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)
-   -   Remove Posting Redirection (like vB3) (https://vborg.vbsupport.ru/showthread.php?t=52098)

Hobbes 04-26-2003 01:11 AM

great hack....only one problem i encountered....

this hack code interferes with Xenon's Prevent Double Posting hack found Here

any help? if needed, i'll post my code up:P

Brad 04-26-2003 02:44 AM

Xenon's Prevent Double Posting hack fix:

----------------------------
Open newreply.php
----------------------------

Find:

PHP Code:

if ($visible) {
            
$goto "showthread.php?s=$session[sessionhash]&postid=" $lastpost['postid'] . "#post" $lastpost['postid'];
              } else {
            
$goto "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
              }
              eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
              exit;     
      } 

Replace with:

PHP Code:

if ($visible) {
            
$goto "showthread.php?s=$session[sessionhash]&goto=lastpost&threadid=$threadid";
              } else {
            
$goto "forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
              }
              @
header ("Location: $goto");
              exit;     
      } 

// Dev note - if user has double posted he had the last post in thread anyway. Showthread link was changed because of this.

Hobbes 04-26-2003 05:45 AM

THANKS!!!!!!!!

*dances*....awesome hack *clicks install becuz he forgot earlier* heh *dances*

alkatraz 04-26-2003 08:57 AM

Quote:

04-24-03 at 09:36 PM alkatraz said this in Post #2
will this affect the way vbulletin performs? Why would the developers add the posting redirection if it wasn't required somehow? plz let me know cuz i'd like to install this
Glad to hear it works!


Just tried installing it but my code is much different...

your code says to find:

[code]// redirect
if ($prevpost[visible]) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}
eval("standardredirect(\"".gettemplate("redirect_p ostthanks")."\",\"$goto\");");[/quote]

But My code looks like this:

Code:

// redirect
      if ($visible) {
        $goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
      } else {
        $goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
      }
      if ($closeopen) {
        if (!ismoderator($threadinfo[forumid],'canopenclose')) {
          $permissions=getpermissions($threadinfo[forumid]);
          if (!$permissions[canview] or !$permissions[canopenclose]) {
            show_nopermission();
          } else {
            $firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1");
            if ($bbuserinfo[userid]!=$firstpostinfo[userid]) {
              show_nopermission();
            }
          }
        }

        updateuserforum($threadinfo[forumid]);

        if ($threadinfo[open]) {
          $threadinfo[open]=0;
          $action='closed';
        } else {
          $threadinfo[open]=1;
          $action='opened';
        }

        $threadinfo[notes]="Thread $action by $bbuserinfo[username] on ".vbdate($dateformat." ".$timeformat,time()).". $threadinfo[notes]";
        $DB_site->query("UPDATE thread SET open=$threadinfo[open],notes='".addslashes($threadinfo[notes])."' WHERE threadid='$threadid'");

        eval("standardredirect(\"".gettemplate("redirect_openclose")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");

I haven't done any mods that I can think of that would change the code in this area..?

Brad 04-26-2003 09:37 AM

Looks like you installed the open/close checkbox option for mods and admins.

At any rate the code block you gave me is incomplete so I cant give you a fix. Link me to the hack you have installed (so I can add it to the issues list and make a fix) or give me the compleate block (from // redirect to where redirect_postthanks is evaled) and ill provide you with a fix.

MindTrix 04-26-2003 02:29 PM

**claps hands** amazing :> I h8 that loading page (cause i got 56k) so sometimes ur starin at it for agessss.

Thank youuuuuuuuuuuuu

**clicks install loadsss of times :p **

gwhooooey 04-26-2003 08:47 PM

You wouldn't have to edit anything else if you're using quick reply would you?

Brad 04-26-2003 11:02 PM

Nope, the hack works perfectly with the quick reply box.

MetaRidley 04-27-2003 12:15 AM

I'm having problems, both newreply and newthread are giving parse errors. Maybe it's related to that missing semicolon?
Edit: Figured it out.

Alien 04-27-2003 01:37 AM

Excellent job, it works perfectly for me! :)

I look forward to your editpost modification!


All times are GMT. The time now is 07:15 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.01271 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_code_printable
  • (2)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