MadamZuZu Wrote:is it possbiel to redirect them to go to a different site when clicked on a particular topic or a thread.
for example. i have a "buy/sell/rent" thread, but i want to redirect them to a different part of the site. is that possible?
Galen Wrote:He means like if they click on a specific thread, can they be redirected.
LOL correct. DO i have eyes:O?
Quote:Yes, you can do that, but it would be easier to make a forum link in the AdminCP instead since that function is built in
Let's be more specific, in
Admin CP > Forum Management > Manage Forums > Edit
There you will find something called
Forum Link whatever link you put there will be the redirection link when you click on that forum in the forums lists.
Quote:The only way I can think of to turn a specific thread into a redirect would be to open global.php and right after the copyright info add
PHP Code:
if ($_GET[tid] == xxx)
{
header("Location: http://www.somesite.com");
}
Replace xxx with the tid of the thread you want to be a redirect and replace "somesite.com" with the URL you want to redirect to.
The concept of redirecting threads this way is so rule of thumb... i know that this might work for now.. but it is not nice to always go and edit the file with every thread we need it to have redirection. Of course this should be a complete plugin, that adds a redirection field to new thread page.
But anyway for now let's stick on the manual way.
Don't use $_GET in mybb use MyBB function. and it is better not to put this thing in the global, this is if it works.
To do thread redirection do the following
open
showthread.php
Find
// Get the thread details from the database.
$options = array(
"limit" => 1
);
Above it add
if($mybb->input['tid'] == X)
{
redirect('http://www.thetechex.net', "You will now be redirected");
}
Replace
X manually by the tid of the thread.
I have used the
redirect function as this will also show a redirection message to the user, therefore nicer