TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 290
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 315
  • Total: 315

What file is this css?

Started by WillyP, July 30, 2011, 01:29:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillyP

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?

ZarPrime

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 ...



ZP

WillyP

#2
Yes, but my question is why does FireBug report the url of the stylesheet as 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.

IchBin

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.

WillyP

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.

IchBin

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.

WillyP

So is there a way to turn them off without a core hack?

IchBin

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.

WillyP

// 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!

WillyP

That did the trick, case closed! Thanks for the help!

This website is proudly hosted on Crocweb Cloud Website Hosting.