| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Joomla
Revision: 10217
Author: eddieajau
Date: 19 Apr 2008 05:39:02
Changes:Merge from 1.5 release 2008-04-19
Files:| ... | ...@@ -45,4 +45,8 @@ | |
| 45 | 45 | } else if (eregi( 'var \$ftp_pass ', $v)) { |
| 46 | 46 | $cf[$k] = 'var $ftp_pass = \'xxxxxx\''; |
| 47 | } else if (eregi( 'var \$smtpuser ', $v)) { | |
| 48 | $cf[$k] = 'var $smtpuser = \'xxxxxx\''; | |
| 49 | } else if (eregi( 'var \$smtppass ', $v)) { | |
| 50 | $cf[$k] = 'var $smtppass = \'xxxxxx\''; | |
| 47 | 51 | } else if (eregi( '<?php', $v)) { |
| 48 | 52 | $cf[$k] = ''; |
| ... | ...@@ -33,5 +33,5 @@ | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | .button1 { background: url(../images/j_button1_right.png) 100% 0 no-repeat; margin-left: 5px; padding-right: 10px; white-space: nowrap; } | |
| 35 | .button1 { background: url(../images/j_button1_right.png) 100% 0 no-repeat; margin-left: 5px; padding-right: 10px; white-space: nowrap; padding-left: 0px; } | |
| 36 | 36 | .button1 .next { background: url(../images/j_button1_prev.png) no-repeat; } |
| 37 | 37 | .button1 a { padding: 0 6px 0 30px; } |
| ... | ...@@ -47,5 +47,5 @@ | |
| 47 | 47 | |
| 48 | 48 | .button2-left { |
| 49 | background:transparent url(../images/j_button2_right_xl.png) no-repeat scroll 100%; | |
| 49 | background:transparent url(../images/j_button2_right.png) no-repeat scroll 100%; | |
| 50 | 50 | float: right; |
| 51 | 51 | } |
| ... | ...@@ -204,3 +204,17 @@ | |
| 204 | 204 | div.col{ |
| 205 | 205 | float: right; |
| 206 | } | |
| 207 | ||
| 208 | #system-message dd.message ul { | |
| 209 | background-position: 99% center; | |
| 210 | } | |
| 211 | ||
| 212 | #system-message dd { | |
| 213 | text-indent:35px; | |
| 214 | } | |
| 215 | ||
| 216 | /* debug */ | |
| 217 | #system-debug ol, | |
| 218 | #system-debug ul{ | |
| 219 | direction: ltr; | |
| 206 | 220 | } |
| 207 | 221 | \ No newline at end of file |
| ... | ...@@ -23,9 +23,10 @@ | |
| 23 | 23 | <th class="title" width="15%"><?php echo JText::_( 'Date' ); ?></th> |
| 24 | 24 | <th class="title" width="25%"><?php echo JText::_( 'Author' ); ?></th> |
| 25 | <th class="title" width="5%"><?php echo JText::_( 'Compatibility' ); ?></th> | |
| 25 | 26 | </tr> |
| 26 | 27 | </thead> |
| 27 | 28 | <tfoot> |
| 28 | 29 | <tr> |
| 29 | <td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | 31 | </tr> |
| 31 | 32 | </tfoot> |
| ... | ...@@ -64,10 +64,10 @@ | |
| 64 | 64 | Translation contributers: |
| 65 | 65 | ------------------------- |
| 66 | Afrikaans (af-ZA) - Afrikaans Translation Team - Gerrit Hoekstra | |
| 67 | Arabic Algeria (ar-DZ) - Arabic Algeria Translation Team - Saber Bousba | |
| 68 | 66 | Basque (eu-ES) - Basque Translation Team (Basque Language School of Santurtzi) - Abel Camacho, Pedro Lonbide |
| 67 | Belarusian (be-BY) - Dennis Hermacki | |
| 69 | 68 | Bengali (bn-IN) - IndicJoomla! Team - Romit Chatterjee |
| 70 | 69 | Bosnian (bs-BA) - Bosnian Joomla! Community (joomla.ba) - Emir Sakic |
| 71 | 70 | Bulgarian (bg-BG) - Joomla! Bulgaria - Ivo Apostolov |
| 71 | Catalan (ca-ES) - Damià Verger | |
| 72 | 72 | Chinese-Traditional (zh-TW) - Traditional Chinese Translation Team - Eddy Chang |
| 73 | 73 | Croatian (hr-HR) - Croatian Translation Team - Klaudia B. |
| ... | ...@@ -85,4 +85,5 @@ | |
| 85 | 85 | Italian (it-IT) - Italian Translation Team - Stefania Gaianigo, Alessandro Rossi |
| 86 | 86 | Japanese (ja-JP) - Japanese Translation Team - Nori Aki |
| 87 | Korean (ko-KR) - Korean Translation Team - Song S. Kim | |
| 87 | 88 | Lao (lo-LA) - Joomla LaiLao Team (LaoOpenSource) - Akarawuth Tamrareang , Viengsakhone phanthanousy , Outhai Saioudom |
| 88 | 89 | Latvian (lv-LV) - Joomla Latvian Team - Edgars Piruška, Iveta Rītiņa-Namiķe, Ingars Stepkāns |
| ... | ...@@ -97,7 +98,10 @@ | |
| 97 | 98 | Russian (ru-RU) - Russian Translation Team - Serge Litvinov |
| 98 | 99 | Serbian (sr-RS) - Joomla! Serbia team (joomlaserbia.com) - Marko Milenovic |
| 100 | Sindhi (sd-PK) - Raheel H. Kaghzi | |
| 99 | 101 | Slovak (sk-SK) - Slovak Translation Team - Karol Cejka, Viliam Kmec, Alexander Horvath, Marek Sabo |
| 100 | 102 | Spanish (es-ES) TodosJuntos.org - Joomla!'s Spanish Community Translation Team |
| 101 | 103 | Swedish (sv-SE) - Swedish Translation Team (SvenskJoomla!) - Sune Hultman, Christer Gerhardsson |
| 104 | Syriac (sy-IQ) - Pauls! Dinka | |
| 105 | Tamil (ta-LK) - UoM, LK | |
| 102 | 106 | Thai (th-TH) - Joomla LaiThai Team (JoomlaCorner) - Akarawuth Tamrareang , Supachai Teasakul |
| 103 | 107 | Turkish (tr-TR) - Joomla! Turkiye (joomlaturkiye.org) - Oguz Kaan Cagatay Kilinc |
| ... | ...@@ -8,5 +8,5 @@ | |
| 8 | 8 | <?php echo $this->item->client_id == "0" ? JText::_( 'Site' ) : JText::_( 'Admin' ); ?> |
| 9 | 9 | </td> |
| 10 | <td align="center"><?php echo @$this->item->version != '' ? $this->item->version : ' '; ?></td> | |
| 10 | <td align="center" <?php if(@$this->item->legacy) echo 'class="legacy-mode"'; ?>><?php echo @$this->item->version != '' ? $this->item->version : ' '; ?></td> | |
| 11 | 11 | <td><?php echo @$this->item->creationdate != '' ? $this->item->creationdate : ' '; ?></td> |
| 12 | 12 | <td> |
| ... | ...@@ -15,3 +15,8 @@ | |
| 15 | 15 | </span> |
| 16 | 16 | </td> |
| 17 | <td align="center"> | |
| 18 | <span class="editlinktip hasTip" title="<?php echo (@$this->item->legacy ? JText::_( 'Not Compatible Extension') : JText::_('Compatible Extension'));?>"> | |
| 19 | <img src="images/<?php echo (@$this->item->legacy ? 'publish_x.png' : 'tick.png');?>"/> | |
| 20 | </span> | |
| 21 | </td> | |
| 17 | 22 | </tr> |
| ... | ...@@ -31,5 +31,5 @@ | |
| 31 | 31 | { |
| 32 | 32 | global $mainframe; |
| 33 | ||
| 33 | ||
| 34 | 34 | $config =& JComponentHelper::getParams('com_media'); |
| 35 | 35 |
| ... | ...@@ -98,5 +98,5 @@ | |
| 98 | 98 | JToolBarHelper::custom( 'doCopy', 'copy.png', 'copy_f2.png', 'Copy', false ); |
| 99 | 99 | JToolBarHelper::cancel('cancelItem'); |
| 100 | JToolBarHelper::help( 'screen.menus.copy' ); | |
| 100 | JToolBarHelper::help( 'screen.menus' ); | |
| 101 | 101 | |
| 102 | 102 | $document = & JFactory::getDocument(); |
| ... | ...@@ -134,5 +134,5 @@ | |
| 134 | 134 | JToolBarHelper::custom( 'doMove', 'move.png', 'move_f2.png', 'Move', false ); |
| 135 | 135 | JToolBarHelper::cancel('cancelItem'); |
| 136 | JToolBarHelper::help( 'screen.menus.move' ); | |
| 136 | JToolBarHelper::help( 'screen.menus' ); | |
| 137 | 137 | |
| 138 | 138 | $document = & JFactory::getDocument(); |
| ... | ...@@ -486,5 +486,5 @@ | |
| 486 | 486 | $bar = & JToolBar::getInstance('toolbar'); |
| 487 | 487 | // Add a configuration button |
| 488 | $bar->appendButton( 'Popup', 'config', $alt, 'index.php?option=com_config&controller=component&component='.$component.'&path='.$path, $width, $height ); | |
| 488 | $bar->appendButton( 'Popup', 'config', $alt, 'index.php?option=com_config&controller=component&component='.$component.'&path='.$path, $width, $height ); | |
| 489 | 489 | } |
| 490 | 490 | } |
| ... | ...@@ -66,5 +66,5 @@ | |
| 66 | 66 | $crypt = new JSimpleCrypt($key); |
| 67 | 67 | $str = $crypt->decrypt($str); |
| 68 | ||
| 68 | ||
| 69 | 69 | $options = array(); |
| 70 | 70 | $options['silent'] = true; |
| ... | ...@@ -21,4 +21,6 @@ | |
| 21 | 21 | CANNOT FIND SOURCE FILE=It has not been possible to locate the required source file |
| 22 | 22 | CLIENT=Client |
| 23 | COMPATIBILITY=Compatibility | |
| 24 | COMPATIBLE EXTENSION=This extension functions with Joomla! 1.5 nativly. | |
| 23 | 25 | COMPONENT MENU LINK=Component Menu Link |
| 24 | 26 | COMPONENT=Component |
| ... | ...@@ -92,4 +94,5 @@ | |
| 92 | 94 | NO FILE SELECTED=No file selected |
| 93 | 95 | NO FILENAME SPECIFIED=No filename specified |
| 96 | NOT COMPATIBLE EXTENSION=This extension does not function with Joomla! 1.5 nativly. It requires LEGACY-MODE to be ON. Please contact the extension's author. | |
| 94 | 97 | PACKAGE MANIFEST FILE INVALID OR NOT FOUND=The Package manifest file is invalid or has not been found |
| 95 | 98 | PATH DOES NOT HAVE A VALID PACKAGE=Path does not have a valid package |
| ... | ...@@ -117,4 +120,5 @@ | |
| 117 | 120 | UNINSTALL=Uninstall |
| 118 | 121 | UNINSTALLEXT=Uninstall %s %s |
| 122 | UNINSTALL LANGUAGE=If you uninstall this language, all your extensions language files for this language will be permanently deleted and cannot be used anymore! | |
| 119 | 123 | UNINSTALLLANGPUBLISHEDALREADY=Cannot remove the default language |
| 120 | 124 | UNKNOWN CLIENT TYPE=Unknown Client Type |
| ... | ...@@ -140,5 +144,5 @@ | |
| 140 | 144 | WARNFS_ERR03=Upload failed, the target directory is not writable |
| 141 | 145 | WARNFS_ERR04=Upload failed, the target directory does not exist |
| 142 | WARNINSTALLFILE=The installer cannot continue until file uploads are enabled for the server. | |
| 146 | WARNINSTALLFILE=The installer cannot continue until file uploads are enabled for the server. | |
| 143 | 147 | WARNINSTALLZLIB=The installer cannot continue until Zlib is installed. |
| 144 | 148 | WARNINSTALLUPLOADERROR=There was an error uploading this file to the server. |
| ... | ...@@ -23,9 +23,10 @@ | |
| 23 | 23 | <th class="title" width="15%"><?php echo JText::_( 'Date' ); ?></th> |
| 24 | 24 | <th class="title" width="25%"><?php echo JText::_( 'Author' ); ?></th> |
| 25 | <th class="title" width="5%"><?php echo JText::_( 'Compatibility' ); ?></th> | |
| 25 | 26 | </tr> |
| 26 | 27 | </thead> |
| 27 | 28 | <tfoot> |
| 28 | 29 | <tr> |
| 29 | <td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | 31 | </tr> |
| 31 | 32 | </tfoot> |
| ... | ...@@ -133,5 +133,6 @@ | |
| 133 | 133 | #module-status span { display: block; float: left; line-height: 16px; padding: 4px 10px 0 22px; margin-bottom: 5px; } |
| 134 | 134 | |
| 135 | #module-status .legacy-mode { background: url(../images/mini_icon.png) 3px 5px no-repeat; color: #c00;} | |
| 135 | #module-status { background: url(../images/mini_icon.png) 3px 5px no-repeat; } | |
| 136 | .legacy-mode{ color: #c00;} | |
| 136 | 137 | #module-status .preview { background: url(../images/menu/icon-16-media.png) 3px 3px no-repeat; } |
| 137 | 138 | #module-status .unread-messages, |
| ... | ...@@ -557,4 +558,5 @@ | |
| 557 | 558 | padding: 5px; |
| 558 | 559 | max-width: 200px; |
| 560 | z-index: 50; | |
| 559 | 561 | } |
| 560 | 562 |
| ... | ...@@ -2,5 +2,6 @@ | |
| 2 | 2 | <model> |
| 3 | 3 | <params> |
| 4 | <param name="target" type="list" default="0" label="Target" description="Target window when the link is clicked"> | |
| 4 | <param name="target" type="list" default="" label="Target" description="Target window when the link is clicked"> | |
| 5 | <option value="">Use Global</option> | |
| 5 | 6 | <option value="0">Parent Window With Browser Navigation</option> |
| 6 | 7 | <option value="1">New Window With Browser Navigation</option> |
| ... | ...@@ -34,5 +34,5 @@ | |
| 34 | 34 | * Set toolbar items for the page |
| 35 | 35 | */ |
| 36 | JToolBarHelper::deleteList( '', 'remove', 'Uninstall' ); | |
| 36 | JToolBarHelper::deleteList( JText::_('UNINSTALL LANGUAGE'), 'remove', 'Uninstall' ); | |
| 37 | 37 | JToolBarHelper::help( 'screen.installer2' ); |
| 38 | 38 |
| ... | ...@@ -467,4 +467,15 @@ | |
| 467 | 467 | echo $pane->endPanel(); |
| 468 | 468 | } |
| 469 | ||
| 470 | ||
| 471 | if ($p->getNumParams('other')) { | |
| 472 | echo $pane->startPanel(JText :: _('Other Parameters'), "other-page"); | |
| 473 | if($params = $p->render('params', 'other')) : | |
| 474 | echo $params; | |
| 475 | else : | |
| 476 | echo "<div style=\"text-align: center; padding: 5px; \">".JText::_('There are no other parameters for this item')."</div>"; | |
| 477 | endif; | |
| 478 | echo $pane->endPanel(); | |
| 479 | } | |
| 469 | 480 | echo $pane->endPane(); |
| 470 | 481 | ?> |
| ... | ...@@ -32,5 +32,5 @@ | |
| 32 | 32 | function showContent( &$rows, &$lists, $page, $redirect ) |
| 33 | 33 | { |
| 34 | ||
| 34 | ||
| 35 | 35 | global $mainframe; |
| 36 | 36 |
| ... | ...@@ -72,5 +72,5 @@ | |
| 72 | 72 | JToolBarHelper::custom( 'doCopyMenu', 'copy.png', 'copy_f2.png', 'Copy', false ); |
| 73 | 73 | JToolBarHelper::cancel(); |
| 74 | JToolBarHelper::help( 'screen.menumanager.copy' ); | |
| 74 | JToolBarHelper::help( 'screen.menumanager' ); | |
| 75 | 75 | |
| 76 | 76 | $document = & JFactory::getDocument(); |
| ... | ...@@ -6,5 +6,5 @@ | |
| 6 | 6 | </td> |
| 7 | 7 | <td><?php echo $this->item->folder; ?></td> |
| 8 | <td align="center"><?php echo @$this->item->version != '' ? $this->item->version : ' '; ?></td> | |
| 8 | <td align="center" <?php if(@$this->item->legacy) echo 'class="legacy-mode"'; ?>><?php echo @$this->item->version != '' ? $this->item->version : ' '; ?></td> | |
| 9 | 9 | <td><?php echo @$this->item->creationdate != '' ? $this->item->creationdate : ' '; ?></td> |
| 10 | 10 | <td> |
| ... | ...@@ -13,3 +13,8 @@ | |
| 13 | 13 | </span> |
| 14 | 14 | </td> |
| 15 | <td align="center"> | |
| 16 | <span class="editlinktip hasTip" title="<?php echo (@$this->item->legacy ? JText::_( 'Not Compatible Extension') : JText::_('Compatible Extension'));?>"> | |
| 17 | <img src="images/<?php echo (@$this->item->legacy ? 'publish_x.png' : 'tick.png');?>"/> | |
| 18 | </span> | |
| 19 | </td> | |
| 15 | 20 | </tr> |
| ... | ...@@ -31,5 +31,5 @@ | |
| 31 | 31 | { |
| 32 | 32 | global $mainframe; |
| 33 | ||
| 33 | ||
| 34 | 34 | $config =& JComponentHelper::getParams('com_media'); |
| 35 | 35 |
| ... | ...@@ -98,5 +98,5 @@ | |
| 98 | 98 | $user =& JFactory::getUser($username); |
| 99 | 99 | plgXMLRPCBloggerHelper::getUserAid( $user ); |
| 100 | ||
| 100 | ||
| 101 | 101 | // Handle the access permissions part of the main database query |
| 102 | 102 | if ($user->authorize('com_content', 'edit', 'content', 'all')) { |
| ... | ...@@ -178,5 +178,5 @@ | |
| 178 | 178 | $publishedWhere = ' AND u.published = 1 AND b.published = 1'; |
| 179 | 179 | } |
| 180 | ||
| 180 | ||
| 181 | 181 | $nullDate = $db->getNullDate(); |
| 182 | 182 | $date =& JFactory::getDate(); |
| ... | ...@@ -207,5 +207,5 @@ | |
| 207 | 207 | return new xmlrpcresp(0, $xmlrpcerruser+2, JText::_("Access Denied")); |
| 208 | 208 | } |
| 209 | ||
| 209 | ||
| 210 | 210 | $content = '<title>'.$item->title.'</title>'; |
| 211 | 211 | $content .= $item->introtext.'<more_text>'.$item->ftext.'</more_text>'; |
| ... | ...@@ -302,5 +302,5 @@ | |
| 302 | 302 | $user =& JFactory::getUser($username); |
| 303 | 303 | plgXMLRPCBloggerHelper::getUserAid( $user ); |
| 304 | ||
| 304 | ||
| 305 | 305 | // Create a user access object for the user |
| 306 | 306 | $access = new stdClass(); |
| ... | ...@@ -358,5 +358,5 @@ | |
| 358 | 358 | $user =& JFactory::getUser($username); |
| 359 | 359 | plgXMLRPCBloggerHelper::getUserAid( $user ); |
| 360 | ||
| 360 | ||
| 361 | 361 | if ($user->get('gid') < 23) { |
| 362 | 362 | return new xmlrpcresp(0, $xmlrpcerruser+1, JText::_('ALERTNOTAUTH')); |
| ... | ...@@ -403,5 +403,5 @@ | |
| 403 | 403 | $user =& JFactory::getUser($username); |
| 404 | 404 | plgXMLRPCBloggerHelper::getUserAid( $user ); |
| 405 | ||
| 405 | ||
| 406 | 406 | // load plugin params info |
| 407 | 407 | $plugin =& JPluginHelper::getPlugin('xmlrpc','blogger'); |
| ... | ...@@ -425,5 +425,5 @@ | |
| 425 | 425 | . ' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'; |
| 426 | 426 | } |
| 427 | ||
| 427 | ||
| 428 | 428 | $query = 'SELECT a.title AS title,' |
| 429 | 429 | . ' a.created AS created,' |
| ... | ...@@ -442,5 +442,5 @@ | |
| 442 | 442 | . $publishTimeWhere |
| 443 | 443 | ; |
| 444 | ||
| 444 | ||
| 445 | 445 | $db->setQuery($query, 0, $numposts); |
| 446 | 446 | $items = $db->loadObjectList(); |
| ... | ...@@ -475,5 +475,5 @@ | |
| 475 | 475 | function setTemplate($appkey, $blogid, $username, $password, $template, $templateType) |
| 476 | 476 | { |
| 477 | global $xmlrpcerruser; | |
| 477 | global $xmlrpcerruser; | |
| 478 | 478 | return new xmlrpcresp(0, $xmlrpcerruser+1, JText::_('Method not implemented') ); |
| 479 | 479 | } |
| ... | ...@@ -499,5 +499,5 @@ | |
| 499 | 499 | } |
| 500 | 500 | } |
| 501 | ||
| 501 | ||
| 502 | 502 | function authenticateUser($username, $password) |
| 503 | 503 | { |
| ... | ...@@ -10,5 +10,5 @@ | |
| 10 | 10 | <option value="1">Yes</option> |
| 11 | 11 | </param> |
| 12 | <param name="pageclass_sfx" type="text" size="20" default="" label="Page Class Suffix" description="PARAMPAGECLASSSFX" /> | |
| 12 | <param name="pageclass_sfx" type="text" size="20" default="" label="Page Class Suffix" description="PARAMPAGECLASSSFX" /> | |
| 13 | 13 | <param name="@spacer" type="spacer" default="" label="" description="" /> |
| 14 | 14 | <param name="menu_image" type="imagelist" directory="/images/stories" hide_default="1" default="" label="Menu Image" description="PARAMMENUIMAGE" /> |
| ... | ...@@ -23,9 +23,10 @@ | |
| 23 | 23 | <th class="title" width="15%"><?php echo JText::_( 'Date' ); ?></th> |
| 24 | 24 | <th class="title" width="25%"><?php echo JText::_( 'Author' ); ?></th> |
| 25 | <th class="title" width="5%"><?php echo JText::_( 'Compatibility' ); ?></th> | |
| 25 | 26 | </tr> |
| 26 | 27 | </thead> |
| 27 | 28 | <tfoot> |
| 28 | 29 | <tr> |
| 29 | <td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 30 | 31 | </tr> |
| 31 | 32 | </tfoot> |
| ... | ...@@ -18,9 +18,10 @@ | |
| 18 | 18 | <th class="title" width="15%"><?php echo JText::_( 'Date' ); ?></th> |
| 19 | 19 | <th class="title" width="25%"><?php echo JText::_( 'Author' ); ?></th> |
| 20 | <th class="title" width="5%"><?php echo JText::_( 'Compatibility' ); ?></th> | |
| 20 | 21 | </tr> |
| 21 | 22 | </thead> |
| 22 | 23 | <tfoot> |
| 23 | 24 | <tr> |
| 24 | <td colspan="6"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 25 | <td colspan="7"><?php echo $this->pagination->getListFooter(); ?></td> | |
| 25 | 26 | </tr> |
| 26 | 27 | </tfoot> |
| ... | ...@@ -106,5 +106,5 @@ | |
| 106 | 106 | return $this->execute('edit'); |
| 107 | 107 | } |
| 108 | ||
| 108 | ||
| 109 | 109 | $objectID = $acl->get_object_id( 'users', $user->get('id'), 'ARO' ); |
| 110 | 110 | $groups = $acl->get_object_groups( $objectID, 'ARO' ); |
| ... | ...@@ -1,8 +1,8 @@ | |
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | * @version $Id$ | |
| 4 | * @package Joomla | |
| 5 | * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. | |
| 6 | * @license GNU/GPL, see LICENSE.php | |
| 3 | * @version $Id$ | |
| 4 | * @package oomla | |
| 5 | * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. | |
| 6 | * @license GNU/GPL, see LICENSE.php | |
| 7 | 7 | * Joomla! is free software. This version may have been modified pursuant |
| 8 | 8 | * to the GNU General Public License, and as distributed it includes or |
| ... | ...@@ -28,8 +28,8 @@ | |
| 28 | 28 | function plgContentEmailCloak(&$row, &$params, $page=0) |
| 29 | 29 | { |
| 30 | if (is_object($row)) { | |
| 31 | return plgEmailCloak($row->text, $params); | |
| 32 | } | |
| 33 | return plgEmailCloak($row, $params); | |
| 30 | if (is_object($row)) { | |
| 31 | return plgEmailCloak($row->text, $params); | |
| 32 | } | |
| 33 | return plgEmailCloak($row, $params); | |
| 34 | 34 | } |
| 35 | 35 | |
| ... | ...@@ -43,9 +43,9 @@ | |
| 43 | 43 | */ |
| 44 | 44 | function plgContentEmailCloak_searchPattern ($link, $text) { |
| 45 | // <a href="mailto:anyLink">anyText</a> | |
| 46 | $pattern = '~(?:<a [\w "\'=\@\.\-]*href\s*=\s*"mailto:' | |
| 47 | . $link . '"[\w "\'=\@\.\-]*)>' . $text . '</a>~i'; | |
| 45 | // <a href="mailto:anyLink">anyText</a> | |
| 46 | $pattern = '~(?:<a [\w "\'=\@\.\-]*href\s*=\s*"mailto:' | |
| 47 | . $link . '"[\w "\'=\@\.\-]*)>' . $text . '</a>~i'; | |
| 48 | 48 | |
| 49 | return $pattern; | |
| 49 | return $pattern; | |
| 50 | 50 | } |
| 51 | 51 | |
| ... | ...@@ -60,106 +60,107 @@ | |
| 60 | 60 | function plgEmailCloak(&$text, &$params) |
| 61 | 61 | { |
| 62 | // Simple performance check to determine whether bot should process further. | |
| 63 | if (JString::strpos($text, '@') === false) { | |
| 64 | return true; | |
| 65 | } | |
| 66 | ||
| 67 | $plugin = & JPluginHelper::getPlugin('content', 'emailcloak'); | |
| 68 | ||
| 69 | /* | |
| 70 | * Check for presence of {emailcloak=off} which is explicits disables this | |
| 71 | * bot for the item. | |
| 72 | */ | |
| 73 | if (! JString::strpos($text, '{emailcloak=off}') === false) { | |
| 74 | $text = JString::str_ireplace('{emailcloak=off}', '', $text); | |
| 75 | return true; | |
| 76 | } | |
| 77 | ||
| 78 | // Load plugin params info | |
| 79 | $pluginParams = new JParameter($plugin->params); | |
| 80 | $mode = $pluginParams->def('mode', 1); | |
| 81 | ||
| 82 | // any@email.address.com | |
| 83 | $searchEmail = '([\w\.\-]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-z0-9\-]{2,4}))'; | |
| 84 | // any@email.address.com?subject=anyText | |
| 85 | $searchEmailLink = $searchEmail . '([?&][\x20-\x7f][^"<>]+)'; | |
| 86 | // anyText | |
| 87 | $searchText = '([\x20-\x7f][^<>]+)'; | |
| 88 | ||
| 89 | /* | |
| 90 | * Search for derivatives of link code <a href="mailto:email@amail.com" | |
| 91 | * >email@amail.com</a> | |
| 92 | */ | |
| 93 | $pattern = plgContentEmailCloak_searchPattern($searchEmail, $searchEmail); | |
| 94 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 95 | $mail = $regs[1][0]; | |
| 96 | $mailText = $regs[2][0]; | |
| 97 | ||
| 98 | // Check to see if mail text is different from mail addy | |
| 99 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText); | |
| 100 | ||
| 101 | // Replace the found address with the js cloaked email | |
| 102 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 103 | } | |
| 104 | ||
| 105 | /* | |
| 106 | * Search for derivatives of link code <a href="mailto:email@amail.com"> | |
| 107 | * anytext</a> | |
| 108 | */ | |
| 109 | $pattern = plgContentEmailCloak_searchPattern($searchEmail, $searchText); | |
| 110 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 111 | $mail = $regs[1][0]; | |
| 112 | $mailText = $regs[2][0]; | |
| 113 | ||
| 114 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText, 0); | |
| 115 | ||
| 116 | // Replace the found address with the js cloaked email | |
| 117 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 118 | } | |
| 119 | ||
| 120 | /* | |
| 121 | * Search for derivatives of link code <a href="mailto:email@amail.com? | |
| 122 | * subject=Text">email@amail.com</a> | |
| 123 | */ | |
| 124 | $pattern = plgContentEmailCloak_searchPattern($searchEmailLink, $searchEmail); | |
| 125 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 126 | $mail = $regs[1][0] . $regs[2][0]; | |
| 127 | $mailText = $regs[3][0]; | |
| 128 | // Needed for handling of Body parameter | |
| 129 | $mail = str_replace( '&', '&', $mail ); | |
| 130 | ||
| 131 | // Check to see if mail text is different from mail addy | |
| 132 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText); | |
| 133 | ||
| 134 | // Replace the found address with the js cloaked email | |
| 135 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 136 | } | |
| 137 | ||
| 138 | /* | |
| 139 | * Search for derivatives of link code <a href="mailto:email@amail.com? | |
| 140 | * subject=Text">anytext</a> | |
| 141 | */ | |
| 142 | $pattern = plgContentEmailCloak_searchPattern($searchEmailLink, $searchText); | |
| 143 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 144 | $mail = $regs[1][0] . $regs[2][0]; | |
| 145 | $mailText = $regs[3][0]; | |
| 146 | // Needed for handling of Body parameter | |
| 147 | $mail = str_replace('&', '&', $mail); | |
| 148 | ||
| 149 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText, 0); | |
| 150 | ||
| 151 | // Replace the found address with the js cloaked email | |
| 152 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 153 | } | |
| 154 | ||
| 155 | // Search for plain text email@amail.com | |
| 156 | $pattern = '~' . $searchEmail . '([^a-z0-9]|$)~i'; | |
| 157 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 158 | $mail = $regs[1][0]; | |
| 159 | $replacement = JHTML::_('email.cloak', $mail, $mode); | |
| 160 | ||
| 161 | // Replace the found address with the js cloaked email | |
| 162 | $text = substr_replace($text, $replacement, $regs[1][1], strlen($mail)); | |
| 163 | } | |
| 164 | return true; | |
| 62 | ||
| 63 | /* | |
| 64 | * Check for presence of {emailcloak=off} which is explicits disables this | |
| 65 | * bot for the item. | |
| 66 | */ | |
| 67 | if (JString::strpos($text, '{emailcloak=off}') !== false) { | |
| 68 | $text = JString::str_ireplace('{emailcloak=off}', '', $text); | |
| 69 | return true; | |
| 70 | } | |
| 71 | ||
| 72 | // Simple performance check to determine whether bot should process further. | |
| 73 | if (JString::strpos($text, '@') === false) { | |
| 74 | return true; | |
| 75 | } | |
| 76 | ||
| 77 | $plugin = & JPluginHelper::getPlugin('content', 'emailcloak'); | |
| 78 | ||
| 79 | // Load plugin params info | |
| 80 | $pluginParams = new JParameter($plugin->params); | |
| 81 | $mode = $pluginParams->def('mode', 1); | |
| 82 | ||
| 83 | // any@email.address.com | |
| 84 | $searchEmail = '([\w\.\-]+\@(?:[a-z0-9\.\-]+\.)+(?:[a-z0-9\-]{2,4}))'; | |
| 85 | // any@email.address.com?subject=anyText | |
| 86 | $searchEmailLink = $searchEmail . '([?&][\x20-\x7f][^"<>]+)'; | |
| 87 | // anyText | |
| 88 | $searchText = '([\x20-\x7f][^<>]+)'; | |
| 89 | ||
| 90 | /* | |
| 91 | * Search for derivatives of link code <a href="mailto:email@amail.com" | |
| 92 | * >email@amail.com</a> | |
| 93 | */ | |
| 94 | $pattern = plgContentEmailCloak_searchPattern($searchEmail, $searchEmail); | |
| 95 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 96 | $mail = $regs[1][0]; | |
| 97 | $mailText = $regs[2][0]; | |
| 98 | ||
| 99 | // Check to see if mail text is different from mail addy | |
| 100 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText); | |
| 101 | ||
| 102 | // Replace the found address with the js cloaked email | |
| 103 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 104 | } | |
| 105 | ||
| 106 | /* | |
| 107 | * Search for derivatives of link code <a href="mailto:email@amail.com"> | |
| 108 | * anytext</a> | |
| 109 | */ | |
| 110 | $pattern = plgContentEmailCloak_searchPattern($searchEmail, $searchText); | |
| 111 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 112 | $mail = $regs[1][0]; | |
| 113 | $mailText = $regs[2][0]; | |
| 114 | ||
| 115 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText, 0); | |
| 116 | ||
| 117 | // Replace the found address with the js cloaked email | |
| 118 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 119 | } | |
| 120 | ||
| 121 | /* | |
| 122 | * Search for derivatives of link code <a href="mailto:email@amail.com? | |
| 123 | * subject=Text">email@amail.com</a> | |
| 124 | */ | |
| 125 | $pattern = plgContentEmailCloak_searchPattern($searchEmailLink, $searchEmail); | |
| 126 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 127 | $mail = $regs[1][0] . $regs[2][0]; | |
| 128 | $mailText = $regs[3][0]; | |
| 129 | // Needed for handling of Body parameter | |
| 130 | $mail = str_replace( '&', '&', $mail ); | |
| 131 | ||
| 132 | // Check to see if mail text is different from mail addy | |
| 133 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText); | |
| 134 | ||
| 135 | // Replace the found address with the js cloaked email | |
| 136 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 137 | } | |
| 138 | ||
| 139 | /* | |
| 140 | * Search for derivatives of link code <a href="mailto:email@amail.com? | |
| 141 | * subject=Text">anytext</a> | |
| 142 | */ | |
| 143 | $pattern = plgContentEmailCloak_searchPattern($searchEmailLink, $searchText); | |
| 144 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 145 | $mail = $regs[1][0] . $regs[2][0]; | |
| 146 | $mailText = $regs[3][0]; | |
| 147 | // Needed for handling of Body parameter | |
| 148 | $mail = str_replace('&', '&', $mail); | |
| 149 | ||
| 150 | $replacement = JHTML::_('email.cloak', $mail, $mode, $mailText, 0); | |
| 151 | ||
| 152 | // Replace the found address with the js cloaked email | |
| 153 | $text = substr_replace($text, $replacement, $regs[0][1], strlen($regs[0][0])); | |
| 154 | } | |
| 155 | ||
| 156 | // Search for plain text email@amail.com | |
| 157 | $pattern = '~' . $searchEmail . '([^a-z0-9]|$)~i'; | |
| 158 | while (preg_match($pattern, $text, $regs, PREG_OFFSET_CAPTURE)) { | |
| 159 | $mail = $regs[1][0]; | |
| 160 |