vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Advanced Editing Options For Mods & Admins (https://vborg.vbsupport.ru/showthread.php?t=61412)

Xenon 02-09-2004 10:00 PM

Advanced Editing Options For Mods & Admins
 
Ok, another one of my vb2 Hacks has been ported over and Optimized ;)

This hack allows mods and Admins to restrict the edit permissions on a levelbased system.
Admins can disallow everyone to edit that post, while mods just can restrict editing by the author. Supermods can restrict editing by normal moderators as well.

Admins also have additional features:
- Editing the Timestamp of that Post
- Editing the Author
- Editing the IP

Nothing more to explain i think, look at the screenies if you need more infos.

Please don't forget to click install :)

Zachery 02-10-2004 10:07 PM

Very nice :) i have the perfect Site for this one (new forum with uber spammers of younge ages ;))

TheComputerGuy 02-11-2004 11:14 AM

Xenon you so rock!

FleaBag 02-11-2004 01:21 PM

Have always kept an eye out for one of these, should come in handy for allowing users to edit link threads e.t.c. Thanks!

gmarik 02-11-2004 06:19 PM

Nice and easy.

DuffMan 02-11-2004 07:49 PM

Looks great! I'll definitely install once gold gomes out.

Schorsch 02-12-2004 03:28 PM

thanks, but
I'm missing the phrase system :(

Xenon 02-12-2004 07:15 PM

i've planned to add phrases within the next release :)

Gaffer 02-16-2004 12:13 PM

i've been trying to get this to work on RC4 for the last 2 hours and i can't get it to work....

Xenon 02-16-2004 12:20 PM

be sure to follow the instructions correctly.
the Mod was written for RC4, so it surely does work with it

Gaffer 02-17-2004 11:25 AM

ok i might be missing something really small.... i'll give it another go...

Edit - *slaps Self*.....

it works i put the main part of the code in editpost.php after not before.... Cool works *hits Install*

Xenon 02-17-2004 06:02 PM

:)

glad you like it :)

Face Off Mobile 02-18-2004 08:03 PM

trying to install this and every time i try to run the query i get the following

Code:

Error

SQL-query : 

ALTER TABLE post ADD editlevel TINYINT( 3 ) DEFAULT '0' NOT NULL

MySQL said:


Table 'faceoffm_vbulletdb.post' doesn't exist
Back


Xenon 02-18-2004 11:32 PM

do you have a tableprefix set up?
if yes, you of course have to add that prefix to that query as well.

if yopu don't have a table prefix, you have a serious problem, as your post table doesn't exist.

all in all, not a problem with the modification itself

Chris M 02-23-2004 06:04 PM

Xenon: How could I integrate this with the other Editing Hierarchy Hack...

What I mean, is that the hierarchy's from your other take presedence over these ones, unless the post is edited...

So basically, with the other hack, a Super Mod cannot edit an Admins post with the default Hierarchy - You could alter the hierarchy with this hack, which would mean you could set it so that Super Mods upwards can edit it ;)

Could this be done? :)

Satan

Xenon 02-25-2004 08:15 PM

Well as you know, everything can be done.

but i don't have any time to do something like that now.
I'm sure you'll find out yourself how to get that, it isn't really hard from what i remeber :)

Chris M 02-25-2004 08:24 PM

Unfortunately I don't have the time to investigate :(

Maybe I will find time sometime in the near future :)

Satan

Boofo 02-25-2004 09:16 PM

Well, if either one of you 2 extremely busy people find the time to do it, I would appreciate it. I just wish I was a busy as you 2 claim to be. ;)

Chris M 02-26-2004 10:54 AM

If I find the time, I'll let you know Bob :)

Satan

TeH Z0mB1E 02-26-2004 12:56 PM

im getting this error whenever i try and edit posts now.

Parse error: parse error in /home/alienfi/public_html/forums/editpost.php on line 134

please help

Boofo 02-26-2004 02:20 PM

What is the code on that line?

TeH Z0mB1E 02-26-2004 03:52 PM

$bbuserinfo['editlevel'] = $editlevel['author'];

thats it.

Boofo 02-26-2004 04:05 PM

This is what it should look like right before and after that line.

PHP Code:

else
{
 
// someone else is trying to edit this post, permission check will be set up later by originalvb
 // maybe it's a mod just having delete permissions..
 
$bbuserinfo['editlevel'] = $editlevel['author'];



TeH Z0mB1E 02-26-2004 05:03 PM

PHP Code:

     // someone else is trying to edit this post, permission check will be set up later by 

    
originalvb
    
    
// maybe it's a mod just having delete permissions..
    
$bbuserinfo['editlevel'] = $editlevel['author'];
}

// now do permissioncheck
if ($postinfo['editlevel'] > $bbuserinfo['editlevel'])
{
    
print_no_permission();



thats what mine looks like.

Chris M 02-26-2004 05:18 PM

Change:

PHP Code:

      // someone else is trying to edit this post, permission check will be set up later by 

    
originalvb 
     
    
// maybe it's a mod just having delete permissions.. 
    
$bbuserinfo['editlevel'] = $editlevel['author']; 


to:
PHP Code:

      // someone else is trying to edit this post, permission check will be set up later by     
    // maybe it's a mod just having delete permissions.. 
    
$bbuserinfo['editlevel'] = $editlevel['author']; 


:)

Satan

Boofo 02-26-2004 05:20 PM

Thanks, Chris. ;)

TeH Z0mB1E 02-26-2004 05:27 PM

done this and the error has changed to

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/alienfi/public_html/forums/editpost.php(161) : eval()'d code on line 48

Boofo 02-26-2004 05:36 PM

Ok, then take the code that is in there right now, and re-add it from the hack install file. That should fix any mistake you might have made the first time. ;)

TeH Z0mB1E 02-26-2004 06:03 PM

Quote:

Originally Posted by Boofo
Ok, then take the code that is in there right now, and re-add it from the hack install file. That should fix any mistake you might have made the first time. ;)

you mean just install it again?

Boofo 02-26-2004 06:05 PM

Yes. Just copy over the code already there. ;)

TeH Z0mB1E 02-26-2004 06:18 PM

Quote:

Originally Posted by Boofo
Yes. Just copy over the code already there. ;)

took a fresh edit.php and editing it from the install file, followed the instructions very carefully and am still getting :

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/alienfi/public_html/forums/editpost.php(158) : eval()'d code on line 48

line 48 is
PHP Code:

require_once('./includes/functions_editor.php'); 


Xenon 02-27-2004 07:44 PM

regarding your posts before, it seems either your downloaded install file was corrupted during the download, or your upload corrupts the files.

redownload the install file, then use an original editpost.php and apply the hack then.

there is nothing wrong with the hack itself.

@Bob: hmm, no problem, i allow you to do my tests so you can become that busy as well ;)

Boofo 02-27-2004 11:36 PM

I'll whip those tests out for you. Bring 'em on! ;)

Andreas 03-04-2004 04:38 AM

@Xenon
I think this hack has a major bug:
The advanced editing options do not show up on preview.
So if you first click preview and then submit the values will be empty ...

Xenon 03-04-2004 10:56 PM

Damn preview....

yeah you are right.
I've uploaded a bugfixed version. it's jsut a copy paste, as a part of the script has to be on another part in editpost.php

Andreas 03-05-2004 12:08 AM

OK. It does show up on preview now, but it still doesn't work correctly.

Example:
I click edit, change the username, click preview.
Now it still displays the original username (it should display the new one).
I decide to stop editing, but when I visit the thread again the username has been changed (it should only be changend when submitting).

Furthermore, your template code isn't fully XHTML-compliant: it should be selected="selected" instead of just selected.

Xenon 03-06-2004 11:56 AM

thx, for finding out :)

i'll do some changes at that WE, but i'm currently very very busy...

Xenon 03-07-2004 12:48 PM

ok, i've uploaded a new version again.
it should be working now without problems.

djohn 03-07-2004 01:09 PM

How do i update it from v. 1.00?

regards

Xenon 03-07-2004 01:12 PM

just restart with a unmodified editpost.php and apply it again.
as the preview functions could be decided in do update, i have had to change the script too much to provide easy upgrade txts.

the template should be overwritten as well


All times are GMT. The time now is 12:11 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.01678 seconds
  • Memory Usage 1,800KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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