EQWiki:Source Code
The EQWiki - Your source for random EverQuest knowledge
This page contains some of the source code for the various custom pages on the site, like the item database and item sets. This code is freely available for use and modification but is provided as is...there is little to no documentation on getting it setup. Also note that some of the source code is based on other peoples work.
rL5k5S Interesting, but still I would like to know more about it. Liked the article:DD
mx9S0P Yeah !... life is like riding a bicycle. You will not fall unless you stop pedaling!!...
Contents |
EqItems Extension: Simple Search
This extension allows items to be searched by name, or part of a name. Note that in order to actually display an item you'll need the ShowItems extension listed below.
- Download and install EqItems in folder named EqItems in the Wiki's extension folder.
- Add a line "require_once( "$IP/extensions/EqItems/EqItems.php" );" to the Wiki's LocalSettings.php file.
- Test that the extension is working by accessing the special page, for example:
http://www.eqwiki.net/wiki/Special:EqItems?searchtext=test
- If it doesn't work check the web server's error log for possible causes.
- To add a simple search box somewhere use the following HTML:
<form action="/wiki/Special:EqItems" style="margin-top:3px;" id="searchform"> <div><center> <input id="searchInput" name="searchtext" type="text" size="18" maxlength="64" /> <input type='submit' class="searchButton" value="Find Items" /> </center></div> </form>
ShowItem Extension: View Item
This extension displays an item in the manner similar to EQItems and Lucy using the old item window display. Many of the other extensions assume that this extension is installed.
- Download and install the ShowItem extension in the ShowItem folder in the Wiki's extension path.
- Add a line "require_once( "$IP/extensions/ShowItem/ShowItem.php" );" to the Wiki's LocalSettings.php file.
- Test the extension by using a link of the form
http://www.eqwiki.net/wiki/Special:ShowItem?id=38151
- If it doesn't work check the web server's error log for possible causes.
Advanced Item Search Extension
This allows more advanced search options for items.
- Install the AdvancedItemSearch extension in the AdvancedItemSearch folder in the Wiki's extension path.
- Add a line "require_once( "$IP/extensions/AdvancedItemSearch/AdvancedItemSearch.php" );" to the Wiki's LocalSettings.php file.
- Visit the page http://www.eqwiki.net/wiki/Special:AdvancedItemSearch and do a few searches to ensure it works.
Spell Database
Like the item database, if the Lucy format or table schema changes it will likely break some of the spell code.
- Download the spell data from Lucy.
- Create the table eqspells in the wiki database using the Spell Table Schema (may be out of date).
- Import the data into the table using a script.
ShowSpell Extension: View Spell Data
This is currently in a very rough state.
- Install the ShowSpell extension in the ShowSpell folder of the Wiki's extension path.
- Add a line "require_once( "$IP/extensions/ShowSpell/ShowSpell.php" );" to the Wiki's LocalSettings.php file.
- Test the installation by using a link of the form:
http://www.eqwiki.net/wiki/Special:ShowSpell?id=1002
Item Sets Extension
- Create the table eqitemsets in the Wiki database:
CREATE TABLE `eqitemsets` ( `id` bigint(20) NOT NULL auto_increment, `name` text NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `name` (`name`) ) TYPE=MyISAM AUTO_INCREMENT=76 ;
- Create the table eqsetitems in the Wiki database:
CREATE TABLE `eqsetitems` ( `id` bigint(20) NOT NULL auto_increment, `setid` int(11) NOT NULL default '0', `itemid` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=196 ;
- Install the ItemSet extension in the ItemSets path of the Wiki's extension folder.
- Edit the Wiki's LocalSettings.php file and add the default item set permissions. These can be changed to whatever permissions values you desire.
$wgGroupPermissions['*' ]['eqitemsetedit'] = false; $wgGroupPermissions['*' ]['eqitemsetdelete'] = false; $wgGroupPermissions['*' ]['eqitemsetcreate'] = false; $wgGroupPermissions['*' ]['eqitemsetlock'] = false; $wgGroupPermissions['user' ]['eqitemsetedit'] = true; $wgGroupPermissions['user' ]['eqitemsetdelete'] = false; $wgGroupPermissions['user' ]['eqitemsetcreate'] = true; $wgGroupPermissions['user' ]['eqitemsetlock'] = false; $wgGroupPermissions['setedit']['eqitemsetedit'] = true; $wgGroupPermissions['setadmin']['eqitemsetedit'] = true; $wgGroupPermissions['setadmin']['eqitemsetlock'] = true; $wgGroupPermissions['setadmin']['eqitemsetdelete'] = true; $wgGroupPermissions['sysop' ]['eqitemsetedit'] = true; $wgGroupPermissions['sysop' ]['eqitemsetdelete'] = true; $wgGroupPermissions['sysop' ]['eqitemsetcreate'] = true; $wgGroupPermissions['sysop' ]['eqitemsetlock'] = true;
- Add the line require_once( "$IP/extensions/ItemSets/ItemSets.php" ); to LocalSettings.php.
- Visit http://www.eqwiki.net/wiki/Special:ItemSets and see if it works.