phpgroupware-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-users] news_admin and rss feeds...


From: Marco Gaiarin
Subject: [Phpgroupware-users] news_admin and rss feeds...
Date: Thu, 2 Mar 2006 18:15:16 +0100
User-agent: Mutt/1.5.9i

I've passed all the afternoon digging and hacking around news_admins
rss export feature.

Now i log some bug to savanah, but waiting from savannah list to be
unlocked i post also here.

Some sparse consideration.


+ in news creation, what are the teaser? Some sort of summary?

+ all the news_admin stuff seems in more or less abandoned state, and
 it is not clear how they work. AFAI've understood the news_admin
module of phpgw it is used to input news, and there's some sort of
``minisite'' ala sitemanager that display it, out of phpgw.
But this news_admin/website/index.php does not work anymore...

+ Again AFAI've understood the link you can use to setup rss feeds in
 news_admin are broken, because are relative to
news_admin/website/index.php and this is broken.

+ news_admin/website/export.php does not work, to make work it it is
needed to patch setup.php.inc, after some fiddling i've tried with:

--- setup.inc.php.sample        2003-06-23 21:20:52.000000000 +0200
+++ setup.inc.php       2006-03-02 14:40:34.000000000 +0100
@@ -12,17 +12,23 @@
        include($path_to_header . 'header.inc.php');
        include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.Template.inc.php');
        $tpl = new Template($template_path);
-       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.db_' . 
$phpgw_domain[$domain]['db_type'] . '.inc.php');
+       $GLOBALS['phpgw_info']['server']['db_type'] = 
$GLOBALS['phpgw_domain']['default']['db_type'];
+
+       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.common.inc.php');
+       $GLOBALS['phpgw']->common = new common();
+
+       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.db.inc.php');
+       //include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/class.db_' . 
$phpgw_domain[$domain]['db_type'] . '.inc.php');

        $GLOBALS['phpgw']->db = new db();
-       $GLOBALS['phpgw']->db->Host     = 
$GLOBALS['phpgw_domain'][$domain]['server']['db_host'];
+       $GLOBALS['phpgw']->db->Host     = 
$GLOBALS['phpgw_domain'][$domain]['db_host'];
        $GLOBALS['phpgw']->db->Type     = 
$GLOBALS['phpgw_domain'][$domain]['db_type'];
        $GLOBALS['phpgw']->db->Database = 
$GLOBALS['phpgw_domain'][$domain]['db_name'];
        $GLOBALS['phpgw']->db->User     = 
$GLOBALS['phpgw_domain'][$domain]['db_user'];
        $GLOBALS['phpgw']->db->Password = 
$GLOBALS['phpgw_domain'][$domain]['db_pass'];

-       include(PHPGW_SERVER_ROOT . '/news_admin/inc/class.so.inc.php');
-       $news_obj = new so();
+       include(PHPGW_SERVER_ROOT . '/news_admin/inc/class.sonews.inc.php');
+       $news_obj = new sonews();

        include(PHPGW_SERVER_ROOT . '/news_admin/inc/class.soexport.inc.php');
        $export_obj = new soexport();

for me it is not clear how work the phpgw class instatiation, so i
think i've done some big mistake. ;)


+ in this way, only news title and link (broken) are exported; i've
fiddle a little about and find that if i do:

--- export.php.orig     2006-03-02 15:52:03.000000000 +0100
+++ export.php  2006-03-02 16:42:04.000000000 +0100
@@ -77,6 +77,7 @@
                        $tpl->set_var($news_data);

                        $tpl->set_var('item_link', $site['link'] . $itemsyntax 
. $news_id);
+                       $tpl->set_var('item_description', 
htmlentities(strip_tags($news_data['content'])));
                        if($format == 'rss1')
                        {
                                $tpl->parse('seqs','seq',True);

and

--- rss2.tpl.orig       2006-03-02 15:39:16.000000000 +0100
+++ rss2.tpl    2006-03-02 15:52:16.000000000 +0100
@@ -7,6 +7,7 @@
                <item>
                        <title>{subject}</title>
                        <link>{item_link}</link>
+                       <description>{item_description}</description>
                </item>
 <!-- END item -->
        </channel>

(clearly the same for all the other templates) i got the content. I'm
not clear if teaser are summary, so it is better to export as
descriptions the teaser and not the content.


Generally i think that all these stuff have to be revamped a bit, i
propose that all this stuff got integrated in sitemanager, where you
can do:

 - a simple page that do rss export
 - a news module that can handle also single news, so we can pass
   a &newsid=23 and got a single page news.

Please, say me. And remember that i'm a php ignorant. ;)

-- 
dott. Marco Gaiarin                                 GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                http://www.sv.lnf.it/
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)sv.lnf.it      tel +39-0434-842711  fax +39-0434-842797




reply via email to

[Prev in Thread] Current Thread [Next in Thread]