The MU forums have moved to WordPress.org

sitemap generator from dagondesign (8 posts)

  1. Ovidiu
    Member
    Posted 15 years ago #

    I have been playing around with the sitemap plugin from: http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/

    but I had some problems with it as it treated my pages just like posts. So one of my friends modified tho code. I have included below my comment on the authors site:

    hello alleister,

    like I told you in previous comments here I was trying to get your plugin to work with wpmu. As it did not work, due to some differences in the table structure I asked a friend to change it for me.
    Here are the differences as I have found out (no guarantee though):

    wp: if post_status = static => it is a page
    wpmu: if post_status = published THEN check if post_type = page or post to find out if its a page or a post.

    The relevant data that had to be changed was this:

    $items = $wpdb->get_results("

    SELECT post_title, ID, post_parent, post_name

    FROM {$table_prefix}posts, {$table_prefix}post2cat, {$table_prefix}categories

    WHERE post_parent = '$id'

    AND post_status = 'publish'
    AND post_type ='page'

    AND ID = {$table_prefix}post2cat.post_id

    AND {$table_prefix}post2cat.category_id = {$table_prefix}categories.cat_ID

    AND post_date < NOW()

    AND post_status != 'draft' AND post_status != 'attachment'

    $extra_checks

    ORDER BY {$ddsg_page_sort_order}, cat_name

    ");

    I hope my code doesn't lose its formatiing.

    P.S. the changes were done by adrian.ceapa@zice.ro and I hope it works out for all of you using wpmu

  2. boetter
    Member
    Posted 15 years ago #

    Is your friend for hire?

  3. Ovidiu
    Member
    Posted 15 years ago #

    lol, well, kind-of...

    I checked the code to see whats wrong, just told him what to change, he is actually my employee, I just "misused" him for some code changes I had no time to do.

    He is a IT student, he is just learning php and mysql while helping me to revamp some sites.

    But if you run into general problems trying to adapt plugins, we might help you as we are doing exactly that for several sites right now. Maybe we can exchange ideas, or share mods of changed plugins.

  4. boetter
    Member
    Posted 15 years ago #

    Ovidiu: How do I contact you?

  5. Ovidiu
    Member
    Posted 15 years ago #

    ooops,

    use ovizii 'at' zice.ro

  6. drmike
    Member
    Posted 15 years ago #

    We had one of the other sitemap generators working. You may want to do a search for it here in teh forums.

  7. Ovidiu
    Member
    Posted 15 years ago #

    I guess you refer to arne brachhold sitemap generator?

    there is a big difference: Arnes sitemap generator generates a sitemap for inclusion in google, this plugin generates a really nice and customizable sitemap for displaying to the visitors, check it out here on a testsite: http://zice.ro/sitemap/ and compare it to arnes output: http://zice.ro/sitemap.xml (I have added a style to arnes sitemap so you can also visualize it in a browser :-)

    waiting for your comments ;-)

  8. suleiman
    Member
    Posted 15 years ago #

    Oooooo I want!

About this Topic