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 07-29-2002 02:59 PM

it's not allowed to send full vb-files don't forget that ;)

as you said every post would be only admin-editable, you must recheck all the queries if they are exactly what i said...

and default value at post.editable must be 1
recheck that also with phpmyadmin

Chris M 07-29-2002 03:13 PM

Did you back it up before making that change?

Satan

MarkyBuzz 07-29-2002 09:42 PM

Hi Xenon Install has been clicked - thanX for a brilliant hack.

I just wish I new about this one when I copied and pasted all indivdual posts from Postnuke Xforum over to VB which took two days - it looked a little suspiciously like I had made posts and members up due to the irregularity of time and date - now I can go and put the date and times into each post again! Jeez - another 2 days :D

Well Done!

Boofo 07-29-2002 09:49 PM

Thanks again, Xenon for clearing this up for me. This hack rocks! :)

ladyfyre 08-01-2002 02:55 AM

i have a question here......
will this hack allow (and if it won't, could you tell me how to make it) an author to edit a post beyond the boardwide edit time limit if you set the author edit option?

We use the time limit to keep users from causing chaos (we had several who would incite flamewars, then go back and edit what they said so it made others look like the instigators), but occasionally, we run into issues where we need edits made, and it would be MUCH easier if the mods could let the authors do it, rather than having them email the edits to the staff and the staff doing it.

Please help me out on this.......If it takes a lot of work, I will be happy to pay you for it...PPN can verify i am good for the money :)

Xenon 08-01-2002 12:28 PM

For now this function isn't included, but it should be easy to include it.

perhaps i can post a solution later this day, but now i haven't time to do it ;)

no money needed ;)

ladyfyre 08-01-2002 06:40 PM

You will DEFINITELY hit my list of PHP heros if you work this out Xenon :)

Btw.....i have a number of your hacks installed on my site, and have gained a lot from following your work :)

(ok...so yeah, i am kissing butt here....but it never hurts right??)

*grinz*
Seriously though....i do enjoy your hacks.....keep up the outstanding work :)

Xenon 08-01-2002 08:22 PM

Thanks for the nice words ;)

ok, here you are:
open hacked editpost.php

find this:
PHP Code:

if ($postinfo[dateline]<(time()-($edittimelimit*60)) and $edittimelimit!=0) { 

replace it with:
PHP Code:

if ($postinfo[dateline]<(time()-($edittimelimit*60)) and $edittimelimit!=and $postinfo[editable]!=4) { 


then find this:
PHP Code:

for($i=0;$i<4;$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 

change it to:
PHP Code:

for($i=0;$i<5;$i++) $editable[$i]=iif($postinfo[editable]==$i,"CHECKED",""); 



then in template admineditpost:
find
<input type="radio" name="editable" $editable[1] value="1">Author |

before it add:
<input type="radio" name="editable" $editable[4] value="4">Author (no timelimit)|

i think this should be all

ladyfyre 08-01-2002 09:50 PM

hmmm.....i appreciate it bunches Xenon....just one problem :(

i am getting this error when i click the edit post link:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /var/www/html/editpost.php(208) : eval()'d code on line 11

could this be getting hosed by another hack??? or am i more clueless than i thought ???



Sorry...forgot to add....my line 208 is this:


eval("\$admineditpost = \"".gettemplate("admineditpost")."\";");

Xenon 08-01-2002 10:02 PM

yes tested it myself and also get this error, seems there are no -1 allowed, i'll edit my post above and change it so it'll work :)

ladyfyre 08-01-2002 10:04 PM

ok....cool then maybe i am not totally hopeless after all!!!!

Thanks again for the help on this!

Boofo 08-01-2002 10:30 PM

Xenon,

How could I add this to the one you did for me a while back? :)

ladyfyre 08-01-2002 10:35 PM

you sooooo rock :)

ladyfyre 08-02-2002 01:12 AM

uh oh :(

Xenon...sorry to be a pain, but i just ran a full test with a standard registered member who was the author of the post, and it still gave them the 60 minute time limit error msg :(

Xenon 08-02-2002 10:35 AM

@ladyfyre: you must have done something wrong, have tested it on my local board and it works as it should.
be sure you have this line in your template:
Code:

<input type="radio" name="editable" $editable[4] value="4">Author (no timelimit)|

@boofo: very easy: just change all 4 to 5 and all 5 to a 6 in the instructions i gave ladyfyre

matthew tucker 12-18-2002 06:49 AM

Thanks Xenon this is a useful hack - I have clicked install ;-)

No, how can I edit the THREAD starter and THREAD date? Could you add that function?

The reason is I have a number of single-post threads I am uploading for historical reasons and want the original dates on them at top level. I can easily change post dates with your hack, but not thread dates - unless I'm missing something!

thanks

Xenon 12-18-2002 03:51 PM

well, after you editet the first posts' dates go to your Admincp, there go to update counters and there you find update threads :)

it will update the threadposter and the creation date :)

Automated 01-02-2003 09:55 PM

What query should i run to un edit the SQL table as i have uninstalled this hack.

Thanks
Matthew

Xenon 01-03-2003 09:14 PM

i think it's
[sql]ALTER TABLE post DELETE editable[/sql]

but you shoul do this via PHPMyAdmin, it's more save ;)

sbywebs 02-05-2003 10:18 AM

Hiya,

Everything works great except one thing ...
On the forum home page, the last post time does not update. Even in the actual forum, it does once you update counters => update threads.

Any solutions?

Xenon 02-05-2003 11:19 AM

well, yes, you are right here.
the point is, it's possible with one or two extraqueries, but it happens just if you edit the last post in a forum, or edit one into the last post, so it's rarely needet to update the forum, and so it think it's not neccesary.

if you really need a solution, i can give you the code of course :)

sbywebs 02-05-2003 02:16 PM

that would be great, please do! :) I need it for my system log forum.

Xenon 02-05-2003 02:44 PM

ok, in editpost.php just before this:
PHP Code:

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

you should add this:
PHP Code:

if($bbuserinfo['usergroupid'] == and $foruminfo['lastpost'] < $datetime) {
$DB_site->query("UPDATE forum SET lastpost='".$datetime."',lastposter='".addslashes($postusername)."' WHERE forumid IN ($foruminfo[parentlist])");


it should work.
the other method would be tu run the upgrade script automatically if this doesn't work, but that would mean som queries again ;)

sbywebs 02-05-2003 07:11 PM

Nope it doesnt :(

Yesterday 07:32 PM
by JB

is what it says at the home page of the forums (www.xaviasupport.com) even though i edited it to say 8 PM, and i updated all counters :(

Xenon 02-10-2003 04:10 PM

hmm, i will look into this problem deeper within the days :)

for now i've uploaded a new version, which has the edittimelimit modification included which was in this thread already, and also optimized the code a (very) little bit.

subu1 04-11-2003 12:32 PM

hoffe es nimmt mir jetzt keiner krum das ich hier in deutsch reinschreibe, aber ich versuche krampfhaft durch zusteigen, mist mein english *heul*

Wollte nur kurz fragen was muß ich machen das die Moderatoren auch in diesen Deinen Hack Genuß kommen.

sorry for my german post, but my english ist not the best

grüße/greetz subu1

Xenon 04-11-2003 03:56 PM

einfach jedes $bbuserinfo[usergroupid]==6 durch in_array($bbuserinfo['usergroupid'], array(5,6,7)) ersetzen :)

Boofo 04-11-2003 04:13 PM

Quote:

Today at 11:50 AM Xenon said this in Post #107
einfach jedes $bbuserinfo[usergroupid]==6 durch in_array($bbuserinfo['usergroupid'], array(5,6,7)) ersetzen :)
Which means? ;)

Dean C 04-11-2003 05:55 PM

subu1 swore in german lol!

Xenon 04-11-2003 09:03 PM

boofo it means replace $bbuserinfo... with in_array...

Boofo 04-11-2003 09:14 PM

Oh, ok. Thanks. ;)

nhlrat 04-19-2003 04:03 AM

This hack seems to exist, just obtained site so didn't install it ourselves, however when an admin tries to edit from the edit icon in the post it says edit successful but actually deletes the post. Could this be something to do with this hack or just another problem? Thanks for the help.

Xenon 04-19-2003 11:35 AM

nope normally impossible with my hack, that's another problem.

nhlrat 04-19-2003 12:08 PM

Ok, thanks for your response!!!

Sharg 04-21-2003 11:45 PM

Hello,
I just installed the hack, and it seems to work great, congratulation.

I wish to know if this hacks alter the vb database in a way that may interfer with upgrade to vb3.0.
I guess not, since it only create a new distinct table, but can you confirm ?

Thanks,
Sharg

Xenon 04-22-2003 07:37 PM

i haven't seen the vb3 DB scheme yet (it's even not fully finished right now)
Normally it shouldn't make any problems, but i can't proove it, as long as vb3 isn't out ;)

Sharg 04-22-2003 09:28 PM

I don't know why but when I change the date of my single post threads, it will still show the previous unmodified date in vbhome lite is if I had not changed the date....

Do you know how to fix this ?

Thanks,
Sharg

Xenon 04-22-2003 10:53 PM

the hack just changes the dateline of the post.
vbhome reads the dateline from the threadtable.

Jacko 04-23-2003 11:56 AM

excellent hack, clicks INSTALL.

works a treat :chinese:

Sharg 04-23-2003 04:36 PM

Quote:

Yesterday at 11:53 PM Xenon said this in Post #118
the hack just changes the dateline of the post.
vbhome reads the dateline from the threadtable.

And there is no way for the hack to update threadtable too ?

Thanks
Sharg


All times are GMT. The time now is 04:17 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.01231 seconds
  • Memory Usage 1,827KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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