PDA

View Full Version : Latest Admin Actions on Admin CP Index


derekivey
07-30-2005, 10:00 PM
Latest Admin Actions on Admin CP Index
Developer: derekivey
Version: 1.0.3 (Fixed Several Bugs).
vBulletin Version: 3.0.13
File Edits: 1
Template Edits: 0
New Phrases: 1
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.0.13. If you are using vBulletin 3.5, use this hack (https://vborg.vbsupport.ru/showthread.php?t=93245)

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 https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=93243) If you installed this hack.

Thanks!

MThornback
07-31-2005, 01:52 AM
Im probably just tired...but for those comming behind me...the sql hes talking about is in the code for the adminCP NOT a query :p (just in case)

It works fine on 3.0.7 incedentally ;)

*Installed

derekivey
07-31-2005, 02:16 AM
Yeah, sorry if I wasn't clear lol.

Marco van Herwaarden
07-31-2005, 10:43 AM
Thank you for sharing your work. If you would make the following change, it would be more compliant to how vB handle queries, and a table prefix would automatically be use:
Old:
$sql = "SELECT * FROM adminlog ORDER BY adminlogid DESC LIMIT $number_of_actions";
$sqlr = mysql_query($sql) or die(mysql_error());
while($sr = mysql_fetch_array($sqlr)) {

Change to:
[php]$sql = "SELECT * FROM " . TABLE_PREFIX . "adminlog ORDER BY adminlogid DESC LIMIT $number_of_actions";
$sqlr = $DB_site->query($sql);
while($sr = $DB_site->fetch_array($sqlr)) {
/[php]

derekivey
07-31-2005, 01:36 PM
Thanks,

I just got vBulletin, so I still need to figure all of this stuff out. I will change it to that for the next release of this mod. I also want to try to convert the userid to the username, but not sure how yet.

Derek

derekivey
07-31-2005, 04:29 PM
Updated hack to version 1.0.1. The only change in it is, it is more complient with vBulletin, I made the changes Marco suggested.

Corriewf
07-31-2005, 06:03 PM
Good hack!

derekivey
07-31-2005, 06:44 PM
Thanks :)

derekivey
08-23-2005, 09:01 PM
Ok, I have updated this mod to version 1.0.2. I added an extra query to show the username of the admin instead of the userid. If anyone has any problems with it let me know.

Derek

derekivey
10-03-2005, 08:36 PM
Hack updated to fix a few bugs. Please see the txt file on how to upgrade.