![]() |
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 |
use a condition;)
Code:
<a <if condition="$f==xx">href="newfilehere.php"<else />href="newthread.php"</if>>New Thread</a> |
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!
|
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?
|
You need two equal signs, since that is how you compare elements in PHP. So $f == 53 it is.
|
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"> |
Well, here is the link:
Code:
<a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]"> Code:
<a href="<if condition="$foruminfo['forumid'] == 53">otherfile.php<else />newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]</if>"> |
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 |
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. |
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|