Extension talk:Mccp

=Complete Installation Walkthrough= note: there are many aspects of this install that you will no doubt want to change and customize... but since the extension is an integration of all these things...I wanted to provide you with a super-simple installation walkthrough that is complete... so, here it goes..... $wgExtraNamespaces = array ( 900 => "MCCP_Function Type_ID" ,901 => "MCCP_Function Type_ID_talk" ,902 => "MCCP_Manufacturer_ID" ,903 => "MCCP_Manufacturer_ID_talk" ,904 => "MCCP_Product_ID" ,905 => "MCCP_Product_ID_talk" ,906 => "MCCP_Equipment_ID" ,907 => "MCCP_Equipment_ID_talk" ,908 => "MCCP_Location Site_ID" ,909 => "MCCP_Location Site_ID_talk" ,910 => "MCCP_Location Structure_ID" ,911 => "MCCP_Location Structure_ID_talk" ,912 => "MCCP_Location Room_ID" ,913 => "MCCP_Location Room_ID_talk" ,914 => "MCCP_Location Area_ID" ,915 => "MCCP_Location Area_ID_talk" ,916 => "MCCP_System_ID" ,917 => "MCCP_System_ID_talk" ,918 => "MCCP_Subsystem_ID" ,919 => "MCCP_Subsystem_ID_talk" ,920 => "MCCP_Instrument_ID" ,921 => "MCCP_Instrument_ID_talk" ,922 => "MCCP_Drawing_ID" ,923 => "MCCP_Drawing_ID_talk" ,924 => "MCCP_Task_ID" ,925 => "MCCP_Task_ID_talk" ,926 => "MCCP_Project_ID" ,927 => "MCCP_Project_ID_talk" ,928 => "MCCP_Document_ID" ,929 => "MCCP_Document_ID_talk" ,928 => "MCCP_Log_ID" ,929 => "MCCP_Log_ID_talk" );
 * 1) First we install and test the WAMP
 * 2) Started with nothing but a machine running windows XP
 * 3) Downloaded WedDev 2.0 from: http://sourceforge.net/project/showfiles.php?group_id=187164
 * Note: saved it to C:\ (this is where it must be run from)
 * 1) Ran "c:\wdsetup-v2.00.exe" and selected "Complete" install type.
 * Note: had to reboot when it was done.
 * 1) Tested my apache server by visiting: "http://localhost/phpinfo.php"
 * Note:got the expected PHP Info page
 * 1) Tested MySQL by visiting: "http://localhost/phpmyadmin/"
 * Note: used the default WebDev MySQL admin username and password of: root:rootwdp
 * Noted the correct "phpmyadmin" response page. so far so good!
 * 1) Next we install and test mediawiki
 * 2) Triggered my mediawiki install by visiting the page: "http://localhost/mediawiki/"
 * Notes:
 * Named it "mytestwiki"
 * provided WikiSysOp password
 * Changed the option for email authentication to "disabled"
 * Used the "Superuser Account" for the database section using root:rootwdp from "phpmyadmin" test above
 * left everything else as default
 * 1) Mediawiki Installation Successful!
 * 2) Moved mediawiki's "LocalSettings.php" file
 * from: "C:\www\webapps\mediawiki\config\"
 * to: "C:\www\webapps\mediawiki\"
 * 1) Then visited: "http://localhost/mediawiki/index.php/Main_Page" and saw the default main page.
 * 2) Next we install PHP's PEAR so as to get the MSExcel Spreadsheet creation tools:
 * 3) Open a command prompt and go to the "C:\www\php5\" directory
 * 4) Trigger the installation of PEAR by typing, "go-pear.bat"
 * press "enter" to accept the system installation
 * press "enter" again to accept all default file layout choices
 * type "Y" to let PEAR alter php.ini
 * press "enter" to continue.
 * press "enter" to finish the PEAR install (note the advice to modify the environment settings, but do nothing yet)
 * (Now we need to install a pre-requisite of "Express Spreadsheet" called OLE')
 * 1) type "pear install OLE-1.0.0RC1" to install PHP OLE
 * 2) next type "pear install Spreadsheet_Excel_Writer-0.9.1" to install Excell writer
 * (keep the command prompt open)
 * 1) Next we need to install WGET
 * 2) with a web browser, visit: "http://users.ugent.be/~bpuype/wget/#download" and download the exe file "wget.exe"
 * Created a folder called "wget" in "c:\www\" to make the path: "c:\www\wget"
 * 1) Copied "wget.exe" to "c:\www\wget\"
 * 2) Test "WGET" in the command prompt by...
 * go to the "c:\www\wget\" folder and type "wget -O trash.txt http://localhost/phpinfo.php"
 * Note a successful response with no failures and note the output file called "trash.txt" in the folder with "wget.exe"
 * 1) Next we need to make sure the SSL is working
 * 2) Re-test "wget" with SSL by typing "wget -O trash-ssl.txt --no-check-certificate https://localhost/phpinfo.php"
 * Note a successful response with no failures and note the output file called "trash-ssl.txt" in the folder with "wget.exe"
 * 1) Next we need to set-up the MS-Access ODBC connection
 * 2) Download the "template" database from "http://www.mavericks2252.net/archive/mediawiki-extensions/mccp/" called "MCCPDb.mdb"
 * Save it to "c:\"
 * 1) Click "Start->Control Panel", then open "Administrative Tools"
 * from "Administrative Tools" open "Data Sources (ODBC)"
 * from "Data Sources (ODBC)" select the "System DNS" tab
 * click "Add", select "Microsoft Access Driver(*.mdb)", click "Finish"
 * Set the Data source name to: "B2X_Metrology_Database"
 * Select the database file "c:\MCCPDb.mdb" as the data source
 * Select "OK" to finish the ODBC driver set-up tool
 * 1) Next we need to install the "MCCP" Extension :-)
 * 2) Download the latest MCCP extension version from: "http://www.mavericks2252.net/archive/mediawiki-extensions/mccp/"
 * 3) Unzip it onto your desktop and we'll put things where they belong manually.
 * 4) from the unzipped MCCP file on your desktop:
 * go in to the "Desktop\{MCCP Zip File}\mccp\extensions" folder (fyi: "MCCP" is is name of the wiki folder on my development machine)...
 * and copy the folder "b2wiki-specialpages" to the "extension" folder of your mediawiki folder.
 * (you should now have a copy of that folder at: "C:\www\webapps\mediawiki\extensions\"
 * which is... "C:\www\webapps\mediawiki\extensions\b2wiki-specialpages\")
 * 1) again, from the unzipped MCCP file on your desktop:
 * go in to the "Desktop\{MCCP Zip File}\" base folder
 * and copy the two folders "b2ccdb" AND "b2wiki-include" to the root web folder of your apache server.
 * (which is: "C:\www\vhosts\localhost")
 * you should now have a copy of those two folders at:
 * "C:\www\vhosts\localhost\b2ccdb\" and
 * "C:\www\vhosts\localhost\b2wiki-includes\"
 * (fyi, the MCCP extension uses iframes to facilitate inline editing... these folders do that...don't mess with them!)
 * 1) Perform the usual "LocalSettings.php" modification to enable the extensions :-)
 * 2) Open "LocalSettings.php" (found in: "C:\www\webapps\mediawiki", remember? ;-)in a text editor and add the lines:
 * go in to the "Desktop\{MCCP Zip File}\" base folder
 * and copy the two folders "b2ccdb" AND "b2wiki-include" to the root web folder of your apache server.
 * (which is: "C:\www\vhosts\localhost")
 * you should now have a copy of those two folders at:
 * "C:\www\vhosts\localhost\b2ccdb\" and
 * "C:\www\vhosts\localhost\b2wiki-includes\"
 * (fyi, the MCCP extension uses iframes to facilitate inline editing... these folders do that...don't mess with them!)
 * 1) Perform the usual "LocalSettings.php" modification to enable the extensions :-)
 * 2) Open "LocalSettings.php" (found in: "C:\www\webapps\mediawiki", remember? ;-)in a text editor and add the lines:
 * 1) Perform the usual "LocalSettings.php" modification to enable the extensions :-)
 * 2) Open "LocalSettings.php" (found in: "C:\www\webapps\mediawiki", remember? ;-)in a text editor and add the lines:

require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_product_apps.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_product_types.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_manufacturers.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_products.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_location.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_systems.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_inventory.setup.php"); require_once("$IP/extensions/b2wiki-specialpages/b2wikiextension_b2x_database_logs.setup.php"); the end.

=Possible Problems & Solutions=
 * 1) Path fixes/customizations
 * it is very likely that your actual installation will involve different directories than the ones I have shown here due to the WebDev installer
 * if this is the case you will need to modify certain paths in my code.
 * the bad news is... there are a number of files to modify
 * the good news is... its all very easy.
 * The paths that you will need to modify are all on the first few lines of each file.
 * Here is a list of files that would need to be modified if your paths are different.
 * (The location of the files shown here are the ones from this walkthrough... yours will be different... thats why you're doing this step.)
 * c:\www\webapps\mediawiki\extensions\b2wiki-specialpages\b2wikiextension_b2x_location.main.php
 * c:\www\webapps\mediawiki\extensions\b2wiki-specialpages\b2wikiextension_b2x_systems.main.php
 * c:\www\webapps\mediawiki\extensions\b2wiki-specialpages\b2wikiextension_b2x_inventory.main.php
 * c:\www\webapps\mediawiki\extensions\b2wiki-specialpages\b2wikiextension_b2x_products.main.php
 * The first two lines of code at the top of each of these files contains the variables named: "$wiki2zb2ccdbpath" and "$wiki2zb2ccdbwwwpath"
 * the basic job here is to change them such that they show the 'relative' path change needed to find the b2ccdb folder
 * The variable "$wiki2zb2ccdbpath" sets the relative path change for the "local file system functions"
 * and "$wiki2zb2ccdbwwwpath" set the relative path change for the "server URLs"
 * for "this" installation walk-through.. they are set like this:
 * $wiki2zb2ccdbpath   = "../../vhosts/localhost/b2ccdb/";
 * $wiki2zb2ccdbwwwpath = "../../b2ccdb/";
 * The following two files will also need a change:
 * C:\www\vhosts\localhost\b2ccdb\b2-x.php
 * C:\www\vhosts\localhost\b2ccdb\b2x-update.php
 * specifically, the variable "$b2xrequestdataprefix" at the top of each file needs to be set to match your wiki's session handle.
 * ... stay tuned and I will provide proper answer on what this should be changed to..
 * C:\www\vhosts\localhost\b2ccdb\b2x-update.php
 * specifically, the variable "$b2xrequestdataprefix" at the top of each file needs to be set to match your wiki's session handle.
 * ... stay tuned and I will provide proper answer on what this should be changed to..

well... that's it...

be sure to tell me if you use it and if you have any success....

Cheers! - Rich (revansx)