Hack mediawiki isbn for affiliates

From OpenTutorial

Jump to: navigation, search
Don't Waste My Time...
Let's get something straight. I'm a jerk. I'm obnoxious. And I'm lazy.
And I don't care, because I'm FILTHY RICH.

Find Out More...

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: Quick Collaboration on the Web) "The Wiki Way: Collaboration and Sharing on the Web" by Bo Leuf, Ward Cunningham



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


Promote OpenTutorial
Toolbox

feeds