vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Conditional "New Thread" for especific forum (https://vborg.vbsupport.ru/showthread.php?t=179039)

kingMOB 05-13-2008 01:30 AM

Conditional "New Thread" for especific forum
 
Hi, is there a way to create a conditional where a different "new thread" button is displayed just for a specific forum?

Something like: "If this is http://www.********.com/forumdisplay.php?f=324 then use "different button image and different vbphrase" else display "default button and default vbphrase".

I just want that if someone enter this specific forum the "new thread" button and the "vbphrase" for the button be different from the rest of the forum.

Thanks =)

Lynne 05-13-2008 02:32 AM

Yep, I do this on my site.

In FORUMDISPLAY, find (in two places!):
HTML Code:

    <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>
replace with something like (where x,y,z are the forums to show the other link):
HTML Code:

<td class="smallfont"><if condition="$show['newthreadlink']">
    <!-- added upload page link -->
    <if condition="in_array($foruminfo[forumid], array(x,y,z))">
<a href="otherlink.php" rel="nofollow"><img src="$stylevar[imgdir_button]/otherimage.gif" alt="Other Link" 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>


kingMOB 05-13-2008 10:54 AM

Thank you =)

Works like a charm =)


All times are GMT. The time now is 05:29 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.01064 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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