Log in

View Full Version : (Request) How to Change the link for the "Post new Thread Button"


SlimWicked
12-04-2005, 02:19 AM
In the FORMDISPLAY template you will find this code:

<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>

If i'm not mistaken, this code displays the newthread button that you click to start a new thread. Is it possible to to edit this so that if a user is in a certine forum (for example forumdisplay.php?f=7) I can have this "Post new thread" button link to what ever I want.

Is this possible? I just can't seem to figure this out.

Hope someone can help.

Slimwicked

Chris M
12-04-2005, 02:21 AM
You could use conditionals, such as:
<if condition="$foruminfo[forumid]==7">what you want here<else />new thread button here</if>

Chris

SlimWicked
12-04-2005, 02:33 AM
Hi and thanks cris for your help. but i'm having a bit of trouble. This is what I have but doesnt seem to work. can you tell me what I did wrong?


<tr valign="bottom">
<td class="smallfont"><if condition="$foruminfo[forumid]==7"><a href="newthread.php?do=mp3post" rel="nofollow"><else /><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></if><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>

and this is what I added to the code above.

<if condition="$foruminfo[forumid]==7"><a href="newthread.php?do=mp3post" rel="nofollow"><else /><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></if>

Chris M
12-04-2005, 02:46 AM
<tr valign="bottom">
<td class="smallfont"><if condition="$show['newthreadlink']"><if condition="$foruminfo[forumid]==7"><a href="newthread.php?do=mp3post" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a></if><else />&nbsp;</if></td>
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
That should work :)

Chris

SlimWicked
12-04-2005, 02:59 AM
wow! That worked perfectly! Thanks a million. But I have just 1 final question for you. If I wanted to add more conditionals just like the one you help me with, what should I just add?

correct..i have figured it out! Thanks alot for all your help!