View Full Version : Must Read Page >> Before Posting New Thread In Forum 1.01
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!
afterlab
03-16-2003, 12:51 AM
Good job on the hack. This will help me with my new thread system I an introducing at my website.
Erwin
03-16-2003, 03:29 AM
You may want to edit your first post. It's very hard to read with all the weird symbols. :)
joeboo
03-16-2003, 04:11 AM
Nice concept. I may use it in the future. And i agree with Erwin :/
partang2
03-16-2003, 05:48 AM
Nice one! Is it possible to get this working when replying to a thread too?
*Clicks Install*
Dean C
03-16-2003, 08:46 AM
Yes i agree with Erwin. Why did you want this hack deleted from the db?
- miSt
Boofo
03-16-2003, 09:34 AM
Excellent hack, N9ne. I don't have a use for this right now but have installed it anyway. I'm sure I will be using it in the near future. Good job! ;)
Dean C
03-16-2003, 10:38 AM
Im definately gon use it but im still curious as to why you didn't want it in the hack db :)?
- miSt
Today at 12:38 PM Mist said this in Post #10 (https://vborg.vbsupport.ru/showthread.php?postid=367324#post367324)
Im definately gon use it but im still curious as to why you didn't want it in the hack db :)?
- miSt
Re-Read my post in the services forum, I accidentally entered it into the DB twice, notice my profile?
I will edit the first post.
Boofo
03-16-2003, 11:52 AM
The php file is kind of hard to read with all of that in it, too, by the way. ;)
Yeah, I noticed that just now too lol, I'll be posting up a modified one with cooler looking stuff on it :p
Arabs Emperor
03-16-2003, 08:28 PM
Great HaCk i like it
install done>>>>%
Smoothie
03-17-2003, 02:29 AM
This is a damn nice hack. Not only is it easy to install, but it provides a unique usefulness. Is something which should be included in vB as a standard feature.
Smoothie
03-17-2003, 05:55 AM
oops! Knew I forgot something..
alkatraz
03-18-2003, 07:26 AM
AWESOME!!!!
/Installed
McDohl
03-22-2003, 09:08 AM
Great job. Thanks. :)
Smoothie
03-30-2003, 04:57 PM
Hey, a little help here please.... installed this hack, it works fine except when I hit preview post, it brings me back to the must read page.
Today at 06:57 PM Smoothie said this in Post #20 (https://vborg.vbsupport.ru/showthread.php?postid=375561#post375561)
Hey, a little help here please.... installed this hack, it works fine except when I hit preview post, it brings me back to the must read page.
If you click proceed after the must read page, after that, does it show you the preview?
Smoothie
03-30-2003, 05:44 PM
Today at 02:20 PM N9ne said this in Post #21 (https://vborg.vbsupport.ru/showthread.php?postid=375577#post375577)
If you click proceed after the must read page, after that, does it show you the preview?
No, it brings you to newreply.php, preview gone...
ok I'll look into the code and try and find a solution...
Today at 07:44 PM Smoothie said this in Post #22 (https://vborg.vbsupport.ru/showthread.php?postid=375586#post375586)
No, it brings you to newreply.php, preview gone...
I just re-read your post, newreply.php? This hack only affects newthread.php...:confused:
Smoothie
03-30-2003, 08:45 PM
I meant newthread.php, sorry.
Smoothie
03-30-2003, 10:49 PM
a definite bug, installed this on an unhacked 2.3. Same problem...preview post don't work
Smoothie
03-31-2003, 03:01 AM
03-15-03 at 09:46 PM N9ne said this in Post #1 (https://vborg.vbsupport.ru/showthread.php?postid=367100#post367100)
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.
Ok, tried the newthread in the full releases forum, and previewing the post works fine.
Yes, I know it works here, but I didn't know that it would affect preview post when creating the hack ;). I'm still looking for a solution, haven't found one yet.
Smoothie
03-31-2003, 04:18 PM
Maybe the guys from vb.org can share some of their knowledge on the hack they use here...
Smoothie
04-01-2003, 12:12 AM
N9ne, I hate to do this, but bumping this thread....
Spitfireisgod
04-01-2003, 04:47 AM
just what i was looking for
/me installs
Smoothie
04-01-2003, 05:45 PM
^ bump ^
trafix
04-02-2003, 08:55 AM
has the preview bug been fixed yet???
Smoothie
04-02-2003, 10:22 AM
No..... bump!
Boofo
04-02-2003, 10:28 AM
I'm unistalling until the bugs are fixed.
/me hits the uninstall button
Smoothie
04-02-2003, 10:32 AM
If it was indeed re-created from the system used here, maybe one of the extra smart vb.org staff could have a look at this hack and give us a fix....
Sorry guys, I've been really busy, as I've been in preparation for my trip to Italy which I leave for tomorrow.
I'll look into this in more depth now, I have an idea on how to fix it, only way to find out is to try it out ;).
Smoothie
04-02-2003, 11:31 AM
cool, hope we can get a fix before you leave.... :)
Try this, in the instructions, it says to find those 2 lines in newthread.php, and replace them with the code given below, well replace that load of code with this instead, and see if it works:
// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1") {
$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 ($HTTP_POST_VARS['action']=="preview")) {
Let me know if it works. I haven't got the hack installed on a board at the moment, and I just made this quick possible fix up...
Smoothie
04-02-2003, 11:44 AM
No, didn't work. Same as before, brings you back in a loop to the must read page after clicking preview.
How about this:
// ############################### start new thread ###############################
if ($action=="newthread" and $foruminfo[mustread]=="1") {
$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 ($HTTP_POST_VARS['action']=="vbform")) {
Smoothie
04-02-2003, 11:54 AM
Same results...
Ok, I've found a fix!
Use this block of code instead!:
// ############################### 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)) {
1.01 Released
Fix: Post Preview: When posting a new thread, you don't get the must read page, when you click on preview post.
First Post and DB Entry updated. New fixed attachment uploaded in first post. Everyone should re-do the step to newthread.php.
Credit: Smoothie for testing out fixes which didn't work lol, and um, me, for finding the simplistic fix :D.
trafix
04-02-2003, 12:32 PM
that means that i can install it now???
well....... right after i update to vb2.3.0
Yep, you can install it now, should work fine :). Enjoy.
Smoothie
04-02-2003, 05:49 PM
yep, preview works fine now. :)
This seems like a perfect hack for certain forums on my site! Great work.
Quick question though -- will this "must read" page show up for everyone who tries to post a new thread, or just new posters who haven't done this before? If it's the former, I'm just worried that oldtimers might get a little annoyed if, every time they post, they're confronted by the same "must read" page that they've already read!
And I have no idea if that paragraph made any sense. :)
Kira, you are correct, everytime someone opts to post a new thread in the forum, the must read page comes up. However it shouldn't annoy anyone too much, as it only requires simply pressing the Proceed button to continue :)
Please click install if you use the hack :).
Just wondering if anyone got it working in 2.2.9 ?
Koutaru
04-28-2003, 01:31 AM
:) is there any way to disable the "proceed" button for a few minutes/seconds? It may be a template mod
Smoothie
04-28-2003, 03:32 AM
Yesterday at 10:26 PM cinq said this in Post #51 (https://vborg.vbsupport.ru/showthread.php?postid=388246#post388246)
Just wondering if anyone got it working in 2.2.9 ? yes, it works fine in 2.2.9
eoc_Jason
04-28-2003, 08:33 AM
I think it would be cool you could add a feature in so they only had to click agree once, unless you made a change to that page then you could reset everyone's info and it would popup the page again for them. Otherwise they might get used to just scrolling and clicking okay without actually reading what is there.
I realize doing that would probably create a lot of extra work thought... ;)
Koutaru - you might be able to disable the button using javascript.
This is a pretty sweet hack, I am planning on adding it in my forum soon.
DelFDgfd_gT
05-21-2003, 03:24 AM
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.
==========
BUG REPORT
==========
If you put a ' in your Must Read message in Admin CP, it will come up with an error.
Example:
-BETA-<br>
Please make sure you have replied to www.forum.com.<br>
If you haven't, please so now.
Error Message:
Database error in vBulletin Control Panel 2.2.9:
Invalid SQL: UPDATE forum
SET
styleid='1', title='Public Chat', description='',
active='1', displayorder='1', parentid='1', parentlist='2,1,-1',
allowposting='1', cancontainthreads='1', daysprune='30',
newpostemail='', newthreademail='',
moderatenew='0', allowhtml='1', allowbbcode='1',
allowimages='1', allowsmilies='1', allowicons='1',
styleoverride='0', allowratings='0', countposts='1',
moderateattach='0', mustread='1',mustreadtext='-BETA-<br>
Please make sure you have replied to [url]www.forum.com.[/url
If you haven't, please so now.', security='1', forumpass='', passtimeout='0'
WHERE forumid='2'
mysql error: You have an error in your SQL syntax near 't, please so now.', security='1', forumpass='', passtimeout='0'
' at line 10
mysql error number: 1064
The code works from start of the bold to end of bold then stops.
The code in bold and underline error says invalid syntax for '.
Reporting this bug.
DelFDgfd_gT
05-22-2003, 03:17 AM
well there is no help, so Im un-installing.
Boofo
05-22-2003, 03:30 AM
Smoothie, have you run into this problem yet?
Smoothie
05-22-2003, 07:30 AM
Today at 12:30 AM Boofo said this in Post #57 (https://vborg.vbsupport.ru/showthread.php?postid=398321#post398321)
Smoothie, have you run into this problem yet?
yes I have.
Smoothie
05-22-2003, 07:31 AM
oh N9ne-
We need a bug fix please!
Boofo
05-22-2003, 08:02 AM
I'm sure it only needs an addslashes somewhere. ;)
Hmm, that's odd, see, in newthread.php you put this code from this hack:
// ############################### 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 :D
Smoothie
05-22-2003, 08:01 PM
N9ne-
yep, noticed this little bug a few weeks ago and forgot to mention it here. Hopefully there will a fix upcoming when you have time.
DelFDgfd_gT
05-23-2003, 01:19 AM
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)
Boofo
05-23-2003, 01:48 AM
Today at 12:57 PM N9ne said this in Post #61 (https://vborg.vbsupport.ru/showthread.php?postid=398551#post398551)
Hmm, that's odd, see, in newthread.php you put this code from this hack:
// ############################### 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 :D
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.
Boofo
05-23-2003, 01:54 AM
Smoothie, try changing this:
mustreadtext='$mustreadtext'
to this in the forum.php:
mustreadtext='".addslashes($mustreadtext)."'
and let me know what happens. Also take this code out from the code above before you test this.
$mustreadtext = addslashes($foruminfo[mustreadtext]);
Smoothie
05-23-2003, 03:11 AM
Yesterday at 10:54 PM Boofo said this in Post #65 (https://vborg.vbsupport.ru/showthread.php?postid=398757#post398757)
Smoothie, try changing this:
mustreadtext='$mustreadtext'
to this in the forum.php:
mustreadtext='".addslashes($mustreadtext)."'
and let me know what happens. Also take this code out from the code above before you test this.
$mustreadtext = addslashes($foruminfo[mustreadtext]);
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.
Boofo
05-23-2003, 09:25 AM
Try changing this:
$mustreadtext = addslashes($foruminfo[mustreadtext]);
to this:
$mustreadtext = $foruminfo[mustreadtext];
DelFDgfd_gT
05-25-2003, 07:14 AM
can u make it for newreply.php too?
Boofo
05-25-2003, 07:17 AM
05-23-03 at 05:25 AM Boofo said this in Post #67 (https://vborg.vbsupport.ru/showthread.php?postid=398877#post398877)
Try changing this:
$mustreadtext = addslashes($foruminfo[mustreadtext]);
to this:
$mustreadtext = $foruminfo[mustreadtext];
Smoothie, did this work for you?
Smoothie
05-25-2003, 03:36 PM
Today at 04:17 AM Boofo said this in Post #69 (https://vborg.vbsupport.ru/showthread.php?postid=399738#post399738)
Smoothie, did this work for you? Haven't tried it yet
Smoothie
05-25-2003, 03:40 PM
I'm a bit confused. Change thismustreadtext='$mustreadtext' To this in forum.phpmustreadtext='".addslashes($mustreadtext)."' Now where does this code go $mustreadtext = $foruminfo[mustreadtext];
Boofo
05-25-2003, 03:47 PM
This is the code you need to change the last part in:
// ############################### 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)) {
Smoothie
05-25-2003, 06:13 PM
yes! Will test more, but it looks like that fixed it.
Boofo
05-25-2003, 06:38 PM
Ok, test it out and post the changes in here for anyone else who has run into this problem. ;)
Was this eventually fixed ?
:)
The Realist
08-25-2003, 01:08 PM
tried it, getting a parse error.
05-25-03 at 09:17 AM Boofo said this in Post #69 (https://vborg.vbsupport.ru/showthread.php?postid=399738#post399738)
Smoothie, did this work for you?
The Realist
08-25-2003, 01:26 PM
Sorted out my parse error. when peeps click on new thread the proceed and cancel shows up ok, but no text. Also if they click reply it does not show at all and they can post without seeing the must read screen?
How can this hack be done so it shows up when they enter a section and not post a thread or reply?
Thanks.
Today at 03:08 PM The Realist said this in Post #76 (https://vborg.vbsupport.ru/showthread.php?postid=428518#post428518)
tried it, getting a parse error.
corsacrazy
09-16-2003, 03:24 PM
wont allow the use of html all i get is
<img border=\"0\" src=\"http://www.XXX.com/yyyl.jpg\" alt=\"text\" width=\"142\" height=\"149\">
and vb code is [*img] doesnt work either :(
gunn0r
01-31-2007, 03:19 PM
Hi there,
does anyone know if this works with vBulletin 3.6.3?
Thanks for any info!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.