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
Details »»

Version: , by Gutspiller Gutspiller is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-25-2001 Last Update: Never Installs: 1
 
No support by the author.

After you post a message it takes you back to the message you just posted. How would I make it so that instead of doing that, take the users back to forum main forum that they posted in?

Any help is appreciated.

Thanks!

Show Your Support

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

Comments
  #2  
Old 08-26-2001, 05:33 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

.
Reply With Quote
  #3  
Old 08-27-2001, 07:31 PM
samtha25 samtha25 is offline
 
Join Date: Jan 2002
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just what I was looking for!

Thanks, Firefly. You're a wonder.
Reply With Quote
  #4  
Old 08-27-2001, 07:34 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you!

If you want, I can add this as an option, under the "Show Signature" and its friends, something like "Send to forum".
Are you interested?
Reply With Quote
  #5  
Old 08-27-2001, 07:37 PM
samtha25 samtha25 is offline
 
Join Date: Jan 2002
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you mean a user-selectable option in their options, that would be terrific. I was just thinking it would be nice to make it user-selectable.
Reply With Quote
  #6  
Old 08-27-2001, 07:58 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alrighty.

Undo all changes (from my first post).
In newreply.php replace
PHP Code:
      // redirect
      
if ($prevpost[visible]) { 
with
PHP Code:
      // redirect
      
if ($prevpost[visible] && !$sendtoforum) { 
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 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"> <b>Go back to forum:</b> after posting would you like to return to the forum.
right after
Code:
	<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature.  Only registered users may have signatures.
You can change the text, but don't touch the tags please.
That's about it - don't forget the last edit needs to be done on both newreply and newthread templates!

I tested this on my forums, so you shouldn't have any problems.

EDIT:
A little tip - if you want the checkbox to be selected by default, add checked right after value="yes" in the code you added to your templates.

EDIT 2:
This could be expanded even more - having an option for the user in their profile options, and making that option decide wheter the box is checked by default, or not.
If you are interested in this, please let me know and I'll work on it tomorrow.
Reply With Quote
  #7  
Old 08-27-2001, 08:06 PM
Gutspiller's Avatar
Gutspiller Gutspiller is offline
 
Join Date: Dec 2001
Posts: 1,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to make it so the user has control over what the default is?

Some of my users want it one way, and others want it the other way. I don't want to set it to default because then they will have to uncheck it if they don't want it. (I know that's better than not having the checkbox at all) but if it's possible it would be nice to give the users a place in their profile. Is this possible or does this then start to become a hack?
Reply With Quote
  #8  
Old 08-27-2001, 08:12 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by FireFly
EDIT 2:
This could be expanded even more - having an option for the user in their profile options, and making that option decide wheter the box is checked by default, or not.
If you are interested in this, please let me know and I'll work on it tomorrow.
Reply With Quote
  #9  
Old 08-27-2001, 11:09 PM
samtha25 samtha25 is offline
 
Join Date: Jan 2002
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice work, Firefly! You've got two approachs there that forum admins might decide to use.

It would be great to have this in the user profile, but there is something to be said for having it selected from newreply, as in some cases someone might be replying to different posts in a thread as they go and want to return to the thread, while in other cases they might be making only one reply or making their last reply and want to return to the forum.

I can't say I see where someone starting a newthread would want to return to their new post, unless to check it. With Preview, though, it doesn't seem necessary.

So, maybe what would work best is to let the user set a default behavior but then be able to also change it from the posting pages. Heh, not too much to ask, right?

I've seen UBB hacks that let the poster select where to go from the redirect message, but usually it flies by too fast for people to make the selection or pauses in which case it usually becomes annoying to be forced to click.
Reply With Quote
  #10  
Old 08-28-2001, 05:55 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The user now has full control over this.

1. In the newreply and newthread replace
Code:
<br><input type="checkbox" name="sendtoforum" value="yes"> <b>Go back to forum:</b> after posting would you like to return to the forum.
with
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.
in both templates!

2. In the modifyoptions add this code
Code:
<tr>
	<td bgcolor="#DFDFDF"><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="#DFDFDF"><normalfont>
		<input type="radio" name="sendtoforumdef" value="yes" $sendtoforumdefchecked> yes
		<input type="radio" name="sendtoforumdef" value="no" $sendtoforumdefnotchecked> no
	</normalfont></td>
</tr>
right after
Code:
<tr>
	<td bgcolor="#DFDFDF"><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="#DFDFDF"><normalfont>
		<input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes
		<input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no
	</normalfont></td>
</tr>
3. 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";
    } 
4. In newthread.php replace
PHP Code:
    if ($bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    } 
with
PHP Code:
    if ($bbuserinfo[emailnotification]) {
      
$emailchecked="checked";
    }
    if (
$bbuserinfo[sendtoforumdef]!=0) {
      
$sendtoforumchecked="checked";
    } 
5. 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";
  } 
6. 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
This is it. I skipped adding this info to the register because it really doesn't matter, there are some option that are not available there as well, so it's not the end of the world.

Hope this is what you want.
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 02:26 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.05492 seconds
  • Memory Usage 2,349KB
  • 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
  • (7)bbcode_code
  • (16)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
  • (10)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