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)

Xenon 04-23-2003 04:45 PM

nope, currently not, and i don't have much time these days for releasing new versions.

it's on my plan of the vb3 version, but for now you have to update threadcounters if you want to change the dateline of a thread

Sharg 04-23-2003 04:51 PM

Thanks for your answer.
Well, In fact I tried to update all counters (except search index reindex) and still vbhome did show the non modified date.

Cordially,
Sharg

Boofo 04-24-2003 08:36 PM

Quote:

Yesterday at 11:45 AM Xenon said this in Post #121
nope, currently not, and i don't have much time these days for releasing new versions.

it's on my plan of the vb3 version, but for now you have to update threadcounters if you want to change the dateline of a thread

This seems to work fine:

Add:

PHP Code:

  updatethreadcount($threadinfo[threadid]);
  
updateforumcount($threadinfo[forumid]); 

Right above:

PHP Code:

  eval("standardredirect(\"".gettemplate("redirect_editthanks")."\",\"showthread.php?s=$session[sessionhash]&postid=$postid#post$postid\");"); 

My question is, will this add any extra queries or server load?

Boofo 04-24-2003 09:34 PM

Quote:

Yesterday at 11:51 AM Sharg said this in Post #122
Thanks for your answer.
Well, In fact I tried to update all counters (except search index reindex) and still vbhome did show the non modified date.

Cordially,
Sharg

What version of vbHome Lite are you using? I use 3.8 and had the same problem but just fixed it. ;)

Xenon 04-25-2003 11:30 AM

Boofo: yes, because the forum and the thread tables have to be updated, it will add queries :)

so make sure they're just called if you've done an admin edit ;)

Boofo 04-25-2003 11:34 AM

Quote:

Today at 07:30 AM Xenon said this in Post #125
Boofo: yes, because the forum and the thread tables have to be updated, it will add queries :)

so make sure they're just called if you've done an admin edit ;)

It will only add 2 queries, right?

And where do I need to put them to only do it after an Admin edit? Right now I have them below:

PHP Code:

 //Admin Edit Hack
  
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',";
  }
  
$DB_site->query("UPDATE post SET " $adminsql "title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',showimage='$showimage',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'"); 


Xenon 04-25-2003 11:51 AM

it will add 4 queries per function so in sum 8 queries in total

the position is right, but you should put it into an if block so it will just be executed if you're an admin :)

Boofo 04-25-2003 11:58 AM

Quote:

Today at 07:51 AM Xenon said this in Post #127
it will add 4 queries per function so in sum 8 queries in total

the position is right, but you should put it into an if block so it will just be executed if you're an admin :)

Like this?

PHP Code:

  if ($bbuserinfo[usergroupid] == 6) {
  
updatethreadcount($threadinfo[threadid]);
  
updateforumcount($threadinfo[forumid]);
  } 

I didn't know that each of those functions added 4 queries. How come so many?

Also, is there a way to make a checkbox that when ticked will update the post with the current date and time that you are editing the post (like a newreply or newthread) and if not ticked, will just update it as normal (like if you manually change the date or time)?

nhlrat 04-26-2003 03:10 PM

Quote:

04-19-03 at 01:35 PM Xenon said this in Post #113
nope normally impossible with my hack, that's another problem.
Any experts care to help a newbie and shed some light on this file of mine? I'm guessing it's something pretty simple, but don't have enough knowledge yet. Thanks guys!

Xenon 04-26-2003 03:31 PM

@nhl: as it's not a problem with my hack you should start an sepearat thread if you have such problems!

@boofo: correctly that was what i meant ;)
look into functions.php to see why so many queries are needed ;)
also yes it would be possible to add a checkbox for that, but i don't have any time to work on this these days...


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.01345 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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