Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Closed Thread
 
LinkBack Thread Tools Display Modes
  #181 (permalink)  
Old 11-19-2006, 02:05 PM
New Pligger
 
Join Date: Feb 2006
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
Yes I changed to value on 5. the others values are :

Code:
- Feed Frequency (hours): 1 -- how often to check for new items.
- Feed Votes: 5 -- how many votes new items recieve (limit 200)
- Feed Items Limit: 5 -- how many new items to take from the feed when it's checked
- Feed URL Dupes: 0 -- Allow duplicate URL's 0=No, 1=Yes, Allow
- Feed Title Dupes: 1 -- Allow duplicate Title's 0=No, 1=Yes, Allow
- Feed Submitter Id (number): 2 -- The ID of the person who will be listed as the submitter
- Feed Category Id (number): 2 -- The ID of the category to place these items into
If Feed Title Dupes is set to 0, Only the first item is imported, then :

Code:
Title: My_RSS_Title
Content: My_RSS_content
URL: My_RSS_url.com

Fatal error: Call to undefined function: duplicates_title() in /home.12/m/i/n/minaddik/www/Witmn/rss/import_feeds.php on line 67
If Feed Title Dupes is set to 1, the RSS items are imported , but in duplicata !
I do again an import feeds (no news items), and I have my news in triple ! It was like if he's not considered the items already present :/

What is wrong ? Thanks for help.
  #182 (permalink)  
Old 11-19-2006, 02:17 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Try this fix http://pligg.svn.sourceforge.net/vie...v&revision=315
__________________
I accept donations for my time helping users like you on the forum and IRC.
  #183 (permalink)  
Old 11-19-2006, 02:27 PM
New Pligger
 
Join Date: Feb 2006
Posts: 24
Thanks: 1
Thanked 0 Times in 0 Posts
arg, thanks for link, but exactly the same :/

If Feed Title Dupes is set to 0, Only the first item is imported (but not published), then :

Code:
Title: My_RSS_Title
Content: My_RSS_content
URL: My_RSS_url.com

Fatal error: Call to undefined function: duplicates_title() in /home.12/m/i/n/minaddik/www/Witmn/rss/import_feeds.php on line 67
If Feed Title Dupes is set to 1, the RSS items are imported , but in duplicata !
I do again an import feeds (no news items), and I have my news in triple ! It was like if he's not considered the items already present :/
  #184 (permalink)  
Old 11-19-2006, 02:42 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Thanks: 254
Thanked 649 Times in 513 Posts
Do you have this function? http://pligg.svn.sourceforge.net/vie...00&pathrev=201
__________________
I accept donations for my time helping users like you on the forum and IRC.
  #185 (permalink)  
Old 11-19-2006, 03:21 PM
Casual Pligger
 
Join Date: Oct 2006
Posts: 35
Thanks: 2
Thanked 1 Time in 1 Post
Excellent, this is pretty much working the way I want. There is one problem I'm having, which is it's adding:

?headlines=true&rsspartner=rssMagpieRSS

at the end of the links, thus not noticing a duplicate URL if someone submitted it manually. Is there an easy way to strip that from the link?

Thanks,
Darren

Actually I figured out how to take care of this in a down and dirty way, now I'll be trying to adapt it to something that will allow users to set certain things to strip from URLs.

Last edited by Darren; 11-19-2006 at 09:13 PM..
  #186 (permalink)  
Old 11-23-2006, 01:17 PM
New Pligger
 
Join Date: Sep 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Problems

I have followed the instructions previously given, and when I go to the magpie debug.php This is what I get. I assume this is why it's not working for me yet.

Does anyone have any ideas?


OK: Found an XML parser.
OK: Support for GZIP encoding.
OK: Support for character munging.

Warning: MagpieRSS: Failed to fetch http://localhost/nik.xml (HTTP Response: HTTP/1.1 404 Not Found ) in /var/www/html/3rdparty/magpierss/rss_fetch.inc on line 238
Error: MagpieRSS: Failed to fetch http://localhost/nik.xml (HTTP Response: HTTP/1.1 404 Not Found )
RSS URL:http://localhost/nik.xml
Parsed Results (var_dump'ed)

bool(false)

OK, I fixed the problem, I just linked the feeds directly from the sites and not from refeed. This seemed to solve the problem.

Thanks

Jason

Last edited by Jason; 12-01-2006 at 11:11 AM.. Reason: update
  #187 (permalink)  
Old 12-05-2006, 10:23 AM
New Pligger
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by humaneasy View Post
Go to PHPClasses and grab the last version of AutoKeyword Generator class or get the one attached.

Put the files in a dir named keygen under Pligg's 3rdparty dir.

This below is the magpietest.php made by AshDigg and included in the file he sent to several people and that you can get at Box.net but slighty modified to generate the tags too with AutoKeywordGenerator.

PHP Code:
<?php

    
include('../config.php');
    require(
mnminclude.'link.php'); 
    require(
mnminclude.'rssimport.php'); 

    require_once(
'../3rdparty/keygen/class.autokeyword.php'); // The Tags

    
require_once('../3rdparty/magpierss/rss_fetch.inc');
    
define('MAGPIE_CACHE_DIR''../templates_c');

    
$RSSImport=new RSSImport;
    
    
$feeds_list $RSSImport->get_feeds_lists();

    foreach (
$feeds_list as $feed) {
        
$url $feed->feed_url;

        
$rss fetch_rss($url);
        
        echo 
"<h1>Site: "$rss->channel['title'], "</h1><hr>";

        
$MyArray = array();
        
$Feed_Links $RSSImport->get_feed_field_links($feed->feed_id);
        foreach (
$Feed_Links as $link ) {
            if(
$link->pligg_field == 'link_title'){
                           
$MyArray['title'] = $link->feed_field;}
            if(
$link->pligg_field == 'link_content'){
                           
$MyArray['content'] = $link->feed_field;}
            if(
$link->pligg_field == 'link_field1'){
                           
$MyArray['link_field1'] = $link->feed_field;}
            if(
$link->pligg_field == 'link_url'){
                           
$MyArray['link_url'] = $link->feed_field;}
            if(
$link->pligg_field == 'link_tags'){ // Add this lines
                           
$MyArray['link_tags'] = $link->feed_field; }
               else { 
$MyArray['link_tags'] = get_tags($MyArray['content'], "UTF-8"); }
        }
        
        foreach (
$rss->items as $item ) {
            echo 
"Title: " get_val($item$MyArray['title']) . "<br>";
            echo 
"Content: " get_val($item$MyArray['content']) . "<br>";
            echo 
"URL: " get_val($item$MyArray['link_url']) . "<br>";
            echo 
"TAGS: " get_val($item$MyArray['link_tags']) . "<hr>";

            
            
$skipthis 0;
            
$linkres=new Link;
            
$linkres->randkey rand(10000,10000000);
            
$linkres->status='queued';
            
$linkres->author=1;
            
$linkres->title=get_val($item$MyArray['title']);
            
$linkres->url=get_val($item$MyArray['link_url']);
            
$linkres->url_title=$linkres->title;
            
$linkres->content=get_val($item$MyArray['content']);
            
$linkres->link_field1=get_val($item$MyArray['link_field1']);
            
$linkres->category=1;     
          
            if(
$feed->feed_title_dupe == 0){  // 0 means don't all, 1 means allow
                
if($linkres->duplicates_title($linkres->title) > 0) {
                    echo 
"Title Match, skipping: " $linkres->title "<HR>";
                    
$skipthis 1;
                }
            }    
            
            if(
$feed->feed_url_dupe == && $linkres->url != ""){  // 0 means don't all, 1 means allow
                
if($linkres->duplicates($linkres->title) > 0) {
                    echo 
"URL Match, skipping: " $linkres->title "<HR>";
                    
$skipthis 1;
                }
            }    
                  
            if (
$skipthis == 2) { $linkres->store(); }
        }
    }


    function 
get_val($item$theField){
        
$nestPos strpos($theField"_ne_st_ed_");
        if (
$nestPos 0){
            
$first substr($theField$nestPos);
            
$second trim(substr($theField$nestPos 10100));
            return 
trim($item[$first][$second]);
        } else {
            return 
trim($item[$theField]);
        }
    }

    
// This is the new function. 
    // Code extracted from AutoKeywordGenerator examples ;)
    
function get_tags($data$chartype){

        
$params['content'] = $data//page content

        //set the length of keywords you like
        
$params['min_word_length'] = 5;  //minimum length of single words
        
$params['min_word_occur'] = 2;  //minimum occur of single words

        
$keyword = new autokeyword($params$chartype);

        return 
$keyword->parse_words();

    }

?>
I hadn't the time to test it but it should work fine. As usual NO WARRANTIES!

I'm doing a program that will work with Simplepie and run from CRON to import feeds (with tags) from an OPML file so be patient.

This is for a costumer so it will be done.

Lopo

Hello,

Has someone already use this function, does-it works?

Thx for answering !
  #188 (permalink)  
Old 12-08-2006, 02:47 PM
Constant Pligger
 
Join Date: Feb 2006
Posts: 120
Thanks: 5
Thanked 1 Time in 1 Post
I'm also interested in the script posted above has worked for anyone. And does it prevent duplicate links from being submitted?
__________________
my pligg site: pickstation.com
  #189 (permalink)  
Old 12-17-2006, 04:18 AM
New Pligger
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Is this script officially released?
How about the option to let users have their own feeds and those feeds included when approved by the admin, this way the author will be the user itself. (already suggested above)
Thanks a lot
  #190 (permalink)  
Old 12-17-2006, 05:02 AM
New Pligger
 
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
I am getting this error message

Fatal error: Call to undefined function: duplicates_title() in /home/site/public_html/rss/import_feeds.php on line 67
Closed Thread

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
[SOLVED] How to automatically check for updates in rss feed? marcinpl87 Module Support 2 06-26-2008 04:17 AM
Some ideas to build a Pligg site Divisive Cotton Off-topic 20 06-03-2008 04:09 PM
RSS Import Feed - Feed Frequency Not working ant560 Installation and Upgrade Help 4 03-15-2008 04:31 AM
Import RSS Auto submit feed argh2xxx Modification Tutorials 12 09-12-2007 04:02 PM
[Fixed] Import RSS feed not update automatically smart Bug Report 11 03-06-2007 12:36 PM


Search Engine Friendly URLs by vBSEO 3.2.0