Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-27-2001 Last Update: Never Installs: 31
 
No support by the author.

This hack gives the user the option to select whether he wants to be sent to the forum after posting, or to the thread he posted in.
You can select this option in your profile, and also at the bottom of the new post screen.

In newreply.php replace
PHP Code:
// redirect
      
if ($prevpost[visible]) { 
with
PHP Code:
// redirect
      
if ($prevpost[visible] && !$sendtoforum) { 
and also in the same file replace
PHP Code:
// redirect
      
if ($visible) { 
with
PHP Code:
// redirect
      
if ($visible && !$sendtoforum) { 
and still in newreply.php replace
PHP Code:
    if ($bbuserinfo[emailnotification]!=0) {
      
$emailchecked="checked";
    } 
with
PHP Code:
    if ($bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    }
    if (
$bbuserinfo[sendtoforumdef]!=0) {
      
$sendtoforumchecked="checked";
    } 
In newthread.php replace
PHP Code:
} elseif ($visible) {
        
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid"
with
PHP Code:
} elseif ($visible && !$sendtoforum) {
        
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid"
and also in the same file replace
PHP Code:
    if ($bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    } 
with
PHP Code:
    if ($bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    }
    if (
$bbuserinfo[sendtoforumdef]!=0) {
      
$sendtoforumchecked="checked";
    } 
And in poll.php replace
PHP Code:
// redirect
    
if ($threadinfo[visible]) { 
with
PHP Code:
// redirect
    
if ($threadinfo[visible] && !$sendtoforum) { 
Now, in your newreply and newthread templates, add this code
Code:
<br><input type="checkbox" name="sendtoforum" value="yes" $sendtoforumchecked> <b>Go back to forum:</b> after posting would you like to return to the forum.
right after this code
Code:
<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature.  Only registered users may have signatures.
In the modifyoptions template add this code
Code:
<tr>
	<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Send to forum' by default?</b></normalfont><br>
	<smallfont>Using this option will send you back to the forum after posting a new message.</smallfont></td>
	<td bgcolor="{secondaltcolor}"><normalfont>
		<input type="radio" name="sendtoforumdef" value="yes" $sendtoforumdefchecked> yes
		<input type="radio" name="sendtoforumdef" value="no" $sendtoforumdefnotchecked> no
	</normalfont></td>
</tr>
right after this code
Code:
<tr>
	<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Email Notification' by default?</b></normalfont><br>
	<smallfont>Using this option emails you whenever someone replies to a thread that you have participated in.</smallfont></td>
	<td bgcolor="{secondaltcolor}"><normalfont>
		<input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes
		<input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no
	</normalfont></td>
</tr>
In member.php replace
PHP Code:
  $emailnotification=iif($emailnotification=="yes",1,0); 
with
PHP Code:
  $emailnotification=iif($emailnotification=="yes",1,0);
  
$sendtoforumdef=iif($sendtoforumdef=="yes",1,0); 
Also replace
PHP Code:
  $DB_site->query("UPDATE user
                   SET "
.$updatestyles."adminemail='$adminemail',
                      showemail='
$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='"
.addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='"
.addslashes($timezoneoffset)."',emailnotification='$emailnotification',
                      startofweek='"
.addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='
$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
                      nosessionhash='
$nosessionhash'
                   WHERE userid='
$bbuserinfo[userid]'"); 
with
PHP Code:
  $DB_site->query("UPDATE user
                   SET "
.$updatestyles."adminemail='$adminemail',
                      showemail='
$showemail',invisible='$invisible',cookieuser='$cookieuser',
                      maxposts='"
.addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
                      timezoneoffset='"
.addslashes($timezoneoffset)."',emailnotification='$emailnotification',sendtoforumdef='$sendtoforumdef',
                      startofweek='"
.addslashes($startofweek)."',options='$options',receivepm='$receivepm',
                      emailonpm='
$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
                      nosessionhash='
$nosessionhash'
                   WHERE userid='
$bbuserinfo[userid]'"); 
and add
PHP Code:
  if ($bbuserinfo[sendtoforumdef]) {
    
$sendtoforumdefchecked="checked";
    
$sendtoforumdefnotchecked="";
  } else {
    
$sendtoforumdefchecked="";
    
$sendtoforumdefnotchecked="checked";
  } 
right after
PHP Code:
  if ($bbuserinfo[emailnotification]) {
    
$emailnotificationchecked="checked";
    
$emailnotificationnotchecked="";
  } else {
    
$emailnotificationchecked="";
    
$emailnotificationnotchecked="checked";
  } 
And last but by no means least, run this SQL query:
Code:
ALTER TABLE user ADD sendtoforumdef SMALLINT(6) DEFAULT '0' not null AFTER emailnotification
(For more info about running SQL queries go here or here)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-31-2001, 09:10 AM
cyrus's Avatar
cyrus cyrus is offline
 
Join Date: Oct 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, want this but its a long hack. Is it possible you can make a zip of this please. Itll be appreciated.

Thank you
Reply With Quote
  #3  
Old 08-31-2001, 01:28 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm... there's nothing to zip here.
Do you want me to attach the instructions as a text file?
Reply With Quote
  #4  
Old 08-31-2001, 06:50 PM
BBInsider
Guest
 
Posts: n/a
Default

I cant find that anywhere. In newreply.php replace ?? Where is it and how do I get to it? Also is this been tested? thanks!!

http://www.buffalobillsinsider.com/g...ard/index.php3
Reply With Quote
  #5  
Old 09-01-2001, 05:41 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This was tested succesfully on v2.0.3.

I see your question was answered in another thread, so I won't bother.
Reply With Quote
  #6  
Old 09-09-2001, 01:25 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Firefly - excellent job!

I loaded this up and am not having any trouble with new topics or polls or the UserCP but the newreply isn't working. I have the box on the screen so I know it isn't in the template but when I check it, the system ignores it. No error message, it just returns to thread.

What am I missing here?
Reply With Quote
  #7  
Old 09-09-2001, 01:34 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Christine.

Sounds to me as if you didn't make the necessary changes to newreply.php.
Double check that, and get back to me.
Reply With Quote
  #8  
Old 09-09-2001, 01:37 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow - that was quick.

That was my concern - newreply.php was the only one I was thinking would affect it from the changes I saw. Blah. I tried a few times last night and didn't see any mistakes. I shall try again now and let you know!
Reply With Quote
  #9  
Old 09-09-2001, 02:25 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmm - still not working.

Here is what I added to newreply.php - I am including the code above and below as well.
PHP Code:
         // redirect
    
if ($prevpost[visible] && !$sendtoforum) {
        
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
      } else {
        
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
      }
      eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");

    } else {
      if (
$attachmentid and !$foruminfo[moderateattach]) {
        
$DB_site->query("UPDATE thread SET attach = attach + 1 WHERE threadid = '$threadid'");
      } 
PHP Code:
if ($bbuserinfo[userid]!=and !$previewpost) {
    if (
$bbuserinfo[signature]!="") {
      
$signaturechecked="CHECKED";
    }
if (
$bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    }
    if (
$bbuserinfo[sendtoforumdef]!=0) {
      
$sendtoforumchecked="checked";
    }
  }

  if (
$foruminfo[allowicons]) {
    
$posticons=chooseicons($iconid);
  }  else {
    
$posticons="";
  } 
I am going blind over here. What am I missing?
Reply With Quote
  #10  
Old 09-09-2001, 02:41 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird, everything's in place.

Umm, check in your newreply template that the name of the checkbox is sendtoforum. That's really the only thing I can think of...
Reply With Quote
Reply

Thread Tools

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 09:57 AM.


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.04354 seconds
  • Memory Usage 2,359KB
  • Queries Executed 23 (?)
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
  • (5)bbcode_code
  • (20)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (10)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