1
bjuti
Image in publisher RSS feed backend.php
  • 2011/10/8 11:23

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


How to shwo image of article in publisher's backend.php

Adding:
<description><img src="<{$item.image_path}>" /><{$item.description}></description>

in publisher_rss.html doesn't work.

Tnx

2
trabis
Re: Image in publisher RSS feed backend.php
  • 2011/10/8 11:39

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


nope, $item.image_path is not set.

You can keep the template like that but you need to add extra lines in publisher/backend.php:
if (is_array($sarray)) {
        
$count $sarray;
        foreach (
$sarray as $item) {
            
$image $item->getMainImage(); //get main image array for this item
            
$tpl->append('items',
                         array(
                               
'image_path' => $image['image_path'], //adds image_path
                               
'title' => htmlspecialchars($item->title(), ENT_QUOTES),
                               
'link' => $item->getItemUrl(),
                               
'guid' => $item->getItemUrl(),
                               
'pubdate' => formatTimestamp($item->getVar('datesub'), 'rss'),
                               
'description' => htmlspecialchars($item->getBlockSummary(300true), ENT_QUOTES)));
        }
    }

No tested

3
bjuti
Re: Image in publisher RSS feed backend.php
  • 2011/10/8 12:22

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Tnx, it works.. well it shows img path, but doesn't display image in rss feed.

i've replaced chars with codes also

<description>&lt;img src="<{$item.image_path}>" /&gt;<{$item.description}></description>

Is it coz of removing html special characters?

Tnx

4
bjuti
Re: Image in publisher RSS feed backend.php
  • 2011/10/8 13:27

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


I've found the solution.

In publisher_rss.html add:

<description><![CDATA[<img src="<{$item.image_path}>" width="140" style="margin: 10px; align: left;" align="left" />]]><![CDATA[<p><{$item.description}></p>]]></description>

5
rgauci
Re: Image in publisher RSS feed backend.php
  • 2012/2/19 18:03

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


can you tell me please in after which line your code goes in publisher_rss.html

thanks
Be Set FREE!

6
bjuti
Re: Image in publisher RSS feed backend.php
  • 2012/2/19 18:37

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Just replace <description> tag with the code.

7
rgauci
Re: Image in publisher RSS feed backend.php
  • 2012/2/21 18:23

  • rgauci

  • Not too shy to talk

  • Posts: 173

  • Since: 2007/8/31


Thanks bjuti, it worked like a charm.

Is it possible for RSS Feeds to pick up the whole article in Publisher?

As you know the RSS Icon is on the Categories page so all the Headlines, Image and scoop come up. If one wants to read the full article one has to click on the headline and it takes him straight to the whole article. Thats how basicly feeds work.

I am trying to pick the latest 3 articles on to another website that the RSS Feed will pick up and show the whole article not just the scoop.

Any ideas on how to hack the publisher pages????
Be Set FREE!

8
bjuti
Re: Image in publisher RSS feed backend.php
  • 2012/2/21 20:44

  • bjuti

  • Just can't stay away

  • Posts: 871

  • Since: 2009/1/7 2


Hm.. ask Trabis

Login

Who's Online

218 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits