Support Forums

Old 12-26-2006, 06:44 PM   #1
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 24
SkGold has a spectacular aura about
Question RSS feed to HTML page

I have a problem to display RSS feed on my HTML page.
I did exactly as in this thread except I am doing it for 3.1.5. Is it working with new version?

I upload these files to the server:
http://realestate.allaboutcalgary.com/rss2html.php
http://realestate.allaboutcalgary.co...emplate-2.html

My external.php is displaying fine. I took the John file from the same thread:
http://realestate.allaboutcalgary.com/external.php

I put this code in my html page:
Quote:
<?php
include("http://realestate.allaboutcalgary.com/rss2html.php?TEMPLATE=rss-template-2.html&XMLFILE=http://realestate.allaboutcalgary.com/external.php?pg=new");
?>
My html page is here http://realestate.allaboutcalgary.co...ss Chaslie.htm
The feed should be between Calgary and Real Estate

I can’t find out why it is not displaying the feed. What I did wrong?
Any help appreciated.
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.

Last edited by SkGold; 12-29-2006 at 02:44 AM.
SkGold is offline   Reply With Quote
Old 12-26-2006, 07:22 PM   #2
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

Where are you displaying the feed? Some place in the classifieds or a completely different site?

I would really recommend using magpie to handle rss feeds.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 12-26-2006, 08:34 PM   #3
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 24
SkGold has a spectacular aura about
Default

My goal is to display it on different site out from 68C.

First I download rss mod from mods.auscity.com but after I found in this thread that it cannot place rss feed out of the 68C. As was suggested in the same thread I download Magpie and was playing around all day but can�t make it work. There are no exact instructions in Magpie how to do it.

Then I found the thread from Chaslie and it seems like very easy but still can�t make it work. As I described above it is not displaying the feed on html page.
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline   Reply With Quote
Old 12-26-2006, 10:06 PM   #4
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

Ok, let me look at the directions, I've used it on other sites but used smarty on those sites so it fit in real nice. I'll see how to use magpie in regular files.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 12-26-2006, 10:27 PM   #5
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

Ok, here is the magpie files in the directory structure I use it.

magpie.zip

Now, upload this as magpie/ at the site you want to display the feeds.

On the page you want to display feeds add this code (I haven't tested it but it should work):

PHP Code:
<?php

require_once('magpie/rss_fetch.inc.php');
require_once(
'magpie/rss_utils.inc.php');

$url "external.php?owner=9";
if ( 
$url ) {
    
$rss fetch_rss$url );
    echo 
"Channel: " $rss->channel['title'] . "<p>";
    echo 
"<ul>";
    echo 
"<table>";
    
    foreach (
$rss->items as $item)
     {
        
$href $item['link'];
        
$title $item['title'];
        
$price $item['price'];
        
$descript $item['description'];
        echo 
"<tr>";
        echo 
"<td><a href=$href>$title ~ $price</a></td>";
        echo 
"</tr>";
        echo 
"<tr>";
        echo 
"<td>$descript</td>";
        echo 
"</tr>";
        
    }
    echo 
"</table>";
}
?>
Note $item['something'] = whatever the xml/rss tag is coming from your external.php. Could be image, shortdescription, or whatever.

Let me know if you come across any errors.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 12-27-2006, 01:36 AM   #6
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 24
SkGold has a spectacular aura about
Default

No, it is still not working. It is showing the code on the page.
Please take a look here: http://realestate.allaboutcalgary.com/testrss.html

I also tried to change url line in you code from:
PHP Code:
$url "external.php?owner=9"
to
PHP Code:
$url "external.php?pg=new";
or
$url "http://realestate.allaboutcalgary.com/external.php?pg=new"
but still not working.
Do I need to wrap somehow the PHP code you provided when it placed in html file?
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline   Reply With Quote
Old 12-27-2006, 08:29 AM   #7
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

It must be put in a php file. Otherwise the php code won't be processed.

Just change the file name to file.php and it should work.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote
Old 12-27-2006, 05:04 PM   #8
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 468
Rep Power: 24
SkGold has a spectacular aura about
Default

Thanks John, I will try it later tonight. I am not on my computer right now.

However my point is to have possibility to input the rss feed to html page.
I want to let other people to display the ads from my site on their sites. Just to give them the piece of code that they could input in their html pages. I cannot ask them to install Magpie and rename their files to php.

I guess many News companies doing something like this to allowed people to display their headlines. Is it possible to do it? To wrap it in java or something. I am not a specialist.

It seems like the Chaslie mod made for this purpose, but it is not working for some reason.
Are there anybody that using Chaslie mod, succeed to display the rss feed on html page and could help?
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline   Reply With Quote
Old 12-28-2006, 12:18 AM   #9
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,039
Rep Power: 116
Eric Barnes is a jewel in the rough
Default

The standard external.php file will not handle javascript files however their mod might and I am sure Chaslie will be along sometime to clarify if their mod will do that.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 12-28-2006, 09:36 AM   #10
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,208
Rep Power: 61
juven14 is a jewel in the rough
Default

Ok, the same problem you had was for both solutions, if the file isn't a php file you can't run php code on it - so the include wouldn't work in the first place.

If they are unwilling to allow either server side includes SSI or PHP then it might be difficult to give them the best looking feed.

There are sites out there that process it for you allowing your users to add a little javascript - but again, you can't control the format as well.

Here is one:
http://itde.vccs.edu/rss2js/build.php

I've seen some out there that allow you to pick colors and etc as well.
__________________
John Snyder
PHP Developer
juven14 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can I run scripts in an content page? dawyatt v3.1 Questions & Support 11 06-22-2007 02:50 PM
page 2 of 2 not working GSP v3.1 Questions & Support 10 03-02-2007 07:00 PM
Special Character in Listings stops feed! garysr v3.1 Questions & Support 6 01-09-2007 10:29 PM
Problem getting page title flyingpylon v3.1 Questions & Support 5 10-19-2006 01:15 PM
Adding Feature Item Table to HTML Page art HTML, CSS, and Design Help 11 08-05-2006 03:10 AM


All times are GMT -4. The time now is 03:52 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0