The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#22
|
|||
|
|||
Just to make this easier for everyone, here is the complete corrected package:
Corrected modslog.php: Code:
<?php // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### PRE-CACHE TEMPLATES AND DATA ###################### $phrasegroups = array(); $specialtemplates = array(); // ########################## REQUIRE BACK-END ############################ require_once('./global.php'); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## print_cp_header('Modification Log'); if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'list'; } if ($_REQUEST['do'] == 'list' ) { $modsquery = $DB_site->query("SELECT * FROM modslog ORDER BY date"); if ($modsquery){ print_form_header('modslog', 'showset'); print_table_header('Modification Log', 5); print_cells_row(array( 'Name', 'Version', 'Author', 'Date Installed', //'Show Users' 'Actions' ), 1, '', 1); while($mod = $DB_site->fetch_array($modsquery)){ $vbphrase['modslog_actions_compiled'] = construct_phrase($vbphrase['modslog_actions'], $mod['modid']); $vbphrase['modslog_name_compiled'] = construct_phrase($vbphrase['modslog_name'], $mod['name'], $mod['description']); $date = $date = date("D-d-M-y",$mod['date']); print_cells_row(array($vbphrase['modslog_name_compiled'],$mod['version'],$mod['author'],$date,$vbphrase['modslog_actions_compiled']),0,''); } } else { print_form_header('modslog', 'showset'); print_table_header('Modification Log', 1); print_cells_row(array('There are currently No Modifications in the Log'),0,''); } print_table_footer(); } //Form to add a mod to the list if ($_REQUEST['do'] == 'add' ) { print_form_header('modslog', 'new'); print_table_header('Add Modification to Log'); print_input_row('Name of Modification', 'name'); print_input_row('Description of the Modification\'s function', 'description'); print_input_row('Modification version number', 'version'); print_input_row('Author name', 'author'); print_submit_row($vbphrase['save'], 0); } //Form to edit a mod in the list if ($_REQUEST['do'] == 'edit' ) { $id = $_REQUEST['id'] ; $id = addslashes($id); $modsquery = $DB_site->query("SELECT * FROM modslog WHERE modid=$id "); $mod = $DB_site->fetch_array($modsquery); print_form_header('modslog', 'modify'); print_table_header('Edit Modification in the Log'); print_input_row('Name of Modification', 'name', $mod['name']); print_input_row('Description of the Modification\'s function', 'description', $mod['description']); print_input_row('Modification version number', 'version', $mod['version']); print_input_row('Author name', 'author', $mod['author']); construct_hidden_code(id, $id); print_submit_row($vbphrase['save'], 0); } if ($_REQUEST['do'] == 'new' OR 'modify' ) { $name = addslashes($_POST['name']); $description = addslashes($_POST['description']); $version = addslashes($_POST['version']); $author = addslashes($_POST['author']); $id = addslashes($_POST['id']); } if ($_REQUEST['do'] == 'new' ) { $date = TIMENOW ; $DB_site->query("INSERT INTO modslog (name,description,author,version,date) VALUES ('$name','$description','$author','$version','$date')"); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_modadded'); } if ($_REQUEST['do'] == 'modify' ) { $DB_site->query("UPDATE modslog SET name='$name',description='$description',author='$author',version='$version' WHERE modid='$id' "); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_modedited'); } if ($_REQUEST['do'] == 'delete' ) { $id = $_REQUEST['id'] ; $id = addslashes($id); $DB_site->query("DELETE FROM modslog WHERE modid='$id' "); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_moddeleted'); } echo '<div align="center"><br /><a href="modslog.php" > [Return to Modificaton Listing] </a> - <a href="modslog.php?do=add" > [Add a Modification to the Log] </a></div>' ; print_cp_footer(); ?> Code:
Corrected Instructions: This hack will add a new option under Logs and Statistics in your Admin CP. It allows you to track which modifications you have installed on to your board by filling out the form in the hack to contain a name, Author name, Version Number, Description and an Installation date. This hack can be made dynamic so you do not have to add the info your self but a hack releaser would just need to add an extra query to the install to do it for you. In the future I intend to extend this to log which files have been modified in the hack and what queries have been run, possibly through making it into an installation system. This hack was made out of a want to track what I have installed simply and without having to go to the trouble of installing the HTL. If the Author of that hack wants me to remove this I will as the original idea was essentially his. --Copyright 2004 Stewart Ritchie/burnist/acid burn/acid/dogwood (me basicly). --Provided as is, use at your own discression. I am not responsible if your vBulletin screws up so back up both files before installing. --Can only be distributed at vB.org ############################################################################### ############################################################################### -------------------------------------------------------------------- File Uploads -- Upload modslog.php to /admincp/ -------------------------------------------------------------------- ############################################################################### ############################################################################### -------------------------------------------------------------------- Database Query -- Run This in PHPMyAdmin or another tool for DB Manipulation -------------------------------------------------------------------- CREATE TABLE modslog ( modid int(10) auto_increment, name varchar(250), description varchar(250), author varchar(250), version varchar(250), date int(10), PRIMARY KEY(modid)) ############################################################################### ############################################################################### -------------------------------------------------------------------- File Edits -- One One, its in admincp/index.php -------------------------------------------------------------------- ~~~~~~~~~ ~Find~~~~ ~~~~~~~~~ construct_nav_option($vbphrase['scheduled_task_log'], 'cronlog.php?do=choose', '<br />'); ~~~~~~~~~~~~~~~~~ ~Below Add~~~~~~~ ~~~~~~~~~~~~~~~~~ construct_nav_option('Modification Log', 'modslog.php', '<br />'); ############################################################################### ############################################################################### -------------------------------------------------------------------- Phrases -- These get added to the Control Panel Global Phrase Group -------------------------------------------------------------------- Title: modslog_actions Text : <a href="modslog.php?do=edit&id={1}"> Edit Entry </a> <a href="modslog.php?do=delete&id={1}"> Delete Entry </a> Title: modslog_name Text : <b>{1}</b><br /> {2} -------------------------------------------------------------------- Phrases -- These get added to the Control Panel Stop Message Group -------------------------------------------------------------------- Title: modslog_moddeleted Text : Your Modification was successfully removed from the log, you will now be returned to the listing Title: modslog_modedited Text : Your Modification was successfully edited, you will now be returned to the listing Title: modslog_modadded Text : Your Modification was successfully added to the log, you will now be returned to the listing |
#23
|
|||
|
|||
Here's another update. This version now allows you to put in an optional URL for the entry. Clicking on the title of the mod in the list will take you to the URL you specify.
This version requires one additional phrase (modslog_name_url) and one additional field in the database table (modurl). Hope the original author doesn't mind! :nervous: Here are the updated files. Modslog.php: Code:
<?php // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### PRE-CACHE TEMPLATES AND DATA ###################### $phrasegroups = array(); $specialtemplates = array(); // ########################## REQUIRE BACK-END ############################ require_once('./global.php'); // ######################################################################## // ######################### START MAIN SCRIPT ############################ // ######################################################################## print_cp_header('Modification Log'); if (empty($_REQUEST['do'])) { $_REQUEST['do'] = 'list'; } if ($_REQUEST['do'] == 'list' ) { $modsquery = $DB_site->query("SELECT * FROM modslog ORDER BY date"); if ($modsquery){ print_form_header('modslog', 'showset'); print_table_header('Modification Log', 5); print_cells_row(array( 'Name', 'Version', 'Author', 'Date Installed', //'Show Users' 'Actions' ), 1, '', 1); while($mod = $DB_site->fetch_array($modsquery)){ $vbphrase['modslog_actions_compiled'] = construct_phrase($vbphrase['modslog_actions'], $mod['modid']); if (empty($mod['modurl'])){ $vbphrase['modslog_name_compiled'] = construct_phrase($vbphrase['modslog_name'], $mod['name'], $mod['description']); } else { $vbphrase['modslog_name_compiled'] = construct_phrase($vbphrase['modslog_name_url'], $mod['name'], $mod['modurl'], $mod['description']); } $date = $date = date("D-d-M-y",$mod['date']); print_cells_row(array($vbphrase['modslog_name_compiled'],$mod['version'],$mod['author'],$date,$vbphrase['modslog_actions_compiled']),0,''); } } else { print_form_header('modslog', 'showset'); print_table_header('Modification Log', 1); print_cells_row(array('There are currently No Modifications in the Log'),0,''); } print_table_footer(); } //Form to add a mod to the list if ($_REQUEST['do'] == 'add' ) { print_form_header('modslog', 'new'); print_table_header('Add Modification to Log'); print_input_row('Name of Modification', 'name'); print_input_row('Description of the Modification\'s function', 'description'); print_input_row('Modification version number', 'version'); print_input_row('Author name', 'author'); print_input_row('Modification URL', 'modurl'); print_submit_row($vbphrase['save'], 0); } //Form to edit a mod in the list if ($_REQUEST['do'] == 'edit' ) { $id = $_REQUEST['id'] ; $id = addslashes($id); $modsquery = $DB_site->query("SELECT * FROM modslog WHERE modid=$id "); $mod = $DB_site->fetch_array($modsquery); print_form_header('modslog', 'modify'); print_table_header('Edit Modification in the Log'); print_input_row('Name of Modification', 'name', $mod['name']); print_input_row('Description of the Modification\'s function', 'description', $mod['description']); print_input_row('Modification version number', 'version', $mod['version']); print_input_row('Author name', 'author', $mod['author']); print_input_row('Modification URL', 'modurl', $mod['modurl']); construct_hidden_code(id, $id); print_submit_row($vbphrase['save'], 0); } if ($_REQUEST['do'] == 'new' OR 'modify' ) { $name = addslashes($_POST['name']); $description = addslashes($_POST['description']); $version = addslashes($_POST['version']); $author = addslashes($_POST['author']); $modurl = addslashes($_POST['modurl']); $id = addslashes($_POST['id']); } if ($_REQUEST['do'] == 'new' ) { $date = TIMENOW ; $DB_site->query("INSERT INTO modslog (name,description,author,version,modurl,date) VALUES ('$name','$description','$author','$version','$modurl','$date')"); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_modadded'); } if ($_REQUEST['do'] == 'modify' ) { $DB_site->query("UPDATE modslog SET name='$name',description='$description',author='$author',modurl='$modurl',version='$version' WHERE modid='$id' "); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_modedited'); } if ($_REQUEST['do'] == 'delete' ) { $id = $_REQUEST['id'] ; $id = addslashes($id); $DB_site->query("DELETE FROM modslog WHERE modid='$id' "); define('CP_REDIRECT', 'modslog.php'); print_stop_message('modslog_moddeleted'); } echo '<div align="center"><br /><a href="modslog.php" > [Return to Modificaton Listing] </a> - <a href="modslog.php?do=add" > [Add a Modification to the Log] </a></div>' ; print_cp_footer(); ?> Code:
This hack will add a new option under Logs and Statistics in your Admin CP. It allows you to track which modifications you have installed on to your board by filling out the form in the hack to contain a name, Author name, Version Number, Description and an Installation date. This hack can be made dynamic so you do not have to add the info your self but a hack releaser would just need to add an extra query to the install to do it for you. In the future I intend to extend this to log which files have been modified in the hack and what queries have been run, possibly through making it into an installation system. This hack was made out of a want to track what I have installed simply and without having to go to the trouble of installing the HTL. If the Author of that hack wants me to remove this I will as the original idea was essentially his. --Copyright 2004 Stewart Ritchie/burnist/acid burn/acid/dogwood (me basicly). --Provided as is, use at your own discression. I am not responsible if your vBulletin screws up so back up both files before installing. --Can only be distributed at vB.org ############################################################################### ############################################################################### -------------------------------------------------------------------- File Uploads -- Upload modslog.php to /admincp/ -------------------------------------------------------------------- ############################################################################### ############################################################################### -------------------------------------------------------------------- Database Query -- Run This in PHPMyAdmin or another tool for DB Manipulation -------------------------------------------------------------------- CREATE TABLE modslog ( modid int(10) auto_increment, name varchar(250), description varchar(250), author varchar(250), version varchar(250), modurl varchar (250), date int(10), PRIMARY KEY(modid)) ############################################################################### ############################################################################### -------------------------------------------------------------------- File Edits -- One One, its in admincp/index.php -------------------------------------------------------------------- ~~~~~~~~~ ~Find~~~~ ~~~~~~~~~ construct_nav_option($vbphrase['scheduled_task_log'], 'cronlog.php?do=choose', '<br />'); ~~~~~~~~~~~~~~~~~ ~Below Add~~~~~~~ ~~~~~~~~~~~~~~~~~ construct_nav_option('Modification Log', 'modslog.php', '<br />'); ############################################################################### ############################################################################### -------------------------------------------------------------------- Phrases -- All of these get added to the Control Panel Global Phrase Group -------------------------------------------------------------------- Title: modslog_actions Text : <a href="modslog.php?do=edit&id={1}"> Edit Entry </a> <a href="modslog.php?do=delete&id={1}"> Delete Entry </a> Title: modslog_name Text : <b>{1}</b><br /> {2} Title: modslog_name_url Test : <b><a href="{2}" target="_blank">{1}</a></b><br /> {3} -------------------------------------------------------------------- Phrases -- All of these get added to the Control Panel Stop Message Group -------------------------------------------------------------------- Title: modslog_moddeleted Text : Your Modification was successfully removed from the log, you will now be returned to the listing Title: modslog_modedited Text : Your Modification was successfully edited, you will now be returned to the listing Title: modslog_modadded Text : Your Modification was successfully added to the log, you will now be returned to the listing |
#24
|
||||
|
||||
Thanks for fixing those errors HellRazor, been far to busy with other things to be able to check up. Im going to update the the attached file and add your name to it
|
#25
|
|||
|
|||
Hi when I edit a mod it gives me this error when I save it?
Code:
Database error in vBulletin 3.0.3: Invalid SQL: UPDATE modslog SET name='infobar',description='added to satellite, default, blue thumb, xmas',author='Slapyo',modurl='https://vborg.vbsupport.ru/showthread.php?t=72279',versio n='1.04' WHERE modid='1' mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'n='1.04' WHERE modid='1'' at line 1 mysql error number: 1064 Date: Wednesday 01st of December 2004 12:44:10 PM Script: http://www./adminpanel/modslog.php Referer: http://www./adminpanel/modslog.php?do=edit&id=1 Username: IP Address: Any ideas |
#26
|
||||
|
||||
Delete modslog.php from your server and upload the one in the zip file at I just uploaded in responce to your error, it "should" have fixed that now
|
#27
|
|||
|
|||
Downloading .......
Uploading Working fine thanks |
#28
|
|||
|
|||
Quote:
|
#29
|
||||
|
||||
Quote:
Its not making use of any table prefixes. I am using table prefixes for my board. Can this be added to the hack? |
#30
|
||||
|
||||
Quote:
|
#31
|
||||
|
||||
Excellent hack! Me luffs it
jluerken, here you go. I modded mine to include prefixes, so everyone should be able to enjoy it (Note: The only difference between this modslog.php and the original is that this one has the table prefix code built into it) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|