Öffentliche Methoden | |
| _Itemid (&$row) | |
| _linkInfo (&$row, &$params) | |
| Author (&$row, &$params) | |
| Category (&$row, &$params) | |
| copySection ($option, $cid, $sectCatList, $sectionid, $items) | |
| CreateDate (&$row, &$params) | |
| editContent (&$row, $section, &$lists, &$images, &$access, $myid, $sectionid, $task, $Itemid) | |
| editContent (&$row, $section, &$lists, &$sectioncategories, &$images, &$params, $option, $redirect, &$menus) | |
| EditIcon (&$row, &$params, &$access) | |
| emailForm ($uid, $title, $template='', $itemid) | |
| EmailIcon (&$row, &$params, $hide_js) | |
| emailSent ($to, $template='') | |
| ModifiedDate (&$row, &$params) | |
| moveSection ($cid, $sectCatList, $option, $sectionid, $items) | |
| Navigation (&$row, &$params) | |
| PdfIcon (&$row, &$params, $hide_js) | |
| ReadMore (&$row, &$params) | |
| Section (&$row, &$params) | |
| Section_Category (&$row, &$params) | |
| show (&$row, &$params, &$access, $page=0) | |
| showArchive (&$rows, $section, &$lists, $search, $pageNav, $option, $all=NULL, $redirect) | |
| showCategories (&$params, &$items, $gid, &$other_categories, $catid, $id, $Itemid) | |
| showContent (&$rows, $section, &$lists, $search, $pageNav, $all=NULL, $redirect) | |
| showContentList ($title, &$items, &$access, $id=0, $sectionid=NULL, $gid, &$params, &$pageNav, $other_categories, &$lists, $order, $categories_exist) | |
| showLinks (&$rows, $links, $total, $i=0, $show=1, $ItemidCount=NULL) | |
| showList (&$rows, $search, $pageNav, $option, $lists) | |
| showTable (&$params, &$items, &$gid, $catid, $id, &$pageNav, &$access, &$sectionid, &$lists, $order) | |
| Title (&$row, &$params, &$access) | |
| TOC (&$row) | |
| URL (&$row, &$params) | |
Definiert in Zeile 22 der Datei admin.content.html.php.
| HTML_content::_Itemid | ( | &$ | row | ) |
calculate Itemid
Definiert in Zeile 561 der Datei content.html.php.
Benutzt $mainframe und $task.
Wird benutzt von show() und showTable().
00561 { 00562 global $task, $Itemid, $mainframe; 00563 00564 // getItemid compatibility mode, holds maintenance version number 00565 $compat = (int) $mainframe->getCfg('itemid_compat'); 00566 00567 if ( ($compat > 0 && $compat <= 11) && $task != 'view' && $task != 'category' ) { 00568 $row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 ); 00569 } else { 00570 // when viewing a content item, it is not necessary to calculate the Itemid 00571 $row->_Itemid = $Itemid; 00572 } 00573 00574 if ( $row->_Itemid && $row->_Itemid != 99999999 ) { 00575 // where Itemid value is returned, do not add Itemid to url 00576 $row->Itemid_link = '&Itemid='. $row->_Itemid; 00577 } else { 00578 // where Itemid value is NOT returned, do not add Itemid to url 00579 $row->Itemid_link = ''; 00580 } 00581 }

| HTML_content::_linkInfo | ( | &$ | row, | |
| &$ | params | |||
| ) |
determines the link and `link text` of the readmore button & linked title
Definiert in Zeile 586 der Datei content.html.php.
Wird benutzt von show().
00586 { 00587 global $my; 00588 00589 $row->link_on = ''; 00590 $row->link_text = ''; 00591 00592 if ($params->get( 'readmore' ) || $params->get( 'link_titles' )) { 00593 if ( $params->get( 'intro_only' ) ) { 00594 // checks if the item is a public or registered/special item 00595 if ( $row->access <= $my->gid ) { 00596 $row->link_on = sefRelToAbs( 'index.php?option=com_content&task=view&id=' . $row->id . $row->Itemid_link ); 00597 00598 if ( isset($row->readmore) && @$row->readmore) { 00599 // text for the readmore link 00600 $row->link_text = _READ_MORE; 00601 } 00602 } else { 00603 $row->link_on = sefRelToAbs( 'index.php?option=com_registration&task=register' ); 00604 00605 if ( isset($row->readmore) && @$row->readmore ) { 00606 // text for the readmore link if accessible only if registered 00607 $row->link_text = _READ_MORE_REGISTER; 00608 } 00609 } 00610 } 00611 } 00612 }

| HTML_content::Author | ( | &$ | row, | |
| &$ | params | |||
| ) |
Writes Author name
Definiert in Zeile 804 der Datei content.html.php.
Benutzt $params.
Wird benutzt von show().
00804 { 00805 if ( ( $params->get( 'author' ) ) && ( $row->author != '' ) ) { 00806 ?> 00807 <tr> 00808 <td width="70%" align="left" valign="top" colspan="2"> 00809 <span class="small"> 00810 <?php echo _WRITTEN_BY . ' '.( $row->created_by_alias ? $row->created_by_alias : $row->author ); ?> 00811 </span> 00812 00813 </td> 00814 </tr> 00815 <?php 00816 } 00817 }

| HTML_content::Category | ( | &$ | row, | |
| &$ | params | |||
| ) |
Writes Category
Definiert in Zeile 789 der Datei content.html.php.
Benutzt $params.
Wird benutzt von Section_Category().
00789 { 00790 if ( $params->get( 'category' ) ) { 00791 ?> 00792 <span> 00793 <?php 00794 echo $row->category; 00795 ?> 00796 </span> 00797 <?php 00798 } 00799 }

| HTML_content::copySection | ( | $ | option, | |
| $ | cid, | |||
| $ | sectCatList, | |||
| $ | sectionid, | |||
| $ | items | |||
| ) |
Form to select Section/Category to copys item(s) to
Definiert in Zeile 1154 der Datei admin.content.html.php.
Wird benutzt von copyItem().
01154 { 01155 ?> 01156 <script language="javascript" type="text/javascript"> 01157 function submitbutton(pressbutton) { 01158 var form = document.adminForm; 01159 if (pressbutton == 'cancel') { 01160 submitform( pressbutton ); 01161 return; 01162 } 01163 01164 // do field validation 01165 if (!getSelectedValue( 'adminForm', 'sectcat' )) { 01166 alert( "Please select a Section/Category to copy the items to" ); 01167 } else { 01168 submitform( pressbutton ); 01169 } 01170 } 01171 </script> 01172 <form action="index2.php" method="post" name="adminForm"> 01173 <br /> 01174 <table class="adminheading"> 01175 <tr> 01176 <th class="edit"> 01177 Copy Content Items 01178 </th> 01179 </tr> 01180 </table> 01181 01182 <br /> 01183 <table class="adminform"> 01184 <tr> 01185 <td align="left" valign="top" width="40%"> 01186 <strong>Copy to Section/Category:</strong> 01187 <br /> 01188 <?php echo $sectCatList; ?> 01189 <br /><br /> 01190 </td> 01191 <td align="left" valign="top"> 01192 <strong>Items being copied:</strong> 01193 <br /> 01194 <?php 01195 echo "<ol>"; 01196 foreach ( $items as $item ) { 01197 echo "<li>". $item->title ."</li>"; 01198 } 01199 echo "</ol>"; 01200 ?> 01201 </td> 01202 </tr> 01203 </table> 01204 <br /><br /> 01205 01206 <input type="hidden" name="option" value="<?php echo $option;?>" /> 01207 <input type="hidden" name="sectionid" value="<?php echo $sectionid; ?>" /> 01208 <input type="hidden" name="task" value="" /> 01209 <?php 01210 foreach ($cid as $id) { 01211 echo "\n<input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; 01212 } 01213 ?> 01214 <input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" /> 01215 </form> 01216 <?php 01217 }

| HTML_content::CreateDate | ( | &$ | row, | |
| &$ | params | |||
| ) |
Writes Create Date
Definiert in Zeile 823 der Datei content.html.php.
Benutzt $params und mosFormatDate().
Wird benutzt von show().
00823 { 00824 $create_date = null; 00825 00826 if ( intval( $row->created ) != 0 ) { 00827 $create_date = mosFormatDate( $row->created ); 00828 } 00829 00830 if ( $params->get( 'createdate' ) ) { 00831 ?> 00832 <tr> 00833 <td valign="top" colspan="2" class="createdate"> 00834 <?php echo $create_date; ?> 00835 </td> 00836 </tr> 00837 <?php 00838 } 00839 }


| HTML_content::editContent | ( | &$ | row, | |
| $ | section, | |||
| &$ | lists, | |||
| &$ | images, | |||
| &$ | access, | |||
| $ | myid, | |||
| $ | sectionid, | |||
| $ | task, | |||
| $ | Itemid | |||
| ) |
Writes the edit form for new and existing content item
A new record is defined when $row is passed with the id property set to 0.
| mosContent | The category object | |
| string | The html for the groups select list |
Definiert in Zeile 973 der Datei content.html.php.
Benutzt $_REQUEST, $access, $GLOBALS, $i, $images, $items, $k, $mainframe, $mosConfig_live_site, $section, apply(), cancel(), canPublish, editorArea(), getEditorContents(), Itemid, josSpoofValue(), mosGetParam(), mosMakeHtmlSafe(), n, save(), mosToolBar::startTable() und task.
00973 { 00974 global $mosConfig_live_site, $mainframe; 00975 00976 mosMakeHtmlSafe( $row ); 00977 00978 require_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/HTML_toolbar.php' ); 00979 00980 // used for spoof hardening 00981 $validate = josSpoofValue(); 00982 00983 $Returnid = intval( mosGetParam( $_REQUEST, 'Returnid', $Itemid ) ); 00984 $tabs = new mosTabs(0, 1); 00985 00986 $mainframe->addCustomHeadTag( '<link rel="stylesheet" type="text/css" media="all" href="includes/js/calendar/calendar-mos.css" title="green" />' ); 00987 ?> 00988 <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> 00989 <!-- import the calendar script --> 00990 <script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/calendar/calendar_mini.js"></script> 00991 <!-- import the language module --> 00992 <script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/calendar/lang/calendar-en.js"></script> 00993 <script language="javascript" type="text/javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script> 00994 <script language="javascript" type="text/javascript"> 00995 onunload = WarnUser; 00996 var folderimages = new Array; 00997 <?php 00998 $i = 0; 00999 foreach ($images as $k=>$items) { 01000 foreach ($items as $v) { 01001 echo "\n folderimages[".$i++."] = new Array( '$k','".addslashes( $v->value )."','".addslashes( $v->text )."' );"; 01002 } 01003 } 01004 ?> 01005 function submitbutton(pressbutton) { 01006 var form = document.adminForm; 01007 if (pressbutton == 'cancel') { 01008 submitform( pressbutton ); 01009 return; 01010 } 01011 01012 // var goodexit=false; 01013 // assemble the images back into one field 01014 form.goodexit.value=1; 01015 var temp = new Array; 01016 for (var i=0, n=form.imagelist.options.length; i < n; i++) { 01017 temp[i] = form.imagelist.options[i].value; 01018 } 01019 form.images.value = temp.join( '\n' ); 01020 try { 01021 form.onsubmit(); 01022 } 01023 catch(e){} 01024 // do field validation 01025 if (form.title.value == "") { 01026 alert ( "<?php echo addslashes( _E_WARNTITLE ); ?>" ); 01027 } else if (parseInt('<?php echo $row->sectionid;?>')) { 01028 // for content items 01029 if (getSelectedValue('adminForm','catid') < 1) { 01030 alert ( "<?php echo addslashes( _E_WARNCAT ); ?>" ); 01031 //} else if (form.introtext.value == "") { 01032 // alert ( "<?php echo addslashes( _E_WARNTEXT ); ?>" ); 01033 } else { 01034 <?php 01035 getEditorContents( 'editor1', 'introtext' ); 01036 getEditorContents( 'editor2', 'fulltext' ); 01037 ?> 01038 submitform(pressbutton); 01039 } 01040 //} else if (form.introtext.value == "") { 01041 // alert ( "<?php echo addslashes( _E_WARNTEXT ); ?>" ); 01042 } else { 01043 // for static content 01044 <?php 01045 getEditorContents( 'editor1', 'introtext' ) ; 01046 ?> 01047 submitform(pressbutton); 01048 } 01049 } 01050 01051 function setgood(){ 01052 document.adminForm.goodexit.value=1; 01053 } 01054 01055 function WarnUser(){ 01056 if (document.adminForm.goodexit.value==0) { 01057 alert('<?php echo addslashes( _E_WARNUSER );?>'); 01058 window.location="<?php echo sefRelToAbs("index.php?option=com_content&task=".$task."§ionid=".$sectionid."&id=".$row->id."&Itemid=".$Itemid); ?>"; 01059 } 01060 } 01061 </script> 01062 01063 <?php 01064 $docinfo = "<strong>"._E_EXPIRES."</strong> "; 01065 $docinfo .= $row->publish_down."<br />"; 01066 $docinfo .= "<strong>"._E_VERSION."</strong> "; 01067 $docinfo .= $row->version."<br />"; 01068 $docinfo .= "<strong>"._E_CREATED."</strong> "; 01069 $docinfo .= $row->created."<br />"; 01070 $docinfo .= "<strong>"._E_LAST_MOD."</strong> "; 01071 $docinfo .= $row->modified."<br />"; 01072 $docinfo .= "<strong>"._E_HITS."</strong> "; 01073 $docinfo .= $row->hits."<br />"; 01074 ?> 01075 <form action="index.php" method="post" name="adminForm" onSubmit="javascript:setgood();"> 01076 01077 <table cellspacing="0" cellpadding="0" border="0" width="100%"> 01078 <tr> 01079 <td class="contentheading" > 01080 <?php echo $section;?> / <?php echo $row->id ? _E_EDIT : _E_ADD;?> 01081 <?php echo _E_CONTENT;?> 01082 <a href="javascript: void(0);" onMouseOver="return overlib('<table><?php echo $docinfo; ?></table>', CAPTION, '<?php echo _E_ITEM_INFO;?>', BELOW, RIGHT);" onMouseOut="return nd();"> 01083 <strong>[Info]</strong> 01084 </a> 01085 </td> 01086 </tr> 01087 </table> 01088 01089 <table class="adminform"> 01090 <tr> 01091 <td> 01092 <div style="float: left;"> 01093 <?php echo _E_TITLE; ?> 01094 <br /> 01095 <input class="inputbox" type="text" name="title" size="50" maxlength="100" value="<?php echo $row->title; ?>" /> 01096 </div> 01097 <div style="float: right;"> 01098 <?php 01099 // Toolbar Top 01100 mosToolBar::startTable(); 01101 mosToolBar::save(); 01102 mosToolBar::apply( 'apply_new' ); 01103 mosToolBar::cancel(); 01104 mosToolBar::endtable(); 01105 ?> 01106 </div> 01107 </td> 01108 </tr> 01109 <?php 01110 if ($row->sectionid) { 01111 ?> 01112 <tr> 01113 <td> 01114 <?php echo _E_CATEGORY; ?> 01115 <br /> 01116 <?php echo $lists['catid']; ?> 01117 </td> 01118 </tr> 01119 <?php 01120 } 01121 ?> 01122 <tr> 01123 <?php 01124 if (intval( $row->sectionid ) > 0) { 01125 ?> 01126 <td> 01127 <?php echo _E_INTRO.' ('._CMN_REQUIRED.')'; ?>: 01128 </td> 01129 <?php 01130 } else { 01131 ?> 01132 <td> 01133 <?php echo _E_MAIN.' ('._CMN_REQUIRED.')'; ?>: 01134 </td> 01135 <?php 01136 } ?> 01137 </tr> 01138 <tr> 01139 <td> 01140 <?php 01141 // parameters : areaname, content, hidden field, width, height, rows, cols 01142 editorArea( 'editor1', $row->introtext , 'introtext', '600', '400', '70', '15' ) ; 01143 ?> 01144 </td> 01145 </tr> 01146 <?php 01147 if (intval( $row->sectionid ) > 0) { 01148 ?> 01149 <tr> 01150 <td> 01151 <?php echo _E_MAIN.' ('._CMN_OPTIONAL.')'; ?>: 01152 </td> 01153 </tr> 01154 <tr> 01155 <td> 01156 <?php 01157 // parameters : areaname, content, hidden field, width, height, rows, cols 01158 editorArea( 'editor2', $row->fulltext , 'fulltext', '600', '400', '70', '15' ) ; 01159 ?> 01160 </td> 01161 </tr> 01162 <?php 01163 } 01164 ?> 01165 </table> 01166 01167 <?php 01168 // Toolbar Bottom 01169 mosToolBar::startTable(); 01170 mosToolBar::save(); 01171 mosToolBar::apply(); 01172 mosToolBar::cancel(); 01173 mosToolBar::endtable(); 01174 ?> 01175 01176 <?php 01177 $tabs->startPane( 'content-pane' ); 01178 $tabs->startTab( _E_IMAGES, 'images-page' ); 01179 ?> 01180 <table class="adminform"> 01181 <tr> 01182 <td colspan="4"> 01183 <?php echo _CMN_SUBFOLDER; ?> :: <?php echo $lists['folders'];?> 01184 </td> 01185 </tr> 01186 <tr> 01187 <td align="top"> 01188 <?php echo _E_GALLERY_IMAGES; ?> 01189 </td> 01190 <td width="2%"> 01191 </td> 01192 <td align="top"> 01193 <?php echo _E_CONTENT_IMAGES; ?> 01194 </td> 01195 <td align="top"> 01196 <?php echo _E_EDIT_IMAGE; ?> 01197 </td> 01198 </tr> 01199 <tr> 01200 <td valign="top"> 01201 <?php echo $lists['imagefiles'];?> 01202 <br /> 01203 <input class="button" type="button" value="<?php echo _E_INSERT; ?>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" /> 01204 </td> 01205 <td width="2%"> 01206 <input class="button" type="button" value=">>" onclick="addSelectedToList('adminForm','imagefiles','imagelist')" title="<?php echo _E_ADD; ?>"/> 01207 <br/> 01208 <input class="button" type="button" value="<<" onclick="delSelectedFromList('adminForm','imagelist')" title="<?php echo _E_REMOVE; ?>"/> 01209 </td> 01210 <td valign="top"> 01211 <?php echo $lists['imagelist'];?> 01212 <br /> 01213 <input class="button" type="button" value="<?php echo _E_UP; ?>" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,-1)" /> 01214 <input class="button" type="button" value="<?php echo _E_DOWN; ?>" onclick="moveInList('adminForm','imagelist',adminForm.imagelist.selectedIndex,+1)" /> 01215 </td> 01216 <td valign="top"> 01217 <table> 01218 <tr> 01219 <td align="right"> 01220 <?php echo _E_SOURCE; ?> 01221 </td> 01222 <td> 01223 <input class="inputbox" type="text" name= "_source" value="" size="15" /> 01224 </td> 01225 </tr> 01226 <tr> 01227 <td align="right" valign="top"> 01228 <?php echo _E_ALIGN; ?> 01229 </td> 01230 <td> 01231 <?php echo $lists['_align']; ?> 01232 </td> 01233 </tr> 01234 <tr> 01235 <td align="right"> 01236 <?php echo _E_ALT; ?> 01237 </td> 01238 <td> 01239 <input class="inputbox" type="text" name="_alt" value="" size="15" /> 01240 </td> 01241 </tr> 01242 <tr> 01243 <td align="right"> 01244 <?php echo _E_BORDER; ?> 01245 </td> 01246 <td> 01247 <input class="inputbox" type="text" name="_border" value="" size="3" maxlength="1" /> 01248 </td> 01249 </tr> 01250 <tr> 01251 <td align="right"> 01252 <?php echo _E_CAPTION; ?>: 01253 </td> 01254 <td> 01255 <input class="text_area" type="text" name="_caption" value="" size="30" /> 01256 </td> 01257 </tr> 01258 <tr> 01259 <td align="right"> 01260 <?php echo _E_CAPTION_POSITION; ?>: 01261 </td> 01262 <td> 01263 <?php echo $lists['_caption_position']; ?> 01264 </td> 01265 </tr> 01266 <tr> 01267 <td align="right"> 01268 <?php echo _E_CAPTION_ALIGN; ?>: 01269 </td> 01270 <td> 01271 <?php echo $lists['_caption_align']; ?> 01272 </td> 01273 </tr> 01274 <tr> 01275 <td align="right"> 01276 <?php echo _E_CAPTION_WIDTH; ?>: 01277 </td> 01278 <td> 01279 <input class="text_area" type="text" name="_width" value="" size="5" maxlength="5" /> 01280 </td> 01281 </tr> 01282 <tr> 01283 <td align="right"> 01284 </td> 01285 <td> 01286 <input class="button" type="button" value="<?php echo _E_APPLY; ?>" onclick="applyImageProps()" /> 01287 </td> 01288 </tr> 01289 </table> 01290 </td> 01291 </tr> 01292 <tr> 01293 <td> 01294 <img name="view_imagefiles" src="<?php echo $mosConfig_live_site;?>/images/M_images/blank.png" width="50" alt="<?php echo _E_NO_IMAGE; ?>" /> 01295 </td> 01296 <td width="2%"> 01297 </td> 01298 <td> 01299 <img name="view_imagelist" src="<?php echo $mosConfig_live_site;?>/images/M_images/blank.png" width="50" alt="<?php echo _E_NO_IMAGE; ?>" /> 01300 </td> 01301 <td> 01302 </td> 01303 </tr> 01304 </table> 01305 <?php 01306 $tabs->endTab(); 01307 $tabs->startTab( _E_PUBLISHING, 'publish-page' ); 01308 ?> 01309 <table class="adminform"> 01310 <?php 01311 if ($access->canPublish) { 01312 ?> 01313 <tr> 01314 <td align="left"> 01315 <?php echo _E_STATE; ?> 01316 </td> 01317 <td> 01318 <?php echo $lists['state']; ?> 01319 </td> 01320 </tr> 01321 <?php 01322 } ?> 01323 <tr> 01324 <td align="left"> 01325 <?php echo _E_ACCESS_LEVEL; ?> 01326 </td> 01327 <td> 01328 <?php echo $lists['access']; ?> 01329 </td> 01330 </tr> 01331 <tr> 01332 <td align="left"> 01333 <?php echo _E_AUTHOR_ALIAS; ?> 01334 </td> 01335 <td> 01336 <input type="text" name="created_by_alias" size="50" maxlength="100" value="<?php echo $row->created_by_alias; ?>" class="inputbox" /> 01337 </td> 01338 </tr> 01339 <tr> 01340 <td align="left"> 01341 <?php echo _E_ORDERING; ?> 01342 </td> 01343 <td> 01344 <?php echo $lists['ordering']; ?> 01345 </td> 01346 </tr> 01347 <tr> 01348 <td align="left"> 01349 <?php echo _E_START_PUB; ?> 01350 </td> 01351 <td> 01352 <input class="inputbox" type="text" name="publish_up" id="publish_up" size="25" maxlength="19" value="<?php echo $row->publish_up; ?>" /> 01353 <input type="reset" class="button" value="..." onclick="return showCalendar('publish_up', 'y-mm-dd');" /> 01354 </td> 01355 </tr> 01356 <tr> 01357 <td align="left"> 01358 <?php echo _E_FINISH_PUB; ?> 01359 </td> 01360 <td> 01361 <input class="inputbox" type="text" name="publish_down" id="publish_down" size="25" maxlength="19" value="<?php echo $row->publish_down; ?>" /> 01362 <input type="reset" class="button" value="..." onclick="return showCalendar('publish_down', 'y-mm-dd');" /> 01363 </td> 01364 </tr> 01365 <tr> 01366 <td align="left"> 01367 <?php echo _E_SHOW_FP; ?> 01368 </td> 01369 <td> 01370 <input type="checkbox" name="frontpage" value="1" <?php echo $row->frontpage ? 'checked="checked"' : ''; ?> /> 01371 </td> 01372 </tr> 01373 </table> 01374 <?php 01375 $tabs->endTab(); 01376 $tabs->startTab( _E_METADATA, 'meta-page' ); 01377 ?> 01378 <table class="adminform"> 01379 <tr> 01380 <td align="left" valign="top"> 01381 <?php echo _E_M_DESC; ?> 01382 </td> 01383 <td> 01384 <textarea class="inputbox" cols="45" rows="3" name="metadesc"><?php echo str_replace('&','&',$row->metadesc); ?></textarea> 01385 </td> 01386 </tr> 01387 <tr> 01388 <td align="left" valign="top"> 01389 <?php echo _E_M_KEY; ?> 01390 </td> 01391 <td> 01392 <textarea class="inputbox" cols="45" rows="3" name="metakey"><?php echo str_replace('&','&',$row->metakey); ?></textarea> 01393 </td> 01394 </tr> 01395 </table> 01396 <?php 01397 $tabs->endTab(); 01398 $tabs->endPane(); 01399 ?> 01400 01401 <div style="clear:both;"></div> 01402 01403 <input type="hidden" name="images" value="" /> 01404 <input type="hidden" name="goodexit" value="0" /> 01405 <input type="hidden" name="option" value="com_content" /> 01406 <input type="hidden" name="Returnid" value="<?php echo $Returnid; ?>" /> 01407 <input type="hidden" name="id" value="<?php echo $row->id; ?>" /> 01408 <input type="hidden" name="version" value="<?php echo $row->version; ?>" /> 01409 <input type="hidden" name="sectionid" value="<?php echo $row->sectionid; ?>" /> 01410 <input type="hidden" name="created_by" value="<?php echo $row->created_by; ?>" /> 01411 <input type="hidden" name="referer" value="<?php echo ampReplace( @$_SERVER['HTTP_REFERER'] ); ?>" /> 01412 <input type="hidden" name="task" value="" /> 01413 <input type="hidden" name="<?php echo $validate; ?>" value="1" /> 01414 </form> 01415 <?php 01416 }

| HTML_content::editContent | ( | &$ | row, | |
| $ | section, | |||
| &$ | lists, | |||
| &$ | sectioncategories, | |||
| &$ | images, | |||
| &$ | params, | |||
| $ | option, | |||
| $ | redirect, | |||
| &$ | menus | |||
| ) |
Writes the edit form for new and existing content item
A new record is defined when $row is passed with the id property set to 0.
| mosContent | The category object | |
| string | The html for the groups select list |
Definiert in Zeile 462 der Datei admin.content.html.php.
Benutzt $database, $i, $images, $items, $k, $nullDate, $params, $row, $section, ampReplace(), editorArea(), getEditorContents(), mosCommonHTML::loadCalendar(), mosCommonHTML::loadOverlib(), mosCommonHTML::menuLinksContent(), mosFormatDate(), mosMakeHtmlSafe(), n, NULL und view().
Wird benutzt von editContent() und editItem().
00462 { 00463 global $database; 00464 00465 mosMakeHtmlSafe( $row ); 00466 00467 $nullDate = $database->getNullDate(); 00468 $create_date = null; 00469 00470 if ( $row->created != $nullDate ) { 00471 $create_date = mosFormatDate( $row->created, '%A, %d %B %Y %H:%M', '0' ); 00472 } 00473 $mod_date = null; 00474 if ( $row->modified != $nullDate ) { 00475 $mod_date = mosFormatDate( $row->modified, '%A, %d %B %Y %H:%M', '0' ); 00476 } 00477 00478 $tabs = new mosTabs(1); 00479 00480 // used to hide "Reset Hits" when hits = 0 00481 if ( !$row->hits ) { 00482 $visibility = "style='display: none; visibility: hidden;'"; 00483 } else { 00484 $visibility = ""; 00485 } 00486 00487 mosCommonHTML::loadOverlib(); 00488 mosCommonHTML::loadCalendar(); 00489 ?> 00490 <script language="javascript" type="text/javascript"> 00491 <!-- 00492 var sectioncategories = new Array; 00493 <?php 00494 $i = 0; 00495 foreach ($sectioncategories as $k=>$items) { 00496 foreach ($items as $v) { 00497 echo "sectioncategories[".$i++."] = new Array( '$k','".addslashes( $v->id )."','".addslashes( $v->name )."' );\t"; 00498 } 00499 } 00500 ?> 00501 00502 var folderimages = new Array; 00503 <?php 00504 $i = 0; 00505 foreach ($images as $k=>$items) { 00506 foreach ($items as $v) { 00507 echo "folderimages[".$i++."] = new Array( '$k','".addslashes( ampReplace( $v->value ) )."','".addslashes( ampReplace( $v->text ) )."' );\t"; 00508 } 00509 } 00510 ?> 00511 00512 function submitbutton(pressbutton) { 00513 var form = document.adminForm; 00514 00515 if ( pressbutton == 'menulink' ) { 00516 if ( form.menuselect.value == "" ) { 00517 alert( "Please select a Menu" ); 00518 return; 00519 } else if ( form.link_name.value == "" ) { 00520 alert( "Please enter a Name for this menu item" ); 00521 return; 00522 } 00523 } 00524 00525 if (pressbutton == 'cancel') { 00526 submitform( pressbutton ); 00527 return; 00528 } 00529 // assemble the images back into one field 00530 var temp = new Array; 00531 for (var i=0, n=form.imagelist.options.length; i < n; i++) { 00532 temp[i] = form.imagelist.options[i].value; 00533 } 00534 form.images.value = temp.join( '\n' ); 00535 00536 // do field validation 00537 if (form.title.value == ""){ 00538 alert( "Content item must have a title" ); 00539 } else if (form.sectionid.value == "-1"){ 00540 alert( "You must select a Section." ); 00541 } else if (form.catid.value == "-1"){ 00542 alert( "You must select a Category." ); 00543 } else if (form.catid.value == ""){ 00544 alert( "You must select a Category." ); 00545 } else { 00546 <?php getEditorContents( 'editor1', 'introtext' ) ; ?> 00547 <?php getEditorContents( 'editor2', 'fulltext' ) ; ?> 00548 submitform( pressbutton ); 00549 } 00550 } 00551 //--> 00552 </script> 00553 <form action="index2.php" method="post" name="adminForm"> 00554 <table class="adminheading"> 00555 <tr> 00556 <th class="edit"> 00557 Content Item: 00558 <small> 00559 <?php echo $row->id ? 'Edit' : 'New';?> 00560 </small> 00561 <?php 00562 if ( $row->id ) { 00563 ?> 00564 <small><small> 00565 [ Section: <?php echo $section; ?> ] 00566 </small></small> 00567 <?php 00568 } 00569 ?> 00570 </th> 00571 </tr> 00572 </table> 00573 00574 <table cellspacing="0" cellpadding="0" width="100%"> 00575 <tr> 00576 <td width="60%" valign="top"> 00577 <table width="100%" class="adminform"> 00578 <tr> 00579