RSS, Introductions, and "More..."

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

RSS, Introductions, and "More..."

Postby Lxndr » Mon Jul 02, 2012 4:09 pm

A lot of sites I read in my RSS reader display their information as follows:


<b>TITLE</b>

blah blah introduction, blah.
More information after the fold..

<i>Read More...</i>


---

How can I get something like this in the RSS feeds for my site? I want people to be able to read the introduction in the RSS feed, but to read the Body, they'll have to click over. Is that a bad thing? How can this be done?
Lxndr
 
Posts: 29
Joined: Mon Jun 04, 2012 2:27 am

Re: RSS, Introductions, and "More..."

Postby Harm10 » Mon Jul 02, 2012 7:03 pm

You can find the lay-out of the feeds in the templates folder but be aware that those files can be changed from version to version.
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1602
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: RSS, Introductions, and "More..."

Postby Lxndr » Mon Jul 02, 2012 7:54 pm

Okay, you're right. Yay! I found the feed_rss_template.xml file, which I imagine is what I'd need to edit.

Unfortunately, the more important question of how I need to edit this file to achieve my goals remains unanswered. :(
Lxndr
 
Posts: 29
Joined: Mon Jun 04, 2012 2:27 am

Re: RSS, Introductions, and "More..."

Postby Harm10 » Mon Jul 02, 2012 8:48 pm

Google is your friend! For instance: http://www.w3schools.com/rss/rss_syntax.asp
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1602
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: RSS, Introductions, and "More..."

Postby Lxndr » Tue Jul 03, 2012 8:40 pm

That... actually doesn't help me.

Here's the RSS I'm seeing:

Code: Select all
       
        <item>
            <title>%title%</title>
            <link>%link%</link>
            <comments>%link%#comm</comments>
            <description><![CDATA[ %description% ]]></description>
            <guid isPermaLink="false">%guid%</guid>
            <category>%category%</category>
            <pubDate>%date_rfc%</pubDate>
            <dc:creator>%author-nick%</dc:creator>
        </item>
       


Okay, well it's obvious I need to change the following: <description><![CDATA[ %description% ]]></description>

And also pretty obvious I need to change "%description%" to whatever points towards the introduction portion of the entry. Which I'd have thought might have been "%introduction%" but testing has shown me it is apparently not.

This seems to be perhaps more a pivotx function than a "google rss" thing.
Lxndr
 
Posts: 29
Joined: Mon Jun 04, 2012 2:27 am

Re: RSS, Introductions, and "More..."

Postby Harm10 » Tue Jul 03, 2012 9:58 pm

If you want to dive into it: the feed creation is in module_parser.php (function renderFeed).
But for this file the same warning: it can be changed in a version upgrade.
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1602
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: RSS, Introductions, and "More..."

Postby Lxndr » Tue Jul 03, 2012 10:46 pm

Understood. But... now I'm confused:


Code: Select all
            if ( $PIVOTX['weblogs']->get('', 'rss_full')==0) {
                // don't put anything in the content.
                $content="";
                $description = trim($introduction);
                if (strlen($body)>5) {
                    $description .= makeMoreLink($entry, '', array('html' => true));
                    $summary .= ' ...';
                }
            } else {
                // put the introduction and body in the content..
                $content = trim(str_replace("&nbsp;"," ", ($introduction.$body)));
                $description = trim($introduction.$body);
            }


It appears my web-log is doing what comes after the 'else' 100% of the time (i.e. "put the introduction and body in the content.")

while what I want it to do is what the first parts seems to be doing... trims the introduction and then creates a 'more link...' .

What I haven't been able to puzzle out yet is this:

$PIVOTX['weblogs']->get('', 'rss_full')==0

How do I get that to return a 'true'?

because if I can make THAT happen, I should get exactly what I want.

This seems to imply that there might be an 'rss_full' setting on my weblogs...

...and now, I've found it.

So all this just to discover that the answer is "unclick the box in your weblog that says 'create full feeds.'" (Which I think was clicked by default)

But hey, I've learned something. :D
Lxndr
 
Posts: 29
Joined: Mon Jun 04, 2012 2:27 am

Re: RSS, Introductions, and "More..."

Postby Harm10 » Wed Jul 04, 2012 5:38 am

Lxndr wrote:But hey, I've learned something. :D

That is never a bad thing! ;)
Quality is in the detail of things............
Harm10
Developer
 
Posts: 1602
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron