vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Post New Thread Redirect for one forum (https://vborg.vbsupport.ru/showthread.php?t=68513)

PKRWUD 08-19-2004 09:12 AM

Post New Thread Redirect for one forum
 
Greetings,

I'm really not sure how to title this request, but I will try my best to explain what I'm trying to do. I have a dozen or so forums on my website, and in each one, when you select New Thread, it takes you to newthread.php. What I would like is to be able to change that for one of the forums, so that when someone clicks on the New Thread button, they are instead sent to a different php file. The reason being that for one specific forum, I am trying to install a form that would have to be filled out every time someone wants to start a new thread. I have everything set up, but I can't figure how to change the address for the New Thread button in just one specific forum. I hope this makes sense. If I didn't explain this well enough, please ask any questions, and I will do my best to answer them. I am currently running 3.0.0.

TIA!!!

Take care,
~Chris

AN-net 08-19-2004 03:10 PM

use a condition;)

Code:

<a <if condition="$f==xx">href="newfilehere.php"<else />href="newthread.php"</if>>New Thread</a>
that would be an example;)

PKRWUD 08-19-2004 03:20 PM

Okay, I'm not real bright when it comes to this stuff. I understand the concept of what you're saying, but I don't know what to change in your example to make it work for me, other than changing the file name. What would I put where you wrote $f==xx? What else would I need to do? I feel very close to solving this. Thank you for your help!

PKRWUD 08-19-2004 03:23 PM

Oh, wait, I think I get it. I should enter the forum number there, yes? It's f=53, so would I just write it as $f=53, or do I need two equals signs?

Admin 08-19-2004 03:47 PM

You need two equal signs, since that is how you compare elements in PHP. So $f == 53 it is.

PKRWUD 08-19-2004 04:02 PM

Okay, that makes sense. Hopefully this will be my last question... Below is the part of the file where the link is created for the new Thread button. Where would I substitute the code above into this?

Code:

<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
        <td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]"><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>


Admin 08-19-2004 04:32 PM

Well, here is the link:
Code:

<a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]">
So that's what you want to change. I'd replace it with this:
Code:

<a href="<if condition="$foruminfo['forumid'] == 53">otherfile.php<else />newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]</if>">

PKRWUD 08-19-2004 11:22 PM

Thank you so much for your help! I will give this a try right away, and let you know how it goes.

Thanks again!

Take care,
~Chris

PKRWUD 08-19-2004 11:29 PM

Okay, when I tried to do that, I received this warning...

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/pkrwud/public_html/vbulletin/includes/adminfunctions_template.php(3037) : eval()'d code on line 124

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

PKRWUD 08-19-2004 11:40 PM

Nevermind. Somehow I managed to change the code, but forgot to close the 'if'. I've corrected this, and it works excellent! I thank you very, very much for your time and assistance!

Take care,
~Chris


All times are GMT. The time now is 10:26 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.01008 seconds
  • Memory Usage 1,735KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete