The MU forums have moved to WordPress.org

Sitewide Feed (213 posts)

  1. ankri
    Member
    Posted 15 years ago #

    Hi guys,

    I use this plugin to show all blogposts on my frontpage.

    I used: $all_posts = $wpmu_sitefeed->get_data('posts');
    to get all the posts. (in the home.php)

    It works fine on my local server, but it doesnt on my webserver :/

    The feed does work on both servers, so i guess the plugin is installed properly on the webserver.

    I really don't have any clue, why $all_posts is empty.

    PS:
    I had some troubles installing it on both servers. I had du edit the wp-config.php.
    I had to set
    define('VHOST', 'no);
    to
    define('VHOST', 'yes');
    to get the plugin to work.

  2. drmiketemp
    Member
    Posted 15 years ago #

    Are you using a subdomain or subdirectory install of mu? That's the setting that you changed.

  3. itdamager
    Member
    Posted 15 years ago #

    ankri, I just updated the plugin to work with VHOST=no a few days back, make sure you have the newer version.

    Also, the URL to access the feed is different when you use subdirectories. (i.e. yoursite.com/?wpmu-feed=posts).

    You shouldn't have to change the VHOST setting in the config file, because if you do, you'll probably screw up your MU because that setting was chosen during install.

    I am also aware of a few glitches with the subdirectory setup (with the settings page) but nothing that should cause the get_data function to fail.

  4. ankri
    Member
    Posted 15 years ago #

    thx itdamager & drmike. I f*ed up the settings with VHOST. The feed does work now! I'm using subdirectories and got confused by the different handling

    ... but ...

    $wpmu_sitefeed->get_data('posts'); still doesn't return anything on my webserver... It works just fine on my local server. Are there any rights I have to set to the filesystem? - its the only difference between the local and the web server I can think of

  5. rickybrennanjr
    Member
    Posted 15 years ago #

    I've got to be missing something super obvious here, I'm only getting posts from blog_id 1 (or, moreover, whatever the trigger blog id is set to)

    Just for fun I tried setting $lastmodified to an older date & increased the limit , but no dice

    It probably has something to do with how my stuff (rss in particular) is set up, I'm sure I'll track it down, but was just curious if anyone had encountered this before?

    I didn't come across anything similar when searching, though I may have overlooked ...

    thanks in advance !

  6. enseignement
    Member
    Posted 15 years ago #

    It Doesn’t work for me (subdir installation).

    Well, to be honest, It works when i reset to default settings, but when i want to edit anyhting (example, feed title), i have an error message :

    Invalid trigger URL. Must be a relative path beginning with and ending with a “/”. Default: /wpmu-feed/
    Invalid comments URL. Must be a relative path ending with a “/”. Default: comments/
    Invalid pages URL. Must be a relative path ending with a “/”. Default: pages/

  7. pegasusteam
    Member
    Posted 15 years ago #

    I'm using subdirs and I got the feed to work, BUT the url's in the feed are wrong. Instead of the "blog name" in url it just says blog. I'm using the default settings.

    MU installed in subdir blogs, so displayed feed url is
    /blogs/blog/my_post_title/

    http://ecoblogs.net/blogs/?wpmu-feed=posts

    Any ideas what line I need to edit to fix this?

  8. heyguy
    Member
    Posted 15 years ago #

    Great plugin itdamager - thanks a boatload. I'm basically using it to do a "list recent posts and comments" thing on my front page. Found it to work better for my purposes than the list-all-posts plugin. You can see it in action at http://someweblog.com

    Design work aside, there are only two more pieces on the functionality side I need to get worked out:

    1. Under the title of each post I would like "Posted on Whatever Blog." You can see the "Posted on" there now as a placeholder. I've been messing with it for a few days now but I simply can't figure out where/how to get the blog name into the RSS feed and onto my page. Any ideas?

    2. I am displaying the full blog posts, and that's good, but I only want to display comment excerpts. First xx number of words. As you can see, some of those comments in the sidebar are quite lengthy and it's kind of awkward.

    Thanks in advance anybody for any help. I'll continue plugging away in the meantime.

  9. akeel
    Member
    Posted 15 years ago #

    Please help!
    How can I remove 'Hellow World!' posts from feed?

  10. lunabyte
    Member
    Posted 15 years ago #

    Um, you can't edit a simple mysql query, but want to run MU?

    http://trac.mu.wordpress.org/browser/trunk/README.txt

    "If you're not comfortable editing PHP code, taking care of a complex webserver and database system and being pro-active about following developments of this project then run, don't walk, to http://wordpress.com/ and sign yourself and your friends up to free blogs.

    It's easier in the long run and you'll save yourself a lot of pain and angst."

  11. demonicume
    Member
    Posted 15 years ago #

    thats what i love about this place, the way community members encourage people to work hard and learn. this post could have sat ignored for months, but that isnt enough. we gotta get that little dig in there to remind everyone just how superior we are. what if they did that everywhere we went for assistance... like the doctor's office or the mechanic?

    It's easier in the long run and you'll save yourself a lot of pain and angst.

    that 'pain and angst' is the point. way to push the community, Mu folks. though i knew no PHP or anything about databases, developing my little site has taught me a lot. i hope other people gain as much as i have from the experience.

  12. lunabyte
    Member
    Posted 15 years ago #

    See, you get the point.

    Sometimes it may be pointed out rather bluntly, but such is life. MU requires some basic skills. You either learn em, or you don't. If you don't then that's your call, but you'll find MU more frustrating than not.

    It isn't made for a simple drop it in, install it, and forget about it type deal. Yes, it actually requires work. How much is different in each persons situation.

    I don't see any any reason for being blunt to be called a dig.

    But, I'm not in the mood to argue at the moment.

    Tell you what, demonicume, we'll start spoon feeding everyone but when they come here to get support for their end users (because of their lacking of fundamentals, which would take care of their userbase), you can answer all those questions. Cool? M-kay, carry on.

  13. gnustavo
    Member
    Posted 15 years ago #

    I'm using WPMU-1.2.3 with the Sitewide plugin that was available today (2007-10-01). Since I'm using a subdir configuration I faced some problems during the configuration that were already discussed here. Here are some problems I had and how I solved (or bypassed) them by editing the wpmufeed.php file. (I've never coded PHP before. Most probably there are better ways to do what I intended.)

    The verification that is performed on the feed URLs doesn't like the URLs for subdir configurations. I made this correction:


    @@ -77,14 +77,25 @@
    if (preg_match('/^[0-9]+$/',$_POST['triggerblog']) && $_POST['triggerblog'] > 0) $triggerblog = intval($_POST['triggerblog']);
    else $configerror[] = 'Trigger blog must be a numeric blog ID. Default: 1';

    - if (preg_match('/^\/[a-zA-Z0-9_\/\-]+\/$/',$_POST['triggerurl'])) $triggerurl = $_POST['triggerurl'];
    - else $configerror[] = 'Invalid trigger URL. Must be a relative path beginning with and ending with a "/". Default: /wpmu-feed/';
    + if( constant( 'VHOST' ) == 'yes' ) {
    + if (preg_match('/^\/[a-zA-Z0-9_\/\-]+\/$/',$_POST['triggerurl'])) $triggerurl = $_POST['triggerurl'];
    + else $configerror[] = 'Invalid trigger URL. Must be a relative path beginning with and ending with a "/". Default: /wpmu-feed/';
    +
    + if (preg_match('/^[a-zA-Z0-9_\-]+\/$/',$_POST['commentsurl'])) $commentsurl = $_POST['commentsurl'];
    + else $configerror[] = 'Invalid comments URL. Must be a relative path ending with a "/". Default: comments/';
    +
    + if (preg_match('/^[a-zA-Z0-9_\-]+\/$/',$_POST['pagesurl'])) $pagesurl = $_POST['pagesurl'];
    + else $configerror[] = 'Invalid pages URL. Must be a relative path ending with a "/". Default: pages/';
    + } else {
    + if (preg_match('/^\?[a-zA-Z0-9_\/\-]+=[a-zA-Z0-9_\/\-]+$/',$_POST['triggerurl'])) $triggerurl = $_POST['triggerurl'];
    + else $configerror[] = 'Invalid trigger URL. Must be a query string beginning with a "?". Default: ?wpmu-feed=posts';

    - if (preg_match('/^[a-zA-Z0-9_\-]+\/$/',$_POST['commentsurl'])) $commentsurl = $_POST['commentsurl'];
    - else $configerror[] = 'Invalid comments URL. Must be a relative path ending with a "/". Default: comments/';
    + if (preg_match('/^\?[a-zA-Z0-9_\/\-]+=[a-zA-Z0-9_\/\-]+$/',$_POST['commentsurl'])) $commentsurl = $_POST['commentsurl'];
    + else $configerror[] = 'Invalid comments URL. Must be a query string beginning with a "?". Default: ?wpmu-feed=comments';

    - if (preg_match('/^[a-zA-Z0-9_\-]+\/$/',$_POST['pagesurl'])) $pagesurl = $_POST['pagesurl'];
    - else $configerror[] = 'Invalid pages URL. Must be a relative path ending with a "/". Default: pages/';
    + if (preg_match('/^\?[a-zA-Z0-9_\/\-]+=[a-zA-Z0-9_\/\-]+$/',$_POST['pagesurl'])) $pagesurl = $_POST['pagesurl'];
    + else $configerror[] = 'Invalid pages URL. Must be a query string beginning with a "?". Default: ?wpmu-feed=pages';
    + }

    if (preg_match('/^[0-9]+$/',$_POST['feedcount']) && $_POST['feedcount'] > 0) $feedcount = intval($_POST['feedcount']);
    else $configerror[] = 'Post count must be a number greater than zero. Default: 20';

    The "test link" links were wrong too. This is what I did:


    @@ -177,8 +188,13 @@
    function create_testlink($type) {
    global $wpdb;
    if ($type == 'posts') $url = $this->triggerurl;
    - if ($type == 'comments') $url = $this->triggerurl.$this->commentsurl;
    - if ($type == 'pages') $url = $this->triggerurl.$this->pagesurl;
    + if( constant( 'VHOST' ) == 'yes' ) {
    + if ($type == 'comments') $url = $this->triggerurl.$this->commentsurl;
    + if ($type == 'pages') $url = $this->triggerurl.$this->pagesurl;
    + } else {
    + if ($type == 'comments') $url = $this->commentsurl;
    + if ($type == 'pages') $url = $this->pagesurl;
    + }

    Since the feeds that were being generated weren't being correctly imported in my feed aggregator I pasted the XML on the W3C Feed Validation Service and it reported some problems.

    The first one is that some feeds had an empty guid tag. I bypassed the problem like this:


    @@ -376,7 +392,7 @@
    <dc:creator><?php the_author() ?></dc:creator>
    <?php the_category_rss() ?>

    - <guid isPermaLink="false"><?php the_guid(); ?></guid>
    + <guid isPermaLink="false"><?php if (get_the_guid()) { the_guid(); } else { permalink_single_rss(); } ?></guid>
    <?php if ($this->excerpt) : ?>
    <description><![CDATA[<?php the_excerpt_rss() ?>]]></description>
    <?php else : ?>

    Moreover, all feed items had empty wfw:commentRss tags too. I simply removed this tag altogether:


    @@ -387,7 +403,6 @@
    <content:encoded><![CDATA[<?php the_excerpt_rss() ?>]]></content:encoded>
    <?php endif; ?>
    <?php endif; ?>
    - <wfw:commentRss><?php comments_rss() ?></wfw:commentRss>
    <?php rss_enclosure(); ?>
    <?php do_action('rss2_item'); ?>
    </item>

    There are one remaining problem that I couldn't understand yet. There must be something strange in some posts and pages because the feeds generated for them are being truncated just after the link tag. This leaves the XML corrupt in a way that it cannot be imported by my feed aggregator.

    So far I was able to avoid the problem in my posts feed by reducing the number of items in it to 10. This is because the post causing the problem is currently the number 14 in the list. But whatever is causing the feed to break is probably going to happen again in a future post, rendering the feed unuseable again.

    The same problem occurs with the pages feed.

    What would be the best strategy to investigate this problem further?

    Notice that this is a Brazilian blog site and the posts are all in Portuguese. Perhaps the accented characters we use may have something to do with this.

  14. bluemumble
    Member
    Posted 15 years ago #

    hi itdamager! i just installed your latest version of the plug-in. It was working fine yesterday but it had a problem with another plug-in i just installed today(textlinkads). I removed the ad plug-in completely but still the feeds are not showing in the sidebar RSS widget where I wanted it to go, which was fine yesterday. Now, that sidebar is blank, but when you try to access the feed itself, it seems to be working fine.

    Here's a link to my website and the feed.
    http://bluemumble.com/ (please look at the upperleft sidebar)
    http://bluemumble.com/?wpmu-feed=posts

    Thanks! I'm not very good at php yet and I hope you can help.

  15. shaythong
    Member
    Posted 15 years ago #

    The download link is down, is there anywhere else to download this?

  16. dgilmour
    Member
    Posted 15 years ago #

    Google's still caching a page with itdamager's email address.

    I've furled it here.

  17. theapparatus
    Member
    Posted 15 years ago #

    Hmm, it's domain didn't get renewed. I do hope that he or she is ok.

  18. joshhighland
    Member
    Posted 15 years ago #

    yes, the domain that hosts this download is dead. can someone please email me a copy of this plugin? joshhighland {at} gmail {dot} com.

    I really want to use this plugin, and would be happy to host a mirror of this plugin on my domain.

  19. theapparatus
    Member
    Posted 15 years ago #

    It's actually still in archive. Not sure if it's the most updated version of the script as I know it was updated for better subdirectory support.

    Link

  20. joshhighland
    Member
    Posted 15 years ago #

    no dice, the download through that link is not a valid zip file.

    but i did a google search on the zip name, and I found this:
    http://www2.org.cn/downloads/plugins/mu/wpmufeed.zip

    It looks like the file. I haven't tried it yet. Get it while you can!

  21. joshhighland
    Member
    Posted 15 years ago #

    yah, I cant get that one to work, its a really old version

  22. theMonkeysUncle
    Member
    Posted 15 years ago #

    Does anyone have a copy of the latest version that they could upload somewhere?

  23. theapparatus
    Member
    Posted 15 years ago #

    Looking at the org.cn download there, that's version 3.2. Looking at the latest cache of the page, that is the latest version of the plugin and should work for subdirectory installs. (Please note the v3.2)

    The date within the zip is also 8/01/07 which matches up with the cache.

  24. shaythong
    Member
    Posted 15 years ago #

    Wow thanks for the info, it seems to be working just fine here.

  25. shaythong
    Member
    Posted 15 years ago #

    Hi gnustavo, I've applied all of your fixes but it didn't work, lots of syntax errors.

    I just want to save my settings but I keep getting Invalid trigger URL. Must be a relative path beginning with and ending with a "/". Default: /wpmu-feed/
    Invalid comments URL. Must be a relative path ending with a "/". Default: comments/
    Invalid pages URL. Must be a relative path ending with a "/". Default: pages/.

    And is Object Cache already included with WPMU or do I have to download it.

  26. TechWorker
    Member
    Posted 15 years ago #

    I have uploaded the last version of this plugin I have (0.3.2) to http://wpmudevorg.wordpress.com/project/WPMU-Sitewide-Feed-Plugin---ITDamager

  27. Farms
    Member
    Posted 15 years ago #

    If anyone has a working version for 1.3+ they could share that'd be grand :)

  28. lunabyte
    Member
    Posted 15 years ago #

    Nope. Ditched this plugin quite a while ago.

  29. andrea_r
    Moderator
    Posted 15 years ago #

    Why doesn't it work with 1.3?

  30. theapparatus
    Member
    Posted 15 years ago #

    I seem to remember a discussion about the new tags not being used alongside categories or not being able to find the categories since it was looking for the old tables.

    The author hasn't been around for many months. I don't think they're going to upgrade.

About this Topic

  • Started 16 years ago by itdamager
  • Latest reply from jeremybyrne