Topic: Feed Aggregator Plugin 1.0

##
##
##        Mod title:  Feed Aggregator
##
##      Mod version:  1.0
##   Works on PunBB:  1.2.4
##     Release date:  2007-04-12
##           Author:  Manuel Ortega (manuel@ortega.cl)
##
##      Description:  Add post automatically via RSS /Atom
##
##   Affected files:  no
##
##       Affects DB:  yes
##
##            Notes:  Use SimplePie (http://simplepie.org) and crontab
##
##    Installation:
##                     - Copy all files to plugins/ folder
##                     - Go to Administration -> Plugins / Feed Aggregator
##                     - Click Install button
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Screenshot: http://www.punres.org/files/projects/pr … enshot.png
Demo: http://adi.ing.uchile.cl/~mortega/punbb … m.php?id=2
Download: http://www.punres.org/files.php?pid=373

sorry for my english tongue

sorry for my english

2

Re: Feed Aggregator Plugin 1.0

Cool, you should post this on the SimplePie forums, Geoffrey and Ryan will get a kick out of seeing this.

Re: Feed Aggregator Plugin 1.0

Best fashion, but the replacement tags "p" and "br" is wrong. See how it works : http://wpforum.ru/topic148.html

Re: Feed Aggregator Plugin 1.0

can u do a auto pruning for this or make a mod so that i can clean the forum up. it seem to keep building threads.
maybe there is a cron job script that i can do for this?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

5 (edited by maximum 2007-04-18 05:52)

Re: Feed Aggregator Plugin 1.0

This is a very bad mod. sad I have long tried to understand from the outside, which I have a forum error. It emerged that the mod conflicts with the base. This is somewhat dependent on "topic last post".

?he example can be found here: http://wpforum.ru/forum1.html
Go to the 2, 3, 4, etc. page the forum.

Time (s)      Query
0.00382     SELECT u.*, g.*, o.logged, o.idle FROM wpforum_users AS u INNER JOIN wpforum_groups AS g ON u.group_id=g.g_id LEFT JOIN wpforum_online AS o ON o.user_id=u.id WHERE u.id=2
0.03392     UPDATE wpforum_online SET logged=1176875345 WHERE user_id=2
0.01296     SELECT * FROM wpforum_online WHERE logged<1176875045
0.00207     SELECT f.forum_name, f.redirect_url, f.moderators, f.num_topics, f.sort_by, fp.post_topics FROM wpforum_forums AS f LEFT JOIN wpforum_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=1) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND f.id=1
0.00465     SELECT COUNT(id) FROM wpforum_reports WHERE zapped IS NULL
0.00791     SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM wpforum_topics WHERE forum_id=1 ORDER BY sticky DESC, last_post DESC LIMIT 5, 5
0.03608     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00807     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00260     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00250     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00283     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00287     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00252     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00272     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00245     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00342     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00280     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00205     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00393     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00244     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00277     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00256     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00263     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00240     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00277     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00264     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00258     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00295     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00318     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00348     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00421     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00465     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00506     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00509     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00222     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00311     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00303     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00196     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00310     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00141     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00265     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00161     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00170     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00181     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00162     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00181     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00210     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00145     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00167     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00197     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00156     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00128     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00125     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00175     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00171     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00194     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00159     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00184     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00189     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00143     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00249     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00157     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00149     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00152     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00139     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00160     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00153     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00186     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00173     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00167     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00169     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00147     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00185     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00148     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00399     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00142     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00187     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00197     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00173     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00172     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00165     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00179     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00174     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00208     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00171     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00169     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00172     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00156     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00187     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00163     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00163     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00177     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00170     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00175     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00159     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00130     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00163     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00159     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00177     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00179     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00147     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00161     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00141     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00153     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00164     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00140     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00186     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00164     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00160     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00174     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00169     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00191     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00155     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00158     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00161     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00165     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00196     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00159     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00160     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00156     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00149     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00174     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00198     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00175     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00169     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00184     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00206     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00189     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00193     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00211     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00165     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00424     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00260     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00134     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00218     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00228     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00217     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00171     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00173     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00179     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00167     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00172     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00140     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00157     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00178     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00243     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00128     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00150     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.03009     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00228     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.01357     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.02206     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00430     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00430     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00225     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00181     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00201     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00167     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00143     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00164     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00140     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00483     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00180     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00176     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00182     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00156     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00154     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00162     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00257     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00177     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00158     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00161     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00168     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00143     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00145     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00175     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00197     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00173     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00244     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00201     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00164     SELECT id, topic_id FROM wpforum_posts WHERE id=0
0.00170     SELECT id, topic_id FROM wpforum_posts WHERE id=0
Total query time: 0.52423 s

Re: Feed Aggregator Plugin 1.0

maximun, you are absolutely right. I published a new version with several fixes. Sorry for problems sad

But, I still have a problem with entity encode/decode... SimplePie always convert entities like & #8217; into , but PunBB don't recognized them as valid sad

sorry for my english

Re: Feed Aggregator Plugin 1.0

what do i have to do if im upgrading? replace the files?

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

quaker wrote:

what do i have to do if im upgrading? replace the files?

Q

yes, just replace fa_cron.php, others files are intact.

sorry for my english

Re: Feed Aggregator Plugin 1.0

ok did it and it works
http://bunpai.com

now my question is can u design a prune function for these forums say after 40 they are deleted? or something like that.


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

I have this error in cron script:

date: 2007-04-19 07:47:43
Fatal error: Call to undefined function: iconv() in /home/xxx/public_html/forum/plugins/fa_cron.php on line 50

11

Re: Feed Aggregator Plugin 1.0

quaker wrote:

ok did it and it works
http://bunpai.com

now my question is can u design a prune function for these forums say after 40 they are deleted? or something like that.


Q

Did you get that working?

Copyright it's a  died culture. Be alive with the copyleft attitude

12

Re: Feed Aggregator Plugin 1.0

i got it to work without the prune functions.
im going to let it run a week before i prune it...
i have added several rss feeds
ufc,yahoo news, and more.

http://bunpai.com/forum.php


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

13

Re: Feed Aggregator Plugin 1.0

That's really cool. Congrats.

I suppose you're manually pruning the forum every week, is it right?

Copyright it's a  died culture. Be alive with the copyleft attitude

14 (edited by Mariwal 2007-04-25 18:23)

Re: Feed Aggregator Plugin 1.0

quaker wrote:

i got it to work without the prune functions.
im going to let it run a week before i prune it...
i have added several rss feeds
ufc,yahoo news, and more.

http://bunpai.com/forum.php


Q

I see YOur news forum ...Very cool... Isee too in Punres that you made a mod That do not display "Yahoo News" in the post, can you sharing whit us your mod?

Thank you smile

15

Re: Feed Aggregator Plugin 1.0

this is my fa_cron.php
line 48 and 55 was modded to take out the yahoo news or any title site.

line 48. $username = "Bunpai";
line 55. $subject = ( $item->get_title() ? $item->get_title() : basename( $item->get_permalink() ) );

Q

<?php

// manuel@ortega.cl

define( 'PUN_ROOT', '../' );
require PUN_ROOT.'include/common.php';
require PUN_ROOT.'include/search_idx.php';
include( 'simplepie.inc' );


$ip = '127.0.0.1';

$feed = new SimplePie();
$feed->cache_max_minutes(30);
$feed->cache_location( PUN_ROOT.'cache/' );

$result = $db->query('SELECT url, max, closed, forum_id FROM '.$db->prefix.'feeds') or error('Unable to search feeds', __FILE__, __LINE__, $db->error());

print 'date: '.date( 'Y-m-d H:i:s' )."\n";

while( $row = $db->fetch_assoc( $result ) ) {
    $url = $row['url'];
    $max = $row['max'];
    $closed = intval( $row['closed'] );
    $fid = $row['forum_id'];

    $feed->feed_url( $url );
    $feed->output_encoding( $lang_common['lang_encoding'] );
    $feed->init();
    $feed->handle_content_type();

    if( ! $feed->data ) continue;

    $title = $feed->get_feed_title();

    $cont = 0;
    $max_time = 0;
    for( $i = 0; ( $max <= 0 || $i < $max ) && $item = $feed->get_item($i); $i++ ) {
        $time = $item->get_date('Y-m-d H:i:s');
        $time = $time ? strtotime( $time ) : time();

        $author = $item->get_author(0);
        if( $author ) {
            $username = $db->escape( $author->get_name() );
            $email = $author->get_email();
            if( empty( $username ) ) $username = $email;
        } else {
            $username = "Bunpai";
        }

        $username = iconv( $feed->get_encoding(), $lang_common['lang_encoding'], $username );
        $username = $db->escape( $username );
        $email = $db->escape( $email );

        $subject = ( $item->get_title() ? $item->get_title() : basename( $item->get_permalink() ) );
        $subject = $db->escape( fa_cleanup( $subject, $feed->get_encoding(), $lang_common['lang_encoding'] ) );

        $message = $item->get_description()."\n\n[url]".$item->get_permalink()."[/url]";
        $message = $db->escape( fa_cleanup( $message, $feed->get_encoding(), $lang_common['lang_encoding'] ) );

        $result2 = $db->query('SELECT 1 FROM '.$db->prefix.'topics WHERE poster = \''.$username.'\' AND subject = \''.$subject.'\' AND forum_id = '.$fid) or error('Unable to search topic', __FILE__, __LINE__, $db->error());

        if( $db->num_rows( $result2 ) > 0 ) continue;

        // Create the topic
        $db->query('INSERT INTO '.$db->prefix.'topics (poster, subject, posted, last_post, last_poster, closed, forum_id) VALUES(\''.$username.'\', \''.$subject.'\', '.$time.', '.$time.', \''.$username.'\', '.$closed.', '.$fid.')') or error('Unable to create topic', __FILE__, __LINE__, $db->error());
        $new_tid = $db->insert_id();

        // Insert the new post
        $db->query('INSERT INTO '.$db->prefix.'posts (poster, poster_ip, poster_email, message, hide_smilies, posted, topic_id) VALUES(\''.$username.'\', \''.$ip.'\', \''.$email.'\', \''.$message.'\', \'0\', '.$time.', '.$new_tid.')') or error('Unable to create post', __FILE__, __LINE__, $db->error());
        $new_pid = $db->insert_id();

        // Update the topic with last_post_id
        $db->query('UPDATE '.$db->prefix.'topics SET last_post_id='.$new_pid.' WHERE id='.$new_tid) or error('Unable to update topic', __FILE__, __LINE__, $db->error());

        update_search_index('post', $new_pid, $message, $subject);

        $max_time = max( $max_time, $time );
        $cont++;
    }

    if( $cont > 0 ) {
        $db->query('UPDATE '.$db->prefix.'feeds SET last_post='.$max_time.', num_posts = num_posts + '.$cont.' WHERE url=\''.$url.'\'') or error('Unable to update feeds', __FILE__, __LINE__, $db->error());

        update_forum($fid);
    }

    print "feed: $url -> $cont / $max\n";
}

list($usec, $sec) = explode(' ', microtime());
$time_diff = sprintf('%.3f', ((float)$usec + (float)$sec) - $pun_start);

die( 'time: '.$time_diff."\n\n" );


function fa_cleanup( $str, $enc_from, $enc_to ) {
    $str = iconv( $enc_from, $enc_to, $str );
    $str = str_replace(
        array( "</p>\n\n", "</p>\n", "<br>\n", "<br>", "<br />\n", "<br />" ),
        array( "\n\n", "\n\n", "\n", "\n", "\n", "\n" ),
        $str
    );
    $str = preg_replace( '#<img.*?src="([^"]+)"[^>]*>#i', "[img]$1[/img]", $str );
    $str = preg_replace( '#<a.*?href="([^"]+)"[^>]*>([^<]+?)</a>#ie', "'[url=\\1]'.strtr('\\2',\"\n\r\",'  ').'[/url]\n\n'", $str );
    $str = html_entity_decode( $str, ENT_QUOTES, $enc_to );
    $str = strip_tags( $str );
    return $str;
}
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

Thank You SO Muck smile

17

Re: Feed Aggregator Plugin 1.0

anytime
im working on a front portal page right now.

http://bunpai.com/portal.php

let me know what you think...

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

I see your site and the front page... JUST AMAIZING... congrats smile

19

Re: Feed Aggregator Plugin 1.0

i just took a standard css template copied it to portal.tpl
added the header info into the header.php
made a blank page then pulled the template inside of the portal.php
if ya need more info let me know ill post the files on my site in the forum.


Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

quaker wrote:

now my question is can u design a prune function for these forums say after 40 they are deleted? or something like that.
Q

Hi! I made a "bypass" for admin_prune.php script. Save it as "ap_prune.php" in "plugins/" folder

<?
// Config
$prune_days = 30;
$prune_sticky = 1;
$prune_from = 'all'; // use forum id or 'all'

// --------------------------------------
define('PUN_ROOT', '../');
@include_once PUN_ROOT.'cache/cache_config.php';
$_SERVER = array( 'HTTP_REFERER' => $pun_config['o_base_url'].'/admin_prune.php' );
$_POST = array(
    'prune_days' => $prune_days,
    'prune_sticky' => $prune_sticky,
    'prune_from' => $prune_from,
    'prune_comply' => 'Prune'
);
$_GET = array( 'action' => 'foo' );
require( '../admin_prune.php' );

And add a cronjob with

*/30 * * * * /usr/bin/wget -O - -q <<<base url>>>/plugins/ap_cron.php
sorry for my english

21

Re: Feed Aggregator Plugin 1.0

kewl.. ill use that to prune my site

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Feed Aggregator Plugin 1.0

What must i do to get only title? now i get this : [CNN] blah blah blah.

I want [CNN] gone... i use your new version.

PunnyBunny..

Re: Feed Aggregator Plugin 1.0

Get a blank page when trying to load admin.

24

Re: Feed Aggregator Plugin 1.0

I installed this but nothing happened when I added feeds.

I had guests view turned off, I switched it on, still nothing.


Is there a way to set how often it posts/updates?

25

Re: Feed Aggregator Plugin 1.0

Anyone? I put all the stuff in plugins/ like it said, why doesnt this work?