Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 19 Aug 2004, 11:12
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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
Reply With Quote
  #2  
Old 19 Aug 2004, 17:10
AN-net's Avatar
AN-net AN-net is offline
 
Join Date: Dec 2003
use a condition


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

that would be an example
Reply With Quote
  #3  
Old 19 Aug 2004, 17:20
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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!
Reply With Quote
  #4  
Old 19 Aug 2004, 17:23
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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?
Reply With Quote
  #5  
Old 19 Aug 2004, 17:47
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
You need two equal signs, since that is how you compare elements in PHP. So $f == 53 it is.
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #6  
Old 19 Aug 2004, 18:02
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #7  
Old 19 Aug 2004, 18:32
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
Well, here is the link:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

So that's what you want to change. I'd replace it with this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]
Reply With Quote
  #8  
Old 20 Aug 2004, 01:22
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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
Reply With Quote
  #9  
Old 20 Aug 2004, 01:29
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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.
Reply With Quote
  #10  
Old 20 Aug 2004, 01:40
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
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
Reply With Quote
  #11  
Old 23 Aug 2004, 20:57
PKRWUD's Avatar
PKRWUD PKRWUD is offline
 
Join Date: Jan 2003
If you're still there, I have one more question. How do I write it for multiple conditions? For example, lets say I have two files I want it to redirect to, depending on where the member is. I thought using an elseif would work, but it didn't.

Any thoughts?
Reply With Quote
  #12  
Old 23 Aug 2004, 21:23
Chen's Avatar
Chen Chen is offline
 
Join Date: Sep 2001
This doesn't work?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You can add as many conditions as you want:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If it's a bit confusing reading the manual won't hurt.
http://www.vbulletin.com/docs/html/m...e_conditionals
__________________
Chen Avinadav
Formerly vBulletin.org Owner and Founder

[email protected]

Last edited by Chen; 23 Aug 2004 at 21:29.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini Mods Redirect to Forum after Posting New Thread Alan @ CIT Modification Graveyard 25 06 Jul 2007 15:10
[code release] Redirect to forum instead of thread after post Gutspiller vBulletin 2.x Full Releases 42 16 Nov 2001 17:08



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:40.

Layout Options | Width: Wide Color: