vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   RSS stuff help needed (https://vborg.vbsupport.ru/showthread.php?t=202057)

TimberFloorAu 01-16-2009 11:05 PM

RSS stuff help needed
 
Okies, I have never ever used RSS before, have no idea how and what you use it for, but I am trying to get my head around it.

I had asked this question before, in another format, but hoping someone can help.

Example: rss feed on our site is

http://www.yobromofo.com/forum/exter...SS2&forumid=40

Now as far as i know, ( noob ) this is rss thats already parsed, but where do i get the xml for this particular feed, so that I can integrate it on a 2nd website, and display the feed within that websites pages.

Ste

Lynne 01-16-2009 11:16 PM

Is this kinda what you are looking for? [HowTo] Display your latest threads on an external page using an RSS2 feed

TimberFloorAu 01-17-2009 12:10 AM

Lynne I hope so !

Will take a gander thankyou :up:

--------------- Added [DATE]1232159146[/DATE] at [TIME]1232159146[/TIME] ---------------

works a treat thanks !!

--------------- Added [DATE]1232159234[/DATE] at [TIME]1232159234[/TIME] ---------------

is there a way to indicate the last posters name ? within the xml

--------------- Added [DATE]1232168071[/DATE] at [TIME]1232168071[/TIME] ---------------

Ok now I need to apply CSS.

Having looked around, it appears inline css is the go. How is this achieved using VB.com version of parsing rss feed.

How do we apply style attributes to the rss elements.

Ste

Lynne 01-17-2009 03:11 AM

You can add it inline in here:
PHP Code:

$rss2_output .= "<dt><strong><a href='" trim($link) . "'>" htmlspecialchars(trim($title)) . "</a></strong> - " htmlspecialchars(trim($date)) . " by <em>" htmlspecialchars(trim($author)) . "</em></dt><dd>" htmlspecialchars(trim($description)) . "</dd>"

You notice that they use the definition list html to display it. You could add css for that in the Main CSS - probably give the div that it is all in an id and then you can define "#yourid dt" and "#yourid dt" in there, then you wouldn't need to do it inline. Or, you could not use the definition list to output it, but instead use a table or whatever.

TimberFloorAu 01-17-2009 03:33 AM

OK.

But.

Code:

$rss2_output .= "<dt><strong><p style="color: sienna; margin-left: 20px">
<a href='" . trim($link) . "'>" . htmlspecialchars(trim($title)) . "</a></p></strong> - " . htmlspecialchars(trim($date)) . " by <em>" . htmlspecialchars(trim($author)) . "</em></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";

Produces an error over the original code below.

Code:

$rss2_output .= "<dt><strong>
<a href='" . trim($link) . "'>" . htmlspecialchars(trim($title)) . "</a></strong> - " . htmlspecialchars(trim($date)) . " by <em>" . htmlspecialchars(trim($author)) . "</em></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";

Am i so dense I am missisng something painfully obvious lol

Lynne 01-17-2009 03:41 AM

It's because you aren't escaping your quotes. - \" instead of " (when you want to have the quote there). So:

HTML Code:

$rss2_output .= "<dt><strong><p style=\"color: sienna; margin-left: 20px\">
<a href='" . trim($link) . "'>" . htmlspecialchars(trim($title)) . "</a></p></strong> - " . htmlspecialchars(trim($date)) . " by <em>" . htmlspecialchars(trim($author)) . "</em></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";

You probably need to put the color inside the <a> tag. Also, don't use <p>, use <span>.

HTML Code:

$rss2_output .= "<dt><strong>
<a href='" . trim($link) . "'><span style=\"color: sienna; margin-left: 20px\">" . htmlspecialchars(trim($title)) . "</span></a></strong> - " . htmlspecialchars(trim($date)) . " by <em>" . htmlspecialchars(trim($author)) . "</em></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";


TimberFloorAu 01-17-2009 04:56 AM

Thanks Lynne.

I am slowly getting there, its all new to me. Albeit I have done css , this is a bit weird lol.

Ok now I have:

Code:

$rss2_output .= "<dt><strong>
<a href='" . trim($link) . "'><span style=\"font-family: sergo UI,sans-serif;font-size:16px;text-decoration: underline;color: #73a202; margin-left: 20px\">" . htmlspecialchars(trim($title)) . "</span></a></strong> - <span style=\"font-family: sergo UI,sans-serif;font-size:12px;color: #92b5e7\">" . htmlspecialchars(trim($date)) . "</span>  <span style=\"font-family: sergo UI,sans-serif;font-size:14px;color: #bbbbbb\">" . htmlspecialchars(trim($author)) . "</span></dt><dd>" . htmlspecialchars(trim($description)) . "</dd>";

I am struggling to style the description.

Appreciate your help again :)

SEOvB 01-17-2009 05:00 AM

There are a few external sites and even an rss2html tool that will give you a little easier control of how to display the feed, maybe a little easier or ideas for something different

http://www.rss-specifications.com/display-rss.htm
http://jade.mcli.dist.maricopa.edu/f...ex.php?s=build
http://rssxpress.ukoln.ac.uk/lite/include/?t=1
http://www.rss-to-javascript.com/p/138.html
http://www.rss2html.com/step-1.php

TimberFloorAu 01-17-2009 05:05 AM

Quote:

Originally Posted by FRDS (Post 1715432)
There are a few external sites and even an rss2html tool that will give you a little easier control of how to display the feed, maybe a little easier or ideas for something different

http://www.rss-specifications.com/display-rss.htm
http://jade.mcli.dist.maricopa.edu/f...ex.php?s=build
http://rssxpress.ukoln.ac.uk/lite/include/?t=1
http://www.rss-to-javascript.com/p/138.html
http://www.rss2html.com/step-1.php


Thanks Mate.
I had tried rss2html, wasnt that keep. Magpierss i couldnt get my head around. Will look at the others tho, much appreciated.
The vb rss works fine, for external pages.

Just the styling is a bit arse about face lol. My one concern is , is the page ( on the external site ) spiderable by search engine robots, or is the feed treated similarly to iframes, and ignored as non page content ?

Any suggestions please.

SEOvB 01-17-2009 05:19 AM

It should be spiderable, if you use view source you should be able to get an idea of what it out puts, most output html that gets generated from using javascript


All times are GMT. The time now is 09:23 AM.

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.01091 seconds
  • Memory Usage 1,759KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete