Version: 1.00, by N9ne
Developer Last Online: Jul 2019
Version: 2.3.x
Rating:
Released: 03-15-2003
Last Update: Never
Installs: 19
No support by the author.
Must Read Page Before Posting In A Forum
> A hack by N9ne, Copyright 2003+
> Hack created on March 16th 2003
Description: This hack will allow you to specify,
on a per forum basis, if a must read page comes up,
when someone tries to post a new thread in that
forum. You may use HTML code in the message.
After reading the page, the user is presented with two
options.
One: 'Proceed'; This will move them onto the page where
they can create the thread (ie. type up the post, subject,
etc.).
Two: 'Cancel'; This option will take them back to the forum.
Queries to run: 1
Files to modify:
admin/forum.php
newthread.php
Templates to add:
newthread_mustread
For: vB 2.x.x (created on 2.3.0)
ChangeLog
1.01: 2nd April 2003: BugFix: Post Preview now works.
Demo: Try posting a new thread in the full releases forum here, it brings up a must read page, i've re-created the system.
Credit: To DrkFusion for helping me with a HTTP_POST_VAR problem.
Note: Download the attached file and open in a text editor to view installation instructions!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Hmm, that's odd, see, in newthread.php you put this code from this hack:
PHP Code:
// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1" and !$previewpost and !$preview) {
$mustreadtext = addslashes($foruminfo[mustreadtext]);
eval("dooutput(\"".gettemplate("newthread_mustread")."\");");
exit;
} elseif (($HTTP_POST_VARS['action']=="postnewthread" and $foruminfo[mustread]=="1") or ($action=="newthread" and $foruminfo[mustread]=="0") or ($previewpost)) {
It already has an addslashes there, so I don't know why it's doing this...
I'm out of ideas, maybe I'll think of something later. Right now I can't do anything as I have some huge exams to take, this whole week actually [some may have noticed my absence at vb.org], I've only got my last 2 tomorrow and then I will be back
I have a little request. Instead of making this work in a certain forum, how can it be done when visiting the index.php?
Basically, when you visit my site, you get the MUST READ page, you click Proceed, and you can view the forums.
Also, I'd like it so that you only have to click it ONE time...
If the index.php must read is too much for you, can you tell me two things...
1. how to enable it in newreply.php
2. only click proceed once. (cookies)
Today at 12:57 PM N9ne said this in Post #61 Hmm, that's odd, see, in newthread.php you put this code from this hack:
PHP Code:
// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1" and !$previewpost and !$preview) {
$mustreadtext = addslashes($foruminfo[mustreadtext]);
eval("dooutput(\"".gettemplate("newthread_mustread")."\");");
exit;
} elseif (($HTTP_POST_VARS['action']=="postnewthread" and $foruminfo[mustread]=="1") or ($action=="newthread" and $foruminfo[mustread]=="0") or ($previewpost)) {
It already has an addslashes there, so I don't know why it's doing this...
I'm out of ideas, maybe I'll think of something later. Right now I can't do anything as I have some huge exams to take, this whole week actually [some may have noticed my absence at vb.org], I've only got my last 2 tomorrow and then I will be back
You are adding slashes as you pull it from the db. You need to add slashes when you add it to the db in the query.
If I use your code, I can add a must read in the admin cp for a forum that has a ' character. But when i click on new thread, the must read contains no text. If I change only the first code in forum.php, it works, but I get this: haven/t instead of haven't.