• Welcome to Simple Machines Community Forum. Please login or sign up.
December 02, 2021, 02:02:51 AM

News:

Join the Facebook Fan Page.


Question

Started by svpernaut, April 02, 2010, 10:30:12 AM

Previous topic - Next topic

svpernaut

I want a thread post to be redirected to a url of my choice. Is this possible?

Arantor

Not out of the box, no.

It *is* possible however. More details needed about what you're trying to do and how you expect it to work.
No good deed goes unpunished
All helpful urges should be circumvented

svpernaut

so I post a sticky topic that says.
recruiting application, they click on that and it redirects them to the form that I made and they fill it out from there.

Arantor

Are you likely to want to do this with another thread in the future?
No good deed goes unpunished
All helpful urges should be circumvented

svpernaut

yeah, right now I just have a thread that says read here first. Then it just has a link in it for them to click on

Arantor

That's not what I asked.

Are you going to want to do something like this with ANOTHER thread in the future?
No good deed goes unpunished
All helpful urges should be circumvented

svpernaut

yes there will only be 2

Arantor

You need to make those two topics, then tell me what the topic id numbers are and where they're supposed to go and I'll give you the code to edit into Sources/Display.php to manage the redirect.
No good deed goes unpunished
All helpful urges should be circumvented


Arantor

*headdesk*

No... if you click on the http://headshotdistrict.com/index.php?topic=14.0 link, where's it supposed to redirect to?
No good deed goes unpunished
All helpful urges should be circumvented


Arantor

Sources/Display.php

Code (find) Select
function Display()
{
global $scripturl, $txt, $modSettings, $context, $settings;
global $options, $sourcedir, $user_info, $board_info, $topic, $board;
global $attachments, $messages_request, $topicinfo, $language, $smcFunc;

// What are you gonna display if these are empty?!
if (empty($topic))
fatal_lang_error('no_board', false);


Code (after the above, add this) Select
// Topic redirections
if ($topic == 14)
redirectexit('action=form;id=3');
elseif($topic == 15)
redirectexit('action=form;id=1');
No good deed goes unpunished
All helpful urges should be circumvented

svpernaut

Thanks a bunch! that did exactly what I wanted to do!

Advertisement: