News:

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

Main Menu

Displaying text only when creating a new topic but not in its replies

Started by Vahid‎‎ ‎Damanafshan, June 12, 2012, 06:13:19 PM

Previous topic - Next topic

Vahid‎‎ ‎Damanafshan

I'm using the following code to add a bit of text above the Subject box. Everything works fine but I want to display the text only when creating a new topic and not when replying to the topic. In short, I want the text not to appear in the replies to that topic.
echo '
<div class="rules">
', $txt['some_rules_here'] ,'
</div>';

By the way, I've added this code above  " // If an error occurred, explain what happened" in post.template.php.
SMF 2.0.5

Mick.

Not sure where you wants this.... can u take a snapshot and add an arrow to it?

Vahid‎‎ ‎Damanafshan

here is a screenshot. Please note that the code works fine and I have no problem with the code. I just want the text not to appear in replies to the topic.
SMF 2.0.5


Vahid‎‎ ‎Damanafshan

Not really. its an interesing Mod. But as i mentioned in the previous post, I dont know how to hide the text in the replies to the topic. just that.
Can you help me solve this issue?
SMF 2.0.5

Arantor

if (empty($_GET['topic']) && empty($_GET['msg']))
        echo '
<div class="rules">
', $txt['some_rules_here'] ,'
</div>';
Holder of controversial views, all of which my own.


Advertisement: