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
Modification Log Details »»
Modification Log
Version: 1.00, by burnist burnist is offline
Developer Last Online: May 2006 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 11-15-2004 Last Update: 11-30-2004 Installs: 13
DB Changes
 
No support by the author.

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.

2 hacks in 2 days


v 1.01 - Includes field for url to modification by HellRazor

Supporters / CoAuthors

Show Your Support

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

Comments
  #22  
Old 11-28-2004, 12:41 AM
HellRazor HellRazor is offline
 
Join Date: Mar 2002
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();


?>
Corrected instructions:

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
Reply With Quote
  #23  
Old 11-28-2004, 04:55 AM
HellRazor HellRazor is offline
 
Join Date: Mar 2002
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();


?>
Here are the updated install instructions:

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
Reply With Quote
  #24  
Old 11-28-2004, 03:14 PM
burnist's Avatar
burnist burnist is offline
 
Join Date: Jul 2003
Location: Ireland
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #25  
Old 12-01-2004, 03:46 PM
rh2004 rh2004 is offline
 
Join Date: Nov 2004
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #26  
Old 12-01-2004, 04:05 PM
burnist's Avatar
burnist burnist is offline
 
Join Date: Jul 2003
Location: Ireland
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #27  
Old 12-01-2004, 07:18 PM
rh2004 rh2004 is offline
 
Join Date: Nov 2004
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Downloading .......


Uploading


Working fine thanks
Reply With Quote
  #28  
Old 12-02-2004, 01:25 AM
HellRazor HellRazor is offline
 
Join Date: Mar 2002
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by burnist
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
No problem, I just got to playing around with it and thought I'd share. Thanks for creating it!
Reply With Quote
  #29  
Old 12-14-2004, 07:45 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HellRazor
No problem, I just got to playing around with it and thought I'd share. Thanks for creating it!
Thanks for fixing this hack but there is one major problem in it.
Its not making use of any table prefixes.

I am using table prefixes for my board. Can this be added to the hack?
Reply With Quote
  #30  
Old 12-17-2004, 08:59 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jluerken
Thanks for fixing this hack but there is one major problem in it.
Its not making use of any table prefixes.

I am using table prefixes for my board. Can this be added to the hack?
no one?
Reply With Quote
  #31  
Old 12-25-2004, 12:11 PM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
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 04:31 PM.


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.05187 seconds
  • Memory Usage 2,343KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_code
  • (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
  • (3)pagenav_pagelink
  • (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