Welcome to Sassafras SystemsWelcome to Sassafras Systems
Home  ·  Your Account  ·  Downloads  ·  Forums  

  Search




  Modules
 

Sassafras Systems: Forums

 
  Control Panel
 
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in Forum FAQForum FAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Sassafras Systems Forum Index -> SassaNews -> Questions about SassaNews

 Author
Message View previous topic :: View next topic  
     
   kevin
 Site Admin
 Site Admin


 Joined: Dec 23, 2003
 Posts: 8
 

PostPosted: Tue Jan 13, 2004 1:45 pm  
 Post subject: Questions about SassaNews
Reply with quote

Posted in Downloads comments:

I found a post on nukecops.com for your . Looks good but ...

I've spent several hours struggling with this since I think it'll be helpful . I've managed to get it to work on a Linux Fedora Core 1 platform but it took some work.

1. I had to turn on the register_globals directive in /etc/php.ini and it is recommended (in the "PHP Bible") that this not be done for future compatibility. To turn it off would require the use of $_POST in many places and I couldn't get it to work (I'm a newbie ).

I asssume that the XML output is supposed to be dumped into the filename file but what I get there is the results of the google search. I think I understand that the google search results are to be parsed and the resulting XML code dumped to the filename file but this isn't happening on my system. I got around this by copying the XML output which appeared in the browser window to the intended file and uploading it to overwrite the one produced by the .

I also made some quick hacks to get this to work with a regular google search (www.google.com) and this looks promising but I don't want to do any more until the original is modified.

I'm willing to test any changes you make and I will recontribute any mods I come up with for a regular google search.

Thanks
 
   
View user's profile Send private message Visit poster's website
   
     
   kevin
 
 

 
 
 

PostPosted: Tue Jan 13, 2004 2:02 pm  
 Post subject: Re: Questions about SassaNews
Reply with quote

I'll look into the register_globals issue to see how it could be addressed differently.

The XML output doesn't have a file name, per se, as it is created as a result of specifying sassanews.php with parameters (e.g. http://www.yourdomain.com/sassanews.php?q=%5C%22root+beer%5C%22&num=10&f=sassanews&k=mysitekey). The filename parameter is actually used to specify the .html file used to store the results from the Google News search and, by using different file names, to support multiple searches on the same server. This existence of this file (and the date and time it was last changed) support the feature that controls when a new search is submitted to Google. That feature isn't really required by phpNuke, since it has it's own ability to time updates, but it is useful for standalone implementation.

I figured most sites would prefer a simple form to search Google, rather than to view the preconfigured results of a saved search via RSS/XML, but I do agree that it should be pretty easy to modify this to syndicate content from any site. We'd be happy to post any contributed updates for use with other websites (we intend to do that as well and as requested / required).
 
   
   
     
   myamigo
 Newbie
 Newbie


 Joined: Jan 13, 2004
 Posts: 1
 

PostPosted: Tue Jan 13, 2004 2:36 pm  
 Post subject: Re: Questions about SassaNews
Reply with quote

Thanks for the explaination. Since I posted my original message I figured out a little more about how your module works. My problem with the correct file not being generated seems to be related to the
Code:
if ($f = "index") $f="";
statement. I commented it out and it works but it doesn't have the filename=index protection in place.

I tried changing your code to use the advanced seach feature on Google and came up with the some code which works with register_globals=On. The form has an exclude search field to narrow the search results. It might be nice to include the "exact phase" field as well. I will email it to you so you can use it as you see fit.
 
   
View user's profile Send private message
   
     
   kevin
 
 

 
 
 

PostPosted: Tue Jan 13, 2004 3:08 pm  
 Post subject: Re: Questions about SassaNews
Reply with quote

Ouch! That's a bug... $f = "index" changes the file name to index. But the code right after that changes the file name again to sassanews if the filename is blank / null. It should be $f == "index" to compare it to index

I'll update the file and post an update on NukeCops and some other sites I've seen that it's been stored on.
 
   
   
     
   kevin
 
 

 
 
 

PostPosted: Wed Jan 14, 2004 12:28 am  
 Post subject: Re: Questions about SassaNews
Reply with quote

Just updated the download to include code so that SassaNews works with register_globals on or off (it's on all my servers, so I turned it off on a development server to test it).

Scott, you were on the right track, but it's $_GET instead of $_POST, since the program needs to get it from the URL. I think $_POST will work if you're manually generating the URL from the included display routine, but once you've generated the URL, most likely it will be saved somewhere and passed as a URL to SassaNews.php (hence, the $_GET). I didn't test $_POST, but I did test $_GET with register_globals On and Off.

A similar point could be made for magic_quotes - there is no logic in SassaNews to check for this since the intent is to use saved searches, rather than open it up for dynamic searches by site visitors. Maybe we can put that in the next release...
 
   
   
     
  Back to top
Display posts from previous:   
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Sassafras Systems Forum Index -> SassaNews -> Questions about SassaNews
All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:   
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Forums ©

Page Generation: 0.18 Seconds