In: , , , , ,
On: 2004 / 10 / 02 Viewed: 68095 times
Shorter URL for this post: http://ozh.in/2q
Outdated stuff: this was written in 2004 for WordPress 1.1 or something. Does not work with modern versions of WordPress


Inspired by Extisp.icio.us, I've written a script that produces the same kind of results. Categories are randomly positionned, font size and colors show how many posts you have in each. Install the script, reload till you get something less random than pretty, then reload again :) Works best if you have a lot of categories with varying number of posts.

Get the script : either the .txt version and Save As .php, or copy & paste the colorized .php version into a blank file.

Shorter URL

Want to share or tweet this post? Please use this short URL: http://ozh.in/2q

Metastuff

This entry "WordPress Category Map" was posted on 02/10/2004 at 10:01 pm and is tagged with , , , , ,
Watch this discussion : Comments RSS 2.0.

30 Blablas

  1. 1
    Stupid Simple Blog United States »
    trackback on 08/Oct/04 at 8:03 am # :

    extisp.icio.us
    How can you not fall in love with the web? Followed a breadcrumb trail from PhotoMatt to planet Ozh to extisp.icio.us, entered my del.icio.us username as instructed, and was floored by the result. Way fucking cool.

  2. 2
    omjn Australia »
    commented, on 25/Oct/04 at 8:07 am # :

    hi. i really dig your script, or at least, its intention. can't get it to work on my site at all. getting an unexpected TString parse error on line 24. any ideas?

  3. 3
    Ozh France »
    commented, on 25/Oct/04 at 10:01 am # :

    Hmmm, weird, the source shown here is the exact replica of my live example. I've also tested it on WP 1.2 and on a (rather old) nighlty build 1.3
    What's your version of WP ? You sure you didn't edit the script and forgot something ?

  4. 4
    omjn Australia »
    wrote, on 26/Oct/04 at 9:09 am # :

    yeah, just a copy and paste. my site is default 1.2 install more or less. I'll have a more thorough attmept later today. I'm assuming when you say install the script you just mean drop it in the root of the WP install?

  5. 5
    Ozh France »
    replied, on 26/Oct/04 at 11:11 am # :

    Exactly, it is supposed to work with no editing, in your blog root. Maybe a phpinfo() will help if you can't get it to work.

  6. 6
    Angsuman Chakraborty India »
    commented, on 17/Mar/05 at 5:46 am # :

    I think omjn's problem is because the script should be under wp-content and not wordpress root. Or he has to edit the script.

  7. 7
    Heatsink Canada »
    commented, on 05/Apr/05 at 3:11 pm # :

    Check there are no blank lines at the end of your script. When you cut and paste there's a tendencey to take some blank lines at the end. I'm really not sure why, but this appears to cause the PHP engine some problems.

    I've had that happen to me twice, and deleting the blank lines at the bottom of the script cures it.

    Shrug..give it a whirl.

  8. 8
    Heatsink Canada »
    commented, on 05/Apr/05 at 3:39 pm # :

    Any idea what's causing this error on my end:

    Parse error: parse error, unexpected T_STRING in /var/www/html/blog/wp-content/plugins/runphp.php(46) : eval()'d code on line 14

    ?? I've played with the code in run_php.php and it seems to be doing the right thing, but I don't really understand what the eval($phpcode) line does.

  9. 9
    Heatsink Canada »
    wrote, on 05/Apr/05 at 3:57 pm # :

    I should add that when I access the script directly from my browser it works fine – I only get this error when I try to incorporate it into a page.

  10. 10
    Ozh France »
    wrote, on 05/Apr/05 at 6:22 pm # :

    Sorry, not only I'm not using "runphp" but I didn't understand what you're trying to do :)
    But from what I see on your blog it seems to be running fine.

  11. 11
    Clarke United States »
    thought, on 12/Apr/05 at 8:09 pm # :

    Is there any way to include this file in a page somehow using php require or include commands? I would be editing it into a wordpress page and using the phpexec command I assume…

  12. 12
    Ozh France »
    said, on 12/Apr/05 at 10:37 pm # :

    Well, of course, you could simply include('wordpress-category-map.php'), but this would not make sense since the output is printed all over the page ….

  13. 13
    Anomalia grafica » Blog Archive ... United States »
    pingback on 24/Apr/05 at 8:57 pm # :

    [...] Mappa del blog Se usate WordPress, con questo script è possibile generare una mappa dei post, raggruppati per cat [...]

  14. 14
    Creation Robot United States »
    trackback on 25/Apr/05 at 5:35 pm # :

    Lemmings sans mullet

    Zeldman has declared tag clouds as uncool as the mullet. What does this mean excactly? It means I had to bother to get one.

    So after a search for the easiest to impliment version, taa-daa, on the left you see my tag cloud, with the 'blog' tag excl…

  15. 15
    Prem United Kingdom »
    said, on 06/May/05 at 2:12 pm # :

    I have just started testing this plugin. Very good work.

    It is good to be able to see the contents of a site in a more visual way than simple heirarchical lists.

    I have some ideas for some ways that this map could be taken further…

    A great addition would be to use the placement and proximity of different category words on the map. For example, if I categorise a particular post as "music" and "politics", then that will bring the "music" and "politics" categories slightly closer to each other on the map.

    This would take the map one step further – where at the moment it visually displays the volume of posts within each category, this extra step would be to also display the relationships that exist between the categories themselves. This relationship is created because posts are connecting points between different categories.

    The categories with the greatest volume of posts could be at the centre of the map, with lesser categories rdiating out from the centre.

    As an alternative, the "latest activity" of the site could be mapped, rather than the "total volume of posts". This would give another view into the site.

    You could also consider the number of comments made to posts within a particular category. So a category with a much more lively community of commentors could be understood by looking at the map. The category names could have differences in colour or boldness depending on how active the commenting is in that category.

    And again, you could consider "most recent commenting activity" as a differnt way to view the site.

    So, there you go… some ideas.
    It would be great to get some intelligent mapping happening. As a free software community, we can create something. I wonder if what I'm thinking about already exists out there.

    Something in the right direction (though not free software) ThinkMap.

    Prem.

  16. 16
    dharmasphere » Category Map United Kingdom »
    pingback on 07/May/05 at 11:27 am # :

    [...] ts on the site and the relative differences in category size gets more pronounced. I have posted some comments the plugin's website, about [...]

  17. 17
    Ozh France »
    thought, on 09/May/05 at 10:40 am # :

    Interesting comments & ideas. I guess I should consider adding them to my "to do or at least to think about" list ;)

  18. 18
    Gary United States »
    commented, on 09/May/05 at 8:53 pm # :

    Cool idea, but I think the random placement makes it seems strange. When I look at the list I try to make sense out of the placement.

    I like the idea of either volume, or most recent being a factor – and if I have two categories that show up in more posts than others those two categories should show up close together. Otherwise why not just do an alpha sort?

  19. 19
    conundrum Netherlands »
    trackback on 04/Sep/05 at 5:02 pm # :

    Charting

    Nuovo anno, nuovo plugin per WordPress.

    Lo trovate qui, se avete WordPress.

  20. 20
    苟世录 » Blog Archi... United States »
    pingback on 13/Oct/05 at 5:55 pm # :

    [...] 一个类似于tag集的插件wordpress category map,担心显示中文有问题,还好我的map没有问题。 [...]

  21. 21
    cifero Italy »
    thought, on 24/Nov/05 at 4:28 pm # :

    great script!

    thankyou

  22. 22
    Joseph United States »
    wrote, on 30/Nov/05 at 12:54 pm # :

    I see no directions on how to go about implimenting that script.

    Do you add it to plug ins onWP or do you access it via a link or what.

    Please be more specific and understand not everyone who reads these are as proficient in server side and script languages as some.

    Thanks.

  23. 23
    Ozh France »
    replied, on 30/Nov/05 at 3:53 pm # :

    Joseph : you just put this file on your server, for example in /wp-content/, or edit its first line to change, if needed, the path to wp-blog-header.php

  24. 24
    Eliecia Malaysia »
    wrote, on 06/Dec/05 at 8:34 am # :

    Hi Ozh,

    Can this script count the links in the "sidebar" as well..? Can you teach me how to modify? If it's possible can You kindly mail me Your reply..?

    Thanks a lot for Your attention…

    -Elie

  25. 25
    Ozh France »
    thought, on 06/Dec/05 at 10:39 am # :

    Sorry I don't even understand your question :/

  26. 26
    marco Italy »
    said, on 12/Jul/06 at 10:21 pm # :

    hi,
    my php file (wp-blog-header.php) is located in the main root (the exactle url is http://www.marcoziero.it/wp-blog-header.php);
    i modify your php file and i put this url (http://www.marcoziero.it/wp-blog-header.php) in the editable area.
    then i rename your php file in mappa-del-sito.php and i put it in the same root (http://www.marcoziero.it), but when i go to http://www.marcoziero.it/mappa-del-sito.php with my browser, it doesn't work.
    what can i do to make it works correctly?
    thanks

    marco from italy

  27. 27
    Wordpress Category Map - WP Plugin Archi... Germany »
    pingback on 04/Mar/09 at 1:31 pm # :

    [...] WordPress Category Map Plugin von planetozh.com erzeugt aus Kategorien eine Art Tag Wolke. Das Plugin läuft nur auf [...]

  28. 28
    Levent Turkey »
    thought, on 18/Jul/10 at 9:41 am # :

    I like the idea.
    And I wonder if this plugin can be still used?

  29. 29
    Ozh France »
    commented, on 18/Jul/10 at 10:39 am # :

    Levent » Check and tell us :) Probably not though, this was written a long time ago and several stuff have changed in WP since.

  30. 30
    Levent Turkey »
    replied, on 19/Jul/10 at 1:44 pm # :

    Sorry guys.
    I couldn't get it work on my page.
    Yet, it makes me happy to see ppl who took benefit of this tip (I'm lying)

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?

 Gmail stuff »