Support Forums

Old 04-06-2006, 03:30 PM   #1
Junior Member
 
Join Date: Mar 2006
Posts: 16
Rep Power: 14
LukeOut is on a distinguished road
Default Listings on main site home page

I would like to add the NEW or FEATURED or TOP listings on my sites home page (www.mysite.com). The 68 Classifieds is a folder within my main site (www.mysite.com/classifieds). Can I use an include to do this? Is it even possible? I looked in the mods area but saw nothing. Thanks.
LukeOut is offline  
Old 04-06-2006, 03:34 PM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,176
Rep Power: 119
Eric Barnes is a jewel in the rough
Default

I have done this before but with two different sites. 68 Classifieds has a file external.php that will print an rss feed for listings. I used this and a php rss reader to print the latest ads.
__________________
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  
Old 04-06-2006, 04:38 PM   #3
Junior Member
 
Join Date: Mar 2006
Posts: 16
Rep Power: 14
LukeOut is on a distinguished road
Default

So point the reader to www.mysite.com/classifieds/external.php and it will read this file? Or is there more to it?
LukeOut is offline  
Old 04-06-2006, 04:43 PM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,176
Rep Power: 119
Eric Barnes is a jewel in the rough
Default

That should be all you have to do. It does have some parameters you can use:

type=number <-- Category
owner=number <-- The owner id. This would be just their listings
searchtext=text <-- This would be any search keywords.
limit=number <-- The number to show. Default is 15

So to use these you would call:
external.php?type=1&owner=1&searchtext=ford&limit= 20

Any of these can be used or not used. But that is just an example.
__________________
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  
Old 04-06-2006, 04:59 PM   #5
Coder
 
Join Date: Mar 2006
Posts: 4,610
Rep Power: 112
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by LukeOut
So point the reader to www.mysite.com/classifieds/external.php and it will read this file? Or is there more to it?
There is a little more to it. As Eric pointed out in the post above, the file external.php returns an RSS feed which is XML formatted. If you want to display this in a table or what have you you will need to manually parse the XML/RSS or use a premade class to do it.

Alternatively you can just do your own database call selecting the records you want.
__________________
Larry.
Lhotch is offline  
Old 04-06-2006, 05:08 PM   #6
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,221
Rep Power: 61
juven14 is a jewel in the rough
Default

If you are willing to use smarty on your main site, you can copy the smarty plugin over and display it anywhere on you site in the same manner as you did within the classifieds directory.

I've tested it, and plan on doing this myself. I included the database connection and copied over the plugin. One thing to note, I had to copy the currency function from functions.php inside of the plugin. Works like a charm.
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-06-2006, 05:32 PM   #7
Junior Member
 
Join Date: Mar 2006
Posts: 16
Rep Power: 14
LukeOut is on a distinguished road
Default

Thanks for all of your help. I have gotten it to work fine with the reader. I assume the only thing being returned here is the TITLE and the LINK, right? At least my reader only picks up those 2 items.
LukeOut is offline  
Old 04-06-2006, 05:45 PM   #8
Coder
 
Join Date: Mar 2006
Posts: 4,610
Rep Power: 112
Lhotch is just really niceLhotch is just really nice
Default

Quote:
Originally Posted by LukeOut
Thanks for all of your help. I have gotten it to work fine with the reader. I assume the only thing being returned here is the TITLE and the LINK, right? At least my reader only picks up those 2 items.
There is a date and description as well. If you point a browser to external.php you can easily make out the fields.

PEAR's xml-rss works very well and is easy to use.

http://pear.php.net/package/XML_RSS


***EDIT*** I stand corrected there isnt a description by default. I forgot I modified mine to include more fields.
__________________
Larry.
Lhotch is offline  
Old 04-06-2006, 05:54 PM   #9
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 2,221
Rep Power: 61
juven14 is a jewel in the rough
Default

The fields set up in the rss-mod are:

Site Title
Site Description

Listing Title
Listing Short Description
Listing Link
Listing Image URL
Date (Today's date, I think) - this was changed, maybe Chaslie can update the file, it should be dateadded.

Which of these displayed is determined on the rss-template file.

As for the default external.php

It should display:

Site Title
Site URL
Site Description

Listing Title
Listing Link
Listing Creator
Listing dateadded
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-06-2006, 07:19 PM   #10
Moderator
 
Chaslie's Avatar
 
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 745
Rep Power: 28
Chaslie will become famous soon enough
Default

John,

Quote:
Date (Today's date, I think) - this was changed, maybe Chaslie can update the file, it should be dateadded.
That was in the files we worked on when trying to hook it up with the V3.1 beta. That amended version of external.php only works with V3.1.
__________________
Chaslie
V4.1 dev


68 Classifieds Important Links
Customer Area | Issue Tracker | User Manuals & Documentation

HTML Help
W3 Schools
Chaslie is offline  
 

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
Thumbnail images for New listings on Home Page marketingsolutions v3.1 Questions & Support 6 01-12-2007 11:13 AM
I need to remove category listings from home page marketingsolutions v3.1 Modules & Modifications 1 09-26-2006 12:07 PM
Newest Listings On Home Page zman78 v3.1 Modules & Modifications 24 05-26-2006 08:23 AM
Show Top Listings On Home Page zman78 HTML, CSS, and Design Help 3 04-21-2006 04:32 AM
Featured Listings on Home Page LukeOut v3.0 Questions & Support 9 04-06-2006 04:36 PM


All times are GMT -4. The time now is 10:35 AM.


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