Hello all,
I wanted to show the Alexa Info and Page Rank on my links manager page. So I modified /includes/modules/YOUR_TEMPLATE/link_listing.php and added a script I found at: http://www.hm2k.com/projects/pagerank
The mod is fairly easy to install and maybe clydejones (thanks for a great mod clydejones ) could add it to future versions with switches to turn off or on
:
Pagerank.php file above will return just the usual google pr image. If you want the image to also show the PR# like my thumbnail shows. You will have to modify line number 131:
From:
PHP Code:
$out='<a href="'.$url.'" title="'.$pagerank.'">'.$html.'</a>';
To:
PHP Code:
$out='<a href="'.$url.'" title="'.$pagerank.'">'.$html.'</a> PR'.$pr.'';
*********************************
Now upload the pagerank.php file you get from http://www.hm2k.com/ to:
/includes/modules/YOUR_TEMPLATE/pagerank.php
Open /includes/modules/YOUR_TEMPLATE/link_listing.php with you favorite php editor.
Find:
PHP Code:
if ($listing_split->number_of_rows > 0) {
Above that line add:
PHP Code:
include('pagerank.php');
*********************************
Find:
PHP Code:
if (DISPLAY_LINK_DESCRIPTION_AS_LINK == 'true') {
Above that line add:
PHP Code:
$pagePR = pagerank( zen_get_links_url($listing_query->fields['links_id']) );
*********************************
Find:
PHP Code:
if (DISPLAY_LINK_DESCRIPTION_AS_LINK == 'true') {
$lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br /><a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_description'] . '</a>';
} else {
$lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br />' . $listing_query->fields['links_description']; }
break;
Replace those lines with:
PHP Code:
if (DISPLAY_LINK_DESCRIPTION_AS_LINK == 'true') {
$lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a> | <a href=http://www.alexa.com/data/details/traffic_details?q=&url=' . zen_get_links_url($listing_query->fields['links_id']) . ' target="_blank">Alexa Info</a> | '.$pagePR.'<br /><a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_description'] . '</a>';
} else {
$lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a> | <a href=http://www.alexa.com/data/details/traffic_details?q=&url=' .zen_get_links_url($listing_query->fields['links_id']) . ' target="_blank">Alexa Info</a> | '.$pagePR.'<br />' . $listing_query->fields['links_description']; }
break;
Now your links manager will show Alexa Info | PageRank for the domains you trade links with. See Thumbnail attachment for example:
NOTE: Use this mod at your own risk, I'm not responsible for any problems you might have.
Bookmarks