Go Back   Pligg CMS Forum > Other > Suggestions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2006, 09:57 AM
Casual Pligger
 
Join Date: Oct 2006
Posts: 67
Thanks: 3
Thanked 17 Times in 6 Posts
some thoughts on RSS import feature

Hi.
from last couple of days i was playing with this new feature.here are some of my obsevations:-
1)current code is buggy(i taken one from svn).it only imports one feed no matter how many you configured.the bug is in a return statment :-
$sql = "Update `feeds` set `feed_last_check` = FROM_UNIXTIME(" . (time()-300) . ") where `feed_id` = $feed->feed_id;";
//echo $sql;
return $db->query($sql);

it is called in a internal for loop so it process the first feeds data and exists from the function or php code without processing next feed.
to correct it cut and paste this code before the following function declration:-

function get_val($item, $theField)

2)if we import some feeds like google news etc then they messup the pligg sites.the reson is there rss feeds contains HTML formatting element like <table> or <a href> etc etc.
so we need a way to filter out html elements from feeds.

3)it would be nice if we can give user a option to select the feed which he want to import from list.in currentl situation there is no option.(not sure if it will be there in final release)

i will keep you updated.
Reply With Quote
The Following 3 Users Say Thank You to newskicks For This Useful Post:
  #2 (permalink)  
Old 10-17-2006, 01:01 PM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 339
Thanks: 94
Thanked 49 Times in 38 Posts
Thanks newskicks,

I've already posted as a bug the need to strip html from the feeds. I'm sure ash will take a look at this and see what he can do.

Jitgos
Reply With Quote
  #3 (permalink)  
Old 10-18-2006, 12:49 PM
Casual Pligger
 
Join Date: Oct 2006
Posts: 67
Thanks: 3
Thanked 17 Times in 6 Posts
just a small thing i did in this script.
i wanted that whenever i import a feed each feed item get random votes between 0-20. so i searched for this line in magpietest.php :- require_once(mnminclude.'votes.php');
and added follwoing bellow it:-
$feed->feed_votes=rand(0,15);

works fine for me
Reply With Quote
  #4 (permalink)  
Old 10-18-2006, 01:19 PM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 339
Thanks: 94
Thanked 49 Times in 38 Posts
haha tricky .... but cool

Jitgos
Reply With Quote
  #5 (permalink)  
Old 10-18-2006, 01:27 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,367
Thanks: 169
Thanked 437 Times in 276 Posts
newskicks

That is a great idea.
I am asuming that some stories would go directly to published and some to the queued?
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #6 (permalink)  
Old 10-18-2006, 03:10 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Quote:
Originally Posted by newskicks View Post
just a small thing i did in this script.
i wanted that whenever i import a feed each feed item get random votes between 0-20. so i searched for this line in magpietest.php :- require_once(mnminclude.'votes.php');
and added follwoing bellow it:-
$feed->feed_votes=rand(0,15);

works fine for me
This is a feature that I am planning to add.
__________________
- Ash
Reply With Quote
  #7 (permalink)  
Old 10-18-2006, 11:06 PM
Casual Pligger
 
Join Date: Oct 2006
Posts: 67
Thanks: 3
Thanked 17 Times in 6 Posts
Quote:
Originally Posted by chuckroast View Post
newskicks

That is a great idea.
I am asuming that some stories would go directly to published and some to the queued?
nope for that you have to modify another variable:-
search following :-
$linkres->status=$feed->feed_status;
and replace it with:-
$linkres->status="published";

you can even write some more code so that some stories goes in to published and some in qued
Reply With Quote
  #8 (permalink)  
Old 10-19-2006, 05:48 AM
jitgos's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: Indiana (soon New Hampshire)
Posts: 339
Thanks: 94
Thanked 49 Times in 38 Posts
Quick way

Quote:
Originally Posted by chuckroast View Post
newskicks

That is a great idea.
I am asuming that some stories would go directly to published and some to the queued?
If you had the votes set to random 0-20 and then set your votes to be published setting at something like 10 then some would be published and some queued. Seems like a quick way to do this.

Jitgos
Reply With Quote
  #9 (permalink)  
Old 10-19-2006, 07:31 AM
Casual Pligger
 
Join Date: Mar 2006
Posts: 41
Thanks: 6
Thanked 4 Times in 4 Posts
Just playing devils advocate for a moment.

Doesn't this make it very easy for some lazy person to setup a new pligg site with instant (duplicate) content by importing other pligg-sites rss feeds.

Of course they wouldn't have an instant community, but would affect your pagerank etc, because of duplicate content.

I realise that this can't be prevented, but perhaps it should be discouraged by adding some Terms and Conditions ?
__________________
Submit, Vote for & Comment on your favourite

Pligg Sites

and / or

Top Ten Tutorials.
Reply With Quote
  #10 (permalink)  
Old 10-21-2006, 05:54 PM
AshDigg's Avatar
Coder
 
Join Date: Dec 2005
Posts: 1,574
Thanks: 235
Thanked 345 Times in 206 Posts
Quote:
Originally Posted by jitgos View Post
If you had the votes set to random 0-20 and then set your votes to be published setting at something like 10 then some would be published and some queued. Seems like a quick way to do this.

Jitgos
It didn't work that way, but I fixed some code so it will now.
__________________
- Ash
Reply With Quote
Reply

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
RSS Import Feature Errors Iceburg General Help 2 03-25-2007 03:16 PM
Can I get RSS Import feature in 8.2 version mde05 Modification Tutorials 1 01-16-2007 04:29 PM
RSS import feature srrpenna General Help 4 12-28-2006 06:39 AM
erro with new rss import feature newskicks Bug Report 2 10-11-2006 12:59 PM


Search Engine Friendly URLs by vBSEO 3.2.0