Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest Admin Actions on Admin CP Index Details »»
Latest Admin Actions on Admin CP Index
Version: 1.0.4, by derekivey derekivey is offline
Developer Last Online: Jan 2010 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 07-30-2005 Last Update: 10-02-2005 Installs: 44
Uses Plugins
 
No support by the author.

Latest Admin Actions on Admin CP Index
Developer: derekivey
Version: 1.0.4 (Date bug fixed).
vBulletin Version: 3.5
File Edits: 0
Template Edits: 0
New Phrases: 1
Uses Plugins: Yes!
Difficulty: Easy

Description: This hack adds a table on the index of the Admin CP that shows the latest admin actions. It only shows it to super admins, but you can have it show up for regular admins by removing the if statement. It's setup to show the latest 10 actions as default, but you can change that by editing the variable in the code.

This hack is for vBulletin 3.5. If you are using vBulletin 3.0.x, use this hack
3.6.0 Version is located here.

Thanks goes to Hellraider for translating this hack to German.

I am still learning php, and will try and help you if you have any problems with this hack.

I have added a screen shot of this hack in action below.

Please click If you installed this hack.

Thanks!

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 07-31-2005, 04:43 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated hack to version 1.0.1. The only change is that I edited the code to make it more vBulletin complient. Thanks goes to MarcoH64 for telling me how.
Reply With Quote
  #3  
Old 08-23-2005, 09:09 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack has now been updated to version 1.0.2. The only change is that I edited it to add another query to show the admin's username instead of their userid. Let me know if you have any problems.

Derek
Reply With Quote
  #4  
Old 08-24-2005, 07:14 AM
Gizmo5h1t3's Avatar
Gizmo5h1t3 Gizmo5h1t3 is offline
 
Join Date: Aug 2005
Location: ROCHDALE LANCS UK
Posts: 650
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed it, works fine
Reply With Quote
  #5  
Old 08-24-2005, 09:27 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are using that Query in a loop ... really not a good idea.

My suggestion:

Hook: admin_index_main
PHP Code:
if (can_access_logs($vbulletin->config['SpecialUsers']['canviewadminlog'])) 

    
print_table_break();
    
print_table_header($vbphrase['latest_admin_actions'], 7);
    
print_cells_row(array('<b>Log ID</b>''<b>UserID</b>''<b>Date</b>''<b>Script</b>''<b>Action</b>''<b>Extra Info</b>''<b>IP Address</b>',), 00, -5'top'11);
    
$number_of_actions 10// Change this to the amount of admin actions you want shown.
    
$sql "SELECT adminlog.*, user.username FROM " TABLE_PREFIX "adminlog
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = adminlog.userid)
        ORDER BY adminlogid DESC LIMIT 
$number_of_actions";
    
$sqlr $db->query($sql);
    while(
$sr $db->fetch_array($sqlr)) 
    {
        if (!
$sr['extrainfo'])
        {
            
$sr['extrainfo'] = 'N/A';
        }
        if (!
$sr['action'])
        {
            
$sr['action'] = 'None';
        }
        
$sr['dateline'] = vbdate($vbulletin->options['logdateformat']);
        
print_cells_row(array($sr['adminlogid'], "<a href=\"user.php?do=edit&amp;userid=$sr[userid]\">$sr[username]</a>"$sr['dateline'], $sr['script'], $sr['action'], $sr['extrainfo'], $sr['ipaddress'],), 00, -5'top'11);
    }
    
print_table_break();

Reply With Quote
  #6  
Old 08-24-2005, 12:43 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Making it a plugin wouldn't work, because The hook is between the server load and the quick links so, it splits them up. I'll just make those changes and keep it as a code modification.
Reply With Quote
  #7  
Old 08-24-2005, 12:51 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Code I posted above does work just fine as a Plugin on localhost
Reply With Quote
  #8  
Old 08-24-2005, 01:25 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really? It looks like this for me...
Reply With Quote
  #9  
Old 08-24-2005, 01:37 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, that's how it looks for me too.
Not ideal, but better then File Edits IMHO.

Btw: IIRC the Hook will be moved in RC3
Reply With Quote
  #10  
Old 08-24-2005, 04:37 PM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I will make this a plugin when RC3 comes...
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 03:10 PM.


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.07857 seconds
  • Memory Usage 2,308KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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