68 Classifieds Forums  

Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Modules
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read

v3.1 Modules A forum for discussions, questions, implementation and development of modules. Questions here are beyond "typical" 68classifieds support and not supported by the 68classifieds team.

 
Thread Tools Display Modes
  #41  
Old 09-29-2006, 05:25 PM
sporthorsebreeder sporthorsebreeder is offline
Senior Member
 
Join Date: Apr 2006
Posts: 124
Default

Hi John
The RSS feed is now in working in IE and Firefox.
Thanks again for all your help and patience.
Cheers

Hugh
Reply With Quote
  #42  
Old 10-06-2006, 01:23 PM
bobsmith bobsmith is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Default display recent ads on my site homepage?

I want to display a list of 10 most recent ads on my site homepage (not my 68C homepage, but my site homepage -- same server, just different directories).

Should I use this module to accomplish this (and if so, how do I go about doing this -- I've already downloaded/install the module)?

If not, can someone direct me elsewhere to accomplish this.

I'm running 68C 3.1.5 Developer

Many thanks in advance.
Reply With Quote
  #43  
Old 10-06-2006, 01:43 PM
juven14's Avatar
juven14 juven14 is offline
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 1,880
Default

well this module is setup for use within the classifieds system, so it won't work outside that directory. You can use magpie as this module does to display feeds outside the classifieds directory.

Magpie has some example pages depending on how you are setup, ie how to make it work within smarty or just plain php pages.

http://sourceforge.net/project/showf...group_id=55691

You might be able to do this:

in your home page:

PHP Code:
require_once('classifiedsdirectory/modules/rss_mod/includes/rss_fetch.inc.php');
require_once(
'classifiedsdirectory/modules/rss_mod/includes/rss_utils.inc.php');
require_once(
'classifiedsdirectory/modules/rss_mod/includes/config.php');
Then where you want to display the feed do something like this (in the same file):

PHP Code:
$url = "somefeedurl.xml";
$rss = fetch_rss( $url );
echo
"Channel: " . $rss->channel['title'] . "<p>";
echo
"<ul>";
foreach (
$rss->items as $item)
{
    
$href = $item['link'];
    
$title = $item['title'];    
    echo
"<li><a href=$href>$title</a></li>";
}
echo
"</ul>";
This will just display the news item's title as a link, if you want to add other elements, you can look at the feed template ie rss.tpl.php and echo the other stuff such as description, and etc:

echo $item['description'];

Hope this helps.
__________________
Regards,

John
mods.auscity.com
v3.1.7 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton

Last edited by juven14 : 10-06-2006 at 01:45 PM.
Reply With Quote
  #44  
Old 10-11-2006, 12:51 AM
bobsmith bobsmith is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Default

Quote:
Originally Posted by juven14 View Post

You might be able to do this:

in your home page:

PHP Code:
require_once('classifiedsdirectory/modules/rss_mod/includes/rss_fetch.inc.php');
require_once(
'classifiedsdirectory/modules/rss_mod/includes/rss_utils.inc.php');
require_once(
'classifiedsdirectory/modules/rss_mod/includes/config.php');
Then where you want to display the feed do something like this (in the same file):

PHP Code:
$url = "somefeedurl.xml";
$rss = fetch_rss( $url );
echo
"Channel: " . $rss->channel['title'] . "<p>";
echo
"<ul>";
foreach (
$rss->items as $item)
{
    
$href = $item['link'];
    
$title = $item['title'];    
    echo
"<li><a href=$href>$title</a></li>";
}
echo
"</ul>";
John, I must be missing something, have tried for an hour and still no luck.

What is $url="somefeedurl.xml" in the above script suppose to be? Is that a custom file XML file I need to set up on my 68C?

Thanks again for all your help.
Reply With Quote
  #45  
Old 10-11-2006, 08:14 AM
juven14's Avatar
juven14 juven14 is offline
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 1,880
Default

That is the link for the feed you are wanting to display, since the module was setup to run within the 68 directory, I just showed you the most basic code to display feeds from outside the 68 directory in an non-smarty page.
__________________
Regards,

John
mods.auscity.com
v3.1.7 Developer

�By perseverance, study, and eternal desire, any man can become great.� George S. Patton
Reply With Quote
  #46  
Old 10-11-2006, 05:04 PM
bobsmith bobsmith is offline
Junior Member
 
Join Date: Jul 2006
Posts: 17
Default

Quote:
Originally Posted by juven14 View Post
That is the link for the feed you are wanting to display, since the module was setup to run within the 68 directory, I just showed you the most basic code to display feeds from outside the 68 directory in an non-smarty page.
John, thanks for your pm. I've changed "somefeedurl.xml" to "my68C/external.php".

Now I'm getting the following error message -- "Fatal error: Call to undefined function: fetch_rss() in /home/mysite/public_html/test.php on line 18"

- - - -

Wondering if I should use a stand-alone version of magpierss, I downloaded/uploaded the script and change the include path to the rss_fetch.inc files in the stand-alone version.

Now I'm getting the following errors:

Warning: MagpieRSS: Failed to parse RSS file. (not well-formed (invalid token) at line 58, column 27) in http://www.mysite.com/classifieds/ma.../rss_fetch.inc on line 238
Channel:

Warning: Invalid argument supplied for foreach() in /home/mysite/public_html/test.php on line 21
Reply With Quote
  #47  
Old 08-01-2007, 03:15 PM
abkeller abkeller is offline
Member
 
Join Date: May 2007
Posts: 32
Default Parsing errors in RSS Feed Module - HELP!!!

Hi John,

I purchased this RSS mod last night and got it installed myself, but when I try to configure the RSS string for my 68 Classifieds site in the admin area my entire site throws an error;

"Warning: MagpieRSS: Failed to parse RSS file. (Invalid document end at line 2, column 1)
in /home/gunmount/public_html/classifieds/modules/rss_mod/includes/rss_fetch.inc.php on line 239"

I posted this issue in another area of the 68 Classifieds support forum here;

http://www.68classifieds.com/forums/...ed=1#post16533

Larry indicated that the parsing error is probably due to the special characters appearing in my feed (apparently the "&" is throwin the errors?). Can you please help me with this ASAP? I need to get this RSS feed working for the front page of our site before we go to a huge, national tradeshow on 8/15.

Thanks!
__________________
private signature
68Classifieds - Developer Edition, v.3.1.7
Reply With Quote


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modification: Users Online Module juven14 v3.1 Modules 21 10-08-2007 02:50 PM
Modification: Rating Module suzkaw v3.1 Modules 11 12-05-2006 09:40 AM
Difference between RSS Feed Module & News Mod by Maffo dawyatt v3.1 Modifications 14 09-23-2006 09:51 PM


All times are GMT -4. The time now is 07:56 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.