HTML_weblinks Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 displaylist (&$categories, &$rows, $catid, $currentcat=NULL, &$params, $tabclass)
 editWeblink ($option, &$row, &$lists)
 editWeblink (&$row, &$lists, &$params, $option)
 showCategories (&$params, &$categories, $catid)
 showTable (&$params, &$rows, $catid, $tabclass)
 showWeblinks ($option, &$rows, &$lists, &$search, &$pageNav)


Ausführliche Beschreibung

Definiert in Zeile 22 der Datei admin.weblinks.html.php.


Dokumentation der Elementfunktionen

HTML_weblinks::displaylist ( &$  categories,
&$  rows,
catid,
currentcat = NULL,
&$  params,
tabclass 
)

Definiert in Zeile 24 der Datei weblinks.html.php.

Benutzt $catid, $Itemid, $mosConfig_live_site, $params, $rows, $tabclass, mosHTML::BackButton(), showCategories() und showTable().

Wird benutzt von listWeblinks().

00024                                                                                                     {
00025                 global $Itemid, $mosConfig_live_site, $hide_js;
00026                 if ( $params->get( 'page_title' ) ) {
00027                         ?>
00028                         <div class="componentheading<?php echo $params->get( 'pageclass_sfx' ); ?>">
00029                         <?php echo $currentcat->header; ?>
00030                         </div>
00031                         <?php
00032                 }
00033                 ?>
00034                 <form action="index.php" method="post" name="adminForm">
00035 
00036                 <table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="contentpane<?php echo $params->get( 'pageclass_sfx' ); ?>">
00037                 <tr>
00038                         <td width="60%" valign="top" class="contentdescription<?php echo $params->get( 'pageclass_sfx' ); ?>" colspan="2">
00039                         <?php
00040                         // show image
00041                         if ( $currentcat->img ) {
00042                                 ?>
00043                                 <img src="<?php echo $currentcat->img; ?>" align="<?php echo $currentcat->align; ?>" hspace="6" alt="<?php echo _WEBLINKS_TITLE; ?>" />
00044                                 <?php
00045                         }
00046                         echo $currentcat->descrip;
00047                         ?>
00048                         </td>
00049                 </tr>
00050                 <tr>
00051                         <td>
00052                         <?php
00053                         if ( count( $rows ) ) {
00054                                 HTML_weblinks::showTable( $params, $rows, $catid, $tabclass );
00055                         }
00056                         ?>
00057                         </td>
00058                 </tr>
00059                 <tr>
00060                         <td>&nbsp;
00061 
00062                         </td>
00063                 </tr>
00064                 <tr>
00065                         <td>
00066                         <?php
00067                         // Displays listing of Categories
00068                         if ( ( $params->get( 'type' ) == 'category' ) && $params->get( 'other_cat' ) ) {
00069                                 HTML_weblinks::showCategories( $params, $categories, $catid );
00070                         } else if ( ( $params->get( 'type' ) == 'section' ) && $params->get( 'other_cat_section' ) ) {
00071                                 HTML_weblinks::showCategories( $params, $categories, $catid );
00072                         }
00073                         ?>
00074                         </td>
00075                 </tr>
00076                 </table>
00077                 </form>
00078                 <?php
00079                 // displays back button
00080                 mosHTML::BackButton ( $params, $hide_js );
00081         }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

HTML_weblinks::editWeblink ( option,
&$  row,
&$  lists 
)

Writes the edit form for new and existing record (FRONTEND)

A new record is defined when $row is passed with the id property set to 0.

Parameter:
mosWeblink The weblink object
string The html for the categories select list

Definiert in Zeile 240 der Datei weblinks.html.php.

Benutzt $_REQUEST, $GLOBALS, $mainframe, $row, cancel(), josSpoofValue(), mosGetParam(), save(), spacer() und mosToolBar::startTable().

00240                                                         {
00241                 global $mainframe;
00242                 
00243                 require_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/HTML_toolbar.php' );
00244                 
00245                 $Returnid = intval( mosGetParam( $_REQUEST, 'Returnid', 0 ) );
00246                 
00247                 // used for spoof hardening
00248                 $validate = josSpoofValue();
00249                 ?>
00250                 <script language="javascript" type="text/javascript">
00251                 function submitbutton(pressbutton) {
00252                         var form = document.adminForm;
00253                         if (pressbutton == 'cancel') {
00254                                 submitform( pressbutton );
00255                                 return;
00256                         }
00257 
00258                         // do field validation
00259                         if (form.title.value == ""){
00260                                 alert( "Weblink item must have a title" );
00261                         } else if (getSelectedValue('adminForm','catid') < 1) {
00262                                 alert( "You must select a category." );
00263                         } else if (form.url.value == ""){
00264                                 alert( "You must have a url." );
00265                         } else {
00266                                 submitform( pressbutton );
00267                         }
00268                 }
00269                 </script>
00270 
00271                 <form action="<?php echo sefRelToAbs("index.php"); ?>" method="post" name="adminForm" id="adminForm">
00272                 <table cellpadding="0" cellspacing="0" border="0" width="100%">
00273                 <tr>
00274                         <td class="contentheading">
00275                         <?php echo _SUBMIT_LINK;?>
00276                         </td>
00277                         <td width="10%">
00278                         <?php
00279                         mosToolBar::startTable();
00280                         mosToolBar::spacer();
00281                         mosToolBar::save();
00282                         mosToolBar::cancel();
00283                         mosToolBar::endtable();
00284                         ?>
00285                         </td>
00286                 </tr>
00287                 </table>
00288 
00289                 <table cellpadding="4" cellspacing="1" border="0" width="100%">
00290                 <tr>
00291                         <td width="20%" align="right">
00292                         <?php echo _NAME; ?>
00293                         </td>
00294                         <td width="80%">
00295                         <input class="inputbox" type="text" name="title" size="50" maxlength="250" value="<?php echo htmlspecialchars( $row->title, ENT_QUOTES );?>" />
00296                         </td>
00297                 </tr>
00298                 <tr>
00299                         <td valign="top" align="right">
00300                         <?php echo _SECTION; ?>
00301                         </td>
00302                         <td>
00303                         <?php echo $lists['catid']; ?>
00304                         </td>
00305                 </tr>
00306                 <tr>
00307                         <td valign="top" align="right">
00308                         <?php echo _URL; ?>
00309                         </td>
00310                         <td>
00311                         <input class="inputbox" type="text" name="url" value="<?php echo $row->url; ?>" size="50" maxlength="250" />
00312                         </td>
00313                 </tr>
00314                 <tr>
00315                         <td valign="top" align="right">
00316                         <?php echo _URL_DESC; ?>
00317                         </td>
00318                         <td>
00319                         <textarea class="inputbox" cols="30" rows="6" name="description" style="width:300px" width="300"><?php echo htmlspecialchars( $row->description, ENT_QUOTES );?></textarea>
00320                         </td>
00321                 </tr>
00322                 </table>
00323 
00324                 <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
00325                 <input type="hidden" name="option" value="<?php echo $option;?>" />
00326                 <input type="hidden" name="task" value="" />
00327                 <input type="hidden" name="ordering" value="<?php echo $row->ordering; ?>" />
00328                 <input type="hidden" name="approved" value="<?php echo $row->approved; ?>" />
00329                 <input type="hidden" name="Returnid" value="<?php echo $Returnid; ?>" />
00330                 <input type="hidden" name="referer" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
00331                 <input type="hidden" name="<?php echo $validate; ?>" value="1" />
00332                 </form>
00333                 <?php
00334         }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

HTML_weblinks::editWeblink ( &$  row,
&$  lists,
&$  params,
option 
)

Writes the edit form for new and existing record

A new record is defined when $row is passed with the id property set to 0.

Parameter:
mosWeblink The weblink object
array An array of select lists
object Parameters
string The option

Definiert in Zeile 151 der Datei admin.weblinks.html.php.

Benutzt $params, $row, mosCommonHTML::loadOverlib() und mosMakeHtmlSafe().

Wird benutzt von editWebLink() und editWeblink().

00151                                                                   {
00152                 mosMakeHtmlSafe( $row, ENT_QUOTES, 'description' );
00153                 
00154                 mosCommonHTML::loadOverlib();
00155                 ?>
00156                 <script language="javascript" type="text/javascript">
00157                 function submitbutton(pressbutton) {
00158                         var form = document.adminForm;
00159                         if (pressbutton == 'cancel') {
00160                                 submitform( pressbutton );
00161                                 return;
00162                         }
00163 
00164                         // do field validation
00165                         if (form.title.value == ""){
00166                                 alert( "Weblink item must have a title" );
00167                         } else if (form.catid.value == "0"){
00168                                 alert( "You must select a category." );
00169                         } else if (form.url.value == ""){
00170                                 alert( "You must have a url." );
00171                         } else {
00172                                 submitform( pressbutton );
00173                         }
00174                 }
00175                 </script>
00176                 <form action="index2.php" method="post" name="adminForm" id="adminForm">
00177                 <table class="adminheading">
00178                 <tr>
00179                         <th>
00180                         Weblink:
00181                         <small>
00182                         <?php echo $row->id ? 'Edit' : 'New';?>
00183                         </small>
00184                         </th>
00185                 </tr>
00186                 </table>
00187 
00188                 <table width="100%">
00189                 <tr>
00190                         <td width="60%" valign="top">
00191                                 <table class="adminform">
00192                                 <tr>
00193                                         <th colspan="2">
00194                                         Details
00195                                         </th>
00196                                 </tr>
00197                                 <tr>
00198                                         <td width="20%" align="right">
00199                                         Name:
00200                                         </td>
00201                                         <td width="80%">
00202                                         <input class="text_area" type="text" name="title" size="50" maxlength="250" value="<?php echo $row->title;?>" />
00203                                         </td>
00204                                 </tr>
00205                                 <tr>
00206                                         <td valign="top" align="right">
00207                                         Category:
00208                                         </td>
00209                                         <td>
00210                                         <?php echo $lists['catid']; ?>
00211                                         </td>
00212                                 </tr>
00213                                 <tr>
00214                                         <td valign="top" align="right">
00215                                         URL:
00216                                         </td>
00217                                         <td>
00218                                         <input class="text_area" type="text" name="url" value="<?php echo $row->url; ?>" size="50" maxlength="250" />
00219                                         </td>
00220                                 </tr>
00221                                 <tr>
00222                                         <td valign="top" align="right">
00223                                         Description:
00224                                         </td>
00225                                         <td>
00226                                         <textarea class="text_area" cols="50" rows="5" name="description" style="width:500px" width="500"><?php echo $row->description; ?></textarea>
00227                                         </td>
00228                                 </tr>
00229 
00230                                 <tr>
00231                                         <td valign="top" align="right">
00232                                         Ordering:
00233                                         </td>
00234                                         <td>
00235                                         <?php echo $lists['ordering']; ?>
00236                                         </td>
00237                                 </tr>
00238                                 <tr>
00239                                         <td valign="top" align="right">
00240                                         Published:
00241                                         </td>
00242                                         <td>
00243                                         <?php echo $lists['published']; ?>
00244                                         </td>
00245                                 </tr>
00246                                 </table>
00247                         </td>
00248                         <td width="40%" valign="top">
00249                                 <table class="adminform">
00250                                 <tr>
00251                                         <th colspan="1">
00252                                         Parameters
00253                                         </th>
00254                                 </tr>
00255                                 <tr>
00256                                         <td>
00257                                         <?php echo $params->render();?>
00258                                         </td>
00259                                 </tr>
00260                                 </table>
00261                         </td>
00262                 </tr>
00263                 </table>
00264 
00265                 <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
00266                 <input type="hidden" name="option" value="<?php echo $option;?>" />
00267                 <input type="hidden" name="task" value="" />
00268                 <input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" />
00269                 </form>
00270                 <?php
00271         }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

HTML_weblinks::showCategories ( &$  params,
&$  categories,
catid 
)

Display links to categories

Definiert in Zeile 194 der Datei weblinks.html.php.

Benutzt $catid, $Itemid, $link, $mosConfig_live_site und href.

Wird benutzt von displaylist().

00194                                                                   {
00195                 global $mosConfig_live_site, $Itemid;
00196                 ?>
00197                 <ul>
00198                 <?php
00199                 foreach ( $categories as $cat ) {
00200                         if ( $catid == $cat->catid ) {
00201                                 ?>
00202                                 <li>
00203                                         <b>
00204                                         <?php echo stripslashes( $cat->name );?>
00205                                         </b>
00206                                         &nbsp;
00207                                         <span class="small">
00208                                         (<?php echo $cat->numlinks;?>)
00209                                         </span>
00210                                 </li>
00211                                 <?php
00212                         } else {
00213                                 $link = 'index.php?option=com_weblinks&amp;catid='. $cat->catid .'&amp;Itemid='. $Itemid;
00214                                 ?>
00215                                 <li>
00216                                         <a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
00217                                         <?php echo stripslashes( $cat->name );?>
00218                                         </a>
00219                                         &nbsp;
00220                                         <span class="small">
00221                                         (<?php echo $cat->numlinks;?>)
00222                                         </span>
00223                                 </li>
00224                                 <?php
00225                         }
00226                 }
00227                 ?>
00228                 </ul>
00229                 <?php
00230         }

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

HTML_weblinks::showTable ( &$  params,
&$  rows,
catid,
tabclass 
)

Display Table of items

Definiert in Zeile 86 der Datei weblinks.html.php.

Benutzt $catid, $k, $link, $mosConfig_live_site, $params, $row, $rows, ampReplace(), height, ImageCheck() und NULL.

Wird benutzt von displaylist().

00086                                                                   {
00087                 global $mosConfig_live_site;
00088                 // icon in table display
00089                 if ( $params->get( 'weblink_icons' ) != -1 ) {
00090                         $img = mosAdminMenus::ImageCheck( 'weblink.png', '/images/M_images/', $params->get( 'weblink_icons' ), '/images/M_images/', 'Link', 'Link' );
00091                 } else {
00092                         $img = NULL;
00093                 }
00094                 ?>
00095                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
00096                 <?php
00097                 if ( $params->get( 'headings' ) ) {
00098                         ?>
00099                         <tr>
00100                                 <?php
00101                                 if ( $img ) {
00102                                         ?>
00103                                         <td class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">&nbsp;
00104 
00105                                         </td>
00106                                         <?php
00107                                 }
00108                                 ?>
00109                                 <td width="90%" height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>">
00110                                 <?php echo _HEADER_TITLE_WEBLINKS; ?>
00111                                 </td>
00112                                 <?php
00113                                 if ( $params->get( 'hits' ) ) {
00114                                         ?>
00115                                         <td width="30" height="20" class="sectiontableheader<?php echo $params->get( 'pageclass_sfx' ); ?>" align="right">
00116                                         <?php echo _HEADER_HITS; ?>
00117                                         </td>
00118                                         <?php
00119                                 }
00120                                 ?>
00121                         </tr>
00122                         <?php
00123                 }
00124 
00125                 $k = 0;
00126                 foreach ($rows as $row) {
00127                         $iparams = new mosParameters( $row->params );
00128 
00129                         $link = sefRelToAbs( 'index.php?option=com_weblinks&task=view&catid='. $catid .'&id='. $row->id );
00130                         $link = ampReplace( $link );
00131                         
00132                         $menuclass = 'category'.$params->get( 'pageclass_sfx' );
00133                         
00134                         switch ($iparams->get( 'target' )) {
00135                                 // cases are slightly different
00136                                 case 1:
00137                                         // open in a new window
00138                                         $txt = '<a href="'. $link .'" target="_blank" class="'. $menuclass .'">'. $row->title .'</a>';
00139                                         break;
00140 
00141                                 case 2:
00142                                         // open in a popup window
00143                                         $txt = "<a href=\"#\" onclick=\"javascript: window.open('". $link ."', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false\" class=\"$menuclass\">". $row->title ."</a>\n";
00144                                         break;
00145 
00146                                 default:        // formerly case 2
00147                                         // open in parent window
00148                                         $txt = '<a href="'. $link .'" class="'. $menuclass .'">'. $row->title .'</a>';
00149                                         break;
00150                         }
00151                         ?>
00152                         <tr class="<?php echo $tabclass[$k]; ?>">
00153                                 <?php
00154                                 if ( $img ) {
00155                                         ?>
00156                                         <td width="100" height="20" align="center">
00157                                         &nbsp;&nbsp;<?php echo $img;?>&nbsp;&nbsp;
00158                                         </td>
00159                                         <?php
00160                                 }
00161                                 ?>
00162                                 <td height="20">
00163                                 <?php echo $txt; ?>
00164                                 <?php
00165                                 if ( $params->get( 'item_description' ) ) {
00166                                         ?>
00167                                         <br />
00168                                         <?php echo $row->description; ?>
00169                                         <?php
00170                                 }
00171                                 ?>
00172                                 </td>
00173                                 <?php
00174                                 if ( $params->get( 'hits' ) ) {
00175                                         ?>
00176                                         <td align="center">
00177                                         <?php echo $row->hits; ?>
00178                                         </td>
00179                                         <?php
00180                                 }
00181                                 ?>
00182                         </tr>
00183                         <?php
00184                         $k = 1 - $k;
00185                 }
00186                 ?>
00187                 </table>
00188                 <?php
00189         }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

HTML_weblinks::showWeblinks ( option,
&$  rows,
&$  lists,
&$  search,
&$  pageNav 
)

Definiert in Zeile 24 der Datei admin.weblinks.html.php.

Benutzt $i, $k, $link, $my, $pageNav, $row, $rows, $task, mosCommonHTML::CheckedOutProcessing(), height, href und mosCommonHTML::loadOverlib().

Wird benutzt von showWeblinks().

00024                                                                                {
00025                 global $my;
00026 
00027                 mosCommonHTML::loadOverlib();
00028                 ?>
00029                 <form action="index2.php" method="post" name="adminForm">
00030                 <table class="adminheading">
00031                 <tr>
00032                         <th>
00033                         Weblink Manager
00034                         </th>
00035                         <td>
00036                         Filter:
00037                         </td>
00038                         <td>
00039                         <input type="text" name="search" value="<?php echo htmlspecialchars( $search );?>" class="text_area" onChange="document.adminForm.submit();" />
00040                         </td>
00041                         <td width="right">
00042                         <?php echo $lists['catid'];?>
00043                         </td>
00044                 </tr>
00045                 </table>
00046 
00047                 <table class="adminlist">
00048                 <tr>
00049                         <th width="5">
00050                         #
00051                         </th>
00052                         <th width="20">
00053                         <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" />
00054                         </th>
00055                         <th class="title">
00056                         Title
00057                         </th>
00058                         <th width="5%">
00059                         Published
00060                         </th>
00061                         <th colspan="2" width="5%">
00062                         Reorder
00063                         </th>
00064                         <th width="25%" align="left">
00065                         Category
00066                         </th>
00067                         <th width="5%">
00068                         Hits
00069                         </th>
00070                 </tr>
00071                 <?php
00072                 $k = 0;
00073                 for ($i=0, $n=count( $rows ); $i < $n; $i++) {
00074                         $row = &$rows[$i];
00075 
00076                         $link   = 'index2.php?option=com_weblinks&task=editA&hidemainmenu=1&id='. $row->id;
00077 
00078                         $task   = $row->published ? 'unpublish' : 'publish';
00079                         $img    = $row->published ? 'publish_g.png' : 'publish_x.png';
00080                         $alt    = $row->published ? 'Published' : 'Unpublished';
00081 
00082                         $checked        = mosCommonHTML::CheckedOutProcessing( $row, $i );
00083 
00084                         $row->cat_link  = 'index2.php?option=com_categories&section=com_weblinks&task=editA&hidemainmenu=1&id='. $row->catid;
00085                         ?>
00086                         <tr class="<?php echo "row$k"; ?>">
00087                                 <td>
00088                                 <?php echo $pageNav->rowNumber( $i ); ?>
00089                                 </td>
00090                                 <td>
00091                                 <?php echo $checked; ?>
00092                                 </td>
00093                                 <td>
00094                                 <?php
00095                                 if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {
00096                                         echo $row->title;
00097                                 } else {
00098                                         ?>
00099                                         <a href="<?php echo $link; ?>" title="Edit Weblinks">
00100                                         <?php echo $row->title; ?>
00101                                         </a>
00102                                         <?php
00103                                 }
00104                                 ?>
00105                                 </td>
00106                                 <td align="center">
00107                                 <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $task;?>')">
00108                                 <img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" />
00109                                 </a>
00110                                 </td>
00111                                 <td>
00112                                 <?php echo $pageNav->orderUpIcon( $i, ($row->catid == @$rows[$i-1]->catid) ); ?>
00113                                 </td>
00114                                 <td>
00115                                 <?php echo $pageNav->orderDownIcon( $i, $n, ($row->catid == @$rows[$i+1]->catid) ); ?>
00116                                 </td>
00117                                 <td>
00118                                 <a href="<?php echo $row->cat_link; ?>" title="Edit Category">
00119                                 <?php echo $row->category; ?>
00120                                 </a>
00121                                 </td>
00122                                 <td align="center">
00123                                 <?php echo $row->hits; ?>
00124                                 </td>
00125                         </tr>
00126                         <?php
00127                         $k = 1 - $k;
00128                 }
00129                 ?>
00130                 </table>
00131                 <?php echo $pageNav->getListFooter(); ?>
00132                 <input type="hidden" name="option" value="<?php echo $option;?>" />
00133                 <input type="hidden" name="task" value="" />
00134                 <input type="hidden" name="boxchecked" value="0" />
00135                 <input type="hidden" name="hidemainmenu" value="0">
00136                 <input type="hidden" name="<?php echo josSpoofValue(); ?>" value="1" />
00137                 </form>
00138                 <?php
00139         }

Hier ist ein Graph der zeigt, was diese Funktion aufruft:

Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:
Erstellt mit Doxygen
www.joomla-tipps.net