TinyPortal

Development => Support => Topic started by: WillyP on July 30, 2011, 01:29:28 AM

Title: What file is this css?
Post by: WillyP on July 30, 2011, 01:29:28 AM
Link to my testing site:http://pdtest2.shirlsworld.net/index.php?action=tpmod;dl
SMF version: SMF 2.0
TP version: TP 1.0 RC-2
Theme name and version:Copy of default
Browser Name and Version: Firefox 5.0
Mods installed: Ultimate Profile, Avea Media
Related Error messages:Ouch! My eyes!

In the files section, I scroll down and there it is, main_block.png. Dang I thought I removed all that! Open Firebug, ok, this one is in a different stylesheet: http://pdtest2.shirlsworld.net/index.php?action=tpmod;dl

Say what? Where the heck is that, lol?
Title: Re: What file is this css?
Post by: ZarPrime on July 30, 2011, 05:43:59 PM
WillyP,

Whatcha been smokin' Bro'? :D I'm not sure what you are talking about.

Are you referring to the catbg using the main_block.png image?  If that's what you are talking about, is this more what you are looking for ...

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fi714.photobucket.com%2Falbums%2Fww142%2FZarPrime%2FWillyP-Categories-edited.png&hash=ba22bd2e223e0268eab0e6130593c6b5d6769413)

ZP
Title: Re: What file is this css?
Post by: WillyP on July 30, 2011, 10:20:00 PM
Yes, but my question is why does FireBug report the url of the stylesheet as http://pdtest2.shirlsworld.net/index.php?action=tpmod;dl (http://pdtest2.shirlsworld.net/index.php?action=tpmod;dl)? On line 64? Where do I edit this?

:idiot2: ::) :o

Something is putting these style declarations in the head and I don't see how, or where it is coming from. If you view the source Firebug is right, they are there, but they are not in the file.
Title: Re: What file is this css?
Post by: IchBin on August 01, 2011, 04:23:42 PM
That's because the index.php is where that particular CSS is being inserted. The code that inserts that into the page is found in the TPortal.php file on about line 120 if you want to take a look at it.
Title: Re: What file is this css?
Post by: WillyP on August 01, 2011, 04:31:54 PM
Ok, it looks like if I have a file 'tp-style.css' in my theme, that will override the hard codded css? I'll try that.
Title: Re: What file is this css?
Post by: IchBin on August 01, 2011, 04:35:50 PM
It depends on when the CSS is loaded. In the code, if the file is loaded and then the classes are put into the page after the file has been called, then no the file will not override the classes in the index.php file.
Title: Re: What file is this css?
Post by: WillyP on August 01, 2011, 04:47:21 PM
So is there a way to turn them off without a core hack?
Title: Re: What file is this css?
Post by: IchBin on August 01, 2011, 04:55:53 PM
If you put a copy of the tp-style.css file in your custom theme it should not call that inline CSS into your theme.
Title: Re: What file is this css?
Post by: WillyP on August 01, 2011, 05:00:22 PM
// load both stylesheets to be sure all is in, but not if things aren't setup!
if(!empty($settings['default_theme_url']) && !empty($settings['theme_url']) && file_exists($settings['theme_dir'].'/tp-style.css'))
$context['html_headers'] .= '
<link rel="stylesheet" type="text/css" href="' . $settings['theme_url'] . '/tp-style.css?fin11" />';
else
;


If 'default_theme_url and theme_url are set, and '/tp-style.css' is found in the theme directory, shouldn't this stop and never load the css, which comes after the 'else'? Or am I reading this all wrong?  :D

Edit: you posted while I was typing, that's what I meant, thank you!
Title: Re: What file is this css?
Post by: WillyP on August 01, 2011, 05:07:09 PM
That did the trick, case closed! Thanks for the help!