vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   RSS Output Mod & Icon (https://vborg.vbsupport.ru/showthread.php?t=65832)

fluent 06-03-2004 10:00 PM

RSS Output Mod & Icon
 
The code modifications make a simple change to external.php to explode a list of child forums in addition to some quick template changes to provide a common button for users to click to see the RSS feed.

1) at the Forum Home level, the xml link when clicked, produces an RSS feed for all threads in all forums. No changes made to external.php for this to work.

2) at the Sub-Forum level, the xml link when clicked, produces an RSS feed for all threads in the listed sub-forums. external.php is changed to explode the list of child forums.

3) at the Forum level, the xml link when clicked, produces an RSS feed only to threads in the that forum. No changes made to external.php for this to work.

I’m using this on an internal forum and have not had any problems. But your mileage may vary. Let me know what you think and if it works for you or not.

I've uploaded the rss.gif file that I'm using.

-paul

[7 June 2004 - re uploaded - small doc changes - no code changes]
[8 June 2004 - re uploaded - Natch's code changes, two options now available]

Acido 06-04-2004 10:48 PM

Excellent :)

*Clicks install*

Thanx ;)

Vivi Ornitier 06-04-2004 11:28 PM

so confused, how about a screenshot lol?

MediaHound 06-05-2004 04:22 AM

Cool, do you have the images too?
Or do I have them already in my working dirs?
If not, do you have any nice ones?
Anyway, I'm going to install it now, it seems like what I was looking for... I'll report back
Many thanks,
MH

****
Self edit - images now added. Kindly disregard this post.

MediaHound 06-05-2004 04:41 AM

Welahhh

1. Looks like a table on my homepage index got thrown off slightly. The other forum pages (forumdisplay) look ok though.
2. So when I click the rss image I used, I get XML Parsing Error: syntax error

XML Parsing Error: syntax error
Location: http://forum.free-templates.com/external.php?type=RSS2
Line Number 1, Column 31:<?xml version="1.0" encoding=""?>
------------------------------^


For what it's worth, thats the first time XML Parsing Error: syntax error was typed here!
Beam me up Scotty!

Any suggestions?

Thanks man,

MH

MediaHound 06-05-2004 04:58 AM

I'm no expert but I think a colspan needs to be fixed on the forum home. If you know where it goes, that'd be great.

still trying to find out why I get the parsing error.

MediaHound 06-05-2004 05:13 AM

I'm getting close.
And only continuing to post here because I know this will be a hot one as the years fly by. If it happened to me, maybe I can help the ones after me..

So, I think I need to roll some dice and pick a charset. This is what I came up with after a very quick search:
I like international standards. But it's not up to me. Is there a best choice out of this list for what I'm doing here? I'm really no expert, I keep telling people.

<?xml version="1.0" encoding="windows-1252"?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-16"?>

I'll be back!

MediaHound 06-05-2004 10:28 AM

Here's whats going on over there:
http://www.vbulletin.com/forum/showthread.php?t=106696

MediaHound 06-05-2004 05:51 PM

Fixed it.
I went into my admin and simply pasted
ISO-8859-1
in my
HTML Character Set
This is the value of the 'charset' attribute for the HTML content type setting in the 'headinclude' template.<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

For some reason, this was missing in my board.
A developer at vbulletin.com said this has happened a few times now.
My installed hacks include the arcade hack and the new user welcome PM. Maybe something along the lines fudged it up.

So for anyone considering this hack, its a great hack and no worries.
Hope it goes smoothly for you.

Many thanks

fluent 06-07-2004 01:40 PM

I get back to the office this morning and all this activity took place :)

@ Vivi Ornitier

Screen shot uploaded


@ MediaHound

I figured, there were a ton of RSS icons available all over the net. Some have rounded corners, some are square, and not everyone might like the one I picked.

Here are some resources for free XML icons:

http://www.graphicpush.com/archives/000035.shtml
http://www.antipixel.com/blog/archiv...e_buttons.html

As for the XML error, I'm glad you found the fix, I had the same error and forgot to mention it in the install docs. I figured it was one of those things that I should have read the manual on :)

I'll add this to the install docs:
Add this to in the admincp if you get XML encoding errors:

Language Manager -> Edit -> HTML Character Set -> ISO-8859-1

MediaHound 06-07-2004 04:20 PM

We're in it together.

So the XML error is taken care of on my site. Good for that.

But my forumhome is still a bit skewed.
Adding a new column above the forums, where the xml icon goes, altered the columns of the page.
Take a look at http://forum.free-templates.com and see what I mean.

If you know the fix would be great to post it here as others will need it too.
If you cant see it, post here and let me know I'll provide a screenshot with an arrow pointing at it.

Many thanks,

Jarred

Natch 06-07-2004 05:27 PM

I actually decided to alter this for my own benefit ...

Look for:

Code:

        <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
Re-place with the following:

Code:

        <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]
        <!-- RSS ICON -->
                <a href="external.php?type=RSS2" style="float:right">
                        <img src="$stylevar[imgdir_button]/rss.gif" alt="Subscribe to XML RSS for all Threads in all Forums" border="0" />
                </a>
        <!-- / RSS ICON -->
        </td>

And apply the same change to all other cells - what you are doing is moving the RSS image into the previous cell, and retaining the Forum spacings ...

Example - http://www.mobileforces.org/forums/

fluent 06-07-2004 06:40 PM

Thanks for the corrections! I'll update and upload the changes in a little bit, but here is what I've ended up going with.

MediaHound 06-07-2004 11:02 PM

Fluent, could you give those of us that installed it already a step by step to fix the problem?

MediaHound 06-07-2004 11:23 PM

Ahh its fine now.
All I did was remove the new td, and moved the existing closing td tag to after the image, and its fine.
Added natches style="float:right" to the image and it looks great.

I'm really no expert.
Anyway, thanks for everything.

Erwin 06-07-2004 11:50 PM

Good hack. I will install this soon.

fluent 06-08-2004 03:54 PM

Quote:

Originally Posted by MediaHound
Fluent, could you give those of us that installed it already a step by step to fix the problem?

MediaHound, What I did (just now to debug) was revert the two templates and search for the strings that need to be replaced. Copy and paste. I think that's the easiest way to make Natch's changes.

I also uploaded the rss icon I'm using and a gif screenshot.

MediaHound 06-08-2004 08:01 PM

Everything works great now.
Just have to spend some time getting it submitted now.

Maybe some of you guys could get some use out of this: I did some research, and I've got a list of RSS sites you can submit your feeds to at:
http://forum.free-templates.com/showthread.php?t=285

This way your site might get picked up by a good source of traffic.

If you know others please add them.

Here's to RSS!

Many thanks for the hack,

MH

Erwin 06-08-2004 11:38 PM

Quote:

Originally Posted by MediaHound
Everything works great now.
Just have to spend some time getting it submitted now.

Maybe some of you guys could get some use out of this: I did some research, and I've got a list of RSS sites you can submit your feeds to at:
http://forum.free-templates.com/showthread.php?t=285

This way your site might get picked up by a good source of traffic.

If you know others please add them.

Here's to RSS!

Many thanks for the hack,

MH

Thanks for that! :)

MediaHound 06-09-2004 08:31 AM

Quote:

Originally Posted by Erwin
Thanks for that! :)

Welcome, Erwin

:up:

Ruffneck 06-21-2004 07:30 PM

Hmm, whats the hell...

Nice Hack but it doesn?t work...

I upgrade to my own root server from vbb 2.2.9 to 3.01 install this hack and have a blank site if i open http://www.hardtalkforum.de/external.php?type=RSS2 i can not understand it, no errors nothing...

whats wrong?

fluent 06-21-2004 07:42 PM

Quote:

Originally Posted by Ruffneck
Hmm, whats the hell...

Nice Hack but it doesn?t work...

I upgrade to my own root server from vB 2.2.9 to 3.01 install this hack and have a blank site if i open http://www.hardtalkforum.de/external.php?type=RSS2 i can not understand it, no errors nothing...

whats wrong?

You must have fixed it. I saw the rss feed... :classic:

Ruffneck 06-22-2004 05:04 AM

Yes forget it to allow it on admincp :)

Ruffneck 06-22-2004 05:08 AM

I like the hack, but i think it´s better if the feed also show new replys about topics and not only a new thread...also i don´t know hob can i ping blogg.de (german blog directory) on every new thread...

lowspeed 06-22-2004 07:17 PM

What if i need the body of the post in the RSS as well ?

lowspeed 06-29-2004 04:22 PM

Bump !

Quote:

Originally Posted by lowspeed
What if i need the body of the post in the RSS as well ?


pgrote 06-30-2004 06:04 PM

Yes I too would like to know.

Does anyone know of a way to edit this mod to allow the full body of each post to be included in the RSS feed as well? This way with each new post on a forum it wont just feed the thread title or post title, but each new body as well...If anyone could point me in the right direction I would greatly appreciate it! THX!

Deska 07-07-2004 07:41 AM

Quote:

Originally Posted by Ruffneck
Hmm, whats the hell...

Nice Hack but it doesn?t work...

I upgrade to my own root server from vB 2.2.9 to 3.01 install this hack and have a blank site if i open http://www.hardtalkforum.de/external.php?type=RSS2 i can not understand it, no errors nothing...

whats wrong?

I have same problem
How to fix it?

Thank's....

Deska 07-07-2004 10:47 AM

Forget my post above, problem solved!
I have to enable External Data Provider first in vBulletin Options

Nice hack, thank's....

MediaHound 07-20-2004 02:20 PM

Quote:

Originally Posted by lowspeed
What if i need the body of the post in the RSS as well ?


Did you install this hack?
It does add body content to the feed; it changes the default output.

SnowBot 07-30-2004 02:26 PM

Instead of having the feed icon displayed on the forums, how could i get it like this

http://www.sitepoint.com/syndication/

Any help would be great

Roms 07-31-2004 06:40 PM

Very nice job!!! *clicks install

streetfighter 08-06-2004 11:35 AM

Hey, cool hack....

Everything installed fine and properly working....

My only request is to add instructions at the bottom of rss_mod.txt file is:
Quote:

Enable External Data Provider>RSS(Yes)& XML(Yes)
from Admincp>vboptions
Cos, tats the most important thing without which maximum users get Blank page displays...

roundhost 08-19-2004 10:57 AM

FANTASTIC!

/me clicks install!

/me states that he has got it installed and working easy peasy!

/me is happy!

pgrote 08-27-2004 04:21 PM

Ok I had another question for you all. A while back we were working on getting our feed to spit out the full post, with all of the html intact, where we changed this in the external.php file:

PHP Code:

echo "\t\t<content:encoded><![CDATA["htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], falsetrue), $vboptions['thread'])) ."]]></content:encoded.\r\n"

to this:

PHP Code:

require_once('./includes/functions_bbcodeparse.php');
echo 
"\t\t<content:encoded><![CDATA["parse_bbcode2($thread['preview'], falsetruefalsetrue) ."]]></content:encoded.\r\n"

Smileys dont show up when viewing it through bloglines (our company's aggregator of choice)...this is a small annoyance but if someone could fill me in on what to do to get smileys to show up as well that would be great...I NEED the full html so I cannot compromise that, so if it is one or the other, than I can live without smileys.

My big thing is that it seems as though the feed is only pumping out the first posts of each thread, anytime a thread is replied to it does not show up in the feed...any one have any ideas how I can remedy this situation? Any help would be greatly appreciated...Thank you!

Slynderdale 08-28-2004 12:52 PM

Quote:

Originally Posted by pgrote
Ok I had another question for you all. A while back we were working on getting our feed to spit out the full post, with all of the html intact, where we changed this in the external.php file:

PHP Code:

 echo "\t\t<content:encoded><![CDATA["htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], falsetrue), $vboptions['thread'])) ."]]></content:encoded.\r\n"

to this:

PHP Code:

  require_once('./includes/functions_bbcodeparse.php');
 echo 
"\t\t<content:encoded><![CDATA["parse_bbcode2($thread['preview'], falsetruefalsetrue) ."]]></content:encoded.\r\n"

Smileys dont show up when viewing it through bloglines (our company's aggregator of choice)...this is a small annoyance but if someone could fill me in on what to do to get smileys to show up as well that would be great...I NEED the full html so I cannot compromise that, so if it is one or the other, than I can live without smileys.

My big thing is that it seems as though the feed is only pumping out the first posts of each thread, anytime a thread is replied to it does not show up in the feed...any one have any ideas how I can remedy this situation? Any help would be greatly appreciated...Thank you!

Check this hack I just made:
https://vborg.vbsupport.ru/showthread.php?t=68815

It lets you choose if you want the feeds to parse bbcodes or not and have support for smilies.

For your second question, open external.php and find:
PHP Code:

         ORDER BY thread.dateline DESC
         LIMIT 15 

and replace that with:
PHP Code:

         ORDER BY thread.lastpost DESC
          LIMIT 15 

Now when a thread gets replied to, it shows up on the feeds.

AlexSFBay 08-28-2004 06:26 PM

I just tweaked the XML image display placement to align to the right of the Forum/Thread title. Looks much cleaner.

FORUMHOME
Code:

<!-- ORGINAL CODE <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td> -->

<!-- RSS FEED MOD -->
<td class="thead" width="100%" align="$stylevar[left]">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="thead">$vbphrase[forum]</td>
    <td><a href="external.php?type=RSS2" style="float:right"><img src="$stylevar[imgdir_button]/rss.gif" alt="XML RSS 2.0 feed for all Threads in all Forums" border="0" /></a></td>
  </tr>
</table>
</td>

FORUMDISPLAY
Code:

<!-- ORIGINAL CODE <td class="tcat" width="100%">$vbphrase[threads_in_forum]<span class="normal">: $foruminfo[title]</span></td> -->

<!-- RSS FEED MOD -->
<td class="tcat" width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="tcat">$vbphrase[forum]<span class="normal">: $foruminfo[title]</span></td>
    <td><a href="external.php?type=RSS2&amp;forumids=$foruminfo[forumid]" style="float:right"><img src="$stylevar[imgdir_button]/rss.gif" alt="XML RSS 2.0 feed for Threads in $foruminfo[title]" border="0" /></a></td>
  </tr>
</table>
</td>

* Notice I added the Forum Title in the "alt" description for the sub-forums. Now reads alt="XML RSS 2.0 feed for Threads in $foruminfo[title]"

See it in action here

Hope this helps. Enjoy!

ChessMess 08-31-2004 08:30 PM

Is there a way to have the xml icon show on each category on the main forum page? Since my subforms do not need to be expanded to see the sub-boards (All boards are visable on main index page) It'd be ideal to have the icon next to each sub-forum listed.

ChessMess 09-02-2004 04:23 PM

Anyone?

SeanThomps 06-09-2005 03:33 PM

Having a problme with the hack; I have put rss on my site, and I want to use myyahoo's button: http://my.yahoo.com/s/button.html

The weird thing is when I type in the url to rss for my site, which works if you click it, it does not work for yahoo. The link is: http://www.volconvo.com/forums/external.php?type=RSS2

Got any ideas?


All times are GMT. The time now is 04:47 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.01469 seconds
  • Memory Usage 1,857KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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