phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.9,1.


From: Michael Totschnig <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/sitemgr-site/inc class.bo.inc.php,1.9,1.10 class.ui.inc.php,1.10,1.11 class.Template3.inc.php,1.1,1.2
Date: Fri, 17 Jan 2003 23:30:36 -0500

Update of /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc
In directory subversions:/tmp/cvs-serv10045/sitemgr-site/inc

Modified Files:
        class.bo.inc.php class.ui.inc.php class.Template3.inc.php 
Log Message:
remove code that is no longer needed
implement lang_ variables in template
added a redirect module
streamline displaypagebyname
remove testing code from NukeNews template


Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.bo.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.bo.inc.php    17 Jan 2003 03:37:52 -0000      1.9
--- class.bo.inc.php    18 Jan 2003 04:30:34 -0000      1.10
***************
*** 65,69 ****
                        return $this->pages_bo->GetPage($page_id);
                }
-       
  
                function loadPage($page_id)
--- 65,68 ----
***************
*** 168,190 ****
                                if ($showhidden || !$page->hidden)
                                {
!                                       //this is not documented!?
!                                       if (strtolower($page->subtitle) == 
'link')
!                                       {
!                                               $pglinks[$page_id] = array(
!                                                       'name'=>$page->name,
!                                                       'link'=>'<a 
href="'.$page->content.'">'.$page->title.'</a>',
!                                                       'title'=>$page->title,
!                                                       'subtitle'=>''
!                                               );
!                                       }
!                                       else
!                                       {
!                                               $pglinks[$page_id] = array(
!                                                       'name'=>$page->name,
!                                                       'link'=>'<a 
href="'.sitemgr_link('page_name='.$page->name).'">'.$page->title.'</a>',
!                                                       'title'=>$page->title,
!                                                       
'subtitle'=>$page->subtitle
!                                               );
!                                       }
                                }
                        }
--- 167,176 ----
                                if ($showhidden || !$page->hidden)
                                {
!                                       $pglinks[$page_id] = array(
!                                               'name'=>$page->name,
!                                               'link'=>'<a 
href="'.sitemgr_link('page_name='.$page->name).'">'.$page->title.'</a>',
!                                               'title'=>$page->title,
!                                               'subtitle'=>$page->subtitle
!                                       );
                                }
                        }

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.ui.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.ui.inc.php    17 Jan 2003 03:37:52 -0000      1.10
--- class.ui.inc.php    18 Jan 2003 04:30:34 -0000      1.11
***************
*** 28,33 ****
                        global $objbo;
                        global $page;
!                       $page = 
$GLOBALS['Common_BO']->pages->pageso->getPageByName($page_name,$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']);
!                       $objbo->loadPage($page->id);
                        $this->generatePage();
                }
--- 28,32 ----
                        global $objbo;
                        global $page;
!                       
$objbo->loadPage($GLOBALS['Common_BO']->pages->pageso->PageToID($page_name));
                        $this->generatePage();
                }
***************
*** 52,74 ****
                        $objbo->loadTOC($categoryid);
                        $this->generatePage();
-               }
- 
-               function get_news()
-               {
-                       $bonews = CreateObject('news_admin.bonews');
-                       $news = $bonews->get_NewsList(0, false);
-                       unset($bonews);
-                       //$themesel = $GLOBALS['sitemgr_info']['themesel'];
-                       
//require_once($GLOBALS['sitemgr_info']['sitemgr-site_path'] . 'themes/' . 
$themesel . '/theme.php');
-                       foreach($news as $newsitem)
-                       {   
-                               $var = Array(
-                                       'subject'   => $newsitem['subject'],
-                                       'submittedby'    => 'Submitted by ' . 
$GLOBALS['phpgw']->accounts->id2name($newsitem['submittedby']) . ' on ' . 
$GLOBALS['phpgw']->common->show_date($newsitem['submissiondate']),
-                                       'content'   => 
nl2br($newsitem['content'])
-                               );
-                               return themearticle($aid, $informant, 
$var['submittedby'], $var['subject'], $var['content'], $topic, $topicname, 
$topicimage, $topictext);
-                               
-                       }
                }
  
--- 51,54 ----

Index: class.Template3.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.Template3.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.Template3.inc.php     17 Jan 2003 03:37:52 -0000      1.1
--- class.Template3.inc.php     18 Jan 2003 04:30:34 -0000      1.2
***************
*** 100,103 ****
--- 100,107 ----
                                array($this,'make_link'),
                                $str);
+                       $str = preg_replace_callback(
+                               "/\{lang_([^{]+)\}/",
+                               array($this,'lang'),
+                               $str);
                        //all template variables that survive look for 
metainformation
                        return preg_replace_callback(
***************
*** 225,228 ****
--- 229,237 ----
                }
  
+               function lang($vars)
+               {
+                       return lang(str_replace('_',' ',$vars[1]));
+               }
+ 
                function get_meta($vars)
                {
***************
*** 243,247 ****
                                case 'user':
                                        return 
$GLOBALS['phpgw_info']['user']['account_lid'];
!               }
                }
  
--- 252,256 ----
                                case 'user':
                                        return 
$GLOBALS['phpgw_info']['user']['account_lid'];
!                       }
                }
  





reply via email to

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