For those that like to track Google Pageranking for their pages comes this new pepper. I had plenty of time to think on it today while waiting in court to have my speeding ticket resolved. Luckily I got the 4 point ticket reduced to 2 points with a doubled fine. Yay.

This pepper simply displays the Pagerank for each of the top popular pages. The number of pages displayed comes from the default pepper’s rows per pane setting. Knowing that Google gets cranky about constant requests for pageranks, I figured a little caching was in order. Since pagerank does not change so often, caching is set for 7 days. I don’t recommend changing this, but the setting is in the code and if there is enough demand I can add a pulldown to the preference pane.

This has been created for Mint 1 since I don’t have Mint 2 yet, but it doesn’t do anything exotic, so it should still work. Once I have the new Mint installed, I’ll take care of any errors that anyone finds.

You can pick up the new pepper at http://www.shokk.com/downloads/prank.zip

43 responses to “Google Pagerank Pepper for Mint: Prank”

  1. Mike Haugland Avatar

    The ZIP file doesn’t seem to be opening on my Mac. It says it’s not compressed or encoded. Could you doublecheck to see if it opens for you?

  2. Ernie Oporto Avatar

    It does indeed uncompress…

    [root@chewbacca prank]#unzip -l /web/shokk/downloads/prank.zip
    Archive:  /web/shokk/downloads/prank.zip
      Length     Date   Time    Name
     --------    ----   ----    ----
            0  01-30-07 11:36   ernieoporto/
            0  01-30-07 18:21   ernieoporto/prank/
         4424  01-30-07 18:21   ernieoporto/prank/class.php
          218  01-30-07 11:37   ernieoporto/prank/pr1.gif
          236  01-30-07 11:37   ernieoporto/prank/pr10.gif
          221  01-30-07 11:37   ernieoporto/prank/pr2.gif
          225  01-30-07 11:37   ernieoporto/prank/pr3.gif
          226  01-30-07 11:37   ernieoporto/prank/pr4.gif
          229  01-30-07 11:37   ernieoporto/prank/pr5.gif
          227  01-30-07 11:37   ernieoporto/prank/pr6.gif
          226  01-30-07 11:37   ernieoporto/prank/pr7.gif
          229  01-30-07 11:37   ernieoporto/prank/pr8.gif
          232  01-30-07 11:37   ernieoporto/prank/pr9.gif
          156  01-30-07 11:37   ernieoporto/prank/print.gif
          213  01-30-07 12:27   ernieoporto/prank/pr0.gif
         6934  01-30-07 18:18   ernieoporto/prank/pagerank.php
            0  01-30-07 18:23   ernieoporto/prank/cache/
     --------                   -------
        13996                   17 files
    
    
  3. R Mitchell Avatar
    R Mitchell

    Doesn’t uncompress for me either. Using latest version of Safari on the latest version of OS X.

  4. Kyle Rove Avatar
    Kyle Rove

    No go here on OS X:

    $ unzip prank.zip
    Archive:  prank.zip
      End-of-central-directory signature not found.  Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive.  In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.
    unzip:  cannot find zipfile directory in one of prank.zip or
            prank.zip.zip, and cannot find prank.zip.ZIP, period.
  5. Ernie Oporto Avatar

    I don’t have a Mac for testing, so if anyone wants to donate one… =)

    Anyway, I’ve made a new one in the same location, only using Windows instead of Red Hat to make the zip file. Please let me know if this one is any better.

  6. R Mitchell Avatar
    R Mitchell

    Still no go here in Safari or Firefox.

  7. Ernie Oporto Avatar

    OK I’ve updated prank.zip to version 1.01 to include some fixes and the prNA.gif. I’ve also added the preferences pane to allow you to change the cache time. Same URL as before for the zip file. Anyone having trouble with the zip can get the tar.gz version from the above link.

  8. Mike Haugland Avatar
    Mike Haugland

    Decompression is still failing on the new ZIP and the TAR.GZ file.

  9. matthew Avatar

    Download never completes, hence it wont decompress. Maybe the original is corrupt.

  10. kopfkribbeln Avatar
    kopfkribbeln

    Doesn’t work for me eather!

  11. Dirk Ginader Avatar

    Same Effect for me. After the download is complete it fails to unpack (either zip or tarball). I’m using firefox 2 and winrar on WIN2000 and never had any problem like this

  12. Markus Avatar
    Markus

    maybe the link is broken?

  13. Ernie Oporto Avatar

    Yes, I am seeing the archive show as invalid now that I check from work. I’ll find another way to distribute this to everyone.

  14. Ernie Oporto Avatar

    Fixed! Seems to have been a problem with the DLoads pepper. I was still on 0.70 for some reason and just updated it to 0.72. Still no help.

    I’ve changed it over to Download Counter for tracking and verified that it’s all working again. Sorry for the download trouble, guys.

  15. R Mitchell Avatar
    R Mitchell

    Got it installed. Now the page rank image is not displaying. Just the ? for missing image. If I try to click and open that image in a new window, the address it shows is http://www.myaddress.com/mint/pepper/ernieoporto/prank/prNA.gif

    I noticed that in your file, prNA is a jpg instead of a gif.

    However, I know that some of pages have ranks. Surely everything shouldn’t be listed as NA. 😦

    Thanks for releasing this by the way. Cool idea. I’m sure the kinks will be ironed out shortly.

  16. R Mitchell Avatar
    R Mitchell

    Okay, I think I see what the issue is with the page rank. I think I have google set up to prefer my site listed as http://www.mysite.com, but mint is stripping the www out of all the links so that what you are checking is mysite.com. Whereas http://www.mysite.com ends up with a paltry 2, mysite.com gets a 0.

  17. Tanc Avatar
    Tanc

    Yep, can’t decompress either on a Mac, using various different utilities. Can you compress it with some other program?

  18. Ernie Oporto Avatar

    Smacks forehead.
    OK I changed the jpg to a gif.
    Version number is up to 102.

    Please look into adding something like the following to your web site’s root .htaccess so that anyone going to mysite.com gets redirected to http://www.mysite.com. This is a known SEO issue.
    RewriteCond %{HTTP_HOST} !^www\..* [NC]
    RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,NC]

    or

    RewriteCond %{HTTP_HOST} ^yourdomainname\.com
    RewriteRule ^(.*)$ http://www.yourdomainname/$1 [R=permanent,L]

  19. Elliott Cable Avatar

    http://no-www.org/

    Check it out. Maybe you’ll learn something.

    WWW is evil! Don’t support it!

  20. Ernie Oporto Avatar

    And version 1.03 is now up to fix a problem that collided with Fresh Mint and probably broke a lot of other things.

  21. Kyle Korleski Avatar

    Does it work with Mint 2?

  22. Ernie Oporto Avatar

    Don’t know yet. I have a Mint 2 license, but I haven’t installed it yet as I’m waiting for more bug fixes and conversions of current peppers. It never hurts to install it and find out.

  23. Jamie Huskisson Avatar

    This seems to be working perfectly fine with my Mint 2 installation 🙂 Will let you know if anything goes wrong..

  24. Ozzpot Avatar
    Ozzpot

    I have had this installed on my Mint 2 for a few days now. Every page has the NA graphic, even though the site is over a year old and I know all the pages are top ranked. Any ideas what could be causing this, or how I could fix it?

    Please bear in mind I know squat about the under-the-hood workings of this internet thing. Installing Mint was a confusing foray into the unknown for me. I have no idea what an htaccess is, what it does, or which way up I would have to hold it to make it work.

    Is there anything simple I can do to get this working?

    Thanks in advance for any help, and for making this pepper!

  25. Tanc Avatar
    Tanc

    I also get an NA graphic for each page on Mint 2. Not sure what is up with this pepper…

  26. Ozzpot Avatar
    Ozzpot

    Thanks for the reply Ernie, but I tried unchecking the “Trim www and index.* from urls”, but it made no difference.

    I’d love to try the htaccess thing, but like I said, I have no idea what that is, what it does, and where I’d find it. I know almost nothing about the code side of webmastering. I can mess around with CSS, make a site look pretty much how I want, but when it comes to databases, php, htaccess, (whatever the heck those things are), I am literally clueless. You might as well be speaking Japanese!

    Can you tell me where this htaccess thing is, and exactly what I need to do to it?

    Thanks. 🙂

  27. Ernie Oporto Avatar

    Make sure that the box “Trim www and index.* from urls” is unchecked. Your site is likely indexed for http://www.site.com and not site.com. Believe it or not, these are two different things. This is a known issue for SEO folks, so to make sure that your site is indexed properly, see my comments above about adding a couple of lines to your .htaccess file.

  28. Ernie Oporto Avatar

    Use the page at this site to check http://www.site.com and site.com for the pagerank. Likely you will find one or the other does not have a pagerank.
    http://www.pagerankprediction.com/

    htaccess is a file, actually called “.htaccess” that can be placed somewhere on the web server to alter the behavior of the server. In this case, I recommend that it be placed at the root of the site with the lines indicated within the file so that attempts to go to site.com are redirected to include the http://www.site.com part. This is really more for indexing purposes these days – no one thinks of http://www.google.com, but instead just google.com. But the indexes can still come to http://www.site.com and that might be what Google knows the site as for its pagerank. Once that is in place it can take some time for Google’s pagerank scoring to adjust for your site.

  29. Ozzpot Avatar
    Ozzpot

    Thanks for the explanation Ernie.

    I created a file called .htaccess consisting of just the code you posted earlier, and put it in the root of my site. I don’t know if it’s made ay difference, because my Prank is exactly the same as it was (all pages showing NA graphics), and it’s now a couple of days later. The predicter site says that most of my pages are rank 5 or thereabouts. Assuming this has worked, how long do you think it would be before I should see a change?

  30. Ernie Oporto Avatar

    What is the URL of the site you are checking?

  31. Ozzpot Avatar
    Ozzpot

    http://www.ozzdesign.com

    My Mint is in in open mode too, so you can go see:

    http://www.ozzdesign.com/mint/

  32. Ernie Oporto Avatar

    OK, so as I figured, ozzdesign.com itself has a pagerank of zero, while http://www.ozzdesign.com has a pagerank of 4. Having just unchecked the “trim http://www.” you won’t see those pages coming up yet – so far they have all been trimmed going into the database. Most of your traffic is coming to URLs like http://ozzdesign.com/SnapShooter/SnapShooter.php so you can see that they will all appear as N/A right now.

    After having done the .htaccess changes, you want to test that it is working correctly. Go to ozzdesign.com and make sure that your browser is redirected to http://www.ozzdesign.com. If so, then you are all set and you have to sit back and wait. If not, you should talk with your hosting service to make sure they have not turned that off.

    Google’s spiders take between one and two weeks to notice a change, so you may not see this change for some time. Keep an eye on it and you will see the URLs begin to gain their rightful pagerank.

  33. Ernie Oporto Avatar

    I can verify that it does work with Mint 2. This is now uploaded to the Peppermill.

  34. Grant Barrett Avatar

    I have the same problem: nothing but “NA” graphics next to the most-popular URLs. My http://www.domain.com has a pagerank of 7, all my urls point to www, and I do not use the “trim urls” feature in the Default pepper. All the URLs listed in the Prank pane include “www.”

  35. Ernie Oporto Avatar

    If you are talking about doubletongued.org, that is correct. http://www.doubletongued.org has a pagerank of 7 and doubletongued.org has a pagerank of 0. This totally depends on how people are visiting your site. If everyone is coming to http://www.doubletongued.org then that’s how the site is known to Google and doubletongued.org is unknown. And it also depends on what Mint has in its database from these visitors. Quite literally, i am taking the URL from the Mint database, untouched, and passing it to Google. That’s why it is so important that you redirect people that come to doubletongued.org to http://www.doubletongued.org

    Can you take a screenshot and email it to me? Or post it on your site and post the URL in reply here?

  36. Grant Barrett Avatar

    Here’s a screen shot of the malfunctioning Prank. Note that looking up the URLs individually shows that they do have pageranks higher than zero. The second one, for example, has a pagerank of 5.

  37. Ernie Oporto Avatar

    Check the URLs individually at http://www.pagerankprediction.com
    http://www.doubletongued.org/index.php/dictionary/gfe/ has a pagerank of 5 and http://doubletongued.org/index.php/dictionary/gfe/ has a pagerank of 0.
    If Mint has doubletongued.org as the domain for that URL in its database, then you will get a 0. I can’t assume to put www at the front of the URL because there are too many cases where you could have any subdomain involved.

    It is best for the Pepper to handle the general case where you use the .htaccess redirect described above to cover any inconsistencies.

  38. Tanc Avatar
    Tanc

    This doesn’t work for me, I get the same problem as Grant Barrett. I don’t want to change my htaccess, I hate www at the beginning.

  39. Grant Barrett Avatar

    You’re missing the point, Ernesto: I already have redirects in place in htaccess of exactly that nature and have had for THREE YEARS. MInt DOES NOT HAVE doubletongued.org assumed as the URL. It’s using http://WWW.DOUBLETONGUED.ORG on EVERY URL. That’s how they’re showing up in Prank, too.

  40. Ernie Oporto Avatar

    OK, I’ll have to see about adding a debug mode so that we can get detailed output about what URLs are being requested, and exactly what the returned data looks like. It’s quite possible you’re getting non-numeric data back from Google for those URLs.

    Can you copy and paste the displayed URLs from the Prank list into an email and shoot it my way?

  41. Ernie Oporto Avatar

    Tanc,
    From what Grant says, he is following the rules for jiving with Google’s service. Yours is more of a personal preference for not following those rules, so this is not going to work for you.

  42. Ernie Oporto Avatar

    Everyone having trouble with this should download http://www.shokk.com/downloads/prank_104.zip and overwrite your current Prank install.

    It has two new debug checkboxes. One will display the info in a tooltip, the other in text within the pepper display. The former is neater but will not display the whole URL due to tooltip length limits. The latter is messier, but displays the whole URL. Let me know if there is something wrong with the URL being requested or if you are still seeing the issue.