mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 19:00:26 +02:00
Book/Chapter image field added.
This commit is contained in:
@@ -182,17 +182,20 @@ class page_chapters_ui extends e_admin_ui
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'chapter_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE, 'readonly'=>TRUE),
|
||||
'chapter_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'writeParms'=> 'glyphs=1', 'readonly'=>FALSE, 'batch' => FALSE, 'filter'=>FALSE),
|
||||
|
||||
'chapter_parent' => array('title'=> CUSLAN_52, 'type' => 'dropdown', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'filter'=>true),
|
||||
'chapter_name' => array('title'=> CUSLAN_53, 'type' => 'method', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'writeParms'=>'size=xxlarge'),
|
||||
'chapter_template' => array('title'=> LAN_TEMPLATE, 'type' => 'dropdown', 'width' => 'auto','filter' => true, 'batch'=>true, 'inline'=>true, 'writeParms'=>''),
|
||||
|
||||
'chapter_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'writeParms'=>'size=xxlarge', 'readonly'=>FALSE),
|
||||
'chapter_meta_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE),
|
||||
'chapter_meta_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE),
|
||||
'chapter_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE, 'batch'=>true, 'inline'=>true, 'writeParms'=>'size=xxlarge&inline-empty=1&sef=chapter_name', ), // Display name
|
||||
'chapter_manager' => array('title'=> CUSLAN_55, 'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE),
|
||||
'chapter_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => 'auto', 'thclass' => 'right', 'class'=> 'right' ),
|
||||
'chapter_visibility' => array('title'=> LAN_VISIBILITY, 'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE),
|
||||
'chapter_fields' => array('title', 'hidden', 'type'=>'hidden'),
|
||||
'chapter_image' => array('title'=> LAN_IMAGE, 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=140&thumb_urlraw=0&thumb_aw=140', 'writeParms'=>'', 'readonly'=>FALSE, 'batch' => FALSE, 'filter'=>FALSE),
|
||||
|
||||
'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'left', 'readParms'=>'sort=1')
|
||||
|
||||
);
|
||||
|
@@ -536,6 +536,14 @@ class cpage_shortcodes extends e_shortcode
|
||||
return $tp->toIcon($row['chapter_icon']);
|
||||
}
|
||||
|
||||
function sc_chapter_image($parm=null)
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$row = $this->getChapter();
|
||||
|
||||
return $tp->toImage($row['chapter_image'],$parm);
|
||||
}
|
||||
|
||||
/**
|
||||
* @example {CHAPTER_DESCRIPTION}
|
||||
*/
|
||||
@@ -576,6 +584,9 @@ class cpage_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function sc_chapter_breadcrumb()
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
|
@@ -418,6 +418,7 @@ CREATE TABLE page_chapters (
|
||||
chapter_meta_keywords varchar(255) NOT NULL default '',
|
||||
chapter_manager tinyint(3) unsigned NOT NULL default '254',
|
||||
chapter_icon varchar(250) NOT NULL default '',
|
||||
chapter_image varchar(250) NOT NULL default '',
|
||||
chapter_order int(6) unsigned NOT NULL default '0',
|
||||
chapter_template varchar(50) NOT NULL default '',
|
||||
chapter_visibility tinyint(3) unsigned NOT NULL default '0',
|
||||
|
Reference in New Issue
Block a user