PDA

View Full Version : Post Redirection Message (PRM) Hack - Custom "postthanks" messages per forum!


N!ck
13 Oct 2002, 01:19
This hack replaces the message you see after posting a new thread or reply ( the "Thanks for posting! You will now be taken to..." message). You can even set multiple messages if you want to use different messages for each forum!

Screenshots will follow!

++++++++++++++++++++++
Version 1.2 - 10/30/02
++++++++++++++++++++++

I'd really like to thank Xenon - he helped me immensely in the debugging process!

Download: click here (http://www.vbulletin.org/forum/attachment.php?s=&postid=316745)

Upgrading to 1.2: click here for instructions (http://www.vbulletin.org/forum/showthread.php?action=showpost&postid=316745)

Enjoy!

-Nick

N!ck
13 Oct 2002, 01:26
screenshot 1: admin cp

N!ck
13 Oct 2002, 01:28
screenshot 2: admin cp (edit forum)

N!ck
13 Oct 2002, 01:28
screenshot 3: after posting

Matt87
13 Oct 2002, 02:02
VERY Nice... Good Job, A definate install :p

N!ck
13 Oct 2002, 02:14
:D

Velocd
13 Oct 2002, 02:30
Hey nifty idea, *kicks install* ;)

N!ck
13 Oct 2002, 02:36
let me know if anything isn't working quite right...i had to revise the instructions a couple times, even after Xenon worked on them.

ZiRu$
13 Oct 2002, 03:11
I'd rather if it would say RETURN TO FORUM, RETURN TO MESSAGE, RETURN TO INDEX

Smoothie
13 Oct 2002, 03:19
Removed my re-directs long ago...

N!ck
13 Oct 2002, 03:43
oh.

Matt87
13 Oct 2002, 04:12
My forums are screwed right now, but once I fix them... Yes, I'll install :p

Dean C
13 Oct 2002, 11:57
lol cool hack ! :D

- miSt

FleaBag
13 Oct 2002, 15:12
How can I edit the actual HTML of that redirection page?

N!ck
13 Oct 2002, 15:24
if you want to edit the whole page, you'd have to edit the standardredirect template. otherwise, if you want to edit only the html in the box where the message is, you can insert it in your post redirection message.

Erwin
13 Oct 2002, 22:24
Originally posted by Smoothie
Removed my re-directs long ago...

Ditto. :)

N!ck
14 Oct 2002, 00:29
wow.

Bison
14 Oct 2002, 02:25
Why?

N!ck
14 Oct 2002, 03:37
why what?

Bison
14 Oct 2002, 04:28
Would anyone remove the redirector code?

And Nick, for the life of me, I couldn't find this code in newthread.php:

$bbuserinfo['username'] = htmlspecialchars($bbuserinfo['username']);
}
}

N!ck
14 Oct 2002, 04:32
that code should be right above:


// redirect
if ($postpoll) {
$goto="poll.php?s=$session[sessionhash]&threadid=$threadid&polloptions=".intval($polloptions);
} elseif ($visible) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}


if you still can't find it, let me know.

____________________________

on the other note, i guess people might remove the redirects to cut down on bandwidth or something...i'm as mystified as you are though ;)

Bison
14 Oct 2002, 04:41
Couldn't find it ... could I just place this

$newforuminfo=$DB_site->query_first("SELECT * FROM postthanks WHERE postthanksid = '".$foruminfo[postthanksid]."'");

above the code you mention above the //Redirect comment?

N!ck
14 Oct 2002, 05:04
mmm...you could try it; it won't hurt anything. i suspect maybe you've modified that part of the code before... :)

if it doesn't work, let me know what version you have.

thedvs
14 Oct 2002, 12:54
everything worked fine until I came to...

Find:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
moderateattach)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Replace it with:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
moderateattach,postthanksid)
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

etc, in forum.php

Using 2.2.8

N!ck
14 Oct 2002, 14:00
in wordpad, search for ",moderateattach" (w/o quotes) and try to find it. you might have made a modification to that part of the code.

thedvs
14 Oct 2002, 15:44
ok it all worked! thank you for a brilliant hack! just what i was looking for!

N!ck
14 Oct 2002, 23:08
i'm happy for you, and you are very welcome. :)

ZiRu$
27 Oct 2002, 18:17
Originally posted by ZiRu$
I'd rather if it would say RETURN TO FORUM, RETURN TO MESSAGE, RETURN TO INDEX

my bad i didnt realize i can do this for EVERY forum. I will install :) good work

BigJohnson
27 Oct 2002, 23:27
Can someone help me. I only want the same redirection message for a reply and a new thread for the certain forum. How we would go by changing this? All i need is it to change the new thread redirection.

N!ck
28 Oct 2002, 02:37
Originally posted by BigJohnson
Can someone help me. I only want the same redirection message for a reply and a new thread for the certain forum. How we would go by changing this? All i need is it to change the new thread redirection.

it's already worked into the next version, which will be released within 48 hours.

Visionray
29 Oct 2002, 01:26
um, you can do this exact same thing by going into your control panel and editing the redirect templates.

N!ck
30 Oct 2002, 02:44
no you can't

Visionray
30 Oct 2002, 11:50
Oh, well I was mistaken, I see this hack is for different messages in multiple forums. I was talking about changing the message for all news posts in all the forums, which you can do in your admin pc with a template edit.

N!ck
30 Oct 2002, 21:29
I've cautiously removed this from BETA and also added the ability to change messages depending on whether a new thread or a new reply is being posted.

To upgrade, I'd recommend uninstalling and starting over, BUT you can just update by redoing steps 5-7 in readme-prm.txt, uploading prm.php to your admin folder (overwrite old one), issuing the following SQL query, and running the install script again.

DROP TABLE postthanks;
ALTER TABLE forum DROP postthanksid;

The new version is attached; enjoy!

Chris M
30 Oct 2002, 21:43
Nice:)

Satan

N!ck
30 Oct 2002, 23:53
thanks :)

Boofo
08 Jan 2003, 10:33
Originally posted by Erwin


Ditto. :)

How do you do that. Is there a way to globally turn them off?