Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Advanced Editing Options For Mods & Admins Details »»
Advanced Editing Options For Mods & Admins
Version: 1.2.1, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 02-09-2004 Last Update: 06-01-2005 Installs: 119
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 07-08-2004, 11:01 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Slynderdale
Nice hack, just wanted to mention that it installed fine on vBulletin 3.0.3.
Had a little problem with another hack but I managed to fix it. I fyou have the quick edit hack installed and tried to quick edit a post, all the options get reset like IP, userid and name, the date and so on.

If anyone else has this problem heres a quick fix, in the template "showthread_quickedit" find:
HTML Code:
  <form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">
and add under it:
HTML Code:
  <input type="hidden" name="quickedit" value="true" />
Then find in editpost.php:
PHP Code:
  if ($_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author']) 
and change it to:
PHP Code:
  if ($_POST['do'] == 'updatepost' AND  $bbuserinfo['editlevel'] > $editlevel['author'] AND !$_POST['quickedit']) 
and that should solve that problem.

Also I notice a small problem with this hack, if you change the user of the post, the original poster count doesn't decrese and the new user post count doesn't increase so you would have to update the counters to get them accurate again. Other then that, its a good hack.
Might this have some relation to the issue I was mentioning about the info being lost if SuperMods edit a post ?
Reply With Quote
  #113  
Old 07-08-2004, 12:23 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Sly: hmm, a lint to that post

would have fit also ^^

As for the postcount, yes i know, will have to add that in my next update (when i find the time to add what i want to add ^^)
Reply With Quote
  #114  
Old 07-08-2004, 09:18 PM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
@Sly: hmm, a lint to that post

would have fit also ^^

As for the postcount, yes i know, will have to add that in my next update (when i find the time to add what i want to add ^^)
Didn't notice that post.

I made some changes to your hack that fixed up a couple things, one is corectly setting the users pos count and the other is updating the forum last poster and first poster info if you change the user.

After you install this hack, find:
PHP Code:
        // now do changes to thread, if logged in user is an admin and changed the dateline
            
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
                
$postinfo['dateline'] != $newpost['dateline'])
            {
                require_once(
'./includes/functions_databuild.php');
                
build_thread_counters($postinfo['threadid']);
            } 
Replace it with:
PHP Code:
        //------------------------------------------------------------
        
if($postinfo['userid']!=$newpost['userid'] && $foruminfo['countposts'])
        {
          if (
$postinfo['userid'] > 0)
          {
            
$DB_site->query("
                  UPDATE " 
TABLE_PREFIX "user
                    SET  posts=posts-1
                 WHERE userid = 
$postinfo[userid]
                "
);
          }
          if (
$newpost[userid] > 0)
          {
            
$DB_site->query("
                UPDATE " 
TABLE_PREFIX "user
                SET  posts=posts+1
                  WHERE userid = 
$newpost[userid]
              "
);
          }
        }
        
//------------------------------------------------------------
    
        // now do changes to thread, if logged in user is an admin and changed the dateline
            
if ($bbuserinfo['editlevel'] == $editlevel['admin'] AND
                
$postinfo['dateline'] != $newpost['dateline'] OR
                
$postinfo['userid']!=$newpost['userid'])
            {
                require_once(
'./includes/functions_databuild.php');
                
build_thread_counters($postinfo['threadid']);
            } 
Now in includes/function_datastore.php find:
PHP Code:
    // ###################### Start updatethreadcount #######################
    
function build_thread_counters($threadid)
    {
        global 
$DB_site$threadcache
and change it to:
PHP Code:
    // ###################### Start updatethreadcount #######################
    
function build_thread_counters($threadid)
    {
        global 
$DB_site$threadcache$vbphrase
Now a little ways under that find:
PHP Code:
    $lastposter iif(empty($lastposts['username']), $lastposts['postuser'], $lastposts['username']); 
under it add:
PHP Code:
    $lastposter iif(empty($lastposter),$vbphrase['guest'],$lastposter); 
Now a little ways under that find:
PHP Code:
    $firstposter iif(empty($firstposts['username']), $firstposts['postuser'], $firstposts['username']); 
and under it add:
PHP Code:
    $firstposter iif(empty($firstposter),$vbphrase['guest'],$firstposter); 
Thats all, now the posts will show Guest instead of nothing when you enter in a blank field. Also it will now update the post count of those who you change the post to and from.
Reply With Quote
  #115  
Old 07-08-2004, 11:34 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thx for sharing your changes

i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount

but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have )
Reply With Quote
  #116  
Old 07-10-2004, 04:45 AM
Slynderdale Slynderdale is offline
 
Join Date: Mar 2002
Location: New York State
Posts: 576
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
Thx for sharing your changes

i might add, that your code for the postcounts isn't correct 100%
if you have forums where post's aren't counted, then of course you would not have to change the postcount

but i'm sure a lot can use this, until i can come up with the next version (which hopefully has all of that implemented and the special additions i want to have )
Thanks for bringing that to me attention, fixed it by adding:
&& $foruminfo['countposts']
To the If statement.

The only problem now is updating the user's usertitle if they gain/lose enough posts for a different one.
Reply With Quote
  #117  
Old 07-10-2004, 09:33 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



now you see why i didn't add that things to the first version of my hack
Reply With Quote
  #118  
Old 08-31-2004, 02:53 PM
Casparian Casparian is offline
 
Join Date: Dec 2003
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you edit the date, does it bump the post up the list/to the top? Or is it just whats displayed when the post is viewed?
Reply With Quote
  #119  
Old 08-31-2004, 04:42 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it does bump the post up/down the list (in linear mode)
in threaded mode it just changes the displayed time
Reply With Quote
  #120  
Old 09-07-2004, 11:12 AM
Ocean's Avatar
Ocean Ocean is offline
 
Join Date: Mar 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, Xenon! I was wondering if you had any ideas as to when you'll be releasing the next version of this hack?
Reply With Quote
  #121  
Old 09-07-2004, 04:36 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

unfortunatelly not.
I'm currently totally overworked with other things, but i will at some day.

I expect when i'm back at university *gg*
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:41 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07441 seconds
  • Memory Usage 2,356KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete