Separate Themes for Every Major Topic

Started by BoxOfQuestions, February 04, 2016, 05:09:59 PM

Previous topic - Next topic

BoxOfQuestions

Version of SMF: 2.0.9
Php Admin Settings/MySQL Settings? (I'm not sure how to get this):
Host: Arvixe
Link to forum: http://onlinefantasyroleplay.com/index.php?action=forum [nofollow]

What I'd Like to Do

I'm sure this has been addressed before, but I'm not seeing it when I search.  I think that's only poor description and keyword search on my part.  However, I am trying to ape my primary look for each main topic of my forum.  This layout here:


The only difference is that I'd like each topic to have a different background and differently colored dividers.  Below, I've outlined the primary changes I want for each topic:

My topics are:
London - 1856
The Rivulet
Shroomwood
Rhodirélle
Steelwood Chase, etc.



I was able to sort of figure out in the past, but I've forgotten (it's been nearly a year, lol).
Example 1 with a different background.
Example 2 with a different background.

If you notice, I got the background to change, but I can't remember how.  What files and lines of code should I tackle to change the background, title, and dividing headers for each topic?

Thank you in advance for all of your help!

Kindred

you can not change per TOPIC.... but you can set/force a theme per BOARD....   that is directly in the board settings
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

I don't think you can do "conditional CSS" :P but you should be able to do a trick with PHP

AFAIK, the rules in CSS are processed "top to bottom", so if a certain rule with the same name as an existing other appears last, it should overwrite the first one. Antes, help? ;D

If that's the case, you should be able to go to your index.template.php, find this:
// Here comes the JavaScript bits!
And add before something like this:
if (!empty($_REQUEST['topic']))
{
if ($_REQUEST['topic'] == 11111)
echo '
<style>
body
{
background: background_properties_for_topic 11111;
}
</style>';
elseif ($_REQUEST['topic'] == 22222)
echo '
<style>
body
{
background: background_properties_for_topic 22222;
}
</style>';
}

It might do the trick ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Antes

Why not just add current topic's ID to Body as ID then you don't have to do inline CSS and stuff just go CSS and add;

body#topic_ID {background: #RED;}

Idea I'm talking about (the code is not working) (on index.template.php)
if ((!empty($context['current_topic'])) && (!empty($_REQUEST['topic'])))
echo '
<body id="topic_', $context['current_topic'],'">';
else
echo '
<body>';

BoxOfQuestions

#4
I...I don't understand what I just did. :/

Is this something I'm placing in the main template's body (Tambiathar theme) or each topic's theme (London, etc.)?



What file(s) am I editing? 
Where am I putting this code? 
After the code's put in, how do I change the background image?

Antes

no the code (which I wrote) is not for you, I wrote it for margarett.


BoxOfQuestions

So it looks like that definitely allowed me to change the background image.  Worked like a charm, actually.

But is there a way to make all of my forums as transparent/translucent as my main one so that the background image, "Bleeds Through?"

:) Love you guys.  Thanks so much for helping me.

BoxOfQuestions

Guys, this still isn't fixed.

I suppose what I call a topic and a board are vastly different.  How do I have each BOARD have its own theme?

http://www.simplemachines.org/community/index.php?topic=523703.0
http://www.simplemachines.org/community/index.php?topic=543223.0

Kindred

That I already told you...

board settings.
http://wiki.simplemachines.org/smf/SMF2.0:Boards#Modify_Boards
Board theme - This board can have a theme which differs from the forum default theme, and from the member's selected theme


Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


Advertisement: