vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   RSS widget using widget description for title (https://vborg.vbsupport.ru/showthread.php?t=273129)

Cyburbia 10-31-2011 09:41 PM

RSS widget using widget description for title
 
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 ...

Code:

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

with something like ...

Code:

<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

Quote:

Originally Posted by Cyburbia (Post 2263873)
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.


All times are GMT. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02054 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete