Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: rd on May 31, 2008, 09:32:55 PM

Title: pagerank bbcode v1.5
Post by: rd on May 31, 2008, 09:32:55 PM


Pagerank bbcode v1.5
By: royalduke

ex Developer:  130860 (http://oharascans.com)


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1227) | Comment On This Mod (http://www.simplemachines.org/community/index.php?topic=242252.0)

Introduction
Enables you to show the pagerank of urls in posts using either
[pagerank=http://www.simplemachines.org/]simplemachines.org[/pagerank]
or
[pagerank]http://www.simplemachines.org/[/pagerank]

For SMF 1.1.10 and 2.0 RC2 versions


Features
- Admin/Features and Options for 1.1.x
- Admin->Configuration->Modifications for 2.0
- Enable PageRank on Profiles (for users websites)
o BBCode Button
o Caches pageranks in the database for 7 days
- For faster performance (and since PR changes very rarely)
- Automatically clears old pageranks for efficiency

Supported languages
o english/utf8
o english/utf8
o spanish_es/utf8
o spanish_latin/utf8
o portuguese_pt/utf8  thanks to Joomlamz
o polish/utf8 thanks to yetj
o turkish/utf8 thanks to Kapadokyali

I welcome translations, please post it on the support topic ;)


Installation
Simply install the package to install on the SMF Default Core / Babylon / Classic Themes AND any other theme which does NOT have a custom Profile.template.php



Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Credits
-Special thanks to Arantor  (http://www.simplemachines.org/community/index.php?action=profile;u=53626) who pretty much do all the code for me :P  many thanks!
The PageRank code/API is modified from original public domain code/api
http://www.devpapers.com/article/326
http://www.googlecommunity.com/scripts/google-pagerank.php
http://www.searchengineengine.com/files/pagerank-code.txt
http://www.hm2k.com/projects/pagerank

Changelog
1.0 - 17th August 2007
o Initial release.
1.1 - 9th October 2007
o Added Turkish/Turkish-utf8 language support (Thanks to Kapadokyali)
1.2 - 8th December 2007
o Added table to cache pagerank data for 7 days
o Changed to use smf fetch_web_data to try to overcome host restrictions
o Added script to drop the pagerank cache table on uninstall
o Re-wrote most of the pagerank functions
1.3 - 9th January 2008
o New readme
o Fixed a minor error
1.4 -  24th October 2009
o take over by 130860
o upgrade to work with  2.0 RC1.2
o added polish and Portuguese languages
1.5 - 11th November2009
o Added support for 2.0RC2 
Title: Re: PAGERANK BBCODE v1.3
Post by: msvdm on June 02, 2008, 04:10:39 PM
thanks for the mod  lets hope you will find time to update the version to work with SMF 2, also,i have one question can you explane me how i can put pageranks on the forum topics, i see that on some custom themes :) and look pretty cool i love the look :P
Title: Re: PAGERANK BBCODE v1.3
Post by: SA™ on June 03, 2008, 02:56:54 AM
yes i am currrently updating it to smf2

sry i dont know how to put pagranks on topics sry
Title: Re: PAGERANK BBCODE v1.3
Post by: msvdm on June 03, 2008, 04:04:36 AM
thanks
Title: Re: pagerank bbcode v1.3
Post by: b33z on July 10, 2008, 08:27:15 PM
hmm... interesting.. anybody have a screenshot??
Title: Re: pagerank bbcode v1.3
Post by: SA™ on July 11, 2008, 08:27:04 AM
demo

http://www.adrevenueshare.com/index.php?topic=17.0
Title: Re: pagerank bbcode v1.3
Post by: b33z on July 11, 2008, 04:52:04 PM
Quote from: wdm2005 on July 11, 2008, 08:27:04 AM
demo

http://www.adrevenueshare.com/index.php?topic=17.0
thanks!

i noticed in the demo, that the PR img is clickable... anyway to turn that off??
Title: Re: pagerank bbcode v1.3
Post by: SA™ on July 11, 2008, 07:34:55 PM
ill have a look see what i can do for you
Title: Re: pagerank bbcode v1.3
Post by: Apllicmz on January 04, 2009, 06:11:01 PM
When update dont forget portuguese_pt
<file name="$themedir/languages/Modifications.portuguese_pt.php" error="skip">
    <operation>
        <search position="after"><![CDATA[?>]]></search>
            <add><![CDATA[
$txt['usepagerankonprofiles'] = 'Utilizar PageRank no Perfil';
$txt['pr'] = 'PR:';
$txt['pagerank'] = 'PageRank #';
$txt['pagerank_desc'] = 'Google PageRank';
$txt['pagerank_outof'] = 'fora de 10';
]]></add>
    </operation>
</file>


<file name="$themedir/languages/Modifications.portuguese_pt-utf8.php" error="skip">
    <operation>
        <search position="after"><![CDATA[?>]]></search>
            <add><![CDATA[
$txt['usepagerankonprofiles'] = 'Utilizar PageRank no Perfil';
$txt['pr'] = 'PR:';
$txt['pagerank'] = 'PageRank #';
$txt['pagerank_desc'] = 'Google PageRank';
$txt['pagerank_outof'] = 'fora de 10';
]]></add>
    </operation>
</file>
Title: Re: pagerank bbcode v1.3
Post by: SA™ on January 04, 2009, 06:43:04 PM
thanks ;)
Title: Re: pagerank bbcode v1.3
Post by: Angie on Dialysis on January 29, 2009, 02:59:36 AM
Quote from: wdm2005 on July 11, 2008, 08:27:04 AM
demo

http://www.adrevenueshare.com/index.php?topic=17.0

Doesn't work anymore so a screenshot would be well worth it ..

QuoteFirefox can't find the server at www.adrevenueshare.com.
Title: Re: pagerank bbcode v1.3
Post by: yetj on January 29, 2009, 02:05:07 PM
Hello, below are Polish translate  ;D


<file name="$themedir/languages/Modifications.polish.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['usepagerankonprofiles'] = 'Użyj PageRanku na Profilach';
$txt['pr'] = 'PR:';
$txt['pagerank'] = 'PageRank #';
$txt['pagerank_desc'] = 'Google PageRank';
$txt['pagerank_outof'] = 'poza 10';
]]></add>
</operation>
</file>



<file name="$themedir/languages/Modifications.polish-utf8.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['usepagerankonprofiles'] = 'Użyj PageRanku na Profilach';
$txt['pr'] = 'PR:';
$txt['pagerank'] = 'PageRank #';
$txt['pagerank_desc'] = 'Google PageRank';
$txt['pagerank_outof'] = 'poza 10';
]]></add>
</operation>
</file>
Title: Re: pagerank bbcode v1.3
Post by: SA™ on January 30, 2009, 02:37:00 PM
thansk
Title: Re: pagerank bbcode v1.3
Post by: No-Half-Measures on May 20, 2009, 07:56:29 PM
Im Getting this Error  :(


Table '####_smf1.smf_pagerank' doesn't exist
File: /home/####/public_html/forum/Sources/Subs.php
Line: 3751
Title: Re: pagerank bbcode v1.3
Post by: mirahalo on October 02, 2009, 02:08:39 PM
@No-Half-Measures   if you still want help:


run this query in to  your phpmyadmin:

   CREATE TABLE IF NOT EXISTS `{$db_prefix}pagerank` (
`url` varchar(32) NOT NULL,
`pr` tinyint(2) NOT NULL default '0',
`timestamp` int(10) NOT NULL default '0',
PRIMARY KEY  (`url`) )


replace  {$db_prefix} with the prefix or your tables ;)


greetings!
Title: Re: pagerank bbcode v1.3
Post by: mirahalo on October 24, 2009, 09:48:47 PM
ok, this mod is officially take it by me ;)  its now compatible for 2.0RC1.2 and 1.1.10, heres the changelog:

Changelog
1.0 - 17th August 2007
o Initial release.
1.1 - 9th October 2007
o Added Turkish/Turkish-utf8 language support (Thanks to Kapadokyali)
1.2 - 8th December 2007
o Added table to cache pagerank data for 7 days
o Changed to use smf fetch_web_data to try to overcome host restrictions
o Added script to drop the pagerank cache table on uninstall
o Re-wrote most of the pagerank functions
1.3 - 9th January 2008
o New readme
o Fixed a minor error
1.4 -  24th October 2009
o take over by 130860
o upgrade to work with  2.0 RC1.2
o added polish and Portuguese languages 


-Special thanks to Arantor  (http://www.simplemachines.org/community/index.php?action=profile;u=53626) who pretty much do all the code for me :P  many thanks!


to upgrade, please uninstall the previous version en install the new one ;)
Title: Re: pagerank bbcode v1.4
Post by: mirahalo on November 11, 2009, 05:23:09 PM
quick update to work with 2.0RC2, did a minor change to create the table and a change in profile.template.php, heres de changelog:

Changelog
1.0 - 17th August 2007
o Initial release.
1.1 - 9th October 2007
o Added Turkish/Turkish-utf8 language support (Thanks to Kapadokyali)
1.2 - 8th December 2007
o Added table to cache pagerank data for 7 days
o Changed to use smf fetch_web_data to try to overcome host restrictions
o Added script to drop the pagerank cache table on uninstall
o Re-wrote most of the pagerank functions
1.3 - 9th January 2008
o New readme
o Fixed a minor error
1.4 -  24th October 2009
o take over by 130860
o upgrade to work with  2.0 RC1.2
o added polish and Portuguese languages
1.5 - 11th November2009
o Added support for 2.0RC2 


this version is only for 1.1.10 and 2.0RC2

Title: Re: pagerank bbcode v1.5
Post by: impreza on January 02, 2011, 09:57:28 AM
Very cool modification, thank you very much for her to build
Title: Re: pagerank bbcode v1.5
Post by: shubha on May 17, 2012, 01:41:12 PM
This will be update for 2.0.2 or we have to leave as it is.
Title: Re: pagerank bbcode v1.5
Post by: Shrink on November 01, 2012, 04:26:34 PM
Can you please tell me how page rank is obtained??