Support Forums

Old 05-14-2008, 06:42 AM   #1
Junior Member
 
Join Date: Feb 2008
Posts: 3
Rep Power: 0
Bluesplayer is on a distinguished road
Default Using Ajax and RSS to show latest posts

I thought to post how easy it is to show the latest classifieds posts anywhere on a site (though it has to be on the same domain). I have used ajax to incorporate the code as this makes it a lot easier to control fonts and urls etc. If you used an iframe for instance the urls would need to be changed to open in a whole page (_top) for instance. I am now showing the latest classifieds adverts on my home page which is a Joomla Portal, but it could be any type of page. You can include the code directly without using ajax but as I have so many rss feeds and bits of code here and there it makes it easier for me to control designs. The code I used is from here

http://www.dynamicdrive.com/dynamici...pausescroller/

It works off the external.php file found in the classifieds directory. Not all rss parsers will work off a php file but the above does.

To make the above work in Joomla for instance I had to add code to the template index.php file. In fact I have 2 feeds on my Joomla Homepage - 1 at the very top which is coded into the index.php file and another which I am using for showing my classified adverts which is a module I have created using ajax. Because I have added ajax include code into my Joomla index.php file I can then use ajax to add code inside the modules. I find it works a lot better than trying to get include commands to work.

You can forget about using ajax though as it might just confuse the hell out of you if you haven't used it before and just use the code from dynamic drive to show your latest posts. Once you get more than one post it will start scrolling. Also you might get an error message showing in some versions of explorer until you have more than one post. Once you have 2 posts and the scrolling kicks in the error goes.

You can see how I have added the code to my Joomla Homepage by viewing source. The top scroller is using rss from my shopping forum and the Latest Classifieds is using the rss from my Classifieds installation (you can see it around the middle of the page).

http://bluesplayer.co.uk/

Hope the above is understandable and useful.

Regards
Bluesplayer
Bluesplayer is offline   Reply With Quote
Old 05-14-2008, 09:38 AM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,757
Rep Power: 110
Eric Barnes is a jewel in the rough
Default

Hi Bluesplayer,

Thanks for posting this. I could see this coming in handy.

Thanks for sharing!
__________________
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

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



All times are GMT -4. The time now is 06:13 AM.


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