Joomla! Discussion Forums



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

 




Post new topic Reply to topic  [ 157 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
Posted: Tue Nov 15, 2005 9:30 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
eugene33 wrote:
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 

Fetching the full article is tricky as it will get the actual html with their own formatting, ads, etc. You might as well put it in a wrapper or something like that.


Top
  E-mail  
 
Posted: Tue Nov 15, 2005 9:33 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
ghandi wrote:
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

Can you please post an example of where its missing?




Top
  E-mail  
 
Posted: Fri Nov 18, 2005 2:33 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Aug 29, 2005 6:35 pm
Posts: 18
ghandi wrote:
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


Hi,

What I did was add the following code:

Around line 88
$link = addslashes($item['link']);


Around line 130, replace
'". $maintext ."',
with

'". $maintext . "

Read more...',

_________________
Sylvain Amyot
http://www.mytechsupport.ca
http://www.mypcsecurity.ca
http://www.tollplumbing.com


Top
  E-mail  
 
Posted: Sun Nov 20, 2005 6:01 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Nov 20, 2005 5:58 pm
Posts: 28
Where do I put the script, the most basic instruction I failed to find. Also, once the script is uploaded to ? folder what happens? Is there any admin interface thet appears?

Please help.


Top
   
 
Posted: Sun Nov 20, 2005 6:25 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
jbsarma wrote:
Where do I put the script, the most basic instruction I failed to find. Also, once the script is uploaded to ? folder what happens? Is there any admin interface thet appears?

Please help.


Anywhere you like, and no theres no admin interface (..as yet). Its not integrated into Mambo/Joomla except for being able to insert data into its tables.


Top
  E-mail  
 
Posted: Sun Nov 20, 2005 6:37 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Nov 20, 2005 5:58 pm
Posts: 28
Many thanks. How do I actually make the feed appear in my news section once the script is uploaded. And where do I list the feeds? Forgive me for asking so many questions but I found this solution wonderful to have. A more detail instruction giving the post installation steps will be helpful.


Top
   
 
Posted: Sun Nov 20, 2005 6:40 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
The script is not integrated at all, all it does is insert data into your database under specified category/section.

Imagine you manually typing this info as you do and then publish the articles, etc... well its the same process but the data input is automatic (ie this script does it)


Top
  E-mail  
 
Posted: Sun Nov 20, 2005 10:10 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Nov 20, 2005 5:58 pm
Posts: 28
typera wrote:
The script is not integrated at all, all it does is insert data into your database under specified category/section.

Imagine you manually typing this info as you do and then publish the articles, etc... well its the same process but the data input is automatic (ie this script does it)
Thanks.

To move on I just installed the script with the database parametres and also installed XML_RSS on my server PEAR library. But when I call the script I get a blank page (http://www.accb.net/rss2joomla.php/).

Please help to get past this --

Thanks again.


Top
   
 
Posted: Sun Nov 20, 2005 10:15 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
jbsarma wrote:
typera wrote:
The script is not integrated at all, all it does is insert data into your database under specified category/section.

Imagine you manually typing this info as you do and then publish the articles, etc... well its the same process but the data input is automatic (ie this script does it)
Thanks.

To move on I just installed the script with the database parametres and also installed XML_RSS on my server PEAR library. But when I call the script I get a blank page (http://www.accb.net/rss2joomla.php/).

Please help to get past this --

Thanks again.

1. Get rid of the slash at the end
2. You are not meant to get any info... all this script does is fetch rss feed and import it into your DB... that is all! You are meant to use the normal techniques to dislpay the imported content, ie same as if you just type it in.


Top
  E-mail  
 
Posted: Mon Nov 21, 2005 2:45 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Aug 29, 2005 6:35 pm
Posts: 18
If you want the script to display something, add this at the end (in red)

}
echo $email_body;
?>

_________________
Sylvain Amyot
http://www.mytechsupport.ca
http://www.mypcsecurity.ca
http://www.tollplumbing.com


Top
  E-mail  
 
Posted: Wed Nov 23, 2005 10:16 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 28, 2005 3:53 am
Posts: 61
This is getting quite tricky for me to get my head around. I've uploaded rss2joomla.php - when I run this file, it goes to a blank page - I'm assuming that this is correct. My first problem is that when I access my db, no new stories have been added. This is ood.

Furthermore, how do I actually "add" stories so that they appear in index.php?option=com_frontpage&Itemid=1 automatically - I can't quite grasp this concept - sorry. A little bit of help would be greatly appreciated.

To speed this up, these are the settings I have in rss2joomla.php (will these have an impact at all)? I have tried blanking it out... and even though I'm running joomla, my db still has references to mos_, so I assume that I should leave this as _mos, right?

INSERT INTO mos_content (
              title,
introtext,
fulltext,
state,
sectionid,
mask,
catid,
created,
created_by,
checked_out,
publish_up,
attribs,
version,
access,
ordering
) VALUES (
'',
'',
'',
'',
'',
'',
'14',
'62',
'',
'',
'',
'',
'',
'',
'99'


Last edited by marsm on Wed Nov 23, 2005 1:16 pm, edited 1 time in total.

Top
   
 
Posted: Wed Nov 23, 2005 4:51 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Nov 20, 2005 5:58 pm
Posts: 28
marsm wrote:
This is getting quite tricky for me to get my head around. I've uploaded rss2joomla.php - when I run this file, it goes to a blank page - I'm assuming that this is correct. My first problem is that when I access my db, no new stories have been added. This is ood.

Furthermore, how do I actually "add" stories so that they appear in index.php?option=com_frontpage&Itemid=1 automatically - I can't quite grasp this concept - sorry. A little bit of help would be greatly appreciated.

I acnnot agree more. There is no use making a script available with no instruction to follow particularly when it is a non-standard script nevertheless a bonafide Joomla project.

Moreover, since I run this script a strange thing happened - I can no longer edit my existing stories - each one I tried to edit subsequently got marked with that small 'lock' (checked_out.png) icon and no editing is allowed now. I strongly suspect this script has something to do as I have not made any changes. Luckily I am still playing and my site is not quite a production site yet. Is there any other explanation and how to remedy this situation. Please help f you know.

I beleive the concept of this script is great and the script works for those who know the tricks. It wish there were some clear instructions for novice! 


Top
   
 
Posted: Wed Nov 23, 2005 5:16 pm 
Joomla! Intern
Joomla! Intern
Offline

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

lets not get worked out about this. I shared this script as I personally found it useful however I did warn that php skills are required (basic to medium php skill level).

If you only work with GUI Web admin on your Joomla site, please do not use this script as you may damage your database or files.

In regards to the last two questions, if you follow the instructions in the file itself, it will work for you. If I had more time at the moment, I would either help you individually or write a component front end for it ...however I dont.

I do plan in the future to turn this into a component but when its unknown, maybe in 1 month time, maybe in 2, time till tell.

Cheers,
Max


Top
  E-mail  
 
Posted: Wed Nov 23, 2005 8:54 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
Wow, I didn't realize this was such a new project, but thank you very much Typera!

There's obviously a decent amount of demand for this component =)
I too am having trouble with the RSS.php part of it.

I recieve the following error after installing the XML_RSS package for Pear:

Warning: main(RSS.php): failed to open stream: No such file or directory in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Warning: main(RSS.php): failed to open stream: No such file or directory in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Fatal error: main(): Failed opening required 'RSS.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13


And when I move the PSS.php file directly into the same directory as the script I get the error:

Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/XML/Parser.php) is not within the allowed path(s): (/home/httpd/vhosts/pureonlinemarketing.com/httpdocs:/tmp) in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23

Warning: main(XML/Parser.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23

Fatal error: main(): Failed opening required 'XML/Parser.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23


Any Suggestions?

Maybe I'll just have to wait until that glorious component is ready  :D


Top
   
 
Posted: Wed Nov 23, 2005 10:02 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
puretom wrote:

And when I move the PSS.php file directly into the same directory as the script I get the error:

Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/XML/Parser.php) is not within the allowed path(s): (/home/httpd/vhosts/pureonlinemarketing.com/httpdocs:/tmp) in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23

Warning: main(XML/Parser.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23

Fatal error: main(): Failed opening required 'XML/Parser.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/RSS.php on line 23


Any Suggestions?

Maybe I'll just have to wait until that glorious component is ready  :D

Contact your host and ask them to add /usr/share/pear to open_basedir php config. Its an issue with your hosting php security configs.

Cheers,
Max


Top
  E-mail  
 
Posted: Wed Nov 23, 2005 11:09 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
Hi Max,

Thank you so much for your timely reply!

Unfortuantly, I'm the host... and I'm not sure how to edit my open_basedir php configs, is there a shell command in linux that I use through SSH to do such a thing?

Thanks again!

-Tom


Top
   
 
Posted: Wed Nov 23, 2005 11:12 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
puretom wrote:
Hi Max,

Thank you so much for your timely reply!

Unfortuantly, I'm the host... and I'm not sure how to edit my open_basedir php configs, is there a shell command in linux that I use through SSH to do such a thing?

Thanks again!

-Tom


Have a read of this: http://uk.php.net/features.safe-mode


Top
  E-mail  
 
Posted: Thu Nov 24, 2005 1:55 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
Hi again Max,

Figured out how to edit my php.ini file and made the appropriate changes.  However no change in the operation of the script, same errors.


Top
   
 
Posted: Thu Nov 24, 2005 5:14 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 28, 2005 3:53 am
Posts: 61
typera wrote:
Guys,

lets not get worked out about this. I shared this script as I personally found it useful however I did warn that php skills are required (basic to medium php skill level).



Hi Typera

Not getting worked up about it - it's just a tad frustrating when you've got limited skills and knowledge and are trying to get things to run - clearly this is a good script because the people who have good skills have been able to use it - when I finally thought I'd got it to work, by going to blank screen, it still didn't add anything to my db.

I understand that you're busy, but the instructions for using this script are extremely vague at best. You've been knee-deep in this project for weeks/months, so you know the ins and outs, but sadly for someone with limited experience and knowledge, it is quite to tough to know if what I;m doing is right or not. I just think that taking a few minutes to give a step-by-step guide what to do, and what the script actually does when it's working, would prove to be invaluable - I'm not joking, but I must have spent about 4 hours on this yesterday, copying stuff, amending the file, and to no avail.

I hope that you get some time to make a component for this, because I think that it's something that people will use a lot - it's a great tool, but sadly I'm back at stage 1, having to find a solution on how I can seamlessly add content from RSS to my db.

Thanks


Top
   
 
Posted: Fri Nov 25, 2005 9:00 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Oct 12, 2005 12:01 pm
Posts: 13
Poor typera...

Once again, everybody who have problems with this script PLEASE DO the following:
1) read this thread from beginning;
2) change the script (a-mysql config; b-e-mail config)
3) contact your PROVIDER if you have problems accessing rss.php (I changed 'rss.php' to '/usr/local/lib/php/pear/XML/RSS.php')
4) if you are using joomla, change 'mos_' to 'jos_' EVERYWHERE in the script
5) copy via ftp script to ANY place on your site (to be able to access it using your browser) (http://www.yoursite.com/script/rss2mambo.php)
6) type in your browser: http://www.yoursite.com/script/rss2mambo.php

And don't post smth. like 'script doesn't work' - it DOES WORK! I see ONLY 2 possible props:
1)you did smth. wrong - reread previous 6 items
2)your hoster has probs with config - contact them and say 'my script doesn't work, what's wrong - my script or your config?'


Top
   
 
Posted: Fri Nov 25, 2005 11:22 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
thanks saintman, I must admit my patients is not my strongest strength  ;)


Top
  E-mail  
 
Posted: Sat Nov 26, 2005 9:29 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
Hmm, still trying here...

Tried this:
'rss.php' to '/usr/local/lib/php/pear/XML/RSS.php'

and got a different error! woohoo! =)

Warning: main(): open_basedir restriction in effect. File(/usr/local/lib/php/pear/XML/RSS.php) is not within the allowed path(s): (/home/httpd/vhosts/pureonlinemarketing.com/httpdocs:/tmp) in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Warning: main(/usr/local/lib/php/pear/XML/RSS.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Fatal error: main(): Failed opening required '/usr/local/lib/php/pear/XML/RSS.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13


Top
   
 
Posted: Sat Nov 26, 2005 9:34 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
puretom, the error means that upi have open_basedir restriction on... have another read of that php safe_mode php link I pasted above.


Top
  E-mail  
 
Posted: Sat Nov 26, 2005 9:39 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
Sorry I should have been more specific,

I've added the correct directory to my php.ini file and still recieve this error,

Do I need to re-compile my php install or somthing? Or re-initialize it somehow?

I made a small correction, and still get this error:

Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/XML/RSS.php) is not within the allowed path(s): (/home/httpd/vhosts/pureonlinemarketing.com/httpdocs:/tmp) in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Warning: main(/usr/share/pear/XML/RSS.php): failed to open stream: Operation not permitted in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13

Fatal error: main(): Failed opening required '/usr/share/pear/XML/RSS.php' (include_path='.:/usr/share/pear') in /home/httpd/vhosts/pureonlinemarketing.com/httpdocs/rss2joomla.php on line 13


Top
   
 
Posted: Sat Nov 26, 2005 9:40 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
Any chanes to php.ini require for apache to be restarted before they take effect


Top
  E-mail  
 
Posted: Sat Nov 26, 2005 9:43 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Nov 23, 2005 8:51 am
Posts: 7
hmm, K, I've already tried restarting the entire server tho... ugh, I feel like such a doofus, cant figure this out!  ???


Top
   
 
Posted: Sat Nov 26, 2005 9:45 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Aug 21, 2005 9:02 am
Posts: 96
the error definately indicates on the problem with your php.ini open_basedir config. I'd suggest a linux admin to have a look at it for you.


Top
  E-mail  
 
Posted: Tue Dec 06, 2005 10:38 pm 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Fri Sep 30, 2005 8:31 am
Posts: 2
Hi typera and everybody else,

great script! Saves me a bunchload of work every day. Thank you for that.

I'm still looking to improve this a bit and had the idea of auto-adding the ". $titletext ." into the meta-description. This works okay with me but it would be neccessary to filter special charakters like +, ", ?, ! out of the titletext wich is coming from the RSS.

What I'm planning is after this bit of code:

$titletext = str_stop(addslashes($item['title']),100);

add another line like:

$titletext = str_tr($titletext, "+", " "); // wich filters out some special chars. (in this case the + should get replaced with an empty space)

I'm trying around a bit with strtr and ereg_replace but since my coding skills are more sort of try and error I did not succseed  :P The script just doesn't enter anything to the DB if I insert this line.

Could anybody give me a hand with this?

Thank you very much.


Last edited by Epikur on Tue Dec 06, 2005 10:45 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Sun Dec 11, 2005 5:54 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Tue Oct 04, 2005 7:58 am
Posts: 76
I spent 1 hour trying to figure out where to put rss2mambo.php  but in vain .. Reading the thread from the start did not help me  :'(

_________________
http://www.mopays.com.


Last edited by FiReStOrM on Sun Dec 11, 2005 6:00 am, edited 1 time in total.

Top
   
 
Posted: Sun Dec 11, 2005 4:57 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sun Dec 11, 2005 3:45 pm
Posts: 12
I can't get the bloody thing to work - why doesn't ANYBODY document ANYTHING when it comes to Joomla? I have no choice but to look for an alternative like WordPress and start over


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

Quick reply

 



Who is online

Users browsing this forum: No registered users and 10 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