PDA

View Full Version : RSS widget using widget description for title


Cyburbia
10-31-2011, 09:41 PM
I'm finding that a lot of RSS feeds have titles that are much longer than the name of the site itself. Sometimes, they include HTML. Thus, I get feed widgets that look like this:

https://vborg.vbsupport.ru/external/2011/10/1.png

What I'd like to do is have the option of making the widget description the title if it is provided. From what little I know, I think that means doing some kind of if-else conditional. Thus, in vbcms_widget_rss_page (4.1.7), I'd replace ...


<div class="cms_widget_header">
<h3><a href="{vb:raw rss_link}" target="_blank">{vb:raw rss_title}</a></h3>
</div>


with something like ...


<div class="cms_widget_header">
<vb:if condition="(SOMETHING)">
<h3><a href="{vb:raw rss_link}" target="_blank">{vb:(SOMETHING ELSE)}</a></h3>
<vb:else />
<h3><a href="{vb:raw rss_link}" target="_blank">{vb:raw rss_title}</a></h3>
</vb:if>
</div>


Is this correct? What should I substitute for (SOMETHING) and (SOMETHING ELSE)?

Thanks!

Cyburbia
11-02-2011, 08:33 PM
Bump. Does anyone know? I've seen a few similar threads on .org and .com, and they've all been sitting unanswered for months.

Cyburbia
11-04-2011, 09:26 PM
https://vborg.vbsupport.ru/external/2011/11/65.jpg

phoenix1977
12-29-2011, 12:56 PM
Is it possible insert the html or php code in the sidebar block to retrive an external feed rss?

kh99
12-29-2011, 07:15 PM
Bump. Does anyone know? I've seen a few similar threads on .org and .com, and they've all been sitting unanswered for months.

To Cyburbia, did you ever figure it out. I haven't tried it but I think in your code SOMETHING would be "!empty($rss_description)" and SOMETHING ELSE would be rss_description.