Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-25-2004, 05:06 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone help me please
Reply With Quote
  #12  
Old 12-25-2004, 05:11 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by exasko
Here is the full install part

Code:
// Add v3 Article settings
	if ($_REQUEST['caction'] == 2)
	{
		
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "settinggroup (grouptitle, displayorder, volatile) VALUES ('v3_articles', '2000', '0')");
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0',  'settinggroup_v3_articles', 'v3 Articles', '5000')");
		
		setting_add('v3 Articles Introduction', 'This introduction text will appear at the top of the main v3 Articles page. Use it to describe the purpose of the Articles section.', 'articleintroduction', '', '', 'textarea', '1');
		setting_add('Comments Per Page', 'The number of comments to display on each page.', 'commentsperpage', '10', '10', '', '20');
		setting_add('Comment Character Limit', 'The maximum character length of a user\'s comment.', 'commentlimit', '500', '500', '', '30');
		setting_add('Articles Per Page', 'The number of articles to display on each page.', 'articlesperpage', '10', '10', '', '40');
		setting_add('Article Attachment Limit', 'The maximum number of files which can be attached to an article.', 'maxarticleattachments', '10', '10', '', '50');		
		setting_add('Thumbnails Per Row', 'The number of "thumbnails", or media items to display per row.', 'artthumbsperrow', '4', '4', '', '60');
		setting_add('Featured Article Preview Length', 'The number of characters to display before the preview text is truncated.', 'featuredlength', '550', '550', '', '70');
Can anyone either put this into a query so I can run it, or tell me how to add these settings through admincp.. please
We need the function setting_add
Reply With Quote
  #13  
Old 12-25-2004, 05:17 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the install file.. i just took out the template html to make it not as long.. i hope what you are looking for is in this...

Code:
<?php

// Set the PHP enviroment
error_reporting(E_ALL & ~E_NOTICE);

// File includes
require_once('./global.php');
require_once('./includes/adminfunctions_template.php');
require_once('./includes/adminfunctions_language.php');

print_cp_header('v3 Articles Installation Script', '', '');

$phase = $_REQUEST['phase'];
if (empty($phase))
{
	$phase = '0';
}

// ########################
// INSTALLATION FUNCTIONS #
// ########################

// template_insert
function template_insert($name, $content)
{
	global $DB_site;
	$template = compile_template($content);
	$DB_site->query("INSERT INTO " . TABLE_PREFIX . "template (templateid, title, template, template_un, styleid, templatetype, dateline, username, version) VALUES (NULL, '$name', '" . addslashes($template) . "', '" . addslashes($content) ."', '-1', 'template', '" . time() . "', 'Tigga', '3.0.0 Gamma')");
}

// template_delete
function template_delete($title)
{
	global $DB_site;
	$DB_site->query("DELETE FROM " . TABLE_PREFIX . "template WHERE title = '$title'");
}

// template_rebuild
// For future upgrade scripts, might as well have it here! 
function template_rebuild($name, $content)
{
	global $DB_site;
	$template = compile_template($content);
	$DB_site->query("UPDATE " . TABLE_PREFIX . "template SET title = '$name', template = '" . addslashes($template) ."', template_un = '" . addslashes($content) . "' WHERE title = '$name'");
}

// setting_add
function setting_add($title, $description, $varname, $value, $defaultvalue, $optioncode, $displayorder)
{
	global $DB_site;
	$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0', 'setting_" . $varname . "_title', '" . addslashes($title) ."', '5000')");
	$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0',  'setting_" . $varname . "_desc', '" . addslashes($description) ."', '5000')");
	$DB_site->query("INSERT INTO " . TABLE_PREFIX . "setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('$varname', 'v3_articles', '$value', '$defaultvalue', '$optioncode', '$displayorder', '0', '0')");
}

// setting_rebuild
function setting_rebuild($varname, $title = '', $description = '', $value = '')
{
	global $DB_site;
	if ($title)
	{
		$DB_site->query("UPDATE " . TABLE_PREFIX . "phrase SET text = '$title' WHERE varname = 'setting_" . $varname . "_title'");
	}
	if ($description)
	{
		$DB_site->query("UPDATE " . TABLE_PREFIX . "phrase SET text = '$description' WHERE varname = 'setting_" . $varname . "_desc'");
	}
}
//setting_delete
function setting_delete($title)
{
	global $DB_site;
	$DB_site->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname = 'setting_" . $title . "_title'");
	$DB_site->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname = 'setting_" . $title . "_desc'");
	$DB_site->query("DELETE FROM " . TABLE_PREFIX . "setting WHERE varname = '$title'");
}

// phrase_insert
function phrase_insert($varname, $text, $groupid=692)
{
	global $DB_site;
	$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0', '" . $varname . "', '" . addslashes($text) ."', $groupid)");
}

// phrase_rebuild
function phrase_rebuild($varname, $text)
{
	global $DB_site;
	$DB_site->query("UPDATE " . TABLE_PREFIX . "phrase SET text = '" . addslashes($text) ."' WHERE varname = '" . $varname . "'");
}

// phrase_rebuild
function phrase_delete($varname)
{
	global $DB_site;
	$DB_site->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname = '" . $varname . "'");
}


// ##################################################
// INSTALLATION START
// ##################################################
if (empty($_REQUEST['do']))
{
	print_form_header('install', 'start');
	print_table_header('Welcome to v3 Articles');
	
	print_description_row("
Welcome to the <b>v3 Articles</b> installation script.
<p>
Please follow the instructions carefully for a trouble-free installation. This installation script comprises of the following steps:
<p>
1. The v3 Articles setting group is added to the Admin CP, along with settings. <br />
2. Phrases are automatically added to the vBulletin phrase table. <br />
3. New templates are automatically inserted into the database.
<p>
Don't forget to make the required file modifications and template changes, as listed in Instructions.txt.
		");

	print_table_break();
	print_table_header('Installation Options');
	print_radio_row('v3 Articles Installation <dfn>Install the v3 Articles system on a standard vBulletin 3 forum.</dfn>', 'iaction', array('1' => 'Full v3 Articles Installation'), '1');
	print_radio_row('Upgrade v3 Articles (1.0.0 to 1.0.1) <dfn>Select this option to upgrade your v3 Articles installation.</dfn>', 'iaction', array('4' => 'Upgrade v3 Articles'));
	print_radio_row('Install Templates Only <dfn>Adds the v3 Articles templates to the database.</dfn>', 'iaction', array('2' => 'Templates Only'));
	print_radio_row('Uninstall v3 Articles <dfn>Reverses the changes made to the database during installation.</dfn>', 'iaction', array('3' => 'Uninstall v3 Articles'));
	print_submit_row('Proceed', '');

}
else
{
	if ($_REQUEST['iaction'] == 1)
	{
		
		$DB_site->query("
			CREATE TABLE `" . TABLE_PREFIX . "article` (
			`articleid` int(10) unsigned NOT NULL auto_increment,
			`title` varchar(250) NOT NULL default '',
			`firstpostid` int(10) unsigned NOT NULL default '0',
			`lastcommentid` int(10) unsigned default NULL,
			`lastcommentdateline` int(10) unsigned NOT NULL default '0',
			`lastcommentposter` varchar(50) default NULL,
			`lastcommentposterid` int(10) unsigned default NULL,
			`categoryid` int(10) unsigned NOT NULL default '0',
			`open` smallint(2) NOT NULL default '0',
			`commentcount` int(10) unsigned NOT NULL default '0',
			`articleusername` varchar(50) NOT NULL default '',
			`articleuserid` int(4) unsigned NOT NULL default '0',
			`dateline` int(10) unsigned NOT NULL default '0',
			`views` int(10) unsigned NOT NULL default '0',
			`iconid` int(10) unsigned NOT NULL default '0',
			`votenum` smallint(5) unsigned NOT NULL default '0',
			`votetotal` smallint(5) unsigned NOT NULL default '0',
			`articlehash` varchar(32) NOT NULL default '',
			PRIMARY KEY  (`articleid`)
			) TYPE=MyISAM
		");
		$DB_site->query("
			CREATE TABLE `" . TABLE_PREFIX . "articleattachment` (
			`attachmentid` int(10) unsigned NOT NULL auto_increment,
			`userid` int(10) unsigned NOT NULL default '0',
			`dateline` int(10) unsigned NOT NULL default '0',
			`thumbnail_dateline` int(10) unsigned NOT NULL default '0',
			`filename` varchar(100) NOT NULL default '',
			`filedata` mediumtext NOT NULL,
			`visible` smallint(5) unsigned NOT NULL default '0',
			`counter` smallint(5) unsigned NOT NULL default '0',
			`filesize` int(10) unsigned NOT NULL default '0',
			`articleid` int(10) unsigned NOT NULL default '0',
			`filehash` varchar(32) NOT NULL default '',
			`thumbnail` mediumtext NOT NULL,
			`posthash` varchar(32) default NULL,
			`caption` varchar(250) default NULL,
			PRIMARY KEY  (`attachmentid`),
			KEY `filesize` (`filesize`),
			KEY `filehash` (`filehash`),
			KEY `userid` (`userid`),
			KEY `articleid` (`articleid`)
			) TYPE=MyISAM
		");
		$DB_site->query("
			CREATE TABLE `" . TABLE_PREFIX . "articlecategory` (
			`categoryid` smallint(5) unsigned NOT NULL auto_increment,
			`styleid` smallint(5) unsigned NOT NULL default '0',
			`title` varchar(100) NOT NULL default '',
			`description` varchar(250) NOT NULL default '',
			`extdescription` mediumtext,
			`options` int(10) unsigned NOT NULL default '0',
			`displayorder` smallint(6) NOT NULL default '0',
			`lastpost` int(11) NOT NULL default '0',
			`lastcommentin` int(11) NOT NULL default '0',
			`lastposter` varchar(50) NOT NULL default '',
			`lastpostin` varchar(250) NOT NULL default '',
			`lastarticle` varchar(250) NOT NULL default '',
			`lastarticleid` int(10) unsigned NOT NULL default '0',
			`lastauthor` varchar(50) NOT NULL default '',
			`lasticonid` smallint(6) NOT NULL default '0',
			`articlecount` mediumint(8) unsigned NOT NULL default '0',
			`newcommentemail` varchar(250) NOT NULL default '',
			`newarticleemail` varchar(250) NOT NULL default '',
			`parentid` smallint(6) NOT NULL default '0',
			`parentlist` varchar(250) NOT NULL default '',
			`childlist` varchar(250) NOT NULL default '',
			PRIMARY KEY  (`categoryid`)
			) TYPE=MyISAM
		");
		$DB_site->query("
			CREATE TABLE `" . TABLE_PREFIX . "articlepost` (
			`postid` int(10) unsigned NOT NULL auto_increment,
			`posticonid` int(10) unsigned NOT NULL default '0',
			`articleid` int(10) unsigned NOT NULL default '0',
			`posttitle` varchar(250) default NULL,
			`postbody` longtext NOT NULL,
			`postdateline` int(10) unsigned NOT NULL default '0',
			`postusername` varchar(250) NOT NULL default '',
			`postuserid` int(10) unsigned NOT NULL default '0',
			`type` tinyint(1) unsigned NOT NULL default '1',
			`posthash` varchar(32) NOT NULL default '',
			`valid` tinyint(1) unsigned NOT NULL default '1',
			PRIMARY KEY  (`postid`)
			) TYPE=MyISAM
		");
		$DB_site->query("
			CREATE TABLE `" . TABLE_PREFIX . "articlerating` (
			`ratingid` int(10) unsigned NOT NULL auto_increment,
			`articleid` int(10) unsigned NOT NULL default '0',
			`userid` int(10) unsigned NOT NULL default '0',
			`rating` tinyint(1) unsigned NOT NULL default '0',
			PRIMARY KEY  (`ratingid`)
			) TYPE=MyISAM
		");
		$DB_site->query("
			ALTER TABLE `" . TABLE_PREFIX . "usergroup`
			ADD COLUMN `articlepermissions` int(10) unsigned NOT NULL DEFAULT 0
  		");
		$DB_site->query("UPDATE " . TABLE_PREFIX . "usergroup SET articlepermissions=2051 WHERE usergroupid=1");
		$DB_site->query("UPDATE " . TABLE_PREFIX . "usergroup SET articlepermissions=3103 WHERE usergroupid=2");
		$DB_site->query("UPDATE " . TABLE_PREFIX . "usergroup SET articlepermissions=3075 WHERE usergroupid=3");
		$DB_site->query("UPDATE " . TABLE_PREFIX . "usergroup SET articlepermissions=4095 WHERE usergroupid IN (5,6,7)");
		
		$DB_site->query("INSERT INTO `" . TABLE_PREFIX . "articlecategory` (`categoryid`, `styleid`, `title`, `description`, `extdescription`, `options`, `displayorder`, `lastpost`, `lastposter`, `lastpostin`, `lastarticle`, `lastarticleid`, `lastauthor`, `lasticonid`, `articlecount`, `newcommentemail`, `newarticleemail`, `parentid`, `parentlist`, `childlist`) VALUES (1,0,'Main Category','Main Category Description','',7875,1,0,'','','',0,'',0,0,'','',-1,'1,-1','1,2,-1')");
		$DB_site->query("INSERT INTO `" . TABLE_PREFIX . "articlecategory` (`categoryid`, `styleid`, `title`, `description`, `extdescription`, `options`, `displayorder`, `lastpost`, `lastposter`, `lastpostin`, `lastarticle`, `lastarticleid`, `lastauthor`, `lasticonid`, `articlecount`, `newcommentemail`, `newarticleemail`, `parentid`, `parentlist`, `childlist`) VALUES (2,0,'Main Sub-Category','Main Sub-Category Description','Extended Main Sub-Category Description',7879,1,0,'','','',0,'',0,0,'','',1,'2,1,-1','2,-1')");
		
		print_form_header('install', 'start');
		print_table_header('v3 Article Installation - Step 1');
		construct_hidden_code('caction', '2');
		print_description_row("Database modifications complete.");
		print_submit_row('Proceed to Step 2', '');
	}

	// Add v3 Article settings
	if ($_REQUEST['caction'] == 2)
	{
		
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "settinggroup (grouptitle, displayorder, volatile) VALUES ('v3_articles', '2000', '0')");
		$DB_site->query("INSERT INTO " . TABLE_PREFIX . "phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, '0',  'settinggroup_v3_articles', 'v3 Articles', '5000')");
		
		setting_add('v3 Articles Introduction', 'This introduction text will appear at the top of the main v3 Articles page. Use it to describe the purpose of the Articles section.', 'articleintroduction', '', '', 'textarea', '1');
		setting_add('Comments Per Page', 'The number of comments to display on each page.', 'commentsperpage', '10', '10', '', '20');
		setting_add('Comment Character Limit', 'The maximum character length of a user\'s comment.', 'commentlimit', '500', '500', '', '30');
		setting_add('Articles Per Page', 'The number of articles to display on each page.', 'articlesperpage', '10', '10', '', '40');
		setting_add('Article Attachment Limit', 'The maximum number of files which can be attached to an article.', 'maxarticleattachments', '10', '10', '', '50');		
		setting_add('Thumbnails Per Row', 'The number of "thumbnails", or media items to display per row.', 'artthumbsperrow', '4', '4', '', '60');
		setting_add('Featured Article Preview Length', 'The number of characters to display before the preview text is truncated.', 'featuredlength', '550', '550', '', '70');
		
		print_form_header('install', 'start');
		print_table_header('v3 Article Installation - Step 2');
		construct_hidden_code('caction', '3');
		print_description_row("Setting additions complete.");
		print_submit_row('Proceed to Step 3', '');

	}

	if ($_REQUEST['caction'] == 3)
	{
		
		phrase_insert('dupecomment', 'You have already submitted the same comment to this article once before.', 1000);
		phrase_insert('comment_deleted', 'Comment deleted.', 2000);
		phrase_insert('comment_edited', 'Comment edited.', 2000);
		phrase_insert('article_deleted', 'Article deleted.', 2000);
		phrase_insert('article_edited', 'Article edited.', 2000);
		phrase_insert('featured', 'This article has now been featured.', 2000);
		phrase_insert('comment_too_long', 'Sorry, your comment is too long. Comments must be shorter than $vboptions[commentlimit] characters long.', 1000);
		build_language(-1);
		
		
		print_form_header('install', 'start');
		print_table_header('v3 Article Installation - Step 3');
		construct_hidden_code('caction', '4');
		print_description_row("Phrase additions complete.");
		print_submit_row('Proceed to Step 4', '');

	}
	if ($_REQUEST['caction'] == 4)
	{
				
		template_insert('ARTICLES', "$articles");
		template_insert('article_rating', "$article_rating");
		template_insert('article_new_attachment', "$article_new_attachment");
		template_insert('article_new', "$article_new");
		template_insert('article_level2_post', "$article_level2_post");
		template_insert('article_level2_nopost', "$article_level2_nopost");
		template_insert('article_level1_post', "$article_level1_post");
		template_insert('article_level1_nopost', "$article_level1_nopost");
		template_insert('article_lastcommentby', "$article_lastcommentby");
		template_insert('article_lastarticleby', "$article_lastarticleby");
		template_insert('article_featured', "$article_featured");
		template_insert('article_edit_comment', "$article_edit_comment");
		template_insert('article_edit', "$article_edit");
		template_insert('article_display_thumbrow', "$article_display_thumbrow");
		template_insert('article_display_thumb', "$article_display_thumb");
		template_insert('article_display_file', "$article_display_file");
		template_insert('article_display', "$article_display");
		template_insert('article_commentbit', "$article_commentbit");
		template_insert('article_categorylist', "$article_categorylist");
		template_insert('article_attachment_newbit', "$article_attachment_newbit");
		template_insert('article_attachment_new', "$article_attachment_new");
		template_insert('article_attachment_bit', "$article_attachment_bit");
		template_insert('article_articlelist_noresults', "$article_articlelist_noresults");
		template_insert('article_articlelist', "$article_articlelist");
		template_insert('article_articlebit_lastcommentby', "$article_articlebit_lastcommentby");
		template_insert('article_articlebit', "$article_articlebit");
				
		build_all_styles(0, 0, "install.php?$session[sessionurl]do=start&caction=5");
	}

	if ($_REQUEST['caction'] == 5)
	{
		print_form_header('install', '');
		print_table_header('v3 Article Installation Complete!');
		print_description_row("
Congratulations, you've successfully installed the v3 Articles system for vBulletin 3.x.x.
<p>
Please remember to delete this file, in order to prevent changes being made to the installation in the future.
<p>
For v3 Articles support, updates and modifications, please visit the support forum <a href=\"http://www.v3arcade.com/play/forumdisplay.php?f=12\"><b>here</b></a>.
		");
		print_table_footer();
	}
	
	if ($_REQUEST['iaction'] == 2)
	{
				
		template_insert('ARTICLES', "$articles");
		template_insert('article_rating', "$article_rating");
		template_insert('article_new_attachment', "$article_new_attachment");
		template_insert('article_new', "$article_new");
		template_insert('article_level2_post', "$article_level2_post");
		template_insert('article_level2_nopost', "$article_level2_nopost");
		template_insert('article_level1_post', "$article_level1_post");
		template_insert('article_level1_nopost', "$article_level1_nopost");
		template_insert('article_lastcommentby', "$article_lastcommentby");
		template_insert('article_lastarticleby', "$article_lastarticleby");
		template_insert('article_featured', "$article_featured");
		template_insert('article_edit_comment', "$article_edit_comment");
		template_insert('article_edit', "$article_edit");
		template_insert('article_display_thumbrow', "$article_display_thumbrow");
		template_insert('article_display_thumb', "$article_display_thumb");
		template_insert('article_display_file', "$article_display_file");
		template_insert('article_display', "$article_display");
		template_insert('article_commentbit', "$article_commentbit");
		template_insert('article_categorylist', "$article_categorylist");
		template_insert('article_attachment_newbit', "$article_attachment_newbit");
		template_insert('article_attachment_new', "$article_attachment_new");
		template_insert('article_attachment_bit', "$article_attachment_bit");
		template_insert('article_articlelist_noresults', "$article_articlelist_noresults");
		template_insert('article_articlelist', "$article_articlelist");
		template_insert('article_articlebit_lastcommentby', "$article_articlebit_lastcommentby");
		template_insert('article_articlebit', "$article_articlebit");
		
		
		build_all_styles(0, 0, "install.php?$session[sessionurl]do=start&caction=6");
	}
	if ($_REQUEST['caction'] == 6)
	{
		print_form_header('install', '');
		print_table_header('v3 Article Template Installation Complete');
		print_description_row("
All v3 Articles templates have been added to the database.
<p>
Please remember to delete this file, in order to prevent changes being made to the installation in the future.
<p>
For v3 Articles support, updates and modifications, please visit the support forum <a href=\"http://www.v3arcade.com/play/forumdisplay.php?f=12\"><b>here</b></a>.
		");
		print_table_footer();
	}
	
	if ($_REQUEST['iaction'] == 3)
	{
		
		template_delete('ARTICLES');
		template_delete('article_rating');
		template_delete('article_new_attachment');
		template_delete('article_new');
		template_delete('article_level2_post');
		template_delete('article_level2_nopost');
		template_delete('article_level1_post');
		template_delete('article_level1_nopost');
		template_delete('article_lastcommentby');
		template_delete('article_lastarticleby');
		template_delete('article_featured');
		template_delete('article_edit_comment');
		template_delete('article_edit');
		template_delete('article_display_thumbrow');
		template_delete('article_display_thumb');
		template_delete('article_display_file');
		template_delete('article_display');
		template_delete('article_commentbit');
		template_delete('article_categorylist');
		template_delete('article_attachment_newbit');
		template_delete('article_attachment_new');
		template_delete('article_attachment_bit');
		template_delete('article_articlelist_noresults');
		template_delete('article_articlelist');
		template_delete('article_articlebit_lastcommentby');
		template_delete('article_articlebit');

		setting_delete('articleintroduction');
		setting_delete('commentsperpage');
		setting_delete('commentlimit');
		setting_delete('articlesperpage');
		setting_delete('maxarticleattachments');		
		setting_delete('artthumbsperrow');
		setting_delete('featuredlength');
		
		phrase_delete('dupecomment');
		phrase_delete('comment_deleted');
		phrase_delete('comment_edited');
		phrase_delete('article_deleted');
		phrase_delete('article_edited');
		phrase_delete('featured');
		phrase_delete('comment_too_long');
		build_language(-1);
		
		
		print_form_header('install', '');
		print_table_header('v3 Articles Uninstalled');
		print_description_row("
The database changes made to this vBulletin installation have been undone.
<p>
However, tables containing content and category information still remain. For security reasons, these tables must be deleted manually.
		");
		print_table_footer();
	}
	
	if ($_REQUEST['iaction'] == 4)
	{
		template_rebuild('article_articlebit', "$article_articlebit");
		template_rebuild('article_level2_post', "$article_level2_post");
		                                                  s
		print_form_header('install', '');
		print_table_header('v3 Articles Upgraded to 1.0.1');
		print_description_row("
You've successfully upgraded your v3 Articles installation. Please make sure you overwrite all the files with the updated version in the Files directory of the zip.
<p>
Please delete this file.
		");
		print_table_footer();
	}

}
print_cp_footer();
?>
Reply With Quote
  #14  
Old 12-25-2004, 05:19 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this what you are looking for, I found it in the code above:

Code:
// setting_add
function setting_add($title, $description, $varname, $value, $defaultvalue, $optioncode, $displayorder)
Reply With Quote
  #15  
Old 12-25-2004, 06:46 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Either ;

1. Run the install.php script again and choose the uninstall option - and then re-run it and choose full install

or

2. Run install.php with caction set to two (i.e. ....../admincp/install.php?caction=2) and then close the script, do not proceed to step 3.
Reply With Quote
  #16  
Old 12-25-2004, 06:53 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i feel really stupid but where or how do i set the caction to 2.. i wanna do number 2 as i already have tried the uninstall and reinstall..

so how do i set the caction to 2?
Reply With Quote
  #17  
Old 12-25-2004, 07:15 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I run caction=2 it just takes me to the first step like it won't let me skip.. but it doesnt seem to be going and installing the setting_add so i don't know what to do..
Reply With Quote
  #18  
Old 12-25-2004, 07:54 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this cut down script - I haven't tested it, but in theory it should re-install the settings.
Attached Files
File Type: php installsettings.php (4.2 KB, 4 views)
Reply With Quote
  #19  
Old 12-25-2004, 08:08 PM
Osterling Osterling is offline
 
Join Date: Jan 2004
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you...

when i ran it, i clicked procced and it took me to a blank page.. i wasn't sure if it installed it or not so i opened phpmyadmin to see if anything was there in the setting table and nothing was there...
Reply With Quote
  #20  
Old 12-25-2004, 08:26 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay;

these are the actual sql inserts - if these fail then your system is screwed beyond help.

Code:
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('articleintroduction', 'v3_articles', '', '', 'textarea', 10, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('commentsperpage', 'v3_articles', '10', '10', '', 20, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('commentlimit', 'v3_articles', '500', '500', '', 30, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('articlesperpage', 'v3_articles', '10', '10', '', 40, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('maxarticleattachments', 'v3_articles', '10', '10', '', 50, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('artthumbsperrow', 'v3_articles', '4', '4', '', 60, 0, 0);
INSERT INTO `setting` (`varname`, `grouptitle`, `value`, `defaultvalue`, `optioncode`, `displayorder`, `advanced`, `volatile`) VALUES ('featuredlength', 'v3_articles', '550', '550', '', 70, 0, 0);
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 07:36 AM.


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.04334 seconds
  • Memory Usage 2,324KB
  • Queries Executed 14 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)postbit
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete