The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP 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. Code:
<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature. Only registered users may have signatures. 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> 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> PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
ALTER TABLE user ADD sendtoforumdef SMALLINT(6) DEFAULT '0' not null AFTER emailnotification Show Your Support
|
Comments |
#62
|
|||
|
|||
Doesn't seem to. Any other thoughts?
|
#63
|
||||
|
||||
Try changing this:
PHP Code:
PHP Code:
|
#64
|
|||
|
|||
Nope.
And viewing source for the page, I can see that the $sendtofurumchecked is being evaluated as nothing. The account I'm using to test _does_ have the redirect to the thread list turned on in the CP. Any idea why the variable isn't defined? |
#65
|
||||
|
||||
Ok, try this and let me know if it works. I just put it together and haven't tested it thoroughly yet.
In showthread.php: Find: PHP Code:
After it add: PHP Code:
Then put this in your showthread_replybox: PHP Code:
|
#66
|
||||
|
||||
Chen, here is the code I seem to be having problems with? Can you please tell me how to get this hack to work with the Hidden reply hack in this bit of code?
Code:
// redirect if ($visible or $hiddenreply==1 && !$sendtoforum) { $goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid"; } else { $goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]"; } eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");"); } } } 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\");"); |
#67
|
||||
|
||||
Is everyone ready for this? I think I am finally starting to get the hang of this. I fixed my problem stated in the post above.
I replaced this: Code:
// redirect if ($visible or $hiddenreply==1 && !$sendtoforum) { Code:
// redirect if (($visible or $hiddenreply==1) && !$sendtoforum) { Thanks to everyone who has helped me along the way to get to this point. I know it's not a big deal to a lot of you, but it sure is to me to know that I am finally starting to understand some of this now. |
#68
|
||||
|
||||
Er.. is this working with 2.2.7??
|
#69
|
|||
|
|||
Not sure, gonna give it a whirl
|
#70
|
|||
|
|||
Oy. I am screwed up. I can't get this to work on 2.2.7. It is probably me, though, rather than the program. I get the following error when I click "reply" in an existing thread:
Quote:
|
#71
|
||||
|
||||
A really cool hack, and it allllmost works, got it working in both my replys and quickreply box, just one snag... replys work fine, but now trying to start a new topic gives me this:
Parse error: parse error, unexpected T_ELSE in C:\Inetpub\wwwroot\procreatica\forum\newthread.php on line 258 heres line 256 to 274 // redirect } elseif ($visible && !$sendtoforum) { $goto="showthread.php?s=$session[sessionhash]&threadid=$threadid"; } else { $goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid"; } eval("standardredirect(\"".gettemplate("redirect_p ostthanks")."\",\"$goto\");"); } else { //create new thread if ($postpoll) { $visible = 0; } $DB_site->query("INSERT INTO thread (threadid,title,lastpost,forumid,open,replycount,p ostusername,postuserid,lastposter,dateline,iconid, visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($subject))."' ,'".time()."','$forumid','1','0','".addslashes($po stusername)."','$bbuserinfo[userid]','".addslashes($postusername)."','".time()."','$i conid','$visible','$attachcount')"); $threadid=$DB_site->insert_id(); where did i goof? Thanks in advance for any help |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|