Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Must Read Page >> Before Posting New Thread In Forum 1.01 Details »»
Must Read Page >> Before Posting New Thread In Forum 1.01
Version: 1.00, by N9ne N9ne is offline
Developer Last Online: Jul 2019 Show Printable Version Email this Page

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.

Comments
  #42  
Old 04-02-2003, 11:48 AM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about this:

PHP Code:
// ############################### 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")) { 
Reply With Quote
  #43  
Old 04-02-2003, 11:54 AM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Same results...
Reply With Quote
  #44  
Old 04-02-2003, 11:58 AM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I've found a fix!

Use this block of code instead!:

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)) { 
Reply With Quote
  #45  
Old 04-02-2003, 12:03 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
  #46  
Old 04-02-2003, 12:32 PM
trafix's Avatar
trafix trafix is offline
 
Join Date: Dec 2002
Location: Australia
Posts: 1,021
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that means that i can install it now???

well....... right after i update to vb2.3.0
Reply With Quote
  #47  
Old 04-02-2003, 12:33 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, you can install it now, should work fine . Enjoy.
Reply With Quote
  #48  
Old 04-02-2003, 05:49 PM
Smoothie Smoothie is offline
 
Join Date: Oct 2001
Location: New York
Posts: 1,834
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, preview works fine now.
Reply With Quote
  #49  
Old 04-02-2003, 05:54 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to hear that .
Reply With Quote
  #50  
Old 04-13-2003, 07:51 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #51  
Old 04-13-2003, 09:03 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11184 seconds
  • Memory Usage 2,310KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete