Changeset 405
- Timestamp:
- 08/20/08 10:39:41 (16 years ago)
- Location:
- trunk/news_admin
- Files:
-
- 4 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/news_admin/inc/class.uinews.inc.php
r49 r405 109 109 $var['cat_name'] = ($this->cat_id != 'all') ? $this->bo->catbo->id2name($this->cat_id) : lang('All news'); 110 110 $this->template->set_var($var); 111 $this->template->parse('_category','category'); 112 111 $this->template->parse('_category','category'); 112 113 113 $this->template->set_var('icon',$GLOBALS['phpgw']->common->image('news_admin','news-corner.gif')); 114 114 $this->template->set_var('icon-right',$GLOBALS['phpgw']->common->image('news_admin','news-corner-right.gif')); 115 115 116 foreach($news as $newsitem) 116 117 { 117 118 $var = Array( 118 119 'subject' => $newsitem['subject'], 119 'submitedby' => 'Submitted by ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' on' . $GLOBALS['phpgw']->common->show_date($newsitem['date']),120 'submitedby' => lang('Submitted by') . ' ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' ' . lang('on') . ' ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 120 121 'content' => $newsitem['content'], 121 122 ); … … 162 163 'width' => '100%', 163 164 'outerborderwidth' => '0', 164 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/ default','bg_filler')165 'header_background_image' => $GLOBALS['phpgw']->common->image('phpgwapi/templates/' . ($GLOBALS['phpgw_info']['server']['template_set'] ? $GLOBALS['phpgw_info']['server']['template_set'] : 'default'), 'bg_filler') 165 166 )); 166 167 … … 223 224 '_news' => 'news_' . $section . '.tpl' 224 225 )); 226 225 227 $this->template->set_block('_news','news_form'); 226 228 $this->template->set_block('_news','row'); … … 240 242 241 243 $this->template->set_var('icon',$GLOBALS['phpgw']->common->image('news_admin','news-corner.gif')); 244 $this->template->set_var('icon-right',$GLOBALS['phpgw']->common->image('news_admin','news-corner-right.gif')); 242 245 243 246 foreach($news as $newsitem) … … 245 248 $var = Array( 246 249 'subject'=> $newsitem['subject'], 247 'submitedby' => 'Submitted by ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' on' . $GLOBALS['phpgw']->common->show_date($newsitem['date']),250 'submitedby' => lang('Submitted by') . ' ' . $GLOBALS['phpgw']->common->grab_owner_name($newsitem['submittedby']) . ' ' . lang('on') . ' ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']), 248 251 'content' => nl2br($newsitem['content']) 249 252 ); … … 266 269 $out .= '<center><a href="' . $GLOBALS['phpgw']->link('/index.php',$link_values) . '">View news archives</a></center>'; 267 270 } 271 268 272 return $out; 269 273 } … … 277 281 } 278 282 if($_POST['submitit']) 279 { 280 $_POST['news']['is_html'] = '1'; 283 { 281 284 $this->news_data = $_POST['news']; 282 285 if(!$this->news_data['subject']) … … 404 407 405 408 function modify($type = 'edit') 406 { 407 include_once("fckeditor.php"); 408 409 { 410 include_once("fckeditor.php"); 411 $this->news_data['is_html'] = ($type == 'add' ? '1' : $this->news_data['is_html'] ); 409 412 $options = $this->bo->get_options($this->news_data); 410 413 $GLOBALS['phpgw']->common->phpgw_header(); … … 425 428 426 429 $category_list = $this->selectlist('write', (int)$this->news_data['category']); 427 428 430 431 if ($category_list == '') 429 432 $this->deny(); 430 433 … … 436 439 ) 437 440 ); 438 439 $oFCKeditor = new FCKeditor('news[content]') ; 440 $oFCKeditor->BasePath = 'news_admin/templates/ celepar/fckeditor/';441 442 $oFCKeditor = new FCKeditor('news[content]') ; 443 $oFCKeditor->BasePath = 'news_admin/templates/' . ($GLOBALS['phpgw_info']['server']['template_set'] ? $GLOBALS['phpgw_info']['server']['template_set'] : 'default') . '/fckeditor/'; 441 444 $oFCKeditor->ToolbarSet = 'ExpressoLivre'; 442 $oFCKeditor->Value = $this->news_data['content']; 443 445 $oFCKeditor->Value = $this->news_data['content']; 444 446 $this->template->set_var(array( 445 447 'form_button' => '<input type="submit" name="submitit" value="' . lang('save') . '">', … … 465 467 'value_end_y' => $this->sbox->getYears('news[end_y]',date('Y',$this->news_data['end']),date('Y')), 466 468 'label_is_html' => lang('Contains HTML'), 467 'value_is_html' => '<input type="checkbox" value="1" name="news[is_html] checked="1""' . ($this->news_data['is_html'] ? ' checked="1"' : '') .'>',468 )); 469 469 'value_is_html' => '<input type="checkbox" value="1" name="news[is_html]" ' . ($this->news_data['is_html'] ? ' checked="1"' : '') .'>', 470 )); 471 470 472 $this->template->pfp('out','form'); 471 473 } … … 482 484 $GLOBALS['phpgw']->common->phpgw_header(); 483 485 echo parse_navbar(); 484 485 486 487 $category_list = $this->selectlist('write', (int)$this->news_data['category']); 486 488 if ($category_list == '') 487 489 $this->deny(); 488 490 489 491 $this->template->set_block('main','category'); 490 492 $var['lang_read'] = lang('Read'); … … 553 555 $this->template->pfp('out','list'); 554 556 } 555 557 556 558 function deny() 557 559 { … … 559 561 $GLOBALS['phpgw']->common->phpgw_exit(True); 560 562 } 561 563 562 564 } 563 565 ?> -
trunk/news_admin/templates/celepar/read.tpl
r45 r405 17 17 <b>{subject}</b> 18 18 </td> 19 <td align="left" width="1%" bgcolor="#FFFFFF">20 21 </td> 19 <td width="13" valign="top" valign="top"> 20 <img src="{icon-right}" align="top"> 21 </td> 22 22 </tr> 23 23 <tr> -
trunk/news_admin/templates/default/read.tpl
r2 r405 17 17 <b>{subject}</b> 18 18 </td> 19 <td align="left" width="1%" bgcolor="#FFFFFF">20 21 </td> 19 <td width="13" valign="top" valign="top"> 20 <img src="{icon-right}" align="top"> 21 </td> 22 22 </tr> 23 23 <tr>
Note: See TracChangeset
for help on using the changeset viewer.