News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Where is defined "$context['class']"

Started by moyack, August 15, 2016, 03:09:47 PM

Previous topic - Next topic

moyack

Hi:

As the title says, I need to know in where php source file is defined this variable. This variable defines the icon for the kind of topic it is.








  • I do want to set a custom html tag, a <span> instead of an <img>, in order to make it look consistent with a bootstrap theme I'm doing. Thanks for your support.

    HUGSS!!

Kindred

it depends where you are using it...

the icon is definitely defined in messageindex.template.php
but it may also be be defined in other palces that use the icon.

that variable is not filled unless a message or thread is being loade.d..
Сл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."

moyack

#2
Quote from: Kindred on August 15, 2016, 03:20:31 PM
it depends where you are using it...

the icon is definitely defined in messageindex.template.php
but it may also be be defined in other palces that use the icon.

that variable is not filled unless a message or thread is being loade.d..
I've checked that php file and the only way I see this variable array defined is in the $context['topic'] @messageindex.template.php is with the function "determineTopicClass($context['topics'][$row['id_topic']])".

Where is this function defined?

EDIT: it's found @subs.php.


Kindred

Well, yes... But the contents change in nearly every source files as different pages are loaded.
Сл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: