vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Give an option to send use to forum after posting and not to thread (https://vborg.vbsupport.ru/showthread.php?t=26734)

Sadie Frost 01-11-2002 12:28 PM

I'm using 2.2.1 and it works great :)

NYI Fan 02-16-2002 01:23 AM

works great on 2.2.2 also

I added the same code from newreply and newthread to the editpost template to get it showing in edit screens as well ;)

Thank you so much Firefly - you always have the best stuff!

X-Fan 02-16-2002 07:21 AM

Quote:

Originally posted by NYI Fan
I added the same code from newreply and newthread to the editpost template to get it showing in edit screens as well ;)
Could I trouble you to list what changes you need to do to have it showing on the edit screen as well, please?

NYI Fan 02-16-2002 11:19 AM

Sure no trouble at all (After all, Chen did all the hard work ;) )

The instructions said this:

Quote:

Originally posted by FireFly
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.

I just went into my editpost template, and did the same as he instructed us for the newreply & newthread :D

Also, Firefly had
Quote:

after posting would you like to return to the forum.
I changed it to
Quote:

after posting would you like to return to the forum?
in all 3 templates
(just MY preference)

Hope this helps

ExcErr 02-19-2002 11:17 AM

Ok!!!
The code which in attachment, is it full compatible for vb 2.2.2???

Thank you for your answer!

NYI Fan 02-19-2002 10:15 PM

Yes, I installed this on my vB 2.2.2 and it's working beautifully :)

ExcErr 02-20-2002 04:44 AM

Quote:

Originally posted by NYI Fan
Yes, I installed this on my vB 2.2.2 and it's working beautifully :)
Ok!!! I'll try to install it today!!! Cause before I've made the changes in newreplay.php and when I'm post something, then everytime I'm backing to forum, not to my post :china:

Thanks for you quick answer :)

Barret 03-03-2002 09:46 PM

It works with 2.2.1 as I just installed it!
Great work FireFly and thanks alot!

ExcErr 03-04-2002 02:10 PM

Yeap!
I've install it already!
It's looks great...
Thanks ;=)

ptenthus 06-04-2002 04:16 PM

Firefly,

Is there any good way to make this work with your Quickreply hack?

Boofo 06-05-2002 10:41 AM

In my poll.php file I don't have the exact code that were in the intructions.

Code:

And in poll.php replace

// redirect
    if ($threadinfo[visible]) {


with:

// redirect
    if ($threadinfo[visible] && !$sendtoforum) {

Here's what I have:

Code:

// redirect
    if ($visible) {

What do I need to do to change it to what it should be?

Boofo 06-05-2002 10:57 AM

If you figure it out or get an answer to the question about why that code won't work, I'd be interested in hearing about it. :)

Quote:

Originally posted by Tommy Boy
If I'm not mistaken, you forgot to add:
PHP Code:

$sendtoforumchecked = ($sendtoforum) ? "checked" ""

Right after:
PHP Code:

    $parseurlchecked=iif($parseurl,"checked","");
    
$emailchecked=iif($email,"checked","");
    
$disablesmilieschecked=iif(!$allowsmilie,"checked","");
    
$signaturechecked=iif($signature,"checked",""); 

In both newthread.php and newreply.php. Without those lines, the checkbox will be cleared when you preview the post.

BTW: Any idea why the following line does NOT work?
PHP Code:

$sendtoforumchecked=iif($sendtoforum,"checked",""); 



Sadie Frost 06-08-2002 02:18 AM

Quote:

Originally posted by Boofo
In my poll.php file I don't have the exact code that were in the intructions.

Code:

And in poll.php replace

// redirect
    if ($threadinfo[visible]) {


with:

// redirect
    if ($threadinfo[visible] && !$sendtoforum) {

Here's what I have:

Code:

// redirect
    if ($visible) {

What do I need to do to change it to what it should be?

What I did was look for
Code:

if (!$threadinfo[visible]) {
and replace that :) Hope it works :)

freakyshiat 06-08-2002 08:50 PM

I have both quickreply and quicknewthread installed. The problems I am havng are:

It shows messages as being unread when you go back to forums.

Send to forum by default only works in reply, not quick reply

any suggestions? :)

Boofo 06-08-2002 08:59 PM

I have that in 2 places in poll.php, but no redirect above either one. :)

Quote:

Originally posted by Sadie Frost


What I did was look for
Code:

if (!$threadinfo[visible]) {
and replace that :) Hope it works :)


The Ghost 06-15-2002 09:57 PM

hi,

works this hack with 2.2.6??

Please! :classic:

Admin 06-16-2002 05:36 AM

Yes.

Christine 07-01-2002 04:54 PM

Just a second 'yep' to that -- I loaded this as written into 2.2.6 this weekend and it is working like a champ.

Thanks, Firefly!

:)

ptenthus 07-26-2002 10:49 PM

Firefly,

Do you have a way that quickreply and this hack can co-exist in perfect harmony? (i.e. if a user's default it to return to the thread list, it should work even if they use the quickreply. Currently it doesn't do that).

Boofo 07-26-2002 11:00 PM

in the showthread_replybox template try adding this:

PHP Code:

<input type="hidden" name="sendtoforum" value="$sendtoforumchecked"

after this:

PHP Code:

<input type="hidden" name="rating" value="0"

and let me know if it works. :)

ptenthus 07-26-2002 11:20 PM

Doesn't seem to. Any other thoughts?

Boofo 07-26-2002 11:35 PM

Try changing this:

PHP Code:

<input type="hidden" name="sendtoforum" value="$sendtoforumchecked"

to this, then:

PHP Code:

<input type="hidden" name="sendtoforumdef" value="$sendtoforumchecked"


ptenthus 07-27-2002 10:20 AM

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?

Boofo 07-27-2002 03:01 PM

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:

} elseif ($bbuserinfo['showquickreply']==0) {
    
$replybox='';
} else {
    
$textareacols gettextareawidth(); 


After it add:

PHP Code:

if ($bbuserinfo['sendtoforumdef']) {
        
$sendtoforum 'yes';
    } else {
        
$sendtoforum '';
    } 


Then put this in your showthread_replybox:

PHP Code:

<input type="hidden" name="sendtoforum" value="$sendtoforum"


Boofo 08-20-2002 04:59 AM

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\");");
    }
  }
}

or this piece of code:

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\");");


Boofo 08-20-2002 05:42 AM

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) {

with this:

Code:

// redirect
      if (($visible or $hiddenreply==1) && !$sendtoforum) {

and now the "Hidden reply hack" and the "Option to send User back to forum After posting hack" are like one big happy family. :)

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. :)

Tim Wheatley 09-04-2002 10:06 PM

Er.. is this working with 2.2.7??

Hamma 09-16-2002 09:22 PM

Not sure, gonna give it a whirl

JFry 09-24-2002 04:16 AM

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:

Warning: Unexpected character in input: '' (ASCII=16) state=1 in /home/thebunga/public_html/forums/newreply.php on line 298

Savant 12-23-2002 01:50 AM

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 :) :D

Gutspiller 03-22-2003 10:58 PM

Quote:

09-09-01 at 08:46 AM FireFly said this in Post #12
Bug.

Fix:
In newreply.php replace this
PHP Code:

      // redirect
      
if ($visible) { 

with
PHP Code:

      // redirect
      
if ($visible && !$sendtoforum) { 

Thanks for finding that Christine. :)

Updated main post

What does that fix? I checked my code and I don't have that so I need to fix it, but after I add that fix, what will it fix?

Right now I am having the problem, (Yes I installed this a long time ago and am trying to fix a problem with it) If the user has it selected to return inside the thread, they are returned to the top of the thread. I want it so that it will return them directly to their post. I have that hack that numbers each thread and creates a hyperlink to each thread, but I don't know exactly how to get it to go back to their post after they submit their post.

I tested it and it does look like the problem is with this hack. (I think)

Can somebody please help me? :(

Keyser S?ze 05-12-2003 11:28 PM

standard reply: anyone tested this in 2.3.0?

007 05-17-2003 10:38 PM

I would assume it works fine in 2.3.0 because I just installed it on 2.2.9 with no problems at all.

I also added this option to the registeradult and registercoppa templates.

Also added it to modify user and add user in the admin CP.

Great HACK! :)

AndreaBash 06-12-2003 02:33 AM

Anyone know if it actually works in 2.3? There must have been changes to the PHP files we're supposed to edit. I can't find all the things I'm supposed to replace.

Anyone have an update?

cindyd 06-22-2003 08:10 PM

Thanks for this hack! I just installed it in 2.3 and didn't have any troubles.

Well, I never did find this in the poll.php:

PHP:

// redirect
if ($threadinfo[visible]) {


with

PHP:

// redirect
if ($threadinfo[visible] && !$sendtoforum) {

Cindy

Christine 06-22-2003 08:39 PM

Oops -- double post.

Christine 06-22-2003 08:42 PM

Cindyd,

Try
PHP Code:

// redirect
    
if ($visible && !$sendtoforum) { 


zsmom 10-25-2003 01:24 PM

My members have been begging for this but I just can't get it to work. :disappointed:

I have version 2.3.

When I hit the post reply button I get a parse error in the newreply.php file, line 645 which is right around the last edit for that file. Would anyone be willing to help me???

larryd 11-10-2003 10:54 PM

Ive read the thread and I see a few mentions of how to get this to work with the quick reply box but I dont see anything definite. Can anyone tell me how to implement this with the quick reply box?

larryd 11-13-2003 07:13 AM

Anyone??


All times are GMT. The time now is 05:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01491 seconds
  • Memory Usage 1,854KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (13)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete