How to Hack mediawiki isbn for affiliates

From OpenTutorial

Jump to: navigation, search
Red Skelton Old Time Radio Shows
MP3 CD Volume 1.
33 Classic Red Skelton radio shows. Over 16 hours of classic comedy
More Info...

How to change the ISBN feature to reflect your affiliation with Amazon and Barnes and Noble

Contents

[edit]  !!Caution!!

This is a hack to modify your MediaWiki - Do so at your own risk.

[edit] MediaWiki version 1.6.3

This is for MediaWiki version 1.6.3 I'm sure other versions would be similar.

[edit] 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 $ :)

[edit] Bibliography

( ISBN 020171499X ) ) "The Wiki Way: Collaboration and Sharing on the Web" by Bo Leuf, Ward Cunningham

blog comments powered by Disqus



Bookmark this page on your favorite bookmarking site.
del.icio.us Reddit YahooMyWeb NewsVine Furl De.lirio.us digg blinkbits BlinkList blogmarks connotea Fark feedmelinks LinkaGoGo Ma.gnolia Netvouz RawSugar Shadows Simpy Smarking Spurl TailRank Wists
Personal tools




Toolbox

feeds