[Top][All Lists]

[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, after some fiddling i've tried with:

---        2003-06-23 21:20:52.000000000 +0200
+++       2006-03-02 14:40:34.000000000 +0100
@@ -12,17 +12,23 @@
        include($path_to_header . '');
        include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/');
        $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'] = 
+       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/');
+       $GLOBALS['phpgw']->common = new common();
+       include(PHPGW_SERVER_ROOT . '/phpgwapi/inc/');
+       //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']->db->Host     = 
        $GLOBALS['phpgw']->db->Type     = 
        $GLOBALS['phpgw']->db->Database = 
        $GLOBALS['phpgw']->db->User     = 
        $GLOBALS['phpgw']->db->Password = 

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

        include(PHPGW_SERVER_ROOT . '/news_admin/inc/');
        $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('item_link', $site['link'] . $itemsyntax 
. $news_id);
+                       $tpl->set_var('item_description', 
                        if($format == 'rss1')


--- 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 @@
+                       <description>{item_description}</description>
 <!-- END item -->

(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''      
  Polo FVG  -  Via della Bontà, 7 - 33078  -  San Vito al Tagliamento (PN)
  marco.gaiarin(at)      tel +39-0434-842711  fax +39-0434-842797

reply via email to

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