Updated Blog Topics Plugin

After some feedback, I’ve updated the blog topics plugin.

New features:

  • New 3-in-1 widget replaces previous widget
    • Display blog topic (linked to blog-topics.php page which displays list of all blogs by topic)
    • Display related blogs
    • Display related posts
  • Everywhere queries are run, the main blog is excluded
  • Example front-page.php and blog-topics.php file updated to use the default WPMU theme

Most importantly, I’ve found a permanent home for the blog topics code. You can now find the code over at the plugins directory at wordpress.org. I’ll make updates to the code base there, and try to remember to update here as well.

Blog Topics Plugin Code


49 thoughts on “Updated Blog Topics Plugin

  1. Thanks a lot. You should include more info about upgrade.

    “On the mother blog, create a page that uses the “Front Page” template. Select Settings -> Reading and select that page as the “static” page to use for your main page.”

    Of course we can use that page as any other page, right? It doesn’t have to be blog’s main page. Also, can we use that template or any other blog? I don’t see why we couldn’t. Thanks once again.

  2. Good point – to upgrade you can simply replace the existing files. Nothing else should need to be changed. (I’m new to this plugin dev stuff.)

    Yes, you can re-use the front page code on any page. In fact, if you don’t want it called “front page” for the template, just go into the front-page.php file and change the template name. I maybe should have made that the “blog topics” template, eh?

  3. Another question… three actually.

    1. As ‘Topic’ is actually a ‘Category’ it would be cool feature to add blog to more than one ‘Topic’. Wouldn’t it? How to do that?

    2. I have some problems with styling plugin’s widget. When I use ‘Sitewide Related Blogs’ an extra ‘li’ shows up. I’d like tio get rid of it. Any idea?

    3. I want my widget to have default settings for every new blog created. So I want ‘Sitewide Related Blogs’ to show up, witf the title ‘Related’ and ‘5’ as value for related blogs. Can You help me with this?

  4. Number 1 isn’t possible with this version. I’ll try to work it into a later version, but it requires changing some of the core pieces of the plugin. What I’m thinking is that site admins would want the ability to say that blogs can either be in 1 or multiple topics (at least I know we would – our topics are pretty much mutually exclusive). But, I’ll work on it for a future release.

  5. line 177 of cets_blogtopics.php shoud be
    if ($potential_tags_blog == (int) $potential_tags_blog && $potential_tags_blog””) {

    otherwhise it could create an erroneus select

  6. if $potential_tags_blogs is empy it does’nt works. the select becomes like “AND b.blog_id != ORDER BY b.last_updated desc;” which is erroneus. in the previous comment you have to read: && $potential_tags_blog ‘not equal to’ ””)

  7. Hi there. Any updates for this useful plugin? Multiple Topics or bether yet Parent – Child Topics option would really improve this baby. Think about it;)

  8. Very good Plugin. Thanks a lot.
    The file cets_blogtopics.php needs a “>” at line 199.

    1. A description of the category (e.g. in sidebar Blog Topic)
    1b. Categories with description in the Main Blog (links to 2.)

    2. Related Posts on a side (with post title, content, Blogname, author, image…)

    I hope, you work on the next version!

  9. I got a simple request.

    I haven’t tried it as yet but can this display the number of blogs under each topic. I wanna use in a way similar to unblog.fr where the a list is shown on the frontpage with the number of blogs under each topic.

  10. David – the current version in the repository now shows the count of the blogs for each topic on the listing page.

    Stefo – I added the missing > on line 199 – thanks for catching that.

    I may have time to work on some more of the requested updates soon.

  11. The topic of a blog is not set when a new blog is created by a user during the signup process.

    It only works when you go to settings and then set it. Only then the blog in question is listed among the others.

    I verify this against my live install and a brand new install i did today which had no other plugins.

    Please fix ? And thanks for your work.

  12. The relations table wouldn’t get updated when a blog was deleted, so I added an action.

    function update_relationships($blog_id)
    global $wpdb;
    $results = $wpdb->query( $wpdb->prepare(“DELETE FROM $this->table_relationships WHERE blog_id = %d”, $blog_id) );

    add_action(‘delete_blog’, array(&$cets_wpmubt, ‘update_relationships’));

    You should include this in the next version.

  13. Can some one please help me?
    I am using wpmu 2.6.5
    I followd the installation instuctions, but the tables are not created in the database. and when I add a new topic it does not show under “Blog Topics Management”.
    So I created the 2 tables in phpmyadmin, I used this query for cets_topics:
    CREATE TABLE cets_topics (
    id int(11) unsigned NOT NULL auto_increment,
    topic_name VARCHAR(55) NOT NULL default ”,
    active int(1) unsigned NOT NULL default 1,
    UNIQUE KEY id (id)

    And I used this one for cets_topics_relationships:

    CREATE TABLE cets_topics_relationships (
    blog_id int(11) unsigned NOT NULL,
    topic_id int(11) unsigned NOT NULL,
    UNIQUE KEY id (blog_id, topic_id)

    But still, no topic is added and the tables are empty even if I add topics.

    Help is badly needed

  14. Oh, I forgot to tell you that I had previously installed that plugin after a fresh wpmu installation, but after I added some other plugins I went stupidly to phpmyadmin and just dropped the 2 tables cose I wanted to install the plugin again ! I which I never did that 😦

  15. Thumbs issue. HAllo, if you look at the widgets on the right column wich will display latest posto from a blog topic, you can see that if there is an image this mess up things.
    Is it possible to overcome this issue somehow? Where to look for it?

    1. I’ll look into this. I’ve made lots of unreleased changes to this plugin (we changed how we wanted it to work internally). And, I know I dealt with this issue. So, it’s just a matter of finding the time to dig up the piece from the new version and figure out where it goes in the old version.

  16. I think it’s enough to post the summary/excerpt (if any otherwise only the title) instead of a piece of the full text.
    I fixed it up this way and works like a charm

    1. Nope. It’s not something that we’ve wanted, so I haven’t done it, as it radically alters the structure of the plugin. Andrea and Ron did a multi-category version that they haven’t released… might want to check with them.

  17. Hi, I love this — it works perfectly! (2.9.1) I would like to add the following (easy?) funtionality, but I need syntax help.

    Admin user makes a page named Cats and a page named Dogs. Admin has also made a topic named Cats and a topic named Dogs.

    If page title == a defined topic title, list sites categorized with this topic.

    [page] Cats

    [page] Dogs
    German Shepard


    1. I’m actually working on updates to the plugin right now – expect them sometime this week. Included will be a sample theme that has a /topic/ page and a /site/ page. Like this site:
      http://fyi.uwex.edu/topic/youth/. If you want to be a tester of the upgrade, let me know. It’s not quite ready for testing yet, but it’s getting there.

      1. Just wondering if you ever make any progress on this? I really just need a little syntax help so I can modify the code in cets_blog_topics_list.php

        How can I get the idtopic number to return as a title (that I can then match to a page title)?


  18. Недвижимость Севастополя. Дом на берегу моря в Севастополе. Продается 3-х этажный дом новой постройки,
    Общая площадь дома 280 кв.м. хоз.пристройка, гараж, бассейн.
    Свет, вода, газ. Участок 10 соток. Гос. акт.
    170 000 usd
    Недвижимость Севастополя. Квартиры, земельные участки, дома в Севастополе

    1. I haven’t done any localization on this plugin. If you want to contribute to it, you may. I’m not super actively maintaining it at this point because my job has re-focused on other technologies.

  19. Привет форумчане.
    Вообщем, показали
    viebal.ru с огромной базой
    порно клипов. Делюсь с удовольствием здесь.
    Смело заходите и бесплатно качайте, видео сайт обновляется ежедневно,
    очень много частного видео, которое нигде не встретишь.
    Если есть еще новые порновидеосайты – выкладывайте здесь – буду благодарен, посмотрим и поанонируем:)

  20. 4 ломтика хлеба, 200 г жареного или вареного мяса, 2–3 вареных яйца, 50 г сливочного масла, 5 перышек зеленого лука, зелень.Сваренное до готовности или тщательно прожаренное мясо пропустите через мясорубку, в ней же измельчите сваренные вкрутую яйца. В полученную массу добавьте мелко нашинкованный зеленый лук, посолите и разотрите с размягченным сливочным маслом. Намажьте пасту на хлеб и украсьте бутерброды веточками зелени.
    приготовление салатов из мясо
    Сладкие и десертные блюда японской кухни отличаются весьма своеобразным и приятным вкусом и готовятся по оригинальным рецептам, многие из которых сохранились с древних времен. Японские кулинары используют для приготовления таких блюд различные фрукты и овощи, ягоды, орехи, молоко и молочные продукты. В меню японцев широко распространены засахаренные фрукты и овощи. Большой популярностью пользуются засахаренные лепестки цветов, особенно хризантем, которые обладают необыкновенно приятным и нежным вкусом.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s