Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 06:54 am EST

Geeklog Forums

RSS feeds in static pages


Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
If you want a quick and easy way to include an RSS feed in a static page, see here.

Examples are here and here.

Cheers,

Euan.
-- Heather Engineering
-- No job too small
 Quote

Bogus

Anonymous
Doesn't work, you get T_VARIABLE error's.
 Quote

Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
Quote by Bogus: Doesn't work, you get T_VARIABLE error's.


No, you get T_VARIABLE errors. I get a page of nicely formatted links.
If you post your errors, then we can get constructive...

Cheers,

Euan.
-- Heather Engineering
-- No job too small
 Quote

Bogus

Anonymous
I had syntax error, it works great!
 Quote

Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
Glad to hear it.

Cheers,

Euan.
-- Heather Engineering
-- No job too small
 Quote

Status: offline

adalia

Forum User
Newbie
Registered: 09/06/04
Posts: 1
determined
Glad to fing this hack, guys....


Adalia
Filles
 Quote

we

Anonymous
Quote by adalia: Glad to fing this hack, guys....


Adalia
Filles


Is that you on the front page? Can we hook up?
 Quote

Status: offline

zemkat

Forum User
Newbie
Registered: 09/19/04
Posts: 2
Will this program make those .rdf files? My error log says "no such file or directory" when it is looking for test.rdf and the only file in my backend directory is geeklog.rdf, which is empty.

Any help would be greatly appreciated!
 Quote

Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
If you read teh explanation on my site, it mentions that the first time that you view the page, the rdf file does not exist so it generates an error. After that, there is no problem as the file is created the first view.

I know it would be better to have some sort of check first, but that would take time...

Cheers

Euan

[edit] that didn't answer your problem, did it. Sorry. You may have a problem with permissions on your backend directory if the file is not being created.

Cheers,

Euan.
-- Heather Engineering
-- No job too small
 Quote

Status: offline

zemkat

Forum User
Newbie
Registered: 09/19/04
Posts: 2
Sorry, should've mentioned -- I did reload several times as your page suggested, but it had no effect.

I fixed the permisions problem on the backend directory, and it is working great now. Thanks!
 Quote

Status: offline

jnordquist

Forum User
Full Member
Registered: 03/14/03
Posts: 129
Location:Kenosha
I try it and I get (on my site, not yours):




Text Formatted Code
Parse error: parse error, unexpected '<' in /home2/kenosha/public_html/staticpages/index.php(80) : eval()'d code on line 1

 


I don't think it's anything in your instructions that are going wrong...

I do have PHP in static pages, etc.
John Nordquist,
Applications Specialist, medical Technologies
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
caffeinated
Very nice one Works like a charm.
Thanks Euan
Geeklog Polish Support Team
 Quote

Status: offline

Robin

Forum User
Full Member
Registered: 02/15/02
Posts: 725
sneezy
A question:
Is it posible to limit the number of news to be displayed using this solution?
Geeklog Polish Support Team
 Quote

austex

Anonymous
Is it possible to limit number of stories? I didn't see a hardcoded number in the code.
 Quote

Status: offline

Don

Forum User
Full Member
Registered: 06/09/04
Posts: 153
When I go to the page to grab the archived file, the formatting is weird. And instead of downloading the archived file, the code for the .tar file displays in my browser window (I tried it in both FireFox and IE).

Is there anywhere else to get a copy of the file? I tried the old geeknews.php page, but that doesn't seem to work with the latest GL release. Thanks!

On Edit: Euan, it looks like all the formatting on your download pages is b0rked. The icons and text are too small to read, and nothing is downloadable from here.

I just tried it on a third machine (Win XP Pro on all of them) and the pages all look the same. Thought you'd like to know.

Edit 2: Just checked it on the lone Mac here, and it looks the same.

- D
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Both his forum and downloads are messed up. But you can still download the file by right clicking on it, if you can read those tiny prints, and saving on your computer.

You need to delete the .htm extension in order to extract the archive. I agree that things on his sites don't seems to follow the standard.

Sam
 Quote

Status: offline

Infomundo

Forum User
Newbie
Registered: 07/27/03
Posts: 1
Here is how I do RSS in Static Pages:

1. Download the software from http://www.feedforall.com/more-php.htm (It is free)
2. Enable executing PHP from the static page (Groups->Static Page Admin-> staticpages.PHP)
3. Create a Static page
4. Select "Execute PHP"
5. Type something like the following in the static page:

require_once ('http://www.splix.com/rss/rss2html.php?XMLFILE=http://www.endi.com/feeds/ultimahora/ultimahora3.xml&TEMPLATE=http://www.splix.com/rss/sample-template.html&MAXITEMS=20');

Replace http://www.splix.com/rss/rss2html.php with the script you installed in your server.
Replace http://www.endi.com/feeds/ultimahora/ultimahora3.xml with the RSS feed you want.
Replace http://www.splix.com/rss/feedtemplate.html with the template you downloaded.
Replace 20 with the number of headlines you want to be displayed.

That is it!

Want to see it working???? Here you go!
http://www.bodas.com/staticpages/index.php?page=20060414063519517

Now, if I can only figure out how to make UTF-8 work !!!!!!! See all those weird characters?
It is Spanish... (no problem for English, I guess).

Richard
----------
 Quote

Status: offline

Don

Forum User
Full Member
Registered: 06/09/04
Posts: 153
Thanks, Info!

That'll give me something to play around with today. I'll let you know how I fare.

- D
 Quote

Status: offline

jetshack

Forum User
Full Member
Registered: 06/29/04
Posts: 122
Location:Texas
Quote by euan: If you want a quick and easy way to include an RSS feed in a static page, see here.

Examples are here and here.

Cheers,

Euan.


Thanks Euan... worked like a charm.
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
Have a look over here, worked fine for me in a static PHP page.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

All times are EST. The time is now 06:54 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content