Additional Info
Type
Package ID
karlbenson:pagerankbbcode
First Created
August 17, 2007, 05:07:41 PM
Last Updated
January 18, 2008, 11:43:01 PM

Google PageRank BBCode v1.3

Adds support for google [pagerank][/pagerank] bbcode for use in posts and on users profile
Compatible With 1.1.3, 1.1.4
Latest version v1.3
Downloads 3,779
Reviews 0
Rating 0/5
Subscribers 1
License (View License)
Author(s)
This mod has been taken over by WDM2005
The new link for which is http://custom.simplemachines.org/mods/index.php?mod=1227


Compatibility
For SMF 1.1.x ONLY

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

Features
o Admin setting [via Admin > Features & Options]
- 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
o Supports Languages
- English/English-utf8
- English_British/English_British-utf8
- Turkish/Turkish-utf8 (Thanks to Kapadokyali)
I welcome translations for other languages. Please post the translated language strings in the Support Topic.

Installation
Simply install the package to install on the SMF Default Core Theme ONLY.

Manual edits will be required for ALL themes (other than SMF Default Core Theme) which have a custom Profile.template.php and/or Post.template.php.

To add the BBCode button to the Post.template.php (IF the theme has a custom Post.template.php)
Open Post.template.php
FIND
'list' => array('code' => 'list', 'before' => '[list]\n[li]', 'after' => '[/li]\n[li][/li]\n[/list]', 'description' => $txt[261]),
ADD AFTER
array(),
'pagerank' => array('code' => 'pagerank', 'before' => '[pagerank]', 'after' => '[/pagerank]','description' => $txt['pagerank_desc']),


To add the PageRank to members profiles for their website (IF the theme has a custom Profile.template.php)
Open Profile.template.php
FIND
<td><a href="', $context['member']['website']['url'], '" target="_blank">', $context['member']['website']['title'], '</a>
ADD AFTER
<br/>';
// Show pagerank of Members Websites on their profile (if enabled)
if(($modSettings['usepagerankonprofiles']) && (!empty($context['member']['website']['url'])))
echo pagerank($context['member']['website']['url']);

echo '

      
You will also need to place a copy of the pagerank.gif in the images/bbc folder of EACH of your themes (eg Themes/{themename}/images/bbc)
(Note the rest of the images are called from the images folder of the SMF Default Core Theme)

If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if your using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

FIND
?>
ADD BEFORE (and translate as necessary the language strings)
$txt['usepagerankonprofiles'] = 'Use PageRank on Profiles';
$txt['pr'] = 'PR:';
$txt['pagerank'] = 'PageRank #';
$txt['pagerank_desc'] = 'Google PageRank';
$txt['pagerank_outof'] = 'out of 10';


Useful Links
SMF Package Parser
Manual Installation Of Mods
How Do I Modify Files?

Donate
Has this modification helped you? Support the developer by Donating

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

Credit
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
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: