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)

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


All times are GMT. The time now is 12:16 AM.

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.02962 seconds
  • Memory Usage 1,758KB
  • 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
  • (4)bbcode_code_printable
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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