vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   (Request) How to Change the link for the "Post new Thread Button" (https://vborg.vbsupport.ru/showthread.php?t=102178)

SlimWicked 12-04-2005 02:19 AM

(Request) How to Change the link for the "Post new Thread Button"
 
In the FORMDISPLAY template you will find this code:

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:
Code:

<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?

Code:

<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

Code:

<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!


All times are GMT. The time now is 12:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01734 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete