刘政道 - 应用程序框架

《31天学会CRM项目开发(C#编程入门及项目实战)》作者,IT经理,程序员
  博客园  :: 新随笔  :: 联系 :: 管理

Joomla中添加新字段 自定义字段 Add New Fields

Posted on 2008-09-09 11:02  刘政道  阅读(1370)  评论(0编辑  收藏  举报

C:"Apache2.2"htdocs"joomla"administrator"components"com_content"admin.content.html.php

<input class=”inputbox” type=”text” name=”title” id=”title” size=”40″ maxlength=”255″ value=”<?php echo $row->title; ?>” />
<input class=”inputbox” type=”text” name=”ceapet” id=”ceapet” size=”40″ maxlength=”255″ value=”<?php echo $row->ceapet; ?>” />

C:"Apache2.2"htdocs"joomla"administrator"components"com_content"controller.php
在$row->metadesc = $item->metadesc;
之后增加
$row->daiqianji = $item->ceapet;

C:"Apache2.2"htdocs"joomla"components"com_content"models"section.php
C:"Apache2.2"htdocs"joomla"components"com_content"models"category.php
C:"Apache2.2"htdocs"joomla"components"com_content"models"archive.php
C:"Apache2.2"htdocs"joomla"components"com_content"models"frontpage.php

在a.metadesc之后,添加字段a.ceapet

C:"Apache2.2"htdocs"joomla"libraries"joomla"database"table"content.php
在var $hits = null;之后,定义变量 var $ceapet = null;

C:"Apache2.2"htdocs"joomla"components"com_content"views"article"tmpl"default.php
在<?php echo $this->escape($this->article->title); ?>
附近增加<br />ceapet:<?php echo $this->escape($this->article->ceapet); ?>

C:"Apache2.2"htdocs"joomla"components"com_content"views"category"tmpl"default_items.php
在<?php if ($this->params->get(’show_title’)) : ?>
附近增加
<td class=”sectiontableheader” width=”45%”>
ceapet
</td>

<td>
<?php echo $item->ceapet; ?>

</td>

 

 源:http://ceapet.com/blog/?p=338