Support Forums


Go Back   68 Classifieds Forums > Legacy Help & Support > v3.1 Questions & Support

 
LinkBack Thread Tools Display Modes
Old 01-29-2008, 04:47 PM   #1
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Question How does the RSS show up on the website?

Greetings all,

Just bought it and so far...really like it; Developer.

http://www.sandrailsonly.curbstoners.com/index.php

How does the RSS show up on the website?

Here is my RSS code that I changed to make all children show up in feed.

Code:
<?php
/*
 * 68 Classifieds
 * 
 * All source code & content (c) Copyright 2006, 68 Classifieds
 * unless specifically noted otherwise.
 * 
 * @Author $Author: Eric $ (68 Classifieds)
 * @copyright 68 Classifieds
 * @link http://www.68classifieds.com
 * @version 3.1
 * @$Revision: 1.2 $
 * @Updated: $Date: 2006/06/21 12:45:41 $
 * @package 68 Classifieds
 *
 */
require_once('includes/init.php');
	//now setup the search query
	$count="";
	$sSQL="SELECT p.id, p.owner, p.title, p.featured, p.section, p.description, p.price, p.dateadded, p.expiration, p.pBold, p.pHighlighted, u.state, u.city, u.country, u.username FROM ".PREFIX."products AS p LEFT JOIN ".PREFIX."users AS u ON p.owner = u.id WHERE p.expiration > NOW() AND p.display = 'Y' ";
	//now get the search fields
	if (isset($_REQUEST['type'])&& $_REQUEST['type']<>"")
	{
		$arr_childs = array((int)$_REQUEST['type']);
		get_ids($arr_childs);
		$sSQL .= ( empty($arr_childs) ) ? '': " AND p.section IN (". implode(', '
	}
	if (isset($_REQUEST['state'])&& $_REQUEST['state']<>"")
	{
		$sSQL .= " AND u.state = '".mysql_real_escape_string($_REQUEST['state'])."'";
	}
	if (isset($_REQUEST['city'])&& $_REQUEST['city']<>"")
	{
		$sSQL .= " AND u.city = '".mysql_real_escape_string($_REQUEST['city'])."'";
	}
	if (isset($_REQUEST['country'])&& $_REQUEST['country']<>"")
	{
		$sSQL .= " AND u.country = '".mysql_real_escape_string($_REQUEST['country'])."'";
	}
	if (isset($_REQUEST['owner'])&& $_REQUEST['owner']<>"")
	{
		$sSQL .= " AND p.owner = ".(int)$_REQUEST['owner'];
	}
	if (isset($_REQUEST['searchtext'])&& $_REQUEST['searchtext']<>"")
	{
		$searchtext=trim(mysql_real_escape_string($_REQUEST['searchtext']));
		$sSQL .= " AND (p.title LIKE '%".$searchtext."%' OR p.description LIKE '%".$searchtext."%')";
	}
	//search price//
	$minprice=(int)trim(@$_REQUEST['minprice']);
	$maxprice=(int)trim(@$_REQUEST['maxprice']);
	if($minprice == "")
		$minprice=0;
	if($maxprice == "")
		$maxprice=9999999;
	$sSQL .= " AND p.price BETWEEN ". $minprice ." AND ". $maxprice;
	//now group by
	$sSQL .= " GROUP BY p.id, p.owner, p.title, p.featured, p.section, p.description, p.price, p.dateadded, p.expiration ,u.state, u.city, u.country";
	if($count>0)
	{
		$sSQL.=" HAVING count(sValue) = ".$count;
	}
	$sSQL .= " ORDER BY p.dateadded DESC";
	//now limit
	if(isset($_GET['limit']) && $_GET['limit']<>"")
	{
		$sSQL .= " LIMIT ". (int)$_GET['limit'];
	}
	else
	{
		$sSQL .= " LIMIT 15";
	}
	//buld array of listings
	$ads = array();
	$result = $db->query($sSQL);
	while ($rs=$result->fetch()) 
	{ 
		$ads[] = $rs;
	}
	// set XML type and nocache headers
	header('Content-Type: text/xml');
	header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
	header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
	header('Pragma: public');
	// print out the page header
	echo '<rss version="0.92">' . "\r\n";
	echo "<channel>\r\n";
	echo "\t<title>" . htmlspecialchars($title) . "</title>\r\n";
	echo "\t<link>".URL."</link>\r\n";
	echo "\t<description>" . htmlspecialchars(DESCRIPTION). "</description>\r\n";
	echo "\t<docs>http://backend.userland.com/rss092</docs>\r\n";
	echo "\t<language>en</language>\r\n";
	// list returned threads
	if (!empty($ads))
	{
		foreach ($ads AS $listing)
		{
			echo "\t\t\t<item>\r\n";
			echo "\t\t\t\t<link>". URL ."/viewlisting.php?view=".$listing['id']."</link>\r\n";
			echo "\t\t\t\t<title>" . $listing[title] . "</title>\r\n";
			echo "\t\t\t\t<author>" . $listing[username] . "</author>\r\n";
			echo "\t\t\t\t<date>" . $listing['dateadded'] . "</date>\r\n";
			echo "\t\t\t</item>\r\n";
		}
	}
	//close the feed
	echo "</channel>\r\n";
	echo "</rss>";
?>
Specifics please....I just don't see anyway to capture the feed from my Mozilla brower....? I have saved other feeds by clicking on an RSS icon.
Soleiltan is offline   Reply With Quote
Old 01-29-2008, 05:02 PM   #2
Moderator
 
 
Join Date: Mar 2006
Posts: 4,108
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

RSS feeds by default arent made to show up on a website. They are meant to be viewed with an RSS reader.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-29-2008, 05:50 PM   #3
PHP Mechanic
 
 
Join Date: Nov 2007
Posts: 118
Rep Power: 9
cheesegrits has a spectacular aura about
Default

I think he's asking where the feed icon is to allow a user to subscribe to the feed.

-- hugh
cheesegrits is offline   Reply With Quote
Old 01-29-2008, 06:15 PM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,767
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

Quote:
Originally Posted by cheesegrits View Post
I think he's asking where the feed icon is to allow a user to subscribe to the feed.
In that case you could add this line to the head of the layout template:
<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://yoursite.com/external.php" />
__________________
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 01-29-2008, 06:56 PM   #5
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Default



Excellent...working like a charm....
Soleiltan is offline   Reply With Quote
Old 01-29-2008, 07:07 PM   #6
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Default

Except that now...I am getting this

This feed contains code errors.
Go back to the previous page.

More information

XML document must have a top level element.
Line: 0 Character: 0

Soleiltan is offline   Reply With Quote
Old 01-30-2008, 10:11 AM   #7
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,767
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

Can you try and upload an original external.php file. Maybe it got corrupt some how.
__________________
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 01-30-2008, 01:03 PM   #8
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Default

That seemed to make the RSS function, but perhaps the error is happening when I add the code to make the child categories part of the feed. I entered it from another's post. See above.

Here it is exactly....

Code:
{
		$arr_childs = array((int)$_REQUEST['type']);
		get_ids($arr_childs);
		$sSQL .= ( empty($arr_childs) ) ? '': " AND p.section IN (". implode(', '
	}
Thanks...
Soleiltan is offline   Reply With Quote
Old 01-30-2008, 02:19 PM   #9
Moderator
 
 
Join Date: Mar 2006
Posts: 4,108
Rep Power: 100
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by Soleiltan View Post
That seemed to make the RSS function, but perhaps the error is happening when I add the code to make the child categories part of the feed. I entered it from another's post. See above.

Here it is exactly....

Code:
{
		$arr_childs = array((int)$_REQUEST['type']);
		get_ids($arr_childs);
		$sSQL .= ( empty($arr_childs) ) ? '': " AND p.section IN (". implode(', '
	}
Thanks...

In the above code you dont have a closing bracket on the implode statement. Even if you did, im not sure it would work. Can you provide a link where you got the code changes from?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-30-2008, 02:42 PM   #10
Senior Member
 
 
Join Date: Jan 2008
Posts: 124
Rep Power: 8
Soleiltan is on a distinguished road
Default Forwarded Link to Code

Here is the link...

Rss by garysmith
Soleiltan 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
Feedback on Multiple Language Website midoplaz v3.1 Modules & Modifications 0 08-31-2007 03:11 PM
Show customers URL on showlistings.tpl.php marketingsolutions v3.1 Questions & Support 0 11-01-2006 08:38 PM
Can you show ads on someone else's site? cherubini v3.1 Modules & Modifications 14 06-09-2006 01:47 PM
Sample faq and terms? macagent v3.1 Questions & Support 2 06-07-2006 06:03 PM
Not show price garysmith v3.1 Modules & Modifications 10 05-30-2006 05:44 AM


All times are GMT -4. The time now is 03:45 PM.


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