Difference between revisions of "Hack mediawiki isbn for affiliates"
Jump to navigation
Jump to search
(Adding asins) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
== MediaWiki version 1.6.3 == | == MediaWiki version 1.6.3 == | ||
This is for MediaWiki version 1.6.3 I'm sure other versions would be similar. | This is for MediaWiki version 1.6.3 I'm sure other versions would be similar. | ||
+ | |||
+ | {{adsense2}} | ||
== Code == | == Code == | ||
Line 43: | Line 45: | ||
== Bibliography == | == Bibliography == | ||
− | + | <asin a=020171499X>The Wiki Way: Collaboration and Sharing on the Web" by Bo Leuf, Ward Cunningham</asin> | |
[[Category:Mediawiki]] | [[Category:Mediawiki]] | ||
[[Category:php]] | [[Category:php]] |
Latest revision as of 03:59, 22 February 2019
How to change the ISBN feature to reflect your affiliation with Amazon and Barnes and Noble
!!Caution!!
This is a hack to modify your MediaWiki - Do so at your own risk.
MediaWiki version 1.6.3
This is for MediaWiki version 1.6.3 I'm sure other versions would be similar.
Code
Starting at Line Number 166 In the File "/languages/language.php"
I changed it from:
/* private */ $wgBookstoreListEn = array( 'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN', 'PriceSCAN' => 'http://www.pricescan.com/books/bookDetail.asp?isbn=$1', 'Barnes & Noble' => 'http://search.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=$1', 'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1' );
To:
/* private */ $wgBookstoreListEn = array( // 'AddALL' => 'http://www.addall.com/New/Partner.cgi?query=$1&type=ISBN', // 'PriceSCAN' => 'http://www.pricescan.com/books/bookDetail.asp?isbn=$1', 'Barnes & Noble' => 'http://service.bfast.com/bfast/click?bfmid=2181&sourceid=41614264&bfpid=$1&bfmtype=book', 'Amazon.com' => 'http://www.amazon.com/exec/obidos/redirect?link_code=ur2&tag=tsickist-20&camp=1789&creative=9325&path=ISBN=$1' );
I commented out AddALL and PriceSCAN because I don't have an affiliation with them. This is purely optional.
Note be sure to replace:
sourceid="41614264" with your Barnes and Noble number tag=tsickist-20 with your Amazon Code
Or you can leave mine and help me make $ :)
Bibliography
The Wiki Way: Collaboration and Sharing on the Web" by Bo Leuf, Ward Cunningham