Merging Zenpage RSS with Zenphoto

People are equally subscribing to both the gallery feed (which is also used as a blog) and the zenpage feed (which is the main blog. How do I go about combining these two for technorati etc...

Also, the rss-news.php is broken and renders no image formatting or text, just a link to the main page. The rss.php works perfectly.

Mixing in rssmix and then putting a parser on the site might work? I want to have only one unified RSS on the site.
«1

Comments

  • I think a good solution is to allow album images into the zenpage blog. The blog is an rss feed of the album images so people who have already browsed the images in the site and mini blogs can just keep up in one place.

    Now it is very confusing for the viewers and they are missing out a lot on content. Combi news works but not for RSS!
  • is it possible just to make xyz.com/zenphotoinstall/news an RSS feed by modifying rss.php and forgetting about rss-news.php altogether?

    The combi works nicely, but xyz.com/zenphotoinstall/news?rss=true only has entries from rss.php

    Edit: Tired and obviously see why that wouldn't work. If anyone knows a simple way to inject the zenpage entries into rss.php that would be great. rss-news.php is broken anyway so it doesn't matter if it is just the title and link, I can worry about formatting later.
  • `
    require_once(ZENFOLDER . '/'.PLUGIN_FOLDER . "/image_album_statistics.php");
    require_once(ZENFOLDER . '/'.PLUGIN_FOLDER . "/zenpage/zenpage-functions.php");
    require_once(ZENFOLDER . '/'.PLUGIN_FOLDER . "/zenpage/zenpage-template-functions.php");
    `
    I'm not sure what is needed to inject to rss.php or if it would be corrupted if you did, but it seems to start with this. It is totally different code.
  • acrylian Administrator, Developer
    You don't need to do anything as is all already there in rss-news.php. Replace the normal rss functions with the Zenpage plugin ones on your theme.

    Please see the documentation about the names and option parameters. Also look at the Zenpage plugin that uses these in the sidebar.php.
  • I looked around documentation, nothing made sense, will try now with fresh head. :-)
  • I looked around documentation, nothing made sense, will try now with fresh head. :-)
  • acrylian Administrator, Developer
    Add this to your theme:
    `<?php printZenpageRSSLink("NewsWithImages","","","RSS"); ?>`

    Example of the link itself here (also on the forum in the side bar the rss list ("All news")
    http://www.zenphoto.org/index.php?rss-news&withimages
  • So take rss-news.php and rename rss.php and then somehow format the combined articles?

    Or just insert this code into rss.php? Sorry if I am thick.

    Here is site: http://www.nadiakhuzina.com/khuzinastudios/news

    Everything shows up there in the RSS except the "Occupy Toronto" post which is part of a zenpage category. The rest are blogs from the gallery. Everything is standard on site, I just commented out link to other RSS feeds so there is only one choice.
  • Well pasting rss-news.php renders just the news, but it works which means it can be consolidated to one file. You can't stack the rss feed code on top of each other unfortunately. It is just a matter of combining them, but with my limited knowledge I'm not even sure that would work.

    I have experience formatting the RSS and it is very difficult much like advance htaccess stuff.

    I'm dying for the simple way, but I don't think it is there. Hopefully I'll have an aha moment soon. :-)
  • acrylian Administrator, Developer
    I really gave you an direct example of the function and an exmaple link it creates....Did you even try it?? You don't need hack anything except you will have to modify your theme to use this link instead of the standard one (there is a separate function for the page <head>). If you haven't read the theming tutorial yet you should do that now.Of course RSS shows only the latest x items as set on the options...

    Just calling rss-news.php of course only gets the news. Also note that rss feeds (all!) take care of the protection and publish state. If a category is unpublished any article assigned is as well (no matter if in other categories that are not). All items inherit the state from their parents (but that is common for Zenphoto anyway).
  • Yes, I tried, been reading everything. I am just slow.

    Thank you for the more detailed explanation. Been hammering away fixing bits. I have a decent understanding of everything in zpfocus + zenpage and how it works together as I've edited a couple installs, but code makes my head hurt. I'm not a programmer, but understand some procedure.

    Trying...will update if anything intelligent to post. :-)
  • acrylian Administrator, Developer
    All right, was not that much code though..;-)
  • Thanks for you patience. I played tennis match and face-palmed after serving an ace. I got it. Took me 5 seconds when I got back.

    When in school failed Algebra first course three times but got a rare perfect score on the ACT in math. In fact I usually got perfect scores on math tests with bubbles. I still don't understand how to factor a binomial equation, maybe that logic will come to me someday.

    Now I just need to fix formatting for the rss-news.php, will check the new version before being acting a script kiddie again. When this site makes me money, I'll definitely throw you a bone or two.
  • Well now only rss-news.php is used. I thought both were for some reason until I saw it echoed for the album images as well.

    So why do the zenpages not have text? I am at a loss.

    All that is shown for news items in the feed itself is:

    `
    ZenPage News Entry
    (zenpage-category) 26 October 2011 23:00
    ...
    `
    No summary for the news items!!!! The images are formatting perfectly.

    <?php echo $content; ?> echos only albums for some reason. Looking through all the code for mimetype and can't figure out what call is missing. This is Really Difficult Syndication!
  • Also, when I make zenpage.php:

    `setOptionDefault('zenpage_rss_length', '');`

    I still get a 100 character length even after purging cache. What's up with that? Did I miss something?
  • I did miss something on the text length front, the settings in the plugin which seem to work.

    Not only that, but making this value 500 solved the formatting problem with the News items. It must treat an image as more than 100 characters? It also doesn't show anything if you don't leave a value, and no sumamry text if you put a 0 in there. Strange, but happy it's working.

    Ahh, trying the easy way. This has been a good use of my life. :-)
  • acrylian Administrator, Developer
    setOptionDefault is only called on first enabling of a plugin to set default values (otherwise nothing will work as nothing is set). You need to change the options the plugin provides.

    Our truncate function tries not ot break html commands so it it clears more than expected. For example if you cut a <p>gfdgd</p> the code will be invalid. So it tries to eitehr close it or clear it completly. You can't truncate an images so it is cleared.

    Acatually no value should show the full text. Might be a bug. Best you file a ticket.
  • Ticket Submitted, as well as another for the other bug I found with RSS options allowing direct downloads of uncompressed images.

    Thanks for your help!
  • acrylian Administrator, Developer
    Thanks we will take a look, might take some time though.
  • Hello, I'm not sure if this is the right place but it seems related.

    I am trying to get my rss-news to load my image. Basically, I am running ZenPage as a photoblog. My content is just the custom TinyZenPage image I am adding. However, my "/index.php?rss-news&withimages&lang=en_US" page loads nothing but "..."

    Has there been any progress to fixing the bug mentioned? I'd like to use the standard rss-news.php without editing it; the only hack I can use is by commenting as below:

    `
    if(getOption('zenpage_rss_length') == "") { // empty value means full content!
    $content = get_language_string($obj->get('content'),$locale);
    } else {
    $content = get_language_string($obj->get('content'),$locale);
    #$content = shortenContent(get_language_string($obj->get('content'),$locale),getOption('zenpage_rss_length'), $elipsis='...');
    }
    `
    Just curious. Thanks!
  • acrylian Administrator, Developer
    Hm that should actually have been fixed but I can however reproduce that the rss with images does indeed not return images as well on our own site. Something must have been slipped through I guess... I will take another look.
  • acrylian Administrator, Developer
    Update: The feed is working correctly. But note that the combined feed sorts images and news by date. The date stored for images is generally the internal file date and not the date uploaded.. ID would be the setting to get images in upload order (exacty discovery order) but ID does not work with news as they are only sorted by date to make sense.

    So if you upload an image today that has been shot three weeks ago it has that old date and therefore does not appear at the beginning. Also if you overwrite an existing image with a same named one it is not considered new, too.

    Set the feed items to a very high number and you will surely see the images you are missing as later numbers.
  • My rss.php feed works just fine. The rss-news is the one that wasn't producing my image. I'm not looking to combine any feed, just the rss-news which produces the ... without the hack.
  • acrylian Administrator, Developer
    rss-news did work for me. Maybe I don't understand the actual problem (I have not re read the topic I admit). Be sure you are on 1.4.2.
  • Hi, I am on 1.4.2. The rss-news itself works, but the problem for me is my image does not show up in my news-article. I am inserting my image via tinyZenpage, and the only thing I get is "..." in the RSS feed without my hack that I posted above.

    The only thing I have in my news $content is the picture inserted from tinyZenpage. It does not show up. I have the option set for full article (not truncating or shortening, by emptying the value).
  • acrylian Administrator, Developer
    Ah, ok, thanks for the clarification. Sadly I cannot reproduce it. I added text, a default size image via tinyZenapge and cleared the option for the Zenpage rss feed lenght.
    All shows up for me in the feed readers I tested (NetNewsWire 3.3 and Apple Mail on Mac, naturally).
  • Ah, well that is quite frustrating..

    Does mine show up for you? RSS-NEWS with images
  • acrylian Administrator, Developer
    Yes, it does, in all entries in nice default image nice. Did you run your feed through the W3 validator? Maybe that helps. Not all rss readers behave the same sadly (as always…)
  • Interesting. Perhaps it is Firefox messing with it. Thanks for letting me know!
  • I think what you are seeing as working is actually my "hack" file.. it seems that a lot of the RSS feeds out there are running the outdated version. Google reader has an old version of my RSS, but running the link straight from Firefox or Google Chrome in Windows renders the images not showing.. I know this because the RSS feed does not show my latest entry...
Sign In or Register to comment.