Customizing SMF > SMF Coding Discussion
modify topic first message only
(1/1)
ormuz:
I'm using this code to modify the topic first message:
--- Code: ---if ($message['id'] == $context['first_message'])
--- End code ---
But the changes are made in the first message of every page. Is there a way to do it only for the first message, and not the first message of every page?
Thanks,
Arantor:
What are you trying to do with the first message, exactly?
There's a heap of different things that might be needing to be changed depending on exactly what you're trying to do, and in several different files.
ormuz:
--- Quote from: Arantor on July 05, 2012, 06:22:05 PM ---What are you trying to do with the first message, exactly?
There's a heap of different things that might be needing to be changed depending on exactly what you're trying to do, and in several different files.
--- End quote ---
Let's say that I don't want to display the user avatar just on the topic first message (all the changes I want to do are layout/fronted related).
PS: If I try to do that with that "code/rule" the rule is applyed to every first message in every topic page (like page 1, page 2, etc)...
Thanks for your help!
Arantor:
Use:
--- Code: ---if ($message['id'] == $context['topic_first_message'])
{
...whatever...
}
--- End code ---
Navigation
[0] Message Index
Go to full version