Joomla! Discussion Forums



It is currently Sun Nov 22, 2009 4:15 am (All times are UTC )

 




Post new topic Reply to topic  [ 157 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
Posted: Thu Oct 13, 2005 8:20 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Hi All,

thought I post a better commented version of the scripts posted http://forum.joomla.org/index.php?topic=6496 in this forum as its better suited to this forum.

Basically take your pick at either of these (one for Joomla other for Mambo).

This script does require some basic PHP skills but if you are happy with defaults then this is all you need to do:
1. Edit MySQL DB configuration (lines 16-19)
2. RSS feed URL or local RSS feed file location (Lines 22 or 23)
3. Email address for new feed notification (line 26)

Happy importing.

PS: If anyone is interested in making this into a component, please let me know (PM me).

Cheers,
Max


You do not have the required permissions to view the files attached to this post.


Top
  E-mail  
 
Posted: Thu Oct 13, 2005 1:03 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Mon Sep 05, 2005 6:18 am
Posts: 725
Location: India
Hello thank you I was in need of such a script I'll try it out and give you the feedback

cheers
jacob

_________________
A. N. Jacob-New
The Tech & Design Blog http://www.Clazh.com


Top
   
 
Posted: Thu Oct 13, 2005 1:22 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
No probs at all, its quiet handy, saves some time :-)


Top
  E-mail  
 
Posted: Sun Oct 16, 2005 7:28 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Oct 15, 2005 4:15 am
Posts: 10
When I upload the script (edited to my database ect.) I get error messages telling me rss.php does not exist. Where am I supposed to place this script ? What is the rss.php and how can I get it ? And lastly, what if I want multiple rss feeds, each article a seperate content item, and sorted by date ? Is this possible ?

Sorry bout all the question, sortof noob at this stuff, though some help would be greatly appreciated. Thankyou.


Top
   
 
Posted: Sun Oct 16, 2005 8:49 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Your need to have RSS_XML PHP Pear library installed on the server (ie shared under php installation).

If not, just copy rss.php from the above pear ibrary to the same directory as yoru script.


Top
  E-mail  
 
Posted: Wed Oct 19, 2005 9:07 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
I have created this as a project on Joomla Sourceforge, http://developer.joomla.org/sf/sfmain/d ... uto_import

Cheers,
Max


Top
  E-mail  
 
Posted: Wed Oct 19, 2005 2:49 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 12, 2005 12:01 pm
Posts: 13
2 typera
Some update for rss feeds that have time information in ....

Replace this line:

      $publishdate = date('Y-m-d H:i:s', strtotime($item['pubdate'])); //Convert feed article publish date to mambo publish date
$publishdate_readable =  date('d-m-Y, H:i', strtotime($item['pubdate'])); // I didnt like the standard date format, this is for email field


with these:
$publishdate = preg_replace('|([-+])([0-9]+):([0-9]+)$|', '\1\2\3', $item['dc:date']);
$publishdate = str_replace('T', ' ', $publishdate);

$publishdate = date('Y-m-d H:i:s', strtotime($publishdate)); //Convert feed article publish date to mambo publish date
$publishdate_readable =  date('d-m-Y, H:i', strtotime($publishdate)); // I didnt like the standard date format, this is for email field


But it would be better if you make the script to decide automaticaly what time format was used in rss feed.
This change was based on rss-import.php form WordPress distributive. I'd advise you to look at this script as you may find there some intersting code to make your script more advanced :)


Top
   
 
Posted: Wed Oct 19, 2005 3:34 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
thanks, this will make it look like the webmaster never sleeps :-)


Top
  E-mail  
 
Posted: Wed Oct 19, 2005 4:18 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Oct 19, 2005 4:11 pm
Posts: 4
I got this kind of error message?

Warning: Unknown(/www/asiakkaat/XXX/public_html/XXX/rss2mambo.php): failed to open stream: Permission denied in Unknown on line 0

Warning: (null)(): Failed opening '/www/asiakkaat/XXX/public_html/XXX/rss2mambo.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0


Top
   
 
Posted: Wed Oct 19, 2005 4:27 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Thats odd, did you make the required changes before trying to use it?


Top
  E-mail  
 
Posted: Thu Oct 20, 2005 5:05 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
Hello,
Very nice and so useful script ;)
Sadly I can't make it work, sorry i'm quite a noob. :-[

I followed the instructions, and made a "scripts" folder where I uploaded the RSS.php and rss2joomla.php, in which I changed the parameters.
But stil I got this message, I "googled" all night to find this WML/Parser.php but didn't find a clue on this.

Quote:
Warning: main(XML/Parser.php): failed to open stream: No such file or directory in /var/www/free.fr/a/8/crisis.communication/scripts/RSS.php on line 23

Fatal error: main(): Failed opening required 'XML/Parser.php' (include_path='/var/www/xxx/x/x/crisis.communication/include:.') in /var/www/xxx/x/x/crisis.communication/scripts/RSS.php on line 23
 


Any help would be very welcome.

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Top
  E-mail  
 
Posted: Thu Oct 20, 2005 5:12 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Are you getting the same error as Petterin ?

How are you trying to run the file?


Top
  E-mail  
 
Posted: Thu Oct 20, 2005 5:46 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
Hi Typera,

No i don't think it's the same error as Petterin.
If I understand well the script is looking for a file called "Parser.php" in the folder "XML" I tried to find such file on the Pear & PHP web site, but I couldn't find any references to this.

So I tried to use the file 01.parse.phpt, that I renamed as Parser.php, but of course no luck at all. Then I tried to use the "domit" RSS and Parser in the folder "includes" expecting I could parse, but still can't work.
So I'n out of any option now  :-[

Too use the file I'm using http://my.web.site/script_folder/rss2joomla.php in a browser.

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Top
  E-mail  
 
Posted: Thu Oct 20, 2005 6:15 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Contact your hosting support and make sure that PHP Pear libraries are accessible, I think thats where the problem is.


Top
  E-mail  
 
Posted: Thu Oct 20, 2005 10:15 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Thu Oct 20, 2005 10:08 pm
Posts: 1
Thanks for this great script.  I installed it and everything worked but I have a question about the output.

It will parse the rss but the problem I have is that the Intro Text or teaser is the same as what is in the main text. It doesn't put the entire article in the main text.  Do I have something set up wrong or is this how it works?  I tested it using the same rss url that was included in the script.


Top
  E-mail  
 
Posted: Fri Oct 21, 2005 6:06 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Intro text and main text both come from the same field within the RSS feed, the article description. The only difference is that intro text is limited to number of characters while main text is not.

If only RSS feeds contained full articles, unfortunately there are very few which have more than 2 lines in description.

Cheers,
Max


Top
  E-mail  
 
Posted: Tue Oct 25, 2005 7:36 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 12, 2005 12:01 pm
Posts: 13
eugene33 wrote:
Hi Typera,

No i don't think it's the same error as Petterin.
If I understand well the script is looking for a file called "Parser.php" in the folder "XML" I tried to find such file on the Pear & PHP web site, but I couldn't find any references to this.

So I tried to use the file 01.parse.phpt, that I renamed as Parser.php, but of course no luck at all. Then I tried to use the "domit" RSS and Parser in the folder "includes" expecting I could parse, but still can't work.
So I'n out of any option now  :-[

Too use the file I'm using http://my.web.site/script_folder/rss2joomla.php in a browser.


If you have troubles with RSS.php, try this:

change this line -
require 'RSS.php';

with this -
require 'XML/RSS.php';

that worked for me...


Top
   
 
Posted: Wed Oct 26, 2005 1:00 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
Thanks Saintman
Sadly I just tried it but still don't work on a subdomain from this server (http://www.free.fr) Like Typera said, it should be a prob with my FAI.
Anyway it works really fine on another server I own, and on which I have all the rights.

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Top
  E-mail  
 
Posted: Wed Oct 26, 2005 1:40 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
I have seen this with some hosting places where the apache/php config has path restrictions in place, and the list of excepted locations does not include the global pear location. Best get in touch with your hosting service provider, its a 2 min fix.


Top
  E-mail  
 
Posted: Wed Oct 26, 2005 2:00 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
Thanks Typera
I have been in touch with them, but currently they can't or don't want, to do anything.
Well it's not a great deal, I plan to move to a real hosting service when the site will be fully finished.

Anyway, You realized the tool I was dreaming of and it work just fine on my other web site and for this THANKS  :D :D :D

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Top
  E-mail  
 
Posted: Wed Oct 26, 2005 2:41 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
hehe, no probs.

Watch this space, going to make this into a component so its easier to add/remove feeds, etc  ;)


Top
  E-mail  
 
Posted: Wed Oct 26, 2005 3:14 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
;D ;D Great  :-*

If you were a women I would certainly ask you to marry me.
If you need some french translation for the component, I'm you man, I won't be able to help for the coding part but for translation I could

By the way, it would be very very very...nice if you could include the RSS Geolocation in your component
Just have a look to this:
WorldKit
http://brainoff.com/worldkit/doc/
http://brainoff.com/worldkit/

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Last edited by eugene33 on Wed Oct 26, 2005 3:17 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Wed Oct 26, 2005 3:23 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
No probs, this script really only parses supplied RSS feeds so if that info is not in it, we cant put that in. On the other hand parsing that info (if its already there) wont be too hard, can even be done with the current script with some tweaks.


Top
  E-mail  
 
Posted: Thu Oct 27, 2005 2:23 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Sat Oct 22, 2005 2:01 pm
Posts: 1
Question about the rss2mambo script. In my mysql logs, I'm only getting the database user logging into the database, but nothings being added. When I do an echo $rss_feed, the only output I'm getting is "Object" on the page. Is that what I sould be seeing?

Thanks in advance.

Kevin


Top
  E-mail  
 
Posted: Thu Oct 27, 2005 9:53 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 6:11 am
Posts: 173
Location: Oamaru,New Zealand
Hi typera,
Is this going to be changed into a component at all?? So the direct mysql query's can be changed to use joomla's
built-in database api. Also,cant you include the PEAR and rss_xml with the script like some other components do?
Don't get me wrong,I'm not complaining ;) I've been after something like this for a looooonnnggg time.
Cheers
Aron


Top
  E-mail  
 
Posted: Fri Oct 28, 2005 5:39 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Yes thats the idea to make it into a component, watch this space.


Last edited by typera on Sat Oct 29, 2005 5:48 am, edited 1 time in total.

Top
  E-mail  
 
Posted: Sat Oct 29, 2005 12:12 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Aug 19, 2005 6:11 am
Posts: 173
Location: Oamaru,New Zealand
Cheers typera! ;D I'm waiting patiently...honest! ;)
Aron


Top
  E-mail  
 
Posted: Sat Oct 29, 2005 5:15 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 08, 2005 2:18 am
Posts: 86
Location: France
Hello,
I was playing  ;) with the script and yahoo RSS, and I'm running in another problem. I'm trying to get the content of the tag (which is the url for the full article)  in the maintext.
this is the code I added:
Quote:
$guid = addslashes($item['guid']);
$rss_feed2 = file_get_contents($guid);

My previous try displayed the url but what I would like is the full article :'(
If anyone could help me that would be great 

_________________
http://deschamps.sebastien.free.fr (Personal Web Portal)
http://my.joomla.free.fr (have fun with joomla and as the name says this is MY joomla! well my experiences with it)


Top
  E-mail  
 
Posted: Sun Nov 06, 2005 3:58 pm 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Aug 18, 2005 6:27 pm
Posts: 64
Location: Netherlands
I can't get the second 'read on' link that goes to the feed article (offsite) ??? It won't show up in the maintext. I have tried several templates on Joomla 1.03 and mucked around with the code a lot but am getting nowhere. I even tried a number of feeds with no luck.

Anybody have any ideas? These are some parameters from the code. I don't see a $link anywhere.

$titletext
$introtext
$maintext
$publishdate

_________________
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

-Albert Einstein


Last edited by ghandi on Sun Nov 06, 2005 4:02 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Sun Nov 13, 2005 3:38 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Oct 15, 2005 4:15 am
Posts: 10
I noticed there was a parameters section. Any ideas on how I could cause the script to auto add to frontpage ? Thanks.


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 157 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

Quick reply

 



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group