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)
-   -   More Functions in Edit Post if you are an Admin (https://vborg.vbsupport.ru/showthread.php?t=33761)

nhlrat 04-26-2003 03:35 PM

Quote:

Today at 05:31 PM Xenon said this in Post #130
@nhl: as it's not a problem with my hack you should start an sepearat thread if you have such problems!
Ok thanks just didn't know where to go for the help.

padblaz 06-30-2003 07:40 PM

i've just d/l it
i'm gonna install later in the evening
thanks for this hack ;)

Aaron1 08-22-2003 11:10 AM

first of all great hack!

But just a Q to make this all available to Mods & Supermods:
is this piece of code properly modified to give them access aswell?

PHP Code:

//Admin Edit Hack by Xenon
  
$adminsql "";
  if ((!isset(
$userid) or $userid=="" or $userid==0) and in_array($bbuserinfo['usergroupid'], array(5,6,7))  and $postinfo[userid]!=0) {
    
$userid=0;
    
$adminsql .= "username='Guest',";
  }
  
$userid=intval($userid);
  
  if (!isset(
$pthreadid) or $pthreadid=="" or $pthreadid==0) {
    
$pthreadid=0;
    
$action="deletepost";
  }
  
$pthreadid=intval($pthreadid);
  
  if (!isset(
$ipadd) or trim($ipadd)=="") {
    
$ipadd="";
  } 

I asked because this own't work :(

Xenon 08-22-2003 11:24 AM

yes it seems to be right.
but it's not the only part to change you know, do you?

Aaron1 08-22-2003 11:33 AM

Aha, that should be the reason i presume. Thanks for pointing that out Xenon!
But where should i apply the same modifications aswell?

Sorry for this extra addition request towards your already (IMO almost perfect) hack

Xenon 08-22-2003 12:00 PM

the most important part to change the bbuserinfo into the in_array version is here:
PHP Code:

  // Admin Edit Hack by Xenon
  
if ($bbuserinfo[usergroupid] == 6) {
    eval(
"\$admineditpost = \"".gettemplate("admineditpost")."\";");
  } else {
    
$admineditpost "";
  } 

and of course here:
PHP Code:

  if ($bbuserinfo[usergroupid] == 6) {
    
$datetime=mktime($datetime[hours],$datetime[minutes],0,$datetime[mon],$datetime[mday],$datetime[year])-3600*($bbuserinfo['timezoneoffset']-$timeoffset);
    
$adminsql .= "ipaddress='".addslashes($ipadd)."',dateline='$datetime',editable='$editable',userid='$userid',threadid='$pthreadid',";
  } 

and no problem, for my vb3 version of this hack, it was already planned to add moderator functions to editpost, too :)

Aaron1 08-22-2003 12:20 PM

Thanks Xenon! Hmm it doesn't seem to work somehow, no extra 'edit post' options for moderators nor Super Moderators.
No errors either, works for admin's though...

Here are the actual code i used:

PHP Code:

    //Admin Edit Hack by Xenon
  
$adminsql "";
  if ((!isset(
$userid) or $userid=="" or $userid==0) and in_array($bbuserinfo['usergroupid'], array(5,6,7))  and $postinfo[userid]!=0) {
    
$userid=0;
    
$adminsql .= "username='Guest',";
  }
  
$userid=intval($userid);
  
  if (!isset(
$pthreadid) or $pthreadid=="" or $pthreadid==0) {
    
$pthreadid=0;
    
$action="deletepost";
  }
  
$pthreadid=intval($pthreadid);
  
  if (!isset(
$ipadd) or trim($ipadd)=="") {
    
$ipadd="";
  } 


And ofcourse this one:

PHP Code:

  //Admin Edit Hack  
  
if (in_array($bbuserinfo['usergroupid'], array(5,6,7))) {
    
$datetime=mktime($datetime[hours],$datetime[minutes],0,$datetime[mon],$datetime[mday],$datetime[year])-3600*($bbuserinfo['timezoneoffset']-$timeoffset);
    
$adminsql .= "ipaddress='".addslashes($ipadd)."',dateline='$datetime',editable='$editable',userid='$userid',threadid='$pthreadid',";
  } 


Xenon 08-22-2003 12:22 PM

you have forgotten the first one where the extra template is loaded :)

Aaron1 08-22-2003 12:28 PM

Yes you are right! Thanks!
I am not worthy!* ;-)

*Takes of his hat and bows his head for Xenon

Thoki 08-31-2003 07:38 AM

Thanks for this great Idea to code this!
Installed.

@Aaron1:
Can you please post the complete moification you did?

Thanks at all
Thoki.


All times are GMT. The time now is 12:42 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.01505 seconds
  • Memory Usage 1,765KB
  • 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
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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