You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <luc...@us...> - 2013-10-01 22:49:53
|
Revision: 12117
http://sourceforge.net/p/xoops/svn/12117
Author: luciorota
Date: 2013-10-01 22:49:50 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
fixed autosummary error in multilanguage (using xlanguages module) contests, i hope ;-)
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-01 20:23:34 UTC (rev 12116)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-01 22:49:50 UTC (rev 12117)
@@ -242,7 +242,15 @@
($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_IFBLANK && empty($summary))) {
// generate autosummary
$maxSummaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
- $download['summary'] = $this->getVar('description');
+
+ if (wfdownloads_checkModule('xlanguage')) {
+ global $xlanguage;
+ include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
+ include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
+ $download['summary'] = xlanguage_ml($this->getVar('description'));
+ } else {
+ $download['summary'] = $this->getVar('description');
+ }
if (strlen($download['summary']) > $maxSummaryLength) {
$download['summary'] = wfdownloads_truncateHtml($download['summary'], $maxSummaryLength, '...', false, true);
} else {
@@ -255,11 +263,11 @@
$download['description'] = $this->getVar('description'); //no html
$download['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFDOWNLOADS_PRICEFREE;
$limitationsArray = $this->wfdownloads->getConfig('limitations');
- $download['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
+ $download['limitations'] = ($this->getVar('limitations') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
$versiontypesArray = $this->wfdownloads->getConfig('versiontypes');
- $download['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
+ $download['versiontypes'] = ($this->getVar('versionypes') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
$licenseArray = $this->wfdownloads->getConfig('license');
- $download['license'] = ($this->getVar('license')=="") ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
+ $download['license'] = ($this->getVar('license') == '') ? _MD_WFDOWNLOADS_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
$download['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
$publisher = $this->getVar('publisher');
if (!empty($publisher)) {
|
|
From: <be...@us...> - 2013-10-01 20:23:36
|
Revision: 12116
http://sourceforge.net/p/xoops/svn/12116
Author: beckmi
Date: 2013-10-01 20:23:34 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
Setting minimum PHP version at 5.3.7
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/functions.php
XoopsCore/branches/2.5.x/2.5.7/release_notes.txt
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-10-01 20:19:32 UTC (rev 12115)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-10-01 20:23:34 UTC (rev 12116)
@@ -37,6 +37,7 @@
- bug in commentrenderer.php (Roby73/irmtfan)
- added missing info about new language constants in Fast Comments (irmtfan/mamba)
- fixed Undefined index: uid in file /modules/profile/userinfo.php line 24 (cesag/mamba)
+- set minimum PHP version to 5.3.7
Security fixes
- XSS issues reported by Mehdi Dadkhah (rgriffith)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/functions.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/functions.php 2013-10-01 20:19:32 UTC (rev 12115)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/install/include/functions.php 2013-10-01 20:23:34 UTC (rev 12116)
@@ -145,9 +145,9 @@
function xoPhpVersion()
{
- if (version_compare(phpversion(), '5.2.0', '>=')) {
+ if (version_compare(phpversion(), '5.3.7', '>=')) {
return xoDiag(1, phpversion());
- } else if (version_compare(phpversion(), '5.1.0', '>=')) {
+ } elseif (version_compare(phpversion(), '5.3.0', '>=')) {
return xoDiag(0, phpversion());
} else {
return xoDiag(-1, phpversion());
Modified: XoopsCore/branches/2.5.x/2.5.7/release_notes.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/release_notes.txt 2013-10-01 20:19:32 UTC (rev 12115)
+++ XoopsCore/branches/2.5.x/2.5.7/release_notes.txt 2013-10-01 20:23:34 UTC (rev 12116)
@@ -1,8 +1,8 @@
-XOOPS 2.5.6 Final
+XOOPS 2.5.7 Beta 1
-The XOOPS Development Team is pleased to announce the release of XOOPS 2.5.6 Final.
+The XOOPS Development Team is pleased to announce the release of XOOPS 2.5.7 Beta 1.
-This release is focused on making XOOPS 2.5.6 compatible with PHP 5.4.x, and on security enhancements
+This release is focused on making XOOPS 2.5.7 compatible with PHP 5.5.x, and on security enhancements
See the Changelog for more details.
@@ -10,7 +10,7 @@
-----------------------------------
PHP:
-Any PHP version >= 5.2 (PHP 5.3+ is strongly recommended)
+Any PHP version >= 5.3.7 (PHP 5.4+ is strongly recommended)
MySQL:
MySQL server 5.0+
|
|
From: <luc...@us...> - 2013-10-01 20:19:35
|
Revision: 12115
http://sourceforge.net/p/xoops/svn/12115
Author: luciorota
Date: 2013-10-01 20:19:32 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
Notice: Undefined variable: summaryLength in file /modules/wfdownloads/class/download.php line 247
fixed
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-01 17:11:18 UTC (rev 12114)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-10-01 20:19:32 UTC (rev 12115)
@@ -244,7 +244,7 @@
$maxSummaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
$download['summary'] = $this->getVar('description');
if (strlen($download['summary']) > $maxSummaryLength) {
- $download['summary'] = wfdownloads_truncateHtml($download['summary'], $summaryLength, '...', false, true);
+ $download['summary'] = wfdownloads_truncateHtml($download['summary'], $maxSummaryLength, '...', false, true);
} else {
// NOP
}
|
|
From: <dj...@us...> - 2013-10-01 17:11:23
|
Revision: 12114
http://sourceforge.net/p/xoops/svn/12114
Author: djculex
Date: 2013-10-01 17:11:18 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
NEW : When entering admin automaticly rename user avatars set as blank.gif to void.
NEW : Parsing array from walls in respective classes clearing multible lines of code
NEW : smallworld_referer to return after various pages
NEW : Count all msg in wall
BUG : Mysql error in ALTER table comments from varchar to text
BUG : School start/stop displayed wrong.
BUG : User avatars displayed void if blank. No shows default gender / no-gender user avatar
BUG : User gallery opening in new tab / window. Now direct to _self instead of _SELF (?)
BUG : Error in smallworld_getAvatarLink($userid, $image); Condition changed from || to &&
BUG : comment_ajax. Condition changed from AND to OR if admin or owner of comment. Permission added to condition correctly.
BUG : In edit profile education start/stop displays correct data (date function not needed in this case).
BUG : In gallery only displays if visitor is a friend or admin.
BUG : Heavy code cleanup -> re-arranging to make use of classes / functions.
BUG : Only allow friends to view profile.
BUG : User posts not showing correctly to friends/followers OR admin.
BUG : jquery.history.js added to code to show hidden iframe in IE correctly.
BUG : After accepting friend request force reload of page to show new friend posts.
BUG : After closing gallery return to refer-page.
BUG : In smallworld.js -> tagging. If @ is followed by /s then close autocomplete indicating email or other. ((this).autocomplete( "close" );)
BUG : When tagging autocomplete is attached after single @ not @@@ (wow strange error)
BUG : Removed test alert() OR console.logs used for testing.
BUG : In friendpage show only gallery menu items for friends.
BUG : Show only wall container if num of messages > 0. [smarty error]
BUG : Rename selector (gave issue with TDMPicture) [mamba]
Modified Paths:
--------------
XoopsModules/smallworld/trunk/smallworld/admin/upgrade.php
XoopsModules/smallworld/trunk/smallworld/class/db.php
XoopsModules/smallworld/trunk/smallworld/class/publicWall.php
XoopsModules/smallworld/trunk/smallworld/class/wall.php
XoopsModules/smallworld/trunk/smallworld/comment_ajax.php
XoopsModules/smallworld/trunk/smallworld/css/smallworld.css
XoopsModules/smallworld/trunk/smallworld/editprofile.php
XoopsModules/smallworld/trunk/smallworld/galleryshow.php
XoopsModules/smallworld/trunk/smallworld/include/functions.php
XoopsModules/smallworld/trunk/smallworld/index.php
XoopsModules/smallworld/trunk/smallworld/js/jquery.history.js
XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
XoopsModules/smallworld/trunk/smallworld/language/english/main.php
XoopsModules/smallworld/trunk/smallworld/loadmore.php
XoopsModules/smallworld/trunk/smallworld/message_ajax.php
XoopsModules/smallworld/trunk/smallworld/permalink.php
XoopsModules/smallworld/trunk/smallworld/publicindex.php
XoopsModules/smallworld/trunk/smallworld/templates/smallworld_friends_template.html
XoopsModules/smallworld/trunk/smallworld/templates/smallworld_galleryshow.html
XoopsModules/smallworld/trunk/smallworld/templates/smallworld_publicindex.html
XoopsModules/smallworld/trunk/smallworld/templates/smallworld_userprofile_template.html
XoopsModules/smallworld/trunk/smallworld/userprofile.php
Modified: XoopsModules/smallworld/trunk/smallworld/admin/upgrade.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/admin/upgrade.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/admin/upgrade.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -8,6 +8,7 @@
global $xoopsDB, $xoopsUser;
varcharToBlog ();
smallworld_comToBlog ();
+ smallworld_adminAvatarRename ();
if (smallworld_DoTableExists($xoopsDB->prefix('smallworld_settings'))) {
// Table exists
Return false;
@@ -24,6 +25,14 @@
}
}
+function smallworld_adminAvatarRename () {
+ global $xoopsDB;
+ $sql = "update ".$xoopsDB->prefix('smallworld_admin')." set userimage = '' WHERE userimage = 'blank.gif' || userimage NOT REGEXP '\.(jpe?g|gif|png|bmp)'";
+ $sql2 = "update ".$xoopsDB->prefix('smallworld_user')." set userimage = '' WHERE userimage = 'blank.gif' || userimage NOT REGEXP '\.(jpe?g|gif|png|bmp)'";
+ $result = $xoopsDB->queryF($sql);
+ $result2 = $xoopsDB->queryF($sql2);
+}
+
function smallworld_DoTableExists($tablename) {
global $xoopsDB;
$result = $xoopsDB->queryF("SHOW TABLES LIKE '$tablename'");
@@ -46,7 +55,7 @@
*/
function smallworld_comToBlog () {
global $xoopsDB;
- $sql ="ALTER TABLE ".$xoopsDB->prefix('smallworld_comments')." CHANGE 'comments' 'comments' TEXT";
+ $sql ="ALTER TABLE ".$xoopsDB->prefix('smallworld_comments')." CHANGE comment comment TEXT";
$result = $xoopsDB->queryF($sql);
}
?>
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/class/db.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/class/db.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/class/db.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -77,8 +77,8 @@
while ($start<=$end) {
$msg[$start]['school_type'] = $school_type[$start];
$msg[$start]['school'] = $arr7[$school[$start]];
- $msg[$start]['schoolstart'] = date('Y', $schoolstart[$start]);
- $msg[$start]['schoolstop'] = date('Y', $schoolstop[$start]);
+ $msg[$start]['schoolstart'] = $schoolstart[$start];
+ $msg[$start]['schoolstop'] = $schoolstop[$start];
$start++;
}
return $msg;
@@ -241,15 +241,14 @@
$aboutme = Smallworld_sanitize($_POST['aboutme']);
$school_type = Smallworld_sanitize(serialize($_POST['school_type']));
$school = Smallworld_sanitize(serialize($_POST['school']));
- $schoolstart = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['schoolstart'])));
- $schoolstop = Smallworld_sanitize(serialize(Smallworld_DateOfArray ($_POST['schoolstop'])));
+ $schoolstart = Smallworld_sanitize(serialize($_POST['schoolstart']));
+ $schoolstop = Smallworld_sanitize(serialize($_POST['schoolstop']));
$jobemployer = Smallworld_sanitize(serialize($_POST['employer']));
$jobposition = Smallworld_sanitize(serialize($_POST['position']));
$jobstart = Smallworld_sanitize(serialize(Smallworld_YearOfArray ($_POST['jobstart'])));
$jobstop = Smallworld_sanitize(serialize(Smallworld_YearOfArray ($_POST['jobstop'])));
$jobdescription = Smallworld_sanitize(serialize($_POST['description']));
-
$sql = '';
if ($_POST['function']=='edit') {
Modified: XoopsModules/smallworld/trunk/smallworld/class/publicWall.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/class/publicWall.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/class/publicWall.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -151,6 +151,12 @@
$image = $r['userimage'];
}
+ if ($image == 'blank.gif') {
+ $image = smallworld_getAvatarLink($uid, $image);
+ }
+
+ //$image = ($image == '' || $image == 'blank.gif') ? smallworld_getAvatarLink($uid, $image) : $image;
+
$type = Array(
1 => 'jpg',
2 => 'jpeg',
@@ -345,6 +351,147 @@
}
return $text;
}
-
+
+ /**
+ * @Parse update and comments array to template for public updates
+ * @param array $updatesarray
+ * @param int $id
+ * @param string $permalink
+ * @return void
+ */
+ function ParsePubArray ($updatesarray, $id)
+ {
+ global $xoopsUser, $xoopsTpl, $tpl, $xoopsModule, $xoopsTpl, $xoopsConfig;
+
+ $check = new SmallWorldUser;
+ $dBase = new SmallWorldDB;
+ $profile = ($xoopsUser) ? $check->checkIfProfile($id) : 0;
+ $module_handler =& xoops_gethandler('module');
+ $module = $module_handler->getByDirname('smallworld');
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+
+ $myavatar = $this->Gravatar($id);
+ $myavatarlink = smallworld_getAvatarLink($id, $myavatar);
+ $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink);
+ $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 100);
+ $user_img = "<img src='".smallworld_getAvatarLink($id, $myavatar)."' id='smallworld_user_img' ".$myavatar_highwide."/>";
+
+ $xoopsTpl->assign('myavatar',$myavatar);
+ $xoopsTpl->assign('myavatarlink',$myavatarlink);
+ $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide);
+ $xoopsTpl->assign('avatar', $user_img);
+
+ if (!empty($updatesarray)) {
+ foreach ($updatesarray as $data) {
+
+ // Is update's user a friend ?
+ $frU = $check->friendcheck($id,$data['uid_fk']);
+
+ $USW = array();
+ $USW['posts'] = 0;
+ $USW['comments'] = 0;
+
+ if ($xoopsUser) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $data['uid_fk'] == $id) {
+ $USW['posts'] = 1;
+ $USW['comments'] = 1;
+ $frU[0] = 2;
+ } else {
+ $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
+ }
+ }
+
+ if (!$xoopsUser) {
+ $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
+ }
+
+ $wm['msg_id'] = $data['msg_id'];
+ $wm['orimessage'] = ($USW['posts'] == 1 || $profile >= 2) ?
+ str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])):'';
+ $wm['message'] = ($USW['posts'] == 1 || $profile >= 2) ?
+ smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']):_SMALLWORLD_MESSAGE_PRIVSETPOSTS;
+ $wm['message'] = Smallworld_cleanup($wm['message']);
+ $wm['created'] = smallworld_time_stamp($data['created']);
+ $wm['username'] = $data['username'];
+ $wm['uid_fk'] = $data['uid_fk'];
+ $wm['priv'] = $data['priv'];
+ $wm['avatar'] = $this->Gravatar($data['uid_fk']);
+ $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']);
+ $wm['avatar_size'] = smallworld_getImageSize(80, 100, $wm['avatar_link']);
+ $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50);
+ $wm['vote_up'] = $this->countVotes ('msg', 'up', $data['msg_id']);
+ $wm['vote_down'] = $this->countVotes ('msg', 'down', $data['msg_id']);
+ $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk'];
+ $wm['sharelinkurl'] .= "&updid=".$data['msg_id']."";
+ $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename'];
+ if ($USW['posts'] == 1 || $profile >= 2) {
+ $wm['sharelink'] = $this->GetSharing ($wm['msg_id'],$wm['priv']);
+ } else {
+ $wm['sharelink'] = $this->GetSharing ($wm['msg_id'],1);
+ }
+
+ if ($USW['posts'] == 1 || $profile >= 2) {
+ $wm['sharediv'] = $this->GetSharingDiv ($wm['msg_id'],$wm['priv'], $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
+ } else {
+ $wm['sharediv'] = $this->GetSharingDiv ($wm['msg_id'],1, $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
+ }
+ $wm['linkimage'] = XOOPS_URL."/modules/smallworld/images/link.png";
+ $wm['permalink'] = XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']."&updid=".$data['msg_id'];
+ $wm['commentsarray'] = $this->Comments($data['msg_id']);
+
+ if ($frU[0] == 2 || $USW['posts'] == 1) {
+ $xoopsTpl->append('walldata', $wm);
+ }
+
+ if (!empty($wm['commentsarray'])){
+ foreach($wm['commentsarray'] as $cdata) {
+ // Is commentuser a friend ?
+ $frC = $check->friendcheck($id,$cdata['uid_fk']);
+
+ $USC = array();
+ $USC['posts'] = 0;
+ $USC['comments'] = 0;
+
+ if ($xoopsUser) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $cdata['uid_fk'] == $id) {
+ $USC['posts'] = 1;
+ $USC['comments'] = 1;
+ $frC[0] = 2;
+ } else {
+ $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
+ }
+ }
+
+ if (!$xoopsUser) {
+ $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
+ }
+
+ $wc['msg_id_fk'] = $cdata['msg_id_fk'];
+ $wc['com_id'] = $cdata['com_id'];
+ $wc['comment'] = ($USC['comments'] == 1 || $profile >= 2) ?
+ smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']):
+ _SMALLWORLD_MESSAGE_PRIVSETCOMMENTS;
+ $wc['comment'] = Smallworld_cleanup($wc['comment']);
+ $wc['time'] = smallworld_time_stamp($cdata['created']);
+ $wc['username'] = $cdata['username'];
+ $wc['uid'] = $cdata['uid_fk'];
+ $wc['myavatar'] = $this->Gravatar($id);
+ $wc['myavatar_link'] = $myavatarlink;
+ $wc['avatar_size'] = smallworld_getImageSize(80, 100, $wc['myavatar_link']);
+ $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35);
+ $wc['cface'] = $this->Gravatar($cdata['uid_fk']);
+ $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']);
+ $wc['vote_up'] = $this->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']);
+ $wc['vote_down'] = $this->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']);
+
+ if ($frC[0] == 2 || $USC['comments'] == 1) {
+ $xoopsTpl->append('comm', $wc);
+ }
+ }
+ }
+ }
+ }
+ }
}
?>
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/class/wall.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/class/wall.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/class/wall.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -140,7 +140,7 @@
$image = $r['userimage'];
}
- $image = ($image == '') ? smallworld_getAvatarLink($uid, $image) : $image;
+ $image = ($image == '' || $image == 'blank.gif') ? smallworld_getAvatarLink($uid, $image) : $image;
$type = Array(
1 => 'jpg',
@@ -436,5 +436,144 @@
return $text;
}
+ /**
+ * @Parse update and comments array to template for public updates
+ * @param array $updatesarray
+ * @param int $id
+ * @param string $permalink
+ * @return void
+ */
+ function ParsePubArray ($updatesarray, $id)
+ {
+ global $xoopsUser, $xoopsTpl, $tpl, $xoopsModule, $xoopsConfig;
+
+ $check = new SmallWorldUser;
+ $dBase = new SmallWorldDB;
+ $profile = ($xoopsUser) ? $check->checkIfProfile($id) : 0;
+ $module_handler =& xoops_gethandler('module');
+ $module = $module_handler->getByDirname('smallworld');
+ $config_handler =& xoops_gethandler('config');
+ $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid'));
+
+ $myavatar = $this->Gravatar($id);
+ $myavatarlink = smallworld_getAvatarLink($id, $myavatar);
+ $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink);
+ $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35);
+
+ $xoopsTpl->assign('myavatar',$myavatar);
+ $xoopsTpl->assign('myavatarlink',$myavatarlink);
+ $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide);
+
+ if (!empty($updatesarray)) {
+ foreach ($updatesarray as $data) {
+
+ // Is update's user a friend ?
+ $frU = $check->friendcheck($id,$data['uid_fk']);
+
+ $USW = array();
+ $USW['posts'] = 0;
+ $USW['comments'] = 0;
+
+ if ($xoopsUser) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $data['uid_fk'] == $id) {
+ $USW['posts'] = 1;
+ $USW['comments'] = 1;
+ $frU[0] = 2;
+ } else {
+ $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
+ }
+ }
+
+ if (!$xoopsUser) {
+ $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
+ }
+
+ $wm['msg_id'] = $data['msg_id'];
+ $wm['orimessage'] = ($USW['posts'] == 1 || $profile >= 2) ?
+ str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])):'';
+ $wm['message'] = ($USW['posts'] == 1 || $profile >= 2) ?
+ smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']):_SMALLWORLD_MESSAGE_PRIVSETPOSTS;
+ $wm['message'] = Smallworld_cleanup($wm['message']);
+ $wm['created'] = smallworld_time_stamp($data['created']);
+ $wm['username'] = $data['username'];
+ $wm['uid_fk'] = $data['uid_fk'];
+ $wm['priv'] = $data['priv'];
+ $wm['avatar'] = $this->Gravatar($data['uid_fk']);
+ $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']);
+ $wm['avatar_size'] = smallworld_getImageSize(80, 100, $wm['avatar_link']);
+ $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50);
+ $wm['vote_up'] = $this->countVotes ('msg', 'up', $data['msg_id']);
+ $wm['vote_down'] = $this->countVotes ('msg', 'down', $data['msg_id']);
+ $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk'];
+ $wm['sharelinkurl'] .= "&updid=".$data['msg_id']."";
+ $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename'];
+ if ($USW['posts'] == 1 || $profile >= 2) {
+ $wm['sharelink'] = $this->GetSharing ($wm['msg_id'],$wm['priv']);
+ } else {
+ $wm['sharelink'] = $this->GetSharing ($wm['msg_id'],1);
+ }
+
+ if ($USW['posts'] == 1 || $profile >= 2) {
+ $wm['sharediv'] = $this->GetSharingDiv ($wm['msg_id'],$wm['priv'], $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
+ } else {
+ $wm['sharediv'] = $this->GetSharingDiv ($wm['msg_id'],1, $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
+ }
+ $wm['linkimage'] = XOOPS_URL."/modules/smallworld/images/link.png";
+ $wm['permalink'] = XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']."&updid=".$data['msg_id'];
+ $wm['commentsarray'] = $this->Comments($data['msg_id']);
+
+ if ($frU[0] == 2 || $USW['posts'] == 1) {
+ $xoopsTpl->append('walldata', $wm);
+ }
+
+ if (!empty($wm['commentsarray'])){
+ foreach($wm['commentsarray'] as $cdata) {
+ // Is commentuser a friend ?
+ $frC = $check->friendcheck($id,$cdata['uid_fk']);
+
+ $USC = array();
+ $USC['posts'] = 0;
+ $USC['comments'] = 0;
+
+ if ($xoopsUser) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $cdata['uid_fk'] == $id) {
+ $USC['posts'] = 1;
+ $USC['comments'] = 1;
+ $frC[0] = 2;
+ } else {
+ $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
+ }
+ }
+
+ if (!$xoopsUser) {
+ $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
+ }
+
+ $wc['msg_id_fk'] = $cdata['msg_id_fk'];
+ $wc['com_id'] = $cdata['com_id'];
+ $wc['comment'] = ($USC['comments'] == 1 || $profile >= 2) ?
+ smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']):
+ _SMALLWORLD_MESSAGE_PRIVSETCOMMENTS;
+ $wc['comment'] = Smallworld_cleanup($wc['comment']);
+ $wc['time'] = smallworld_time_stamp($cdata['created']);
+ $wc['username'] = $cdata['username'];
+ $wc['uid'] = $cdata['uid_fk'];
+ $wc['myavatar'] = $this->Gravatar($id);
+ $wc['myavatar_link'] = $myavatarlink;
+ $wc['avatar_size'] = smallworld_getImageSize(80, 100, $wc['myavatar_link']);
+ $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35);
+ $wc['cface'] = $this->Gravatar($cdata['uid_fk']);
+ $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']);
+ $wc['vote_up'] = $this->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']);
+ $wc['vote_down'] = $this->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']);
+
+ if ($frC[0] == 2 || $USC['comments'] == 1) {
+ $xoopsTpl->append('comm', $wc);
+ }
+ }
+ }
+ }
+ }
+ }
}
?>
\ No newline at end of file
Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -64,9 +64,10 @@
if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $data['uid_fk'] == $id) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $data['uid_fk'] == $id) {
$USC['posts'] = 1;
$USC['comments'] = 1;
+ $frC[0] = 2;
} else {
$USC = json_decode($dBase->GetSettings($data['uid_fk']), true);
}
Modified: XoopsModules/smallworld/trunk/smallworld/css/smallworld.css
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/css/smallworld.css 2013-10-01 17:11:18 UTC (rev 12114)
@@ -664,7 +664,7 @@
padding:3px;
}
-#display
+#smallworld_display
{
width:250px;
display:none;
Modified: XoopsModules/smallworld/trunk/smallworld/editprofile.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/editprofile.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/editprofile.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -267,7 +267,7 @@
$school = "";
foreach ($nr5 as $k => $v) {
$school .= $item->school_add ('smallworld_add3', 'school', 'school_type',
- '.smallworld_clone3', $arr7, _SMALLWORLD_ADDMORE, $selected=stripslashes($nr6[$k]),$preset=$v, $selectedstart=date("Y",$nr7[$k]),$selectedstop=date("Y",$nr8[$k]));
+ '.smallworld_clone3', $arr7, _SMALLWORLD_ADDMORE, $selected=stripslashes($nr6[$k]),$preset=$v, $selectedstart=$nr7[$k],$selectedstop=$nr8[$k]);
$school .= "<span class='smallworld_remove2' id='schoolremove'>";
$school .= "<a href='javascript:void(0);' id='schoolremovelnk'>"._SMALLWORLD_REMOVE."</a><br></span>";
}
Modified: XoopsModules/smallworld/trunk/smallworld/galleryshow.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/galleryshow.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -23,44 +23,52 @@
include_once(XOOPS_ROOT_PATH."/header.php");
include_once(XOOPS_ROOT_PATH."/modules/smallworld/include/functions.php");
include_once(XOOPS_ROOT_PATH."/modules/smallworld/class/class_collector.php");
-global $xoopsUser, $xoTheme;
+global $xoopsUser, $xoTheme, $xoopsLogger;
+$xoopsLogger->activated = false;
+
+ $admin = false;
- if ($xoopsUser) {
+ if ($xoopsUser) {
$id = $xoopsUser->getVar('uid');
$check = new SmallWorldUser;
$image = new SmallWorldImages;
+ $username = $_GET['username'];
+ $userID = smallworld_isset_or($_GET['username']); // Id of user wich profile you want to see
+ $userisfriend = $check->friendcheck($id,$userID);
- // Check if inspected userid -> redirect to userprofile and show admin countdown
+ if ( $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ $xoopsTpl->assign('isadminuser', 'YES');
+ $admin = true;
+ }
+
+ // Check if inspected userid -> redirect to userprofile and show admin countdown
$inspect = Smallworld_isInspected ($id);
if ($inspect['inspect'] == 'yes') {
- redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1);
+ redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1, _SMALLWORLD_INSPEC_usermsg);
}
$profile = $check->checkIfProfile($id);
- if ($profile >= 2) {
+ if ($profile >= 2 || $userisfriend[0] == 2 || $admin == true) {
$myusername = $xoopsUser->getVar('uname');
- if ( $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
- $xoopsTpl->assign('isadminuser', 'YES');
- }
+
$user = new XoopsUser($id);
- $userID = smallworld_isset_or($_GET['username']); // Id of user wich profile you want to see
- $username = $_GET['username'];
$countimages = $image->count($userID);
- $userisfriend = $check->friendcheck($id,$userID);
//$gallery = $image->viewalbum ($id, $user=$xoopsUser->getVar('uid'));
$gallery = $image->viewalbum ($id, $userID);
$xoopsTpl->assign('countimages',$countimages);
- $xoopsTpl->assign('userisfriend',$userisfriend);
+ $xoopsTpl->assign('userisfriend',$userisfriend[0]);
$xoopsTpl->assign('gallery',$gallery);
$xoopsTpl->assign('closealbum',_SMALLWORLD_ALBUMTITLETEXT);
$xoopsTpl->assign('username',$username);
$xoopsTpl->assign('myusername',$myusername);
$xoopsTpl->assign('gallerytitleheader',_SMALLWORLD_TITLEHEADER);
$xoopsTpl->assign('check',1);
- } elseif ($profile == 0) {
+ } elseif ($profile == 0) {
$check->chkUser ();
- }
+ } else {
+ redirect_header("userprofile.php?username=".$xoopsUser->getVar('uname'), 1, _NOPERM);
+ }
} else {
redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM);
}
Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -240,15 +240,19 @@
$text = str_replace('UPLIMAGE', '', $text);
$text = preg_replace('/(((f|ht){1}tp:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i',
'<span class="smallworldUplImgTxt"><br/><img class="smallworldAttImg" src="\\1"><br><br><a id="smallworldUplImgLnk" href="'
- . $gallery . '" target="_SELF">'
+ . $gallery . '" target="_self">'
. $usr->getVar('uname') . _SMALLWORLD_UPLOADEDSOMEIMAGES
. '</a><br></span>', $text
);
$text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i',
- '<a href="\\1">lala</a>', $text);
+ '<span class="smallworldUplImgTxt"><br/><img class="smallworldAttImg" src="\\1"><br><br><a id="smallworldUplImgLnk" href="'
+ . $gallery . '" target="_self">'
+ . $usr->getVar('uname') . _SMALLWORLD_UPLOADEDSOMEIMAGES
+ . '</a><br></span>', $text
+ );
$text = preg_replace('/([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i',
'\\1<span class="smallworldUplImgTxt"><br/><img class="smallworldAttImg" src="//\\2"><br><br><a id="smallworldUplImgLnk" href="'
- . $gallery . '" target="_SELF">'
+ . $gallery . '" target="_self">'
. $username . _SMALLWORLD_UPLOADEDSOMEIMAGES
. '</a><br></span>', $text
);
@@ -375,35 +379,30 @@
$gender = $row['gender'];
}
}
+
+ $image = ($image == 'blank.gif') ? '' : $image;
- $link = XOOPS_UPLOAD_URL."/".$image;
+ if (preg_match("/avatars/i", $image)) {
+ $link = XOOPS_UPLOAD_URL."/".$image;
+ } else {
+ $link = $image;
+ }
+
if (!in_array($ext,array('jpg','bmp','gif','png','jpeg')) || $image == '' || $image == "blank.gif"){
- if ($ext == '' || $gender == '1') {
+
+ if ($ext == '' && $gender == '1') {
$link = XOOPS_URL."/modules/smallworld/images/ano_woman.png";
}
-
- if ($ext == '' AND $gender == '1') {
- $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png";
- }
- if ($ext == '' AND $gender == '2') {
+ if ($ext == '' && $gender == '2') {
$link = XOOPS_URL."/modules/smallworld/images/ano_man.png";
}
- if ($ext == '' AND $gender == '1') {
- $link = XOOPS_URL."/modules/smallworld/images/ano_woman.png";
- }
- if ($ext == '' AND $gender == '2') {
- $link = XOOPS_URL."/modules/smallworld/images/ano_man.png";
- }
-
+
if ($ext == '' AND $gender == '') {
$link = XOOPS_URL."/modules/smallworld/images/genderless.png";
}
-
- if ($ext == '' AND $gender == '') {
- $link = XOOPS_URL."/modules/smallworld/images/genderless.png";
- }
}
+ //echo $link."<br>";
return $link;
}
@@ -1069,6 +1068,7 @@
$script .= "if (typeof Smallworld_myID === 'undefined') {"."\n";
$script .= "var smallworld_url = '" . $xoops_url . "/modules/smallworld/" . "';\n";
$script .= "var smallworld_uploaddir = '" . $xoops_url . "/uploads/avatars/" . "';\n";
+ $script .= "var smallworld_urlReferer = document.referrer;"."\n";
$script .= "var xoops_smallworld = jQuery.noConflict();\n";
$script .= "var Smallworld_myID = " . $myid . ";\n";
$script .= "var Smallworld_userHasProfile = " . $ChkProf . ";\n";
@@ -1299,3 +1299,17 @@
}
}
+
+ /**
+ * Function to get count of messages in wall
+ * @param int $uid
+ * @return int $count
+ */
+ function smallworld_countUserWallMsges ($uid)
+ {
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = "SELECT message FROM ".$db->prefix('smallworld_messages')." where uid_fk='".$uid."'";
+ $result = $db->queryF($sql);
+ $count = $db->getRowsNum($result);
+ return $count;
+ }
Modified: XoopsModules/smallworld/trunk/smallworld/index.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/index.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/index.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -85,110 +85,10 @@
$followers = Smallworld_array_flatten($Wall->getFollowers($id),0);
$updatesarray=$Wall->Updates(0,$id, $followers);
}
- $myavatar = $Wall->Gravatar($id);
- $myavatarlink = smallworld_getAvatarLink($id, $myavatar);
- $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink);
- $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35);
//Get friends invitations
- $getInvitations = ($xoopsUser) ? $check->getRequests ($id) : 0;
-
- if (!empty($updatesarray)) {
- foreach ($updatesarray as $data) {
- $USW = array();
- $USW['posts'] = 0;
- $USW['comments'] = 0;
-
- if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $data['uid_fk'] == $id) {
- $USW['posts'] = 1;
- $USW['comments'] = 1;
- } else {
- $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
- }
- }
-
- if (!$xoopsUser) {
- $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
- }
-
- $wm['msg_id'] = $data['msg_id'];
- $wm['orimessage'] = ($USW['posts'] == 1 || $profile >= 2) ?
- str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])):'';
- $wm['message'] = ($USW['posts'] == 1 || $profile >= 2) ?
- smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']):_SMALLWORLD_MESSAGE_PRIVSETPOSTS;
- $wm['message'] = Smallworld_cleanup($wm['message']);
- $wm['created'] = smallworld_time_stamp($data['created']);
- $wm['username'] = $data['username'];
- $wm['uid_fk'] = $data['uid_fk'];
- $wm['priv'] = $data['priv'];
- $wm['avatar'] = $Wall->Gravatar($data['uid_fk']);
- $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']);
- $wm['avatar_size'] = smallworld_getImageSize(80, 100, $wm['avatar_link']);
- $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50);
- $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']);
- $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']);
- $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk'];
- $wm['sharelinkurl'] .= "&updid=".$data['msg_id']."";
- $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename'];
- if ($USW['posts'] == 1 || $profile >= 2) {
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],$wm['priv']);
- } else {
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],1);
- }
-
- if ($USW['posts'] == 1 || $profile >= 2) {
- $wm['sharediv'] = $Wall->GetSharingDiv ($wm['msg_id'],$wm['priv'], $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
- } else {
- $wm['sharediv'] = $Wall->GetSharingDiv ($wm['msg_id'],1, $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
- }
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],$wm['priv']);
- $wm['linkimage'] = XOOPS_URL."/modules/smallworld/images/link.png";
- $wm['permalink'] = XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']."&updid=".$data['msg_id'];
- $wm['commentsarray'] = $Wall->Comments($data['msg_id']);
- $xoopsTpl->append('walldata', $wm);
-
- if (!empty($wm['commentsarray'])){
- foreach($wm['commentsarray'] as $cdata) {
- $USC = array();
- $USC['posts'] = 0;
- $USC['comments'] = 0;
-
- if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $cdata['uid_fk'] == $id) {
- $USC['posts'] = 1;
- $USC['comments'] = 1;
- } else {
- $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
- }
- }
-
- if (!$xoopsUser) {
- $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
- }
-
- $wc['msg_id_fk'] = $cdata['msg_id_fk'];
- $wc['com_id'] = $cdata['com_id'];
- $wc['comment'] = ($USC['comments'] == 1 || $profile >= 2) ?
- smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']):
- _SMALLWORLD_MESSAGE_PRIVSETCOMMENTS;
- $wc['comment'] = Smallworld_cleanup($wc['comment']);
- $wc['time'] = smallworld_time_stamp($cdata['created']);
- $wc['username'] = $cdata['username'];
- $wc['uid'] = $cdata['uid_fk'];
- $wc['myavatar'] = $Wall->Gravatar($id);
- $wc['myavatar_link'] = $myavatarlink;
- $wc['avatar_size'] = smallworld_getImageSize(80, 100, $wc['myavatar_link']);
- $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35);
- $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']);
- $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']);
- $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']);
- $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']);
- $xoopsTpl->append('comm', $wc);
- }
- }
- }
- }
+ $getInvitations = ($xoopsUser) ? $check->getRequests ($id) : 0;
+ $Wall->ParsePubArray ($updatesarray, $id);
if ($profile >= 2) {
$xoopsTpl->assign('menu_startpage',$menu_startpage);
@@ -200,9 +100,7 @@
$xoopsTpl->assign('myusername',$username);
$xoopsTpl->assign('pagename','index');
$xoopsTpl->assign('check',$profile);
- $xoopsTpl->assign('myavatar',$myavatar);
- $xoopsTpl->assign('myavatarlink',$myavatarlink);
- $xoopsTpl->assign('myavatar_highwide',$myavatar_highwide);
+
$xoopsTpl->assign('friendinvitations',$getInvitations);
$xoopsTpl->assign('access',$set['access']);
Modified: XoopsModules/smallworld/trunk/smallworld/js/jquery.history.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/js/jquery.history.js 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/js/jquery.history.js 2013-10-01 17:11:18 UTC (rev 12114)
@@ -31,8 +31,13 @@
}
// add hidden iframe for IE
- xoops_smallworld("body").prepend(''
- );
+ // add hidden iframe for IE
+ xoops_smallworld("body").prepend('<iframe id="xoops_smallworld_history" style="display: none;"'+
+ (xoops_smallworld.historyIframeSrc ? ' src="'+xoops_smallworld.historyIframeSrc+'"' : '')
+ +'></iframe>'
+ );
+ // xoops_smallworld("body").prepend(''
+ // );
var ihistory = xoops_smallworld("#xoops_smallworld_history")[0];
var iframe = ihistory.contentWindow.document;
iframe.open();
Modified: XoopsModules/smallworld/trunk/smallworld/js/smallworld.js
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/js/smallworld.js 2013-10-01 17:11:18 UTC (rev 12114)
@@ -112,7 +112,10 @@
xoops_smallworld('#friendInvitations_box').hide();
xoops_smallworld('#friendInvitations_box').css('display','none');
},
- href:"#friendInvitations_box"
+ href:"#friendInvitations_box",
+ onClosed:function() {
+ location.reload(true);
+ }
});
};
xoops_smallworld('.smallworldrequestlink').on('click',function() {
@@ -186,7 +189,7 @@
},
onClosed:function() {
//location.href = window.location.pathname;
- history.go(-1);
+ location.href = smallworld_urlReferer;
},
href:"div#page"
});
@@ -202,11 +205,11 @@
}
buttons[_smallworldCancel] = function() {
xoops_smallworld( this ).dialog( "close" );
- location.href = smallworld_url+'publicindex.php';
+ location.href = smallworld_urlReferer;
}
buttons[_smallworldClose] = function() {
xoops_smallworld( this ).dialog( "close" );
- location.href = smallworld_url+'publicindex.php';
+ location.href = smallworld_urlReferer;
}
xoops_smallworld('#smallworld_notyetusercontent').dialog({
@@ -215,7 +218,7 @@
hide: "explode",
width: "550px",
close: function(event, ui) {
- location.href = smallworld_url+'publicindex.php';
+ location.href = smallworld_urlReferer;
},
buttons: buttons
});
@@ -321,7 +324,7 @@
// Autocomplete renders @username to scripted html code or Xcode
function split(val) {
- return val.split(/@/);
+ return val.split(/@\s*/);
}
function split_(val) {
@@ -343,7 +346,7 @@
if (event.keyCode === 50) {
xoops_smallworld(this).autocomplete({
disabled: false,
- minLength: 3,
+ minLength: 1,
source : function (request, response) {
xoops_smallworld.ajax({
// basePath is used for defining contecxt-path of the url.
@@ -354,7 +357,7 @@
term : extractLast(request.term)
},
success: function(data,type) {
- console.log( data);
+ //console.log( data);
items = data;
response(items);
},
@@ -365,7 +368,7 @@
},
focus: function() {
return false;
- },
+ },
open: function(event, ui){
xoops_smallworld("ul.ui-autocomplete li a").each(function(){
var htmlString = xoops_smallworld(this).html().replace(/</g, '<');
@@ -391,6 +394,7 @@
});
} else {
xoops_smallworld(this).autocomplete({ disabled: true });
+ xoops_smallworld(this).autocomplete( "close" );
}
});
});
Modified: XoopsModules/smallworld/trunk/smallworld/language/english/main.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/language/english/main.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -380,6 +380,7 @@
/* ------------ Inspection & countdown ---------------- */
define("_SMALLWORLD_INSPEC_DESC","Admin has taken this account down for inspection.<br/><br/>Estimated inspection time will finish in");
define("_SMALLWORLD_INSPEC_DESC2","Try again at this time.");
+define("_SMALLWORLD_INSPEC_usermsg","Admin has taken this account down for inspection.<br/><br/>Access is temporarily denied!");
define("_SMALLWORLD_BDAY_TODAY","Today");
define("_SMALLWORLD_BDAY_ISIN","Birthday is in: ");
define("_SMALLWORLD_BDAY_YEARS","years");
Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -35,7 +35,7 @@
global $xoopsUser, $xoTheme, $xoopsTpl,$xoopsLogger;
$xoopsLogger->activated = false;
/* error_reporting(E_ALL); */
-$tpl = new XoopsTpl();
+$xoopsTpl = new XoopsTpl();
$id = ($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
if ($id <= 0 || $page == 'publicindex' && $set['access'] = 1) {
$Wall = new Public_Wall_Updates();
@@ -53,150 +53,44 @@
$check = new SmallWorldUser;
$profile = ($xoopsUser) ? $check->checkIfProfile($id) : 0;
- //
- if ($id > 0) {
- if ( $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
- $pub = $check->allUsers();
- $tpl->assign('isadminuser', 'YES');
- }
- } else {
- $tpl->assign('isadminuser', 'NO');
- $pub = smallworld_checkUserPubPostPerm ();
+if ($id > 0) {
+ if ( $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ $pub = $check->allUsers();
+ $xoopsTpl->assign('isadminuser', 'YES');
}
- $myavatar = $Wall->Gravatar($id);
- $myavatarlink = smallworld_getAvatarLink($id, $myavatar);
- $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink);
- $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35);
-
-
-
- if ($id <= 0 && $set['access'] == 1 ) {
- //$pub = $check->allUsers();
- $followers = $pub;
- } elseif ($id > 0 && $set['access'] == 1 && $page == 'publicindex') {
- //$pub = $check->allUsers();
- $followers = $pub;
- }else {
- $followers = Smallworld_array_flatten($Wall->getFollowers($id),0);
- }
+} else {
+ $xoopsTpl->assign('isadminuser', 'NO');
+ $pub = smallworld_checkUserPubPostPerm ();
+}
- if ($page == 'index') {
- $updatesarray = ($id > 0) ? $Wall->Updates($_POST['last'], $id, $followers) : $Wall->Updates($_POST['last'], $followers);
- } elseif ($page == 'profile') {
- $updatesarray = ($id > 0) ? $Wall->Updates($_POST['last'], $userid, $userid) : $Wall->Updates($_POST['last'], $userid);
- } elseif ($page == 'publicindex') {
- $updatesarray = $Wall->Updates($_POST['last'], $followers);
- }
+if ($id <= 0 && $set['access'] == 1 ) {
+ //$pub = $check->allUsers();
+ $followers = $pub;
+} elseif ($id > 0 && $set['access'] == 1 && $page == 'publicindex') {
+ //$pub = $check->allUsers();
+ $followers = $pub;
+}else {
+ $followers = Smallworld_array_flatten($Wall->getFollowers($id),0);
+}
- if (!empty($updatesarray)) {
- foreach ($updatesarray as $data) {
- $USW = array();
- $USW['posts'] = 0;
- $USW['comments'] = 0;
-
- if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $data['uid_fk'] == $id) {
- $USW['posts'] = 1;
- $USW['comments'] = 1;
- } else {
- $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
- }
- }
-
- if (!$xoopsUser) {
- $USW = json_decode($dBase->GetSettings($data['uid_fk']), true);
- }
+if ($page == 'index') {
+ $updatesarray = ($id > 0) ? $Wall->Updates($_POST['last'], $id, $followers) : $Wall->Updates($_POST['last'], $followers);
+} elseif ($page == 'profile') {
+ $updatesarray = ($id > 0) ? $Wall->Updates($_POST['last'], $userid, $userid) : $Wall->Updates($_POST['last'], $userid);
+} elseif ($page == 'publicindex') {
+ $updatesarray = $Wall->Updates($_POST['last'], $followers);
+}
- $wm['msg_id'] = $data['msg_id'];
- $wm['orimessage'] = ($USW['posts'] == 1 || $profile >= 2) ?
- str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])):'';
- $wm['message'] = ($USW['posts'] == 1 || $profile >= 2) ?
- smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']):_SMALLWORLD_MESSAGE_PRIVSETPOSTS;
- $wm['message'] = Smallworld_cleanup($wm['message']);
- $wm['created'] = smallworld_time_stamp($data['created']);
- $wm['username'] = $data['username'];
- $wm['uid_fk'] = $data['uid_fk'];
- $wm['priv'] = $data['priv'];
- $wm['avatar'] = $Wall->Gravatar($data['uid_fk']);
- $wm['avatar_link'] = smallworld_getAvatarLink ($data['uid_fk'], $wm['avatar']);
- $wm['avatar_size'] = smallworld_getImageSize(80, 100, $wm['avatar_link']);
- $wm['avatar_highwide'] = smallworld_imageResize($wm['avatar_size'][0], $wm['avatar_size'][1], 50);
- $wm['vote_up'] = $Wall->countVotes ('msg', 'up', $data['msg_id']);
- $wm['vote_down'] = $Wall->countVotes ('msg', 'down', $data['msg_id']);
- $wm['sharelinkurl'] = XOOPS_URL."/modules/smallworld/smallworldshare.php?ownerid=".$data['uid_fk'];
- $wm['sharelinkurl'] .= "&updid=".$data['msg_id']."";
- $wm['usernameTitle'] = $wm['username']._SMALLWORLD_UPDATEONSITEMETA.$xoopsConfig['sitename'];
- if ($USW['posts'] == 1 || $profile >= 2) {
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],$wm['priv']);
- } else {
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],1);
- }
-
- if ($USW['posts'] == 1 || $profile >= 2) {
- $wm['sharediv'] = $Wall->GetSharingDiv ($wm['msg_id'],$wm['priv'], $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
- } else {
- $wm['sharediv'] = $Wall->GetSharingDiv ($wm['msg_id'],1, $wm['sharelinkurl'],$wm['orimessage'],$wm['usernameTitle']);
- }
- $wm['sharelink'] = $Wall->GetSharing ($wm['msg_id'],$wm['priv']);
- $wm['linkimage'] = XOOPS_URL."/modules/smallworld/images/link.png";
- $wm['permalink'] = XOOPS_URL."/modules/smallworld/permalink.php?ownerid=".$data['uid_fk']."&updid=".$data['msg_id'];
- $wm['commentsarray'] = $Wall->Comments($data['msg_id']);
- $tpl->append('walldata', $wm);
-
- if (!empty($wm['commentsarray'])){
- foreach($wm['commentsarray'] as $cdata) {
- $USC = array();
- $USC['posts'] = 0;
- $USC['comments'] = 0;
-
- if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $cdata['uid_fk'] == $id) {
- $USC['posts'] = 1;
- $USC['comments'] = 1;
- } else {
- $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
- }
- }
-
- if (!$xoopsUser) {
- $USC = json_decode($dBase->GetSettings($cdata['uid_fk']), true);
- }
-
- $wc['msg_id_fk'] = $cdata['msg_id_fk'];
- $wc['com_id'] = $cdata['com_id'];
- $wc['comment'] = ($USC['comments'] == 1 || $profile >= 2) ?
- smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']):
- _SMALLWORLD_MESSAGE_PRIVSETCOMMENTS;
- $wc['comment'] = Smallworld_cleanup($wc['comment']);
- $wc['time'] = smallworld_time_stamp($cdata['created']);
- $wc['username'] = $cdata['username'];
- $wc['uid'] = $cdata['uid_fk'];
- $wc['myavatar'] = $Wall->Gravatar($id);
- $wc['myavatar_link'] = $myavatarlink;
- $wc['avatar_size'] = smallworld_getImageSize(80, 100, $wc['myavatar_link']);
- $wc['avatar_highwide'] = smallworld_imageResize($wc['avatar_size'][0], $wc['avatar_size'][1], 35);
- $wc['cface'] = $Wall->Gravatar($cdata['uid_fk']);
- $wc['avatar_link'] = smallworld_getAvatarLink ($cdata['uid_fk'], $wc['cface']);
- $wc['vote_up'] = $Wall->countVotesCom ('com', 'up', $cdata['msg_id_fk'],$cdata['com_id']);
- $wc['vote_down'] = $Wall->countVotesCom ('com', 'down', $cdata['msg_id_fk'],$cdata['com_id']);
- $tpl->append('comm', $wc);
- }
- }
- }
- }
+$Wall->ParsePubArray ($updatesarray, $id);
-$tpl->assign('sCountResp',count($updatesarray));
+$xoopsTpl->assign('sCountResp',count($updatesarray));
+$xoopsTpl->assign('msgtoshow',$hm);
+$xoopsTpl->assign('myusername',$username);
+$xoopsTpl->assign('pagename',$page);
-$tpl->assign('msgtoshow',$hm);
-$tpl->assign('myusername',$username);
-$tpl->assign('pagename',$page);
-$tpl->assign('myavatar',$myavatar);
-$tpl->assign('myavatarlink',$myavatarlink);
-$tpl->assign('myavatar_highwide',$myavatar_highwide);
-
if ($id > 0) {
- $tpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getmore.html');
+ $xoopsTpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getmore.html');
} else {
- $tpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getmorepublic.html');
+ $xoopsTpl->display(XOOPS_ROOT_PATH .'/modules/smallworld/templates/getmorepublic.html');
}
?>
Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -65,7 +65,7 @@
$USW['comments'] = 0;
if ($xoopsUser) {
- if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) && $data['uid_fk'] == $id) {
+ if ($xoopsUser->isAdmin($xoopsModule->getVar('mid')) || $data['uid_fk'] == $id) {
$USW['posts'] = 1;
$USW['comments'] = 1;
} else {
Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php
===================================================================
--- XoopsModules/smallworld/trunk/smallworld/permalink.php 2013-09-30 23:16:50 UTC (rev 12113)
+++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2013-10-01 17:11:18 UTC (rev 12114)
@@ -67,120 +67,19 @@
// Things to do with wall
$Wall = new Wall_Updates();
- $myavatar = $Wall->Gravatar($id);
- $myavatarlink = smallworld_getAvatarLink($id, $myavatar);
- $myavatar_size = smallworld_getImageSize(80, 100, $myavatarlink);
- $myavatar_highwide = smallworld_imageResize($myavatar_size[0], $myavatar_size[1], 35);
+
// Follow array here
$followers = Smallworld_array_flatten($Wall->getFollowers($id),0);
...
[truncated message content] |
|
From: <be...@us...> - 2013-09-30 23:16:53
|
Revision: 12113
http://sourceforge.net/p/xoops/svn/12113
Author: beckmi
Date: 2013-09-30 23:16:50 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
Making the check icons in the Configuration check smaller
Adding new DB import icon
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png 2013-09-30 17:38:04 UTC (rev 12112)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png 2013-09-30 23:16:50 UTC (rev 12113)
Property changes on: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/icons/32/database_go.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2013-09-30 17:38:04 UTC (rev 12112)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2013-09-30 23:16:50 UTC (rev 12113)
@@ -206,12 +206,12 @@
case "folder":
if (!is_dir($value)) {
$line .= "<span style='color : red; font-weight : bold;'>";
- $line .= "<img src='" . $path . "off.png' >";
+ $line .= "<img src='" . $path . "0.png' >";
$line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDERKO, $value);
$line .= "</span>\n";
} else {
$line .= "<span style='color : green;'>";
- $line .= "<img src='" . $path . "on.png' >";
+ $line .= "<img src='" . $path . "1.png' >";
$line .= sprintf(_AM_MODULEADMIN_CONFIG_FOLDEROK, $value);
$line .= "</span>\n";
}
@@ -221,12 +221,12 @@
if (is_dir($value[0])) {
if (substr(decoct(fileperms($value[0])),2) != $value[1]) {
$line .= "<span style='color : red; font-weight : bold;'>";
- $line .= "<img src='" . $path . "off.png' >";
+ $line .= "<img src='" . $path . "0.png' >";
$line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2));
$line .= "</span>\n";
} else {
$line .= "<span style='color : green;'>";
- $line .= "<img src='" . $path . "on.png' >";
+ $line .= "<img src='" . $path . "1.png' >";
$line .= sprintf(_AM_MODULEADMIN_CONFIG_CHMOD, $value[0], $value[1], substr(decoct(fileperms($value[0])),2));
$line .= "</span>\n";
}
@@ -264,9 +264,9 @@
$path = XOOPS_URL . "/Frameworks/moduleclasses/icons/16/";
if ($this->_obj->getInfo('min_php')) {
if (phpversion() < $this->_obj->getInfo('min_php')) {
- $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
+ $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
} else {
- $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
+ $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_PHP, $this->_obj->getInfo('min_php'), phpversion()) . "</span>\n";
}
$ret .= "<br />";
}
@@ -307,18 +307,18 @@
}
}
if ($reqVer > $curVer) {
- $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(XOOPS_DB_TYPE.' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n";
+ $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(XOOPS_DB_TYPE.' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n";
} else {
- $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n";
+ $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(strtoupper(XOOPS_DB_TYPE).' '._AM_MODULEADMIN_CONFIG_DB, $dbRequiredVersion, $dbCurrentVersion) . "</span><br />\n";
}
}
// xoops version
if ($this->_obj->getInfo('min_xoops')) {
if (substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6) < $this->_obj->getInfo('min_xoops')) {
- $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n";
+ $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n";
} else {
- $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n";
+ $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_XOOPS, $this->_obj->getInfo('min_xoops'), substr(XOOPS_VERSION, 6, strlen(XOOPS_VERSION)-6)) . "</span>\n";
}
$ret .= "<br />";
}
@@ -326,9 +326,9 @@
// ModuleAdmin version
if ($this->_obj->getInfo('min_admin')) {
if ($this->getVersion() < $this->_obj->getInfo('min_admin')) {
- $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "off.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n";
+ $ret .= "<span style='color : red; font-weight : bold;'><img src='" . $path . "0.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n";
} else {
- $ret .= "<span style='color : green;'><img src='" . $path . "on.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n";
+ $ret .= "<span style='color : green;'><img src='" . $path . "1.png' >" . sprintf(_AM_MODULEADMIN_CONFIG_ADMIN, $this->_obj->getInfo('min_admin'), $this->getVersion()) . "</span>\n";
}
$ret .= "<br />";
}
|
|
From: <luc...@us...> - 2013-09-30 17:38:08
|
Revision: 12112
http://sourceforge.net/p/xoops/svn/12112
Author: luciorota
Date: 2013-09-30 17:38:04 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
- added support to $mode parameter in XoopsFormEditor & XoopsFormSelectEditor objects
- fixed small bug in XoopsFormDateTime objcect
- added renderGetContentJS method to all form elements, now Xoops form can return all form elements values as javascript object, it's useful in ajax contests
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/language/english.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdatetime.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formfile.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formradio.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/site-closed.php
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/json2.js
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/theme.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -304,6 +304,7 @@
}
// Load global javascript
$this->addScript('include/xoops.js');
+ $this->addScript('include/json2.js');
$this->loadLocalization();
if ($this->bufferOutput) {
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -49,11 +49,12 @@
$options['cols'] = 60; // default value = 50
$options['width'] = '100%'; // default value = 100%
$options['height'] = '400px'; // default value = 400px
+ $options['mode'] = $mode; // for editors that support mode option
// "textarea": if the selected editor with name of $editor can not be created, the editor "textarea" will be used
// if no $onFailure is set, then the first available editor will be used
// If dohtml is disabled, set $noHtml to true
- $sample_form->addElement(new XoopsFormEditor(_MD_MESSAGEC, $options['name'], $options, $nohtml = false, $onfailure = 'textarea', $mode), true);
+ $sample_form->addElement(new XoopsFormEditor(_MD_MESSAGEC, $options['name'], $options, $nohtml = false, $onfailure = 'textarea'), true);
$sample_form->addElement(new XoopsFormText('SOME REQUIRED ELEMENTS', 'required_element2', 50, 255, $required_element2), true);
$sample_form->addElement(new XoopsFormButton('', 'save', _SUBMIT, 'submit'));
$sample_form->display();
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/language/english.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/language/english.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/language/english.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -14,7 +14,7 @@
* Assocated with editor_registry.php
*/
// Name of the editor
-define('_XOOPS_EDITOR_TINYMCE',"TinyMCE");
+define('_XOOPS_EDITOR_TINYMCE',"TinyMCE v3.5.8");
// The value must be the same as /tinymce/jscripts/langs/your_language_code, for example, "en" for English, "fr" for French
// For details, check http://tinymce.moxiecode.com/download_i18n.php
define('_XOOPS_EDITOR_TINYMCE_LANGUAGE',"en");
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -526,10 +526,10 @@
* A basic element validation method may contain something like this:
* <code>
* function renderValidationJS() {
- * $name = $this->getName();
- * return "if (myform.{$name}.value != 'valid') { " .
- * "myform.{$name}.focus(); window.alert( '$name is invalid' ); return false;" .
- * " }";
+ * $name = $this->getName();
+ * return "if (myform.{$name}.value != 'valid') { " .
+ * "myform.{$name}.focus(); window.alert( '$name is invalid' ); return false;" .
+ * " }";
* }
* </code>
*
@@ -558,6 +558,66 @@
}
/**
+ * Renders the Javascript function needed for client-side for get content
+ *
+ * Additionally, each element class may provide its own "renderGetContentJS" method
+ * that is supposed to return custom get content code for the element.
+ *
+ * The element get content code can assume that the JS "myform" variable points to the form.
+ * Exemple:
+ * <script type='text/javascript'>
+ * var content[];
+ * content = " . $form->renderGetContentJS(false) . "
+ * </script>
+ *
+ * A basic element get content method may contain something like this:
+ * <code>
+ * function renderGetContentJS() {
+ * $name = $this->getName();
+ * return "document.getElementById('{$name}');";
+ * }
+ * </code>
+ *
+ * @param boolean $withtags Include the < javascript > tags in the returned string
+ * @return string
+ */
+ function renderGetContentJS($withTags = false)
+ {
+ $formname = $this->getName();
+ $js = '';
+ if ($withTags) {
+ $js .= "\n<!-- Start Form GetContent JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
+ $js .= "function xoopsFormGetContent_{$formname}() {\n";
+ } else {
+ $js .= "(function() {\n";
+ }
+ //$js .= " var myform = window.document.{$formname};\n";
+ $js .= " var content = new Object();\n";
+ $elements = $this->getElements(true);
+ foreach($elements as $elt) {
+ if (method_exists($elt, 'renderGetContentJS') && ($elt->getName() != '')) {
+ $js .= " content['" . $elt->getName() . "'] = " . $elt->renderGetContentJS() . ";\n";
+ }
+ }
+ $js .= " Object.size = function(obj) {\n";
+ $js .= " var size = 0, key;\n";
+ $js .= " for (key in obj)\n";
+ $js .= " {if (obj.hasOwnProperty(key)) size++;}\n";
+ $js .= " return size;\n";
+ $js .= " };\n";
+ $js .= " return (Object.size(content) > 0) ? content : null;\n";
+
+ if ($withTags) {
+ $js .= "}\n";
+ $js .= "//--></script>\n<!-- End Form GetContent JavaScript //-->\n";
+ } else {
+ $js .= "})()\n";
+ }
+
+ return $js;
+ }
+
+ /**
* assign to smarty form template instead of displaying directly
*
* @param object $ &$tpl reference to a {@link Smarty} object
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -242,4 +242,32 @@
}
return '';
}
+
+ /**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode(NWLINE, $this->customGetContentCode);
+ // generate get content code if required
+ } else {
+ $eltname = $this->getName();
+ return "(function(){
+ var checkboxesChecked = [];
+ var checkboxes = document.getElementsByName('{$eltname}[]');
+ if (checkboxes.length) {
+ for (var i = 0; i < checkboxes.length; i++) {
+ if (checkboxes[i].checked == true) {
+ checkboxesChecked.push(checkboxes[i].value);
+ }
+ }
+ }
+ return (checkboxesChecked.length > 0) ? checkboxesChecked : null;
+ })()";
+ }
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -72,4 +72,17 @@
return "if ( !(new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value)) ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
}
+
+ /**
+ * Returns custom get content Javascript
+ *
+ * @return string Element get content Javascript
+ */
+ function renderGetContentJS()
+ {
+ $eltname = $this->getName();
+ return "(function(){
+ return ((new RegExp('^#[0-9a-fA-F]{6}','i').test(document.getElementById('{$eltname}').value))) ? document.getElementById('{$eltname}').value : null;
+ })()";
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdatetime.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdatetime.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdatetime.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -38,13 +38,15 @@
* @param integer $value
* @param mixed $showtime
*/
- function XoopsFormDateTime($caption, $name, $size = 15, $value = 0, $showtime = true)
+ function __construct($caption, $name, $size = 15, $value = 0, $showtime = true)
{
- $this->XoopsFormElementTray($caption, ' ');
+ $this->XoopsFormElementTray($caption, ' ', $name);
$value = intval($value);
$value = ($value > 0) ? $value : time();
$datetime = getDate($value);
- $this->addElement(new XoopsFormTextDateSelect('', $name . '[date]', $size, $value, $showtime));
+ $dateselect = new XoopsFormTextDateSelect('', $name . '[date]', $size, $value, $showtime);
+ $this->addElement($dateselect);
+
$timearray = array();
for ($i = 0; $i < 24; $i ++) {
for ($j = 0; $j < 60; $j = $j + 10) {
@@ -53,9 +55,30 @@
}
}
ksort($timearray);
-
$timeselect = new XoopsFormSelect('', $name . '[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10));
$timeselect->addOptionArray($timearray);
$this->addElement($timeselect);
}
+
+ /**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ $eltname = $this->getName();
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode(NWLINE, $this->customGetContentCode);
+ // generate get content code if required
+ } else {
+ return "(function(){
+ var dateTime = []
+ dateTime.push(document.getElementById('{$eltname}[date]').value);
+ dateTime.push(document.getElementById('{$eltname}[time]').value);
+ return (dateTime.length > 0) ? dateTime : null;
+ })()";
+ }
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -265,4 +265,19 @@
}
return parent::renderValidationJS();
}
+
+ /**
+ * XoopsFormDhtmlTextArea::renderGetContentJS()
+ *
+ * @return
+ */
+ function renderGetContentJS()
+ {
+ if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderGetContentJS')) {
+ if (! isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) {
+ return $this->htmlEditor->renderGetContentJS();
+ }
+ }
+ return parent::renderGetContentJS();
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -38,7 +38,7 @@
* @param array $configs configures: editor - editor identifier; name - textarea field name; width, height - dimensions for textarea; value - text content
* @param bool $noHtml use non-WYSIWYG eitor onfailure
* @param string $OnFailure editor to be used if current one failed
- * @param string Requested mode, useful for syntax highlighting editors
+ * @param string Requested mode, useful for syntax highlighting editors*
*/
function XoopsFormEditor($caption, $name, $configs = null, $nohtml = false, $OnFailure = '', $mode = null)
{
@@ -50,6 +50,10 @@
} else {
$configs['name'] = $name;
}
+ if (empty($mode) && !empty($configs['mode'])) {
+ $mode = $configs['mode'];
+ $configs['mode'] = null;
+ }
$this->XoopsFormTextArea($caption, $name);
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -434,6 +434,37 @@
}
/**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom get content code if any
+ if (!empty($this->customGetContentCode)) {
+ return implode(NWLINE, $this->customGetContentCode);
+ // generate get content code if required
+ } else if ($eltname = $this->getName()) {
+ // $eltname = $this->getName();
+ $eltcaption = $this->getCaption();
+ $eltmsg = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
+ $eltmsg = str_replace(array(':' , '?' , '%'), '', $eltmsg);
+ $eltmsg = str_replace('"', '\"', stripslashes($eltmsg));
+ $eltmsg = strip_tags($eltmsg);
+ echo $this->getFormType();
+ switch ($this->getFormType()) {
+ case 'checkbox':
+ return "document.getElementById('{$eltname}').value";
+ break;
+ default:
+ return "document.getElementById('{$eltname}').value";
+ break;
+ } // switch
+ }
+ return false;
+ }
+
+ /**
* Generates output for the element.
*
* This method is abstract and must be overwritten by the child classes.
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formfile.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formfile.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formfile.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -40,7 +40,7 @@
* @param string $name "name" attribute
* @param int $maxfilesize Maximum size for an uploaded file
*/
- function XoopsFormFile($caption, $name, $maxfilesize)
+ function __construct($caption, $name, $maxfilesize)
{
$this->setCaption($caption);
$this->setName($name);
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formradio.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formradio.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formradio.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -197,4 +197,30 @@
}
return $ret;
}
+
+ /**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode("\n", $this->customGetContentCode);
+ // generate validation code if required
+ } else {
+ $eltname = $this->getName();
+ return "(function(){
+ var radios = document.getElementsByName('{$eltname}');
+ for(var i = 0; i < radios.length; i++){
+ if(radios[i].checked){
+ return radios[i].value;
+ }
+ }
+ return null; // or undefined, or your preferred default for none checked
+ })()";
+ }
+ return '';
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -238,4 +238,33 @@
}
return '';
}
+
+ /**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode("\n", $this->customGetContentCode);
+ // generate validation code if required
+ } else {
+ $eltname = $this->getName();
+ return "(function(){
+ var selectSelected = [];
+ var options = document.getElementById('{$eltname}') && document.getElementById('{$eltname}').options;
+ var opt;
+ for (var i=0, iLen=options.length; i<iLen; i++) {
+ opt = options[i];
+ if (opt.selected) {
+ selectSelected.push(opt.value || opt.text);
+ }
+ }
+ return (selectSelected.length > 0) ? selectSelected : null;
+ })()";
+ }
+ return '';
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -27,6 +27,7 @@
*/
class XoopsFormSelectEditor extends XoopsFormElementTray
{
+ var $modes = null;
var $allowed_editors = array();
var $form;
var $value;
@@ -40,10 +41,13 @@
* @param string $name editor name
* @param string $value Pre-selected text value
* @param bool $noHtml dohtml disabled
+ * @param array $allowed_editors
+ * @param mixed $modes Requested mode (or array of them)
*/
- function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array())
+ function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array(), $modes = null)
{
$this->XoopsFormElementTray(_SELECT);
+ $this->modes = $modes;
$this->allowed_editors = $allowed_editors;
$this->form = &$form;
$this->name = $name;
@@ -61,12 +65,13 @@
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
$editor_handler->allowed_editors = $this->allowed_editors;
+ $editor_handler->modes = $this->modes;
$option_select = new XoopsFormSelect("", $this->name, $this->value);
$extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
window.document.forms.' . $this->form->getName() . '.submit();
}"';
$option_select->setExtra($extra);
- $option_select->addOptionArray($editor_handler->getList($this->nohtml));
+ $option_select->addOptionArray($editor_handler->getList($this->nohtml, $this->modes));
$this->addElement($option_select);
return parent::render();
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/functions.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -245,7 +245,8 @@
<meta name="copyright" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_copyright']) . '" />
<meta name="generator" content="XOOPS" />
<title>' . htmlspecialchars($xoopsConfig['sitename']) . '</title>
- <script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script>';
+ <script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script>
+ <script type="text/javascript" src="' . XOOPS_URL . '/include/json2.js"></script>';
$themecss = xoops_getcss($xoopsConfig['theme_set']);
echo '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" />';
$language = xoops_getConfigOption('language');
Added: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/json2.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/json2.js (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/json2.js 2013-09-30 17:38:04 UTC (rev 12112)
@@ -0,0 +1,486 @@
+/*
+ json2.js
+ 2013-05-26
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+
+
+ This file creates a global JSON object containing two methods: stringify
+ and parse.
+
+ JSON.stringify(value, replacer, space)
+ value any JavaScript value, usually an object or array.
+
+ replacer an optional parameter that determines how object
+ values are stringified for objects. It can be a
+ function or an array of strings.
+
+ space an optional parameter that specifies the indentation
+ of nested structures. If it is omitted, the text will
+ be packed without extra whitespace. If it is a number,
+ it will specify the number of spaces to indent at each
+ level. If it is a string (such as '\t' or ' '),
+ it contains the characters used to indent at each level.
+
+ This method produces a JSON text from a JavaScript value.
+
+ When an object value is found, if the object contains a toJSON
+ method, its toJSON method will be called and the result will be
+ stringified. A toJSON method does not serialize: it returns the
+ value represented by the name/value pair that should be serialized,
+ or undefined if nothing should be serialized. The toJSON method
+ will be passed the key associated with the value, and this will be
+ bound to the value
+
+ For example, this would serialize Dates as ISO strings.
+
+ Date.prototype.toJSON = function (key) {
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ You can provide an optional replacer method. It will be passed the
+ key and value of each member, with this bound to the containing
+ object. The value that is returned from your method will be
+ serialized. If your method returns undefined, then the member will
+ be excluded from the serialization.
+
+ If the replacer parameter is an array of strings, then it will be
+ used to select the members to be serialized. It filters the results
+ such that only members with keys listed in the replacer array are
+ stringified.
+
+ Values that do not have JSON representations, such as undefined or
+ functions, will not be serialized. Such values in objects will be
+ dropped; in arrays they will be replaced with null. You can use
+ a replacer function to replace those with JSON values.
+ JSON.stringify(undefined) returns undefined.
+
+ The optional space parameter produces a stringification of the
+ value that is filled with line breaks and indentation to make it
+ easier to read.
+
+ If the space parameter is a non-empty string, then that string will
+ be used for indentation. If the space parameter is a number, then
+ the indentation will be that many spaces.
+
+ Example:
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
+ // text is '["e",{"pluribus":"unum"}]'
+
+
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
+
+ text = JSON.stringify([new Date()], function (key, value) {
+ return this[key] instanceof Date ?
+ 'Date(' + this[key] + ')' : value;
+ });
+ // text is '["Date(---current time---)"]'
+
+
+ JSON.parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = JSON.parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
+ var d;
+ if (typeof value === 'string' &&
+ value.slice(0, 5) === 'Date(' &&
+ value.slice(-1) === ')') {
+ d = new Date(value.slice(5, -1));
+ if (d) {
+ return d;
+ }
+ }
+ return value;
+ });
+
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+*/
+
+/*jslint evil: true, regexp: true */
+
+/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+ call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
+ lastIndex, length, parse, prototype, push, replace, slice, stringify,
+ test, toJSON, toString, valueOf
+*/
+
+
+// Create a JSON object only if one does not already exist. We create the
+// methods in a closure to avoid creating global variables.
+
+if (typeof JSON !== 'object') {
+ JSON = {};
+}
+
+(function () {
+ 'use strict';
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ if (typeof Date.prototype.toJSON !== 'function') {
+
+ Date.prototype.toJSON = function () {
+
+ return isFinite(this.valueOf())
+ ? this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z'
+ : null;
+ };
+
+ String.prototype.toJSON =
+ Number.prototype.toJSON =
+ Boolean.prototype.toJSON = function () {
+ return this.valueOf();
+ };
+ }
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe escape
+// sequences.
+
+ escapable.lastIndex = 0;
+ return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
+ var c = meta[a];
+ return typeof c === 'string'
+ ? c
+ : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ }) + '"' : '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+// Produce a string from holder[key].
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+// If the value has a toJSON method, call it to obtain a replacement value.
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+
+// If we were called with a replacer function, then call the replacer to
+// obtain a replacement value.
+
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+// What happens next depends on the value's type.
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+// If the value is a boolean or null, convert it to a string. Note:
+// typeof null does not produce 'null'. The case is included here in
+// the remote chance that this gets fixed someday.
+
+ return String(value);
+
+// If the type is 'object', we might be dealing with an object or an array or
+// null.
+
+ case 'object':
+
+// Due to a specification blunder in ECMAScript, typeof null is 'object',
+// so watch out for that case.
+
+ if (!value) {
+ return 'null';
+ }
+
+// Make an array to hold the partial results of stringifying this object value.
+
+ gap += indent;
+ partial = [];
+
+// Is the value an array?
+
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
+
+// The value is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+// Join all of the elements together, separated with commas, and wrap them in
+// brackets.
+
+ v = partial.length === 0
+ ? '[]'
+ : gap
+ ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
+ : '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+// If the replacer is an array, use it to select the members to be stringified.
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ if (typeof rep[i] === 'string') {
+ k = rep[i];
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+// Join all of the member texts together, separated with commas,
+// and wrap them in braces.
+
+ v = partial.length === 0
+ ? '{}'
+ : gap
+ ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
+ : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+// If the JSON object does not yet have a stringify method, give it one.
+
+ if (typeof JSON.stringify !== 'function') {
+ JSON.stringify = function (value, replacer, space) {
+
+// The stringify method takes a value and an optional replacer, and an optional
+// space parameter, and returns a JSON text. The replacer can be a function
+// that can replace values, or an array of strings that will select the keys.
+// A default replacer method can be provided. Use of the space parameter can
+// produce text that is more easily readable.
+
+ var i;
+ gap = '';
+ indent = '';
+
+// If the space parameter is a number, make an indent string containing that
+// many spaces.
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+// If the space parameter is a string, it will be used as the indent string.
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+// If there is a replacer, it must be a function or an array.
+// Otherwise, throw an error.
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+// Make a fake root object containing our value under the key of ''.
+// Return the result of stringifying the value.
+
+ return str('', {'': value});
+ };
+ }
+
+
+// If the JSON object does not yet have a parse method, give it one.
+
+ if (typeof JSON.parse !== 'function') {
+ JSON.parse = function (text, reviver) {
+
+// The parse method takes a text and an optional reviver function, and returns
+// a JavaScript value if the text is a valid JSON text.
+
+ var j;
+
+ function walk(holder, key) {
+
+// The walk method is used to recursively walk the resulting structure so
+// that modifications can be made.
+
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+
+// Parsing happens in four stages. In the first stage, we replace certain
+// Unicode characters with escape sequences. JavaScript handles many characters
+// incorrectly, either silently deleting them, or treating them as line endings.
+
+ text = String(text);
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' +
+ ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
+ });
+ }
+
+// In the second stage, we run the text against regular expressions that look
+// for non-JSON patterns. We are especially concerned with '()' and 'new'
+// because they can cause invocation, and '=' because it can cause mutation.
+// But just to be safe, we want to reject all unexpected forms.
+
+// We split the second stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+ if (/^[\],:{}\s]*$/
+ .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
+ .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the third stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+ j = eval('(' + text + ')');
+
+// In the optional fourth stage, we recursively walk the new structure, passing
+// each name/value pair to a reviver function for possible transformation.
+
+ return typeof reviver === 'function'
+ ? walk({'': j}, '')
+ : j;
+ }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+ throw new SyntaxError('JSON.parse');
+ };
+ }
+}());
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/site-closed.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/site-closed.php 2013-09-30 17:22:19 UTC (rev 12111)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/site-closed.php 2013-09-30 17:38:04 UTC (rev 12112)
@@ -46,6 +46,8 @@
'plugins' => array()));
$xoTheme->addScript('/include/xoops.js', array(
'type' => 'text/javascript'));
+ $xoTheme->addScript('/include/json2.js', array(
+ 'type' => 'text/javascript'));
$xoopsTpl =& $xoTheme->template;
$xoopsTpl->assign(array(
'xoops_theme' => $xoopsConfig['theme_set'] ,
|
|
From: <luc...@us...> - 2013-09-30 17:22:22
|
Revision: 12111
http://sourceforge.net/p/xoops/svn/12111
Author: luciorota
Date: 2013-09-30 17:22:19 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
now codemirror3 runs well, tested/improved support to $mode parameter for better syntax highlight
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/english.php
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css 2013-09-30 17:18:17 UTC (rev 12110)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css 2013-09-30 17:22:19 UTC (rev 12111)
@@ -2,5 +2,5 @@
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
height: auto;
- z-index: 9;
+ z-index: 255;
}
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php 2013-09-30 17:18:17 UTC (rev 12110)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php 2013-09-30 17:22:19 UTC (rev 12111)
@@ -32,4 +32,3 @@
'csv', 'text/csv'
)
);
-?>
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php 2013-09-30 17:18:17 UTC (rev 12110)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php 2013-09-30 17:22:19 UTC (rev 12111)
@@ -30,7 +30,7 @@
var $setting = array();
var $language = _LANGCODE;
var $width = '100%';
- var $height = '500px';
+ var $height = '300px';
var $syntax = 'txt'; // default
var $mode = null; // default
@@ -41,7 +41,7 @@
*/
function __construct($configs, $mode)
{
- $this->rootPath = "/class/xoopseditor/codemirror2";
+ $this->rootPath = "/class/xoopseditor/codemirror3";
parent::__construct($configs);
$this->width = isset($this->configs["width"]) ? $this->configs["width"] : $this->width;
$this->height = isset($this->configs["height"]) ? $this->configs["height"] : $this->height;
@@ -160,17 +160,35 @@
static $isCodemirror3JsLoaded;
$ret = '';
- if ( is_object($GLOBALS['xoopsModule']) )
+ if ( is_object($GLOBALS['xoopsModule']) )
$dirname = $GLOBALS['xoopsModule']->getVar('dirname');
else
$dirname = 'system';
- if ( is_object($GLOBALS['xoTheme']) ) {
- // uses $GLOBALS['xoTheme']
- if ( !$isCodemirror3JsLoaded ) {
+
+ // Load common stuff only once
+ if ( !$isCodemirror3JsLoaded ) {
+ // CodeMirror custom css
+ $css = ".CodeMirror {border: none;}\n";
+ $css.= ".CodeMirror {height: 100%;}\n";
+ $css.= ".CodeMirror {width: 100%;}\n";
+ $css.= ".CodeMirror-gutters {background-color: #F0F0EE;}\n";
+ $css.= ".CodeMirror-scroll {overflow-y: hidden; overflow-x: auto;}\n";
+ $css.= ".CodeMirror-activeline-background {background: #e8f2ff !important;}\n"; // Highlighting the current line
+ $css.= ".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); background-position: right; background-repeat: no-repeat;}\n"; // Visible tabs
+ $css.= ".CodeMirror-foldmarker {color: blue; text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; font-family: arial;}\n";
+ // Get available codemirror themes
+ function codemirror_filesList($d, $x){
+ foreach(array_diff(scandir($d), array('.', '..')) as $f) if (is_file($d . '/' . $f) && (($x) ? preg_match('/' . $x . '$/' , $f) : 1)) $l[] = $f;
+ return $l;
+ }
+ $themes = codemirror_filesList(XOOPS_ROOT_PATH . '/class/xoopseditor/codemirror3/codemirror/theme', '.css');
+ // Generate no common html/javascript/stylesheet
+ if ( is_object($GLOBALS['xoTheme']) ) {
+ // uses $GLOBALS['xoTheme']
// CodeMirror stuff
$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/lib/codemirror.css');
- //$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/doc/docs.css');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/lib/codemirror.js');
+ $GLOBALS['xoTheme']->addStylesheet(null, null, $css);
// CodeMirror addons
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/addon/selection/active-line.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/addon/fold/foldcode.js');
@@ -179,91 +197,79 @@
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.js');
// Automatic xml tag closing
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/addon/edit/closetag.js');
+ // Automatic match brakets
+ $GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/addon/edit/matchbrackets.js');
// CodeMirror themes
- function codemirror_filesList($d, $x){
- foreach(array_diff(scandir($d), array('.', '..')) as $f) if (is_file($d . '/' . $f) && (($x) ? preg_match('/' . $x . '$/' , $f) : 1)) $l[] = $f;
- return $l;
- }
- $themes = codemirror_filesList(XOOPS_ROOT_PATH . '/class/xoopseditor/codemirror3/codemirror/theme', '.css');
foreach($themes as $theme)
$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/theme/' . $theme);
-
- // CodeMirror mode: htmlmixed
+ // CodeMirror modes
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/xml/xml.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/javascript/javascript.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/css/css.js');
+ $GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/less/less.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/vbscript/vbscript.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/htmlmixed/htmlmixed.js');
- // Define an extended mixed-mode that understands vbscript and leaves mustache/handlebars embedded templates in html mode
- $GLOBALS['xoTheme']->addScript(null, null, "var mixedMode = {name: 'htmlmixed', scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i, mode: null}, {matches: /(text|application)\/(x-)?vb(a|script)/i, mode: 'vbscript'}]};");
-
+ $GLOBALS['xoTheme']->addScript(null, null, "var mixedMode = {name: 'htmlmixed', scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i, mode: null}, {matches: /(text|application)\/(x-)?vb(a|script)/i, mode: 'vbscript'}]};"); // Define an extended mixed-mode that understands vbscript and leaves mustache/handlebars embedded templates in html mode
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/smarty/smarty.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/smartymixed/smartymixed.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/clike/clike.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/plsql/plsql.js');
$GLOBALS['xoTheme']->addScript(XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/mode/php/php.js');
-
+ // Initialize arrays for multiple CodeMirror istances
$GLOBALS['xoTheme']->addScript(null, null, 'var codemirror3_editor = new Array();');
$GLOBALS['xoTheme']->addScript(null, null, 'var codemirror3_textarea = new Array();');
$GLOBALS['xoTheme']->addScript(null, null, 'var codemirror3_uiOptions = new Array();');
$GLOBALS['xoTheme']->addScript(null, null, 'var codemirror3_codeMirrorOptions = new Array();');
-
- /*
- if ( file_exists( XOOPS_ROOT_PATH . $this->rootPath . '/module/config. '. $dirname . '.js' ) )
- $GLOBALS['xoTheme']->addScript( XOOPS_URL . $this->rootPath . '/module/config.' . $dirname . '.js' );
- else
- $GLOBALS['xoTheme']->addScript( XOOPS_URL . $this->rootPath . '/codemirror3/config.js' );
- */
- $isCodemirror3JsLoaded = true;
- }
- } else {
- // does not use $GLOBALS['xoTheme']
- if ( !$isCodemirror3JsLoaded ) {
+ } else {
+ // does not use $GLOBALS['xoTheme']
// CodeMirror stuff
$ret.= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/lib/codemirror.css);</style>\n";
$ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/lib/codemirror.js' type='text/javascript'></script>\n";
+ $ret.= "<style type='text/css'>\n" . $css . "</style>\n";
+ // CodeMirror addons
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/selection/active-line.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/fold/foldcode.js' type='text/javascript'></script>\n";
+ $ret.= "<script type='text/javascript'>var foldFunc = CodeMirror.newFoldFunction(CodeMirror.braceRangeFinder);</script>\n";
+ $ret.= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css);</style>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.js' type='text/javascript'></script>\n";
+ // Automatic xml tag closing
+ $ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/edit/closetag.js' type='text/javascript'></script>\n";
+ // Automatic match brakets
+ $ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/addon/edit/matchbrackets.js' type='text/javascript'></script>\n";
// CodeMirror themes
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/default.css);</style>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/neat.css);</style>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/elegant.css);</style>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/night.css);</style>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/cobalt.css);</style>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/theme/eclipse.css);</style>\n";
+ foreach($themes as $theme)
+ $ret .= "<style type='text/css'>@import url(" . XOOPS_URL . '/class/xoopseditor/codemirror3/codemirror/theme/' . $theme . ");</style>\n";
// CodeMirror modes
- $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/http/http.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/javascript/javascript.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/css/css.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/htmlmixed/htmlmixed.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/clike/clike.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/plsql/plsql.js' type='text/javascript'></script>\n";
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/CodeMirror/mode/php/php.js' type='text/javascript'></script>\n";
- // CodeMirrorUI stuff
- //$ret .= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror2/codemirror-ui/js/codemirror-ui.js' type='text/javascript'></script>\n";
- //$ret .= "<style type='text/css'>@import url(" . XOOPS_URL . "/class/xoopseditor/codemirror2/codemirror-ui/css/codemirror-ui.css);</style>\n";
-
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/xml/xml.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/javascript/javascript.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/css/css.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/less/less.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/vbscript/vbscript.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/htmlmixed/htmlmixed.js' type='text/javascript'></script>\n";
+ $ret.= "<script type='text/javascript'>var mixedMode = {name: 'htmlmixed', scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i, mode: null}, {matches: /(text|application)\/(x-)?vb(a|script)/i, mode: 'vbscript'}]};</script>\n"; // Define an extended mixed-mode that understands vbscript and leaves mustache/handlebars embedded templates in html mode
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/smarty/smarty.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/smartymixed/smartymixed.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/clike/clike.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/plsql/plsql.js' type='text/javascript'></script>\n";
+ $ret.= "<script src='" . XOOPS_URL . "/class/xoopseditor/codemirror3/codemirror/mode/php/php.js' type='text/javascript'></script>\n";
+ // Initialize arrays for multiple CodeMirror istances
$ret.= "<script type='text/javascript'>\n";
$ret.= "var codemirror3_editor = new Array();\n";
$ret.= "var codemirror3_textarea = new Array();\n";
$ret.= "var codemirror3_uiOptions = new Array();\n";
$ret.= "var codemirror3_codeMirrorOptions = new Array();\n";
$ret.= "</script>\n";
- /*
- if ( file_exists( XOOPS_ROOT_PATH . $this->rootPath . '/module/config.' . $dirname . '.js' ) )
- $ret .= '<script src="' . XOOPS_URL . $this->rootPath . '/module/config .'. $dirname . '.js' . '" type="text/javascript"></script>';
- else
- $ret .= '<script src="' . XOOPS_URL . $this->rootPath . '/codemirror2/config.js' . '" type="text/javascript"></script>';
- */
- $isCodemirror3JsLoaded = true;
}
+ $isCodemirror3JsLoaded = true;
}
+ // Set no common settings
if ($decode) {
$ts =& MyTextSanitizer::getInstance();
$value = $ts->undoHtmlSpecialChars( $this->getValue() );
} else {
$value = $this->getValue();
}
-
$mode = (isset($this->mode) ? $this->mode : $this->syntax);
switch ($mode) {
case 'txt' :
@@ -341,6 +347,8 @@
$this->setting['theme'] = 'eclipse';//'default';
$this->setting['lineNumbers'] = true;
$this->setting['firstLineNumber'] = (int)1;
+ $this->setting['lineNumbers'] = true;
+ $this->setting['lineWrapping'] = true;
$this->setting['matchBrackets'] = true;
// ??? $this->setting['autoMatchParens'] = true;
$this->setting['indentUnit'] = (int)4;
@@ -356,33 +364,21 @@
$this->setting['styleActiveLine'] = true;
// Automatic xml tag closing
$this->setting['autoCloseTags'] = true;
-
- $this->setting['lineNumbers'] = true;
- $this->setting['lineWrapping'] = true;
+ // Extrakeys
$this->setting['extraKeys'] = array(
'"Ctrl-Q": function(cm){foldFunc(cm, cm.getCursor().line);}',
'"F11": function(cm) {cm.setOption("fullScreen", !cm.getOption("fullScreen"));}',
'"Esc": function(cm) {if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);}'
);
- $ret.= "<style type='text/css'>\n";
- $ret.= ".CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}\n";
- // Auto-resizing editor
- $ret.= ".CodeMirror-scroll {overflow-y: hidden; overflow-x: auto;}\n";
- $ret.= ".CodeMirror {height: auto;}\n";
- // Highlighting the current line
- $ret.= ".CodeMirror-activeline-background {background: #e8f2ff !important;}\n";
- // Visible tabs
- $ret.= ".cm-tab {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=); background-position: right; background-repeat: no-repeat;}\n";
-
- $ret.= ".CodeMirror-foldmarker {color: blue; text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px; font-family: arial;}\n";
- $ret.= "</style>\n";
- $ret.= "<p>" . $this->mode . "</p>";
+ // Generate no common editor html/javascript
+ $ret.= "<div style='height:{$this->getHeight()};width:{$this->getWidth()};border:1px solid #CCCCCC;'>";
$ret.= "<textarea name='" . $this->getName() . "' id='" . $this->getName() . "' rows='" . $this->getRows() . "' cols='" . $this->getCols() . "' " . $this->getExtra() . " style='width:" . $this->getWidth() . ";height:" . $this->getHeight() . ";'>" . $this->getValue() . "</textarea>\n";
-
+ $ret.= "</div>";
+ $ret.= "<small>" . _XOOPS_EDITOR_CODEMIRROR3_MODE. " " . $this->setting['mode'] . "</small>";
+ $ret.= "<br />";
+ $ret.= "<small>" . _XOOPS_EDITOR_CODEMIRROR3_FULLSCREEN . "</small>";
$ret.= "<script type='text/javascript'>\n";
-
- //then create the editor
$ret.= "window.codemirror3_editor['" . $this->getName() . "'] = CodeMirror.fromTextArea(document.getElementById('" . $this->getName() . "'), {";
$ret.= "\n";
foreach ($this->setting as $key => $val) {
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/english.php
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/english.php 2013-09-30 17:18:17 UTC (rev 12110)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/english.php 2013-09-30 17:22:19 UTC (rev 12111)
@@ -6,7 +6,7 @@
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package core
* @subpackage xoopseditor
- * @since 2.4.x
+ * @since 2.5.7
* @author Rota Lucio <luc...@gm...>
* @version $Id$
*/
@@ -14,6 +14,7 @@
* Assocated with editor_registry.php
*/
// Name of the editor
-define("_XOOPS_EDITOR_CODEMIRROR3", "CodeMirror3 v3.18");
-define("_XOOPS_EDITOR_CODEMIRROR3_LANGUAGE", "en");
-?>
+define("_XOOPS_EDITOR_CODEMIRROR3","CodeMirror3 v3.18");
+define("_XOOPS_EDITOR_CODEMIRROR3_LANGUAGE","en");
+define("_XOOPS_EDITOR_CODEMIRROR3_MODE","Syntax highlight mode:");
+define("_XOOPS_EDITOR_CODEMIRROR3_FULLSCREEN","Press F11 when cursor is in the editor to toggle full screen editing. Esc can also be used to exit full screen editing.");
|
|
From: <luc...@us...> - 2013-09-30 17:18:23
|
Revision: 12110
http://sourceforge.net/p/xoops/svn/12110
Author: luciorota
Date: 2013-09-30 17:18:17 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
added: new autosummary option: autosummary if summary field is empty
fixed(imo): autosummary truncate xoops tags
fixed: errors in language definitions
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -164,7 +164,7 @@
$GLOBALS['xoopsTpl']->assign('mirrors_published_pagenav', $pagenav_published->renderNav());
}
- $xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_mirrors'));
+ $xoopsTpl->assign('use_mirrors', $wfdownloads->getConfig('enable_mirrors'));
$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_ratings'));
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -75,7 +75,7 @@
$ratings_pagenav = new XoopsPageNav($ratings_count, $wfdownloads->getConfig('admin_perpage'), $start, 'start');
$GLOBALS['xoopsTpl']->assign('ratings_pagenav', $ratings_pagenav->renderNav());
- $xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_mirrors'));
+ $xoopsTpl->assign('use_mirrors', $wfdownloads->getConfig('enable_mirrors'));
$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_ratings'));
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -354,7 +354,7 @@
$GLOBALS['xoopsTpl']->assign('modifications_pagenav', $pagenav_modification -> renderNav());
}
- $xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_mirrors'));
+ $xoopsTpl->assign('use_mirrors', $wfdownloads->getConfig('enable_mirrors'));
$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_ratings'));
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -176,7 +176,7 @@
$GLOBALS['xoopsTpl']->assign('reviews_published_pagenav', $pagenav_published -> renderNav());
}
- $xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_mirrors'));
+ $xoopsTpl->assign('use_mirrors', $wfdownloads->getConfig('enable_mirrors'));
$xoopsTpl->assign('use_ratings', $wfdownloads->getConfig('enable_ratings'));
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -237,12 +237,13 @@
$download['lang_subdate'] = ($this->getVar('updated') != 0) ? _MD_WFDOWNLOADS_UPDATEDON : _MD_WFDOWNLOADS_SUBMITDATE;
$summary = $this->getVar('summary');
- if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary)) {
+ if (
+ ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_YES) ||
+ ($this->wfdownloads->getConfig('autosummary') == _WFDOWNLOADS_AUTOSUMMARY_IFBLANK && empty($summary))) {
// generate autosummary
- $summaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
- $summaryDescription = stripslashes($this->getVar('description'));
- $download['summary'] = $myts->displayTarea($summaryDescription, true);
- if (strlen($summaryDescription) > $summaryLength) {
+ $maxSummaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
+ $download['summary'] = $this->getVar('description');
+ if (strlen($download['summary']) > $maxSummaryLength) {
$download['summary'] = wfdownloads_truncateHtml($download['summary'], $summaryLength, '...', false, true);
} else {
// NOP
@@ -404,7 +405,7 @@
$sform->addElement($versiontypes_select);
$sform->addElement(new XoopsFormText(_MD_WFDOWNLOADS_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
-
+/*
if ($this->wfdownloads->getConfig('autosummary') == true) {
$summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
$summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
@@ -415,6 +416,26 @@
$summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
$sform->addElement($summary_dhtmltextarea, false);
}
+*/
+ switch ($this->wfdownloads->getConfig('autosummary')) {
+ case _WFDOWNLOADS_AUTOSUMMARY_YES :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES);
+ $summary_dhtmltextarea->setExtra('disabled', 'disabled');
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK);
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ default :
+ case _WFDOWNLOADS_AUTOSUMMARY_NO :
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO);
+ $sform->addElement($summary_dhtmltextarea, false);
+ break;
+ }
$description_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFDOWNLOADS_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription');
$description_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_DESCRIPTION_DESC);
@@ -597,11 +618,25 @@
$options['mode'] = $mode; // for editors that support mode option
$summary_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
$summary_tray->addElement($summary_editor);
+/*
if ($this->wfdownloads->getConfig('autosummary') == true) {
$summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
} else {
$summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF);
}
+*/
+ switch ($this->wfdownloads->getConfig('autosummary')) {
+ case _WFDOWNLOADS_AUTOSUMMARY_YES :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES);
+ break;
+ case _WFDOWNLOADS_AUTOSUMMARY_IFBLANK :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK);
+ break;
+ default :
+ case _WFDOWNLOADS_AUTOSUMMARY_NO :
+ $summary_tray->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO);
+ break;
+ }
$sform->addElement($summary_tray);
$description_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_DESCRIPTION, '<br />');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-30 17:18:17 UTC (rev 12110)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-09-29)</u></b>
+<b><u>=> Version 3.23 Beta (2013-09-30)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
@@ -18,7 +18,8 @@
- added: enable/disable brokens reports system (luciorota)
- added: admin side downloads filter (luciorota)
- added: breadcrumb class (luciorota)
-- added: html tags compatible autosummary generator (luciorota)
+- added: new autosummary option: autosummary if summary field is empty (luciorota)
+- added: xoops/multilanguages/html tags compatible autosummary generator (luciorota)
- added: sort subcategories by cid or title or weight (luciorota)
- added: improved by letters choice bar (luciorota)
- added: wfdownloads_submit.html template for submit.php (luciorota)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/constants.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -39,4 +39,9 @@
define("_WFDOWNLOADS_AUTOAPPROVE_NONE", 1);
define("_WFDOWNLOADS_AUTOAPPROVE_DOWNLOAD", 2);
define("_WFDOWNLOADS_AUTOAPPROVE_MIRROR", 3);
-define("_WFDOWNLOADS_AUTOAPPROVE_BOTH", 4);
\ No newline at end of file
+define("_WFDOWNLOADS_AUTOAPPROVE_BOTH", 4);
+
+// CONFIG autosummary
+define("_WFDOWNLOADS_AUTOSUMMARY_NO", 1);
+define("_WFDOWNLOADS_AUTOSUMMARY_IFBLANK", 2);
+define("_WFDOWNLOADS_AUTOSUMMARY_YES", 3);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -351,7 +351,7 @@
define("_AM_WFDOWNLOADS_FILE_CREATENEWFILE","Create new file");
define("_AM_WFDOWNLOADS_FILE_TITLE","File title");
define("_AM_WFDOWNLOADS_FILE_DLURL","Remote URL");
-define("_AM_WFDOWNLOADS_FILE_FILENAME","Local filename<br /><br /><span style='font-weight: normal;'>Note: if using local file as download, then you must also enter the correct filetype below!</span>");
+define("_AM_WFDOWNLOADS_FILE_FILENAME","Local filename <br /><br /><span style='font-weight: normal;'>Note: if using local file as download, then you must also enter the correct filetype below!</span>");
define("_AM_WFDOWNLOADS_FILE_FILETYPE","File type");
define("_AM_WFDOWNLOADS_FILE_MIRRORURL","File mirror");
define("_AM_WFDOWNLOADS_FILE_SUMMARY","File summary");
@@ -368,15 +368,15 @@
define("_AM_WFDOWNLOADS_FILE_LICENCE","Software licence");
define("_AM_WFDOWNLOADS_FILE_LIMITATIONS","Software limitations");
define("_AM_WFDOWNLOADS_FILE_PRICE","Price");
-define("_AM_WFDOWNLOADS_FILE_KEYFEATURES","Key features<br /><br /><span style='font-weight: normal;'>Separate each key feature with a |</span>");
-define("_AM_WFDOWNLOADS_FILE_REQUIREMENTS","System requirements<br /><br /><span style='font-weight: normal;'>Separate each requirement with |</span>");
-define("_AM_WFDOWNLOADS_FILE_HISTORY","Download history edit<br /><br /><span style='font-weight: normal;'>Add new download history and only use this field to if you need to edit the previous history.</span>");
-define("_AM_WFDOWNLOADS_FILE_HISTORYD","Add new download history<br /><br /><span style='font-weight: normal;'>The version number and date will be added automatically</span>");
+define("_AM_WFDOWNLOADS_FILE_KEYFEATURES","Key features <br /><br /><span style='font-weight: normal;'>Separate each key feature with a |</span>");
+define("_AM_WFDOWNLOADS_FILE_REQUIREMENTS","System requirements <br /><br /><span style='font-weight: normal;'>Separate each requirement with |</span>");
+define("_AM_WFDOWNLOADS_FILE_HISTORY","Download history edit <br /><br /><span style='font-weight: normal;'>Add new download history and only use this field to if you need to edit the previous history.</span>");
+define("_AM_WFDOWNLOADS_FILE_HISTORYD","Add new download history <br /><br /><span style='font-weight: normal;'>The version number and date will be added automatically</span>");
define("_AM_WFDOWNLOADS_FILE_HISTORYVERS","<b>Version</b>");
define("_AM_WFDOWNLOADS_FILE_HISTORDATE"," <b>Updated</b> ");
-define("_AM_WFDOWNLOADS_FILE_FILESSTATUS"," Set download offline<br /><br /><span style='font-weight: normal;'>Download will not be viewable to all users.</span>");
-define("_AM_WFDOWNLOADS_FILE_SETASUPDATED"," Set download status as updated<br /><br /><span style='font-weight: normal;'>Download will display updated icon.</span>");
-define("_AM_WFDOWNLOADS_FILE_SHOTIMAGE","Select screenshot image<br /><br /><span style='font-weight: normal;'>Note that screenshots will only be displayed if activated in module preferences.</span>");
+define("_AM_WFDOWNLOADS_FILE_FILESSTATUS"," Set download offline <br /><br /><span style='font-weight: normal;'>Download will not be viewable to all users.</span>");
+define("_AM_WFDOWNLOADS_FILE_SETASUPDATED"," Set download status as updated <br /><br /><span style='font-weight: normal;'>Download will display updated icon.</span>");
+define("_AM_WFDOWNLOADS_FILE_SHOTIMAGE","Select screenshot image <br /><br /><span style='font-weight: normal;'>Note that screenshots will only be displayed if activated in module preferences.</span>");
define("_AM_WFDOWNLOADS_FILE_DISCUSSINFORUM","Add discuss in this forum?");
define("_AM_WFDOWNLOADS_FILE_PUBLISHDATE","Download publish date");
define("_AM_WFDOWNLOADS_FILE_EXPIREDATE","Download expire date");
@@ -386,8 +386,8 @@
define("_AM_WFDOWNLOADS_FILE_SETDATETIMEPUBLISH"," Set the date/time of publish");
define("_AM_WFDOWNLOADS_FILE_SETDATETIMEEXPIRE"," Set the date/time of expire");
define("_AM_WFDOWNLOADS_FILE_SETPUBLISHDATE","<b>Set publish date</b>");
-define("_AM_WFDOWNLOADS_FILE_SETNEWPUBLISHDATE","<b>Set new publish date: </b><br />published");
-define("_AM_WFDOWNLOADS_FILE_SETPUBDATESETS","<b>Publish date set: </b><br />publishes on date");
+define("_AM_WFDOWNLOADS_FILE_SETNEWPUBLISHDATE","<b>Set new publish date:</b> <br />published");
+define("_AM_WFDOWNLOADS_FILE_SETPUBDATESETS","<b>Publish date set:</b> <br />publishes on date");
define("_AM_WFDOWNLOADS_FILE_EXPIREDATESET"," Expire date set: ");
define("_AM_WFDOWNLOADS_FILE_SETEXPIREDATE","<b>Set expire date</b>");
define("_AM_WFDOWNLOADS_FILE_MUSTBEVALID","Screenshot image must be a valid image file under %s directory (ex. shot.gif). Leave it blank if there is no image file.");
@@ -524,11 +524,11 @@
define("_AM_WFDOWNLOADS_MIRROR_SUBMITDATE","Submitted");
define("_AM_WFDOWNLOADS_MIRROR_FHOMEURLTITLE","Home page title");
define("_AM_WFDOWNLOADS_MIRROR_FHOMEURL","Home Page URL: ");
-define("_AM_WFDOWNLOADS_MIRROR_UPLOADIMAGE","Upload site logo<br /><br />A small logo representing your website.");
+define("_AM_WFDOWNLOADS_MIRROR_UPLOADIMAGE","Upload site logo <br /><br />A small logo representing your website.");
define("_AM_WFDOWNLOADS_MIRROR_MIRRORIMAGE","Site logo");
define("_AM_WFDOWNLOADS_MIRROR_CONTINENT","Continent");
-define("_AM_WFDOWNLOADS_MIRROR_LOCATION","Location<br /><br />Example: London, UK");
-define("_AM_WFDOWNLOADS_MIRROR_DOWNURL","Download URL<br /><br />Enter the url to the file.");
+define("_AM_WFDOWNLOADS_MIRROR_LOCATION","Location <br /><br />Example: London, UK");
+define("_AM_WFDOWNLOADS_MIRROR_DOWNURL","Download URL <br /><br />Enter the url to the file.");
define("_AM_WFDOWNLOADS_MIRROR_FAPPROVE","Mirror approve");
define("_AM_WFDOWNLOADS_MIRROR_ACTION","Action");
define("_AM_WFDOWNLOADS_MIRROR_NOWAITINGMIRRORS","No waiting mirrors found");
@@ -667,7 +667,7 @@
define("_AM_WFDOWNLOADS_CLONE_NAME_DSC","Do not use special characters! <br />Do not choose an existing module dirname or database table name!");
define("_AM_WFDOWNLOADS_CLONE_INVALIDNAME","ERROR: Invalid module name, please try another one!");
define("_AM_WFDOWNLOADS_CLONE_EXISTS","ERROR: Module name already taken, please try another one!");
-define("_AM_WFDOWNLOADS_CLONE_CONGRAT","Congratulations! %s was sucessfully created!<br />You may want to make changes in language files.");
+define("_AM_WFDOWNLOADS_CLONE_CONGRAT","Congratulations! %s was sucessfully created! <br />You may want to make changes in language files.");
define("_AM_WFDOWNLOADS_CLONE_IMAGEFAIL","Atention, we failed creating the new module logo. Please consider modifying images/module_logo.png manually!");
define("_AM_WFDOWNLOADS_CLONE_FAIL","Sorry, we failed in creating the new clone. Maybe you need to temporally set write permissions (CHMOD 777) to 'modules' folder and try again.");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -22,8 +22,8 @@
//Todo - Still to remove redundat defines from this area.
define("_MD_WFDOWNLOADS_NEEDLOGINVIEW","You need to login first!");
define("_MD_WFDOWNLOADS_NODOWNLOAD","This download does not exist!");
-define("_MD_WFDOWNLOADS_DOWNLOADMINPOSTS","You need to increase you post count<br />Before you can download files");
-define("_MD_WFDOWNLOADS_UPLOADMINPOSTS","You need to increase you post count<br />Before you can upload files");
+define("_MD_WFDOWNLOADS_DOWNLOADMINPOSTS","You need to increase you post count <br />Before you can download files");
+define("_MD_WFDOWNLOADS_UPLOADMINPOSTS","You need to increase you post count <br />Before you can upload files");
define("_MD_WFDOWNLOADS_SUBCATLISTING","Category listing");
define("_MD_WFDOWNLOADS_ISADMINNOTICE","Webmaster: there is a problem with this image.");
@@ -31,7 +31,7 @@
define("_MD_WFDOWNLOADS_ISAPPROVED","Thank-you for your submission. Your request has been approved and will now appear in our listing.");
define("_MD_WFDOWNLOADS_THANKSFORHELP","Thank-you for helping to maintain this directory's integrity.");
define("_MD_WFDOWNLOADS_FORSECURITY","For security reasons your user name and IP address will also be temporarily recorded.");
-define("_MD_WFDOWNLOADS_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!!</b> <br /><br /><b>Definition of a Leecher:</b> One who is to lazy to link from his own server or steals other peoples hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
+define("_MD_WFDOWNLOADS_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!!</b> <br /><br /><b>Definition of a Leecher:</b> One who is to lazy to link from his own server or steals other peoples hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
define("_MD_WFDOWNLOADS_SUMMARY","Summary");
define("_MD_WFDOWNLOADS_DESCRIPTION","Description");
define("_MD_WFDOWNLOADS_SUBMITCATHEAD","Submit download form");
@@ -118,9 +118,9 @@
define("_MD_WFDOWNLOADS_CURSORTBY","Downloads currently sorted by: %s");
define("_MD_WFDOWNLOADS_CANCEL","Cancel");
define("_MD_WFDOWNLOADS_ALREADYREPORTED","You have already submitted a broken report for this resource.");
-define("_MD_WFDOWNLOADS_MUSTREGFIRST","Sorry, you don't have the permission to perform this action.<br />Please register or login first!");
+define("_MD_WFDOWNLOADS_MUSTREGFIRST","Sorry, you don't have the permission to perform this action. <br />Please register or login first!");
define("_MD_WFDOWNLOADS_NORATING","No rating selected.");
-define("_MD_WFDOWNLOADS_CANTVOTEOWN","You cannot vote on the resource you submitted.<br />All votes are logged and reviewed.");
+define("_MD_WFDOWNLOADS_CANTVOTEOWN","You cannot vote on the resource you submitted. <br />All votes are logged and reviewed.");
define("_MD_WFDOWNLOADS_SUBMITDOWNLOAD","Submit download");
define("_MD_WFDOWNLOADS_SUB_SNEWMNAMEDESC","<ul><li>All new downloads are subject to validation and may take up to 24 hours before they appear in our listing.</li><li>We reserve the rights to refuse any submitted download or change the content without approval.</li></ul>");
define("_MD_WFDOWNLOADS_MAINLISTING","Main category listings");
@@ -180,8 +180,8 @@
define("_MD_WFDOWNLOADS_ERROR_CREATEREVIEW","ERROR: unable to create a review");
define("_MD_WFDOWNLOADS_REV_SNEWMNAMEDESC","
-Please completely fill out the form below, and we'll add your review as soon as possible.<br /><br />
-Thank you for taking the time to submit your opinion. We want to give our users a possibility to find quality software faster.<br /><br />All reviews will be reviewed by one of our webmasters before they are put up on the web site.
+Please completely fill out the form below, and we'll add your review as soon as possible. <br /><br />
+Thank you for taking the time to submit your opinion. We want to give our users a possibility to find quality software faster. <br /><br />All reviews will be reviewed by one of our webmasters before they are put up on the web site.
");
define("_MD_WFDOWNLOADS_ISNOTAPPROVED","Your submission has to be approved by a moderator first.");
define("_MD_WFDOWNLOADS_LICENCEC","Software licence");
@@ -259,8 +259,8 @@
define("_MD_WFDOWNLOADS_MIRROR_SUBMITMIRROR","Submit mirror");
define("_MD_WFDOWNLOADS_ERROR_CREATEMIRROR","ERROR: unable to create a mirror");
define("_MD_WFDOWNLOADS_MIRROR_SNEWMNAMEDESC","
-Please completely fill out the form below, and we'll add your mirror as soon as possible.<br /><br />
-Thank you for your assistance in providing another location to download these files. We want to give our users a possibility to find quality software faster.<br /><br />All mirror submissions will be reviewed by one of our webmasters before they are put up on the web site.
+Please completely fill out the form below, and we'll add your mirror as soon as possible. <br /><br />
+Thank you for your assistance in providing another location to download these files. We want to give our users a possibility to find quality software faster. <br /><br />All mirror submissions will be reviewed by one of our webmasters before they are put up on the web site.
");
define("_MD_WFDOWNLOADS_MIRROR_HHOST","Host");
define("_MD_WFDOWNLOADS_MIRROR_HLOCATION","Location");
@@ -314,11 +314,12 @@
define("_MD_WFDOWNLOADS_KEYFEATURESC_DESC","Separate each key feature with a |");
define("_MD_WFDOWNLOADS_REQUIREMENTSC_DESC","Separate each requirement with |");
define("_MD_WFDOWNLOADS_HISTORYD_DESC","The submit date will automatically be added to this.");
-define("_MD_WFDOWNLOADS_UPLOAD_FILEC_DESC","Max file size: %s<br />Max image width: %dpx<br />Max image height: %dpx<br /><span title='%s'>Allowed extensions:<br />%s</span>");
+define("_MD_WFDOWNLOADS_UPLOAD_FILEC_DESC","Max file size: %s <br />Max image width: %dpx <br />Max image height: %dpx <br /><span title='%s'>Allowed extensions: <br />%s</span>");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC","You can leave this blank<br />A summary will be autocreated if empty.");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON","Warning: summary field is disabled.<br />The "Download autosummary" module preference is enabled.<br />A summary will be autocreated using "Description" field content.");
-define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_OFF","You can leave this field blank. A summary will be autocreated using "Description" field content.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC","You can leave this blank <br />A summary will be autocreated if empty.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_YES","Warning: summary field is disabled. <br />The \"Download autosummary\" module preference is enabled. <br />A summary will be autocreated using \"Description\" field content.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_IFBLANK","You can leave this field blank. A summary will be autocreated using \"Description\" field content.");
+define("_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_NO","You can leave this field blank.");
define("_MD_WFDOWNLOADS_DESCRIPTION_DESC","");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -49,31 +49,31 @@
//define("_MI_WFDOWNLOADS_MMIRRORS","Mirrors"); // NOT USED FROM 3.23
// Title of config items
-define('_MI_WFDOWNLOADS_POPULAR','[status] Downloads "popular" count');
+define('_MI_WFDOWNLOADS_POPULAR','[status] Downloads "popular" count');
define('_MI_WFDOWNLOADS_POPULARDSC','The number of hits before a Download status will be considered as popular.');
//Display Icons
-define("_MI_WFDOWNLOADS_ICONDISPLAY","[status] Display Downloads "popular" and "new" icons");
-define("_MI_WFDOWNLOADS_DISPLAYICONDSC","Select how to display the "popular" and "new" icons in download listing.");
+define("_MI_WFDOWNLOADS_ICONDISPLAY","[status] Display Downloads \"popular\" and \"new\" icons");
+define("_MI_WFDOWNLOADS_DISPLAYICONDSC","Select how to display the \"popular\" and \"new\" icons in download listing.");
define("_MI_WFDOWNLOADS_DISPLAYICON1","Display as icons");
define("_MI_WFDOWNLOADS_DISPLAYICON2","Display as text");
define("_MI_WFDOWNLOADS_DISPLAYICON3","Do not display");
-define("_MI_WFDOWNLOADS_DAYSNEW","[status] Downloads days "new"");
-define("_MI_WFDOWNLOADS_DAYSNEWDSC","The amount of days a Download status will be considered as "new".");
-define("_MI_WFDOWNLOADS_DAYSUPDATED","[status] Downloads days "updated"");
-define("_MI_WFDOWNLOADS_DAYSUPDATEDDSC","The amount of days a Download status will be considered as "updated".");
+define("_MI_WFDOWNLOADS_DAYSNEW","[status] Downloads days \"new\"");
+define("_MI_WFDOWNLOADS_DAYSNEWDSC","The amount of days a Download status will be considered as \"new\".");
+define("_MI_WFDOWNLOADS_DAYSUPDATED","[status] Downloads days \"updated\"");
+define("_MI_WFDOWNLOADS_DAYSUPDATEDDSC","The amount of days a Download status will be considered as \"updated\".");
define('_MI_WFDOWNLOADS_PERPAGE','Download listing count');
define('_MI_WFDOWNLOADS_PERPAGEDSC','Number of Downloads to display in each category listing.');
define('_MI_WFDOWNLOADS_TEMPLATESET','Select Template Set');
-define('_MI_WFDOWNLOADS_TEMPLATESETDSC','Select Templates to use for your module.<br />This will allow you to choose how your downloads are listed');
+define('_MI_WFDOWNLOADS_TEMPLATESETDSC','Select Templates to use for your module. <br />This will allow you to choose how your downloads are listed');
define('_MI_WFDOWNLOADS_TEMPLATESET1','Default');
define('_MI_WFDOWNLOADS_TEMPLATESET2','Professional');
define('_MI_WFDOWNLOADS_USESHOTS','[screenshots] Display screenshot images');
-define('_MI_WFDOWNLOADS_USESHOTSDSC','Select "' . _YES . '" to display screenshot images for each download item.');
+define('_MI_WFDOWNLOADS_USESHOTSDSC','Select "' . _YES . '" to display screenshot images for each download item.');
define('_MI_WFDOWNLOADS_SHOTWIDTH','[thumbnails] Thumbnails width (pixels)');
define('_MI_WFDOWNLOADS_SHOTWIDTHDSC','Display width for thumbnails image.');
define('_MI_WFDOWNLOADS_SHOTHEIGHT','[thumbnails] Thumbnails height (pixels)');
@@ -119,10 +119,10 @@
define('_MI_WFDOWNLOADS_AUTOSUMMARYLENGTHDESC','The maximum amount of characters displayed for the summary.');
define('_MI_WFDOWNLOADS_UPLOADDIR','[upload files] Upload directory');
-define('_MI_WFDOWNLOADS_UPLOADDIRDSC','Upload directory *MUST* be an absolute path!<br />No trailing slash.');
+define('_MI_WFDOWNLOADS_UPLOADDIRDSC','Upload directory *MUST* be an absolute path! <br />No trailing slash.');
define('_MI_WFDOWNLOADS_ENABLERSS','[RSS feeds] Enable RSS Feeds');
-define('_MI_WFDOWNLOADS_ENABLERSSDSC','Select "' . _YES . '" to enable rss feeds.');
+define('_MI_WFDOWNLOADS_ENABLERSSDSC','Select "' . _YES . '" to enable rss feeds.');
define('_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',"Minimum posts required to download");
define('_MI_WFDOWNLOADS_DOWNLOADMINPOSTSDSC',"Enter the minimum number of posts required to download a file.");
@@ -136,16 +136,16 @@
define('_MI_WFDOWNLOADS_ALLOWSUBMISS3','Mirror only');
define('_MI_WFDOWNLOADS_ALLOWSUBMISS4','Both');
define('_MI_WFDOWNLOADS_ALLOWUPLOADS','[submissions] User can uploads files');
-define('_MI_WFDOWNLOADS_ALLOWUPLOADSDSC','Allow Users to upload files directly to your website.<br />This includes both files & screenshots!');
+define('_MI_WFDOWNLOADS_ALLOWUPLOADSDSC','Allow Users to upload files directly to your website. <br />This includes both files & screenshots!');
define('_MI_WFDOWNLOADS_ALLOWUPLOADSGROUP','[submissions] Groups uploading files');
-define('_MI_WFDOWNLOADS_ALLOWUPLOADSGROUPDSC','Select groups that can upload files directly to your website.<br />This includes both files & screenshots!');
+define('_MI_WFDOWNLOADS_ALLOWUPLOADSGROUPDSC','Select groups that can upload files directly to your website. <br />This includes both files & screenshots!');
define('_MI_WFDOWNLOADS_SCREENSHOTS','[screenshots] Screenshots upload directory');
define('_MI_WFDOWNLOADS_CATEGORYIMG','Categories images upload directory');
define('_MI_WFDOWNLOADS_MAINIMGDIR','Main images directory');
define('_MI_WFDOWNLOADS_USETHUMBS','[thumbnails] Use thumbnails');
-define('_MI_WFDOWNLOADS_USETHUMBSDSC','Supported file types: JPG, GIF, PNG.<br />Wfdownloads will use thumbnails for images (category & screenshots).<br />Set to "' . _NO . '" to use orginal image if the server does not support this option.');
+define('_MI_WFDOWNLOADS_USETHUMBSDSC','Supported file types: JPG, GIF, PNG. <br />Wfdownloads will use thumbnails for images (category & screenshots). <br />Set to "' . _NO . '" to use orginal image if the server does not support this option.');
define('_MI_WFDOWNLOADS_DATEFORMAT','Timestamp');
-define('_MI_WFDOWNLOADS_DATEFORMATDSC','Default Timestamp for Wfdownloads users side.<br />More info here: <a href="http://www.php.net/manual/en/function.date.php">http://www.php.net/manual/en/function.date.php</a>');
+define('_MI_WFDOWNLOADS_DATEFORMATDSC','Default Timestamp for module frontend. <br />More info here: <a href="http://www.php.net/manual/en/function.date.php">http://www.php.net/manual/en/function.date.php</a>');
define('_MI_WFDOWNLOADS_SHOWDISCLAIMER','[disclaimer] Show disclaimer before user submission');
define('_MI_WFDOWNLOADS_SHOWDOWNDISCL','[disclaimer] Show disclaimer before user download');
define('_MI_WFDOWNLOADS_DISCLAIMER','[disclaimer] Submission disclaimer text');
@@ -159,10 +159,10 @@
define('_MI_WFDOWNLOADS_MAXSHOTSDSC','Sets the maximum number of allowed screenshot uploads.');
define("_MI_WFDOWNLOADS_SUBMITART","[submissions] Download submission");
-define("_MI_WFDOWNLOADS_SUBMITARTDSC","Select groups that can submit new downloads.<br />Webmasters are automatically selected!");
+define("_MI_WFDOWNLOADS_SUBMITARTDSC","Select groups that can submit new downloads. <br />Webmasters are automatically selected!");
define("_MI_WFDOWNLOADS_IMGUPDATE","[thumbnails] Update thumbnails");
-define("_MI_WFDOWNLOADS_IMGUPDATEDSC",'If selected "' . _YES . '" thumbnail images will be updated at each page render, otherwise the first thumbnail image will be used regardless.');
+define("_MI_WFDOWNLOADS_IMGUPDATEDSC",'If selected "' . _YES . '" thumbnail images will be updated at each page render, otherwise the first thumbnail image will be used regardless.');
define("_MI_WFDOWNLOADS_QUALITY","[thumbnails] Thumbnail quality");
define("_MI_WFDOWNLOADS_QUALITYDSC","Quality lowest: 0 highest: 100.");
define("_MI_WFDOWNLOADS_KEEPASPECT","[thumbnails] Keep image aspect ratio");
@@ -180,9 +180,9 @@
define('_MI_WFDOWNLOADS_COPYRIGHTDSC','Select to display a copyright notice on download page.');
// Description of each config items
-define('_MI_WFDOWNLOADS_PLATFORMDSC','List of platforms to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
-define('_MI_WFDOWNLOADS_SUBCATSDSC','Select "' . _YES . '" to display subcategories. Selecting "' . _NO . '" will hide sub-categories from the listings.');
-define('_MI_WFDOWNLOADS_LICENSEDSC','List of licenses to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
+define('_MI_WFDOWNLOADS_PLATFORMDSC','List of platforms to enter. <br />Separate with | <br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
+define('_MI_WFDOWNLOADS_SUBCATSDSC','Select "' . _YES . '" to display subcategories. Selecting "' . _NO . '" will hide sub-categories from the listings.');
+define('_MI_WFDOWNLOADS_LICENSEDSC','List of licenses to enter. <br />Separate with | <br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
// Text for notifications
define('_MI_WFDOWNLOADS_GLOBAL_NOTIFY','Global');
@@ -288,14 +288,14 @@
INCIDENTAL OR CONSEQUENTIAL DAMAGES HOWEVER THEY MAY ARISE AND EVEN IF
XOOPS HAS BEEN PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES..");
-define('_MI_WFDOWNLOADS_AUTHOR_CREDITSTEXT',"The SmartFactory Team would like to thank the following people for their help and support during the development phase of this module:<br /><br />tom, mking, paco1969, mharoun, Talis, m0nty, steenlnielsen, Clubby, Geronimo, bd_csmc, herko, LANG, Stewdio, tedsmith, veggieryan, carnuke, MadFish, Kiang<br />and anyone else who has contributed to either directly or indirectly.");
+define('_MI_WFDOWNLOADS_AUTHOR_CREDITSTEXT',"The SmartFactory Team would like to thank the following people for their help and support during the development phase of this module: <br /><br />tom, mking, paco1969, mharoun, Talis, m0nty, steenlnielsen, Clubby, Geronimo, bd_csmc, herko, LANG, Stewdio, tedsmith, veggieryan, carnuke, MadFish, Kiang<br />and anyone else who has contributed to either directly or indirectly.");
define('_MI_WFDOWNLOADS_AUTHOR_BUGFIXES',"Bug Fix History");
define('_MI_WFDOWNLOADS_COPYRIGHTIMAGE',"Images copyright WF-Project/SmartFactory and may only be used with permission");
// mirror defines
define('_MI_WFDOWNLOADS_MIRROR_USEIMAGES','Display mirror logos'); // not implemented yet
-define('_MI_WFDOWNLOADS_MIRROR_USEIMAGESDSC','Select "' . _YES . '" to display logo for each mirror.'); // not implemented yet
+define('_MI_WFDOWNLOADS_MIRROR_USEIMAGESDSC','Select "' . _YES . '" to display logo for each mirror.'); // not implemented yet
define('_MI_WFDOWNLOADS_MIRROR_IMGWIDTH','Logo display width'); // not implemented yet
define('_MI_WFDOWNLOADS_MIRROR_IMGWIDTHDSC','Display width for mirror logo.'); // not implemented yet
define('_MI_WFDOWNLOADS_MIRROR_IMGHEIGHT','Logo display height'); // not implemented yet
@@ -311,7 +311,7 @@
define('_MI_WFDOWNLOADS_MIRROR_ENABLE','[mirrors] Enable mirrors system');
define('_MI_WFDOWNLOADS_MIRROR_ENABLEDSC','If enabled, morrors system (submit and use mirrors) is enabled in backend.');
define('_MI_WFDOWNLOADS_MIRROR_ENABLEONCHK','[mirrors] Enable server online check');
-define('_MI_WFDOWNLOADS_MIRROR_ENABLEONCHKDSC','Enables the host server check for the mirrors.<br />This can slow your page load down if you have many mirrors.');
+define('_MI_WFDOWNLOADS_MIRROR_ENABLEONCHKDSC','Enables the host server check for the mirrors. <br />This can slow your page load down if you have many mirrors.');
define('_MI_WFDOWNLOADS_MIRROR_ALLOWSUBMISS','[mirrors] User mirror submissions');
define('_MI_WFDOWNLOADS_MIRROR_ALLOWSUBMISSDSC','Allow users to submit new mirrors.');
define('_MI_WFDOWNLOADS_MIRROR_MIRRORIMAGES','[mirrors] Mirror logo upload directory'); // not implemented yet
@@ -349,9 +349,9 @@
define("_MI_WFDOWNLOADS_MENU_CLONE","Clone module");
define("_MI_WFDOWNLOADS_MENU_ABOUT","About");
-define("_MI_WFDOWNLOADS_SCREENSHOTSDSC","Path relative to Xoops root path: "" . XOOPS_ROOT_PATH . "/".<br />No trailing slash.");
-define("_MI_WFDOWNLOADS_MAINIMGDIRDSC","Path relative to Xoops root path: "" . XOOPS_ROOT_PATH . "/".<br />No trailing slash.");
-define("_MI_WFDOWNLOADS_CATEGORYIMGDSC","Path relative to Xoops root path: "" . XOOPS_ROOT_PATH . "/".<br />No trailing slash.");
+define("_MI_WFDOWNLOADS_SCREENSHOTSDSC","Path relative to Xoops root path: \"" . XOOPS_ROOT_PATH . "/\". <br />No trailing slash.");
+define("_MI_WFDOWNLOADS_MAINIMGDIRDSC","Path relative to Xoops root path: \"" . XOOPS_ROOT_PATH . "/\". <br />No trailing slash.");
+define("_MI_WFDOWNLOADS_CATEGORYIMGDSC","Path relative to Xoops root path: \"" . XOOPS_ROOT_PATH . "/\". <br />No trailing slash.");
define("_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC","");
define("_MI_WFDOWNLOADS_DISCLAIMERDSC","HTML tags, smiley icons, XOOPS codes, images are enabled.");
@@ -359,8 +359,8 @@
define("_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC","");
define("_MI_WFDOWNLOADS_DOWNDISCLAIMERDSC","HTML tags, smiley icons, XOOPS codes, images are enabled.");
-define("_MI_WFDOWNLOADS_LIMITSDSC","List of limits to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
-define("_MI_WFDOWNLOADS_VERSIONTYPESDSC","List of version types to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
+define("_MI_WFDOWNLOADS_LIMITSDSC","List of limits to enter. <br />Separate with | <br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
+define("_MI_WFDOWNLOADS_VERSIONTYPESDSC","List of version types to enter. <br />Separate with | <br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
define("_MI_WFDOWNLOADS_REVIEW_ENABLE","[reviews] Enable Reviews system");
define("_MI_WFDOWNLOADS_REVIEW_ENABLEDSC","If enabled, Reviews system (submit and show reviews) is enabled in backend.");
@@ -371,9 +371,15 @@
define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLE","[broken reports] Enable Broken reports system");
define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLEDSC","If enabled, Broken reports system is enabled in backend.");
-define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS","File submission generals permissions");
+define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS","Downloads submission generals permissions");
define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGSDSC","");
+define("_MI_WFDOWNLOADS_DOWNLOAD_CONFIGS","Download preferences");
+define("_MI_WFDOWNLOADS_DOWNLOAD_CONFIGSDSC","");
+
+define("_MI_WFDOWNLOADS_UPLOAD_CONFIGS","Upload/submit preferences");
+define("_MI_WFDOWNLOADS_UPLOAD_CONFIGSDSC","");
+
define("_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGS","Screenshots preferences");
define("_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGSDSC","");
@@ -385,3 +391,7 @@
define("_MI_WFDOWNLOADS_VARIOUS_CONFIGS","Various preferences");
define("_MI_WFDOWNLOADS_VARIOUS_CONFIGSDSC","");
+
+define("_MI_WFDOWNLOADS_AUTOSUMMARY1",_NO);
+define("_MI_WFDOWNLOADS_AUTOSUMMARY2","If blank");
+define("_MI_WFDOWNLOADS_AUTOSUMMARY3",_YES);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-30 02:38:53 UTC (rev 12109)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-30 17:18:17 UTC (rev 12110)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-09-29';
-$modversion['release_date'] = '2013/09/29';
-$modversion['releasedate'] = '2013-09-29';
+$modversion['date'] = '2013-09-30';
+$modversion['release_date'] = '2013/09/30';
+$modversion['releasedate'] = '2013-09-30';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
@@ -323,7 +323,7 @@
$modversion['templates'][$i]['description'] = '';
-//Module config setting
+// Module config setting
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
$editorList = array_flip($editor_handler->getList());
@@ -383,9 +383,28 @@
'default' => 10);
$modversion['config'][] = array(
- 'name' => 'submissions_configs',
- 'title' => '_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS',
- 'description' => '_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGSDSC',
+ 'name' => 'admin_perpage',
+ 'title' => '_MI_WFDOWNLOADS_ADMINPAGE',
+ 'description' => '_MI_WFDOWNLOADS_ADMINPAGEDESC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50),
+ 'default' => 10);
+
+$modversion['config'][] = array(
+ 'name' => 'dateformat',
+ 'title' => '_MI_WFDOWNLOADS_DATEFORMAT',
+ 'description' => '_MI_WFDOWNLOADS_DATEFORMATDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'text',
+ 'default' => _DATESTRING); //'D, d-M-Y');
+
+
+// Upload configs
+$modversion['config'][] = array(
+ 'name' => 'upload_configs',
+ 'title' => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
@@ -454,6 +473,66 @@
'default' => '1');
$modversion['config'][] = array(
+ 'name' => 'upload_minposts',
+ 'title' => '_MI_WFDOWNLOADS_UPLOADMINPOSTS',
+ 'description' => '_MI_WFDOWNLOADS_UPLOADMINPOSTSDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 0);
+
+$modversion['config'][] = array(
+ 'name' => 'showdisclaimer',
+ 'title' => '_MI_WFDOWNLOADS_SHOWDISCLAIMER',
+ 'description' => '_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => false);
+
+$modversion['config'][] = array(
+ 'name' => 'disclaimer',
+ 'title' => '_MI_WFDOWNLOADS_DISCLAIMER',
+ 'description' => '_MI_WFDOWNLOADS_DISCLAIMERDSC',
+ 'formtype' => 'textarea',
+ 'valuetype' => 'text',
+ 'default' => 'We have the right, but not the obligation to monitor and review submissions submitted by users, in the forums. We shall not be responsible for any of the content of these messages. We further reserve the right, to delete, move or edit submissions that the we, in its exclusive discretion, deems abusive, defamatory, obscene or in violation of any Copyright or Trademark laws or otherwise objectionable.');
+
+
+// Download configs
+$modversion['config'][] = array(
+ 'name' => 'download_configs',
+ 'title' => '_MI_WFDOWNLOADS_DOWNLOAD_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_UPLOAD_CONFIGS',
+ 'formtype' => 'line_break',
+ 'valuetype' => 'textbox',
+ 'default' => 'head');
+
+$modversion['config'][] = array(
+ 'name' => 'download_minposts',
+ 'title' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',
+ 'description' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTSDSC',
+ 'formtype' => 'textbox',
+ 'valuetype' => 'int',
+ 'default' => 0);
+
+$modversion['config'][] = array(
+ 'name' => 'showDowndisclaimer',
+ 'title' => '_MI_WFDOWNLOADS_SHOWDOWNDISCL',
+ 'description' => '_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => false);
+
+$modversion['config'][] = array(
+ 'name' => 'downdisclaimer',
+ 'title' => '_MI_WFDOWNLOADS_DOWNDISCLAIMER',
+ 'description' => '_MI_WFDOWNLOADS_DOWNDISCLAIMERDSC',
+ 'formtype' => 'textarea',
+ 'valuetype' => 'text',
+ 'default' => 'The file downloads on this site are provided as is without warranty either expressed or implied. Downloaded files should be checked for possible virus infection using the most up-to-date detection and security packages. If you have a question concerning a particular piece of software, feel free to contact the developer. We refuse liability for any damage or loss resulting from the use or misuse of any software offered from this site for downloading. If you have any doubt at all about the safety and operation of software made available to you on this site, do not download it.<br /><br />Contact us if you have questions concerning this disclaimer.');
+
+
+// Screenshots/thumbs configs
+$modversion['config'][] = array(
'name' => 'screenshots_configs',
'title' => '_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGS',
'description' => '_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGSDSC',
@@ -534,6 +613,8 @@
'valuetype' => 'int',
'default' => false);
+
+// Files configs
$modversion['config'][] = array(
'name' => 'filesuploads_configs',
'title' => '_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGS',
@@ -606,6 +687,8 @@
'valuetype' => 'text',
'default' => 'uploads/' . $modversion['dirname'] . '/images');
+
+// extra systems configs
$modversion['config'][] = array(
'name' => 'extrasystems_configs',
'title' => '_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMS',
@@ -679,6 +762,16 @@
'default' => true);
$modversion['config'][] = array(
+ 'name' => 'copyright',
+ 'title' => '_MI_WFDOWNLOADS_COPYRIGHT',
+ 'description' => '_MI_WFDOWNLOADS_COPYRIGHTDSC',
+ 'formtype' => 'yesno',
+ 'valuetype' => 'int',
+ 'default' => true);
+
+
+// Various configs
+$modversion['config'][] = array(
'name' => 'various_configs',
'title' => '_MI_WFDOWNLOADS_VARIOUS_CONFIGS',
'description' => '_MI_WFDOWNLOADS_VARIOUS_CONFIGSDSC',
@@ -687,22 +780,6 @@
'default' => 'head');
$modversion['config'][] = array(
- 'name' => 'download_minposts',
- 'title' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTS',
- 'description' => '_MI_WFDOWNLOADS_DOWNLOADMINPOSTSDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 0);
-
-$modversion['config'][] = array(
- 'name' => 'upload_minposts',
- 'title' => '_MI_WFDOWNLOADS_UPLOADMINPOSTS',
- 'description' => '_MI_WFDOWNLOADS_UPLOADMINPOSTSDSC',
- 'formtype' => 'textbox',
- 'valuetype' => 'int',
- 'default' => 0);
-
-$modversion['config'][] = array(
'name' => 'check_host',
'title' => '_MI_WFDOWNLOADS_CHECKHOST',
'description' => '_MI_WFDOWNLOADS_CHECKHOSTDSC',
@@ -737,14 +814,26 @@
'_MI_WFDOWNLOADS_SUBCATSSORTBYWEIGHT' => 'weight'),
'default' => 'weight');
+$qa = ' (A)';
+$qd = ' (D)';
$modversion['config'][] = array(
- 'name' => 'dateformat',
- 'title' => '_MI_WFDOWNLOADS_DATEFORMAT',
- 'description' => '_MI_WFDOWNLOADS_DATEFORMATDSC',
- 'formtype' => 'textbox',
+ 'name' => 'filexorder',
+ 'title' => '_MI_WFDOWNLOADS_ARTICLESSORT',
+ 'description' => '_MI_WFDOWNLOADS_ARTICLESSORTDSC',
+ 'formtype' => 'select',
'valuetype' => 'text',
- 'default' => _DATESTRING); //'D, d-M-Y');
+ 'options' => array(
+ _MI_WFDOWNLOADS_TITLE . $qa => 'title ASC',
+ _MI_WFDOWNLOADS_TITLE . $qd => 'title DESC',
+ _MI_WFDOWNLOADS_SUBMITTED2 . $qa => 'published ASC' ,
+ _MI_WFDOWNLOADS_SUBMITTED2 . $qd => 'published DESC',
+ _MI_WFDOWNLOADS_RATING . $qa => 'rating ASC',
+ _MI_WFDOWNLOADS_RATING . $qd => 'rating DESC',
+ _MI_WFDOWNLOADS_POPULARITY . $qa => 'hits ASC',
+ _MI_WFDOWNLOADS_POPULARITY . $qd => 'hits DESC'),
+ 'default' => 'title ASC');
+/*
$modversion['config'][] = array(
'name' => 'autosummary',
'title' => '_MI_WFDOWNLOADS_AUTOSUMMARY',
@@ -752,6 +841,18 @@
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => true);
+*/
+$modversion['config'][] = array(
+ 'name' => 'autosummary',
+ 'title' => '_MI_WFDOWNLOADS_AUTOSUMMARY',
+ 'description' => '_MI_WFDOWNLOADS_AUTOSUMMARYDESC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'options' => array(
+ '_MI_WFDOWNLOADS_AUTOSUMMARY1' => _WFDOWNLOADS_AUTOSUMMARY_NO,
+ '_MI_WFDOWNLOADS_AUTOSUMMARY2' => _WFDOWNLOADS_AUTOSUMMARY_IFBLANK,
+ '_MI_WFDOWNLOADS_AUTOSUMMARY3' => _WFDOWNLOADS_AUTOSUMMARY_YES),
+ 'default' => _WFDOWNLOADS_AUTOSUMMARY_NO);
$modversion['config'][] = array(
'name' => 'autosumlength',
@@ -762,38 +863,6 @@
'default' => 200);
$modversion['config'][] = array(
- 'name' => 'showdisclaimer',
- 'title' => '_MI_WFDOWNLOADS_SHOWDISCLAIMER',
- 'description' => '_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => false);
-
-$modversion['config'][] = array(
- 'name' => 'disclaimer',
- 'title' => '_MI_WFDOWNLOADS_DISCLAIMER',
- 'description' => '_MI_WFDOWNLOADS_DISCLAIMERDSC',
- 'formtype' => 'textarea',
- 'valuetype' => 'text',
- 'default' => 'We have the right, but not the obligation to monitor and review submissions submitted by users, in the forums. We shall not be responsible for any of the content of these messages. We further reserve the right, to delete, move or edit submissions that the we, in its exclusive discretion, deems abusive, defamatory, obscene or in violation of any Copyright or Trademark laws or otherwise objectionable.');
-
-$modversion['config'][] = array(
- 'name' => 'showDowndisclaimer',
- 'title' => '_MI_WFDOWNLOADS_SHOWDOWNDISCL',
- 'description' => '_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => false);
-
-$modversion['config'][] = array(
- 'name' => 'downdisclaimer',
- 'title' => '_MI_WFDOWNLOADS_DOWNDISCLAIMER',
- 'description' => '_MI_WFDOWNLOADS_DOWNDISCLAIMERDSC',
- 'formtype' => 'textarea',
- 'valuetype' => 'text',
- 'default' => 'The file downloads on this site are provided as is without warranty either expressed or implied. Downloaded files should be checked for possible virus infection using the most up-to-date detection and security packages. If you have a question concerning a particular piece of software, feel free to contact the developer. We refuse liability for any damage or loss resulting from the use or misuse of any software offered from this site for downloading. If you have any doubt at all about the safety and operation of software made available to you on this site, do not download it.<br /><br />Contact us if you have questions concerning this disclaimer.');
-
-$modversion['config'][] = array(
'name' => 'platform',
'title' => '_MI_WFDOWNLOADS_PLATFORM',
'description' => '_MI_WFDOWNLOADS_PLATFORMDSC',
@@ -851,42 +920,6 @@
'valuetype' => 'array',
'default' => 'None|Alpha|Beta|RC|Final');
-$modversion['config'][] = array(
- 'name' => 'admin_perpage',
- 'title' => '_MI_WFDOWNLOADS_ADMINPAGE',
- 'description' => '_MI_WFDOWNLOADS_ADMINPAGEDESC',
- 'formtype' => 'select',
- 'valuetype' => 'int',
- 'options' => array('5' => 5, '10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30, '50' => 50),
- 'default' => 10);
-
-$qa = ' (A)';
-$qd = ' (D)';
-$modversion['config'][] = array(
- 'name' => 'filexorder',
- 'title' => '_MI_WFDOWNLOADS_ARTICLESSORT',
- 'description' => '_MI_WFDOWNLOADS_ARTICLESSORTDSC',
- 'formtype' => 'select',
- 'valuetype' => 'text',
- 'options' => array(
- _MI_WFDOWNLOADS_TITLE . $qa => 'title ASC',
- _MI_WFDOWNLOADS_TITLE . $qd => 'title DESC',
- _MI_WFDOWNLOADS_SUBMITTED2 . $qa => 'published ASC' ,
- _MI_WFDOWNLOADS_SUBMITTED2 . $qd => 'published DESC',
- _MI_WFDOWNLOADS_RATING . $qa => 'rating ASC',
- _MI_WFDOWNLOADS_RATING . $qd => 'rating DESC',
- _MI_WFDOWNLOADS_POPULARITY . $qa => 'hits ASC',
- _MI_WFDOWNLOADS_POPULARITY . $qd => 'hits DESC'),
- 'default' => 'title ASC');
-
-$modversion['config'][] = array(
- 'name' => 'copyright',
- 'title' => '_MI_WFDOWNLOADS_COPYRIGHT',
- 'description' => '_MI_WFDOWNLOADS_COPYRIGHTDSC',
- 'formtype' => 'yesno',
- 'valuetype' => 'int',
- 'default' => true);
-
/* // Not completed yet
$modversion['config'][] = array(
'name' => 'mirrorimage',
|
|
From: <ce...@us...> - 2013-09-30 02:38:57
|
Revision: 12109
http://sourceforge.net/p/xoops/svn/12109
Author: cesag
Date: 2013-09-30 02:38:53 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
fixed bug with video thumbnail (alain01)
Modified Paths:
--------------
XoopsModules/xoopstube/trunk/xoopstube/docs/changelog.txt
XoopsModules/xoopstube/trunk/xoopstube/include/video.php
XoopsModules/xoopstube/trunk/xoopstube/xoops_version.php
Modified: XoopsModules/xoopstube/trunk/xoopstube/docs/changelog.txt
===================================================================
--- XoopsModules/xoopstube/trunk/xoopstube/docs/changelog.txt 2013-09-29 21:10:51 UTC (rev 12108)
+++ XoopsModules/xoopstube/trunk/xoopstube/docs/changelog.txt 2013-09-30 02:38:53 UTC (rev 12109)
@@ -1,4 +1,12 @@
+
=========================================================
+2013-09-30 1.06 RC 2
+=========================================================
+
+- Added install.php file (txmodxoops)
+- fixed bug with video thumbnail (alain01)
+
+=========================================================
2013-06-16 1.06 RC 1
=========================================================
Modified: XoopsModules/xoopstube/trunk/xoopstube/include/video.php
===================================================================
--- XoopsModules/xoopstube/trunk/xoopstube/include/video.php 2013-09-29 21:10:51 UTC (rev 12108)
+++ XoopsModules/xoopstube/trunk/xoopstube/include/video.php 2013-09-30 02:38:53 UTC (rev 12109)
@@ -157,11 +157,11 @@
break;
// Determine if video source is XoopsTube for thumbnail
- case 200:
- $thumb
- = '<img src="' . XOOPS_URL . '/' . $screenshot . '" width="' . $width . '" height="' . $height
- . '" title="' . $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />';
- break;
+ case 200:
+ $thumb
+ =
+ '<img src="' . XOOPS_URL . '/' . $screenshot . '/' . $picurl .'" title="'. $title . '" alt="' . $title . '" style="padding: 0px; border-style: none;" />';
+ break;
}
return $thumb;
}
Modified: XoopsModules/xoopstube/trunk/xoopstube/xoops_version.php
===================================================================
--- XoopsModules/xoopstube/trunk/xoopstube/xoops_version.php 2013-09-29 21:10:51 UTC (rev 12108)
+++ XoopsModules/xoopstube/trunk/xoopstube/xoops_version.php 2013-09-30 02:38:53 UTC (rev 12109)
@@ -49,20 +49,10 @@
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
//about
-$modversion['release_date'] = '2013/07/07';
+$modversion['release_date'] = '2013/09/30';
$modversion["module_website_url"] = "www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-
-
-
-$modversion["module_status"] = "RC1";
-
-$modversion["module_status"] = "Beta1";
-
-$modversion["module_status"] = "Beta 2";
-
-$modversion["module_status"] = "RC 1";
-
+$modversion["module_status"] = "RC 2";
$modversion['min_php'] = '5.2';
$modversion['min_xoops'] = "2.5.6";
$modversion['min_admin'] = '1.1';
|
|
From: <luc...@us...> - 2013-09-29 21:10:54
|
Revision: 12108
http://sourceforge.net/p/xoops/svn/12108
Author: luciorota
Date: 2013-09-29 21:10:51 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
add categories ID column to categories list in /admin/categories.php
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-29 12:56:30 UTC (rev 12107)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-29 21:10:51 UTC (rev 12108)
@@ -670,3 +670,6 @@
define("_AM_WFDOWNLOADS_CLONE_CONGRAT","Congratulations! %s was sucessfully created!<br />You may want to make changes in language files.");
define("_AM_WFDOWNLOADS_CLONE_IMAGEFAIL","Atention, we failed creating the new module logo. Please consider modifying images/module_logo.png manually!");
define("_AM_WFDOWNLOADS_CLONE_FAIL","Sorry, we failed in creating the new clone. Maybe you need to temporally set write permissions (CHMOD 777) to 'modules' folder and try again.");
+
+// admin/categories.php
+define("_AM_WFDOWNLOADS_FCATEGORY_ID","ID");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html 2013-09-29 12:56:30 UTC (rev 12107)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_categorieslist.html 2013-09-29 21:10:51 UTC (rev 12108)
@@ -3,6 +3,7 @@
<legend style='font-weight: bold; color: #900;'><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_CATEGORIES_LIST}></legend>
<table class="outer">
<tr>
+ <th><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_ID}></th>
<th><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_TITLE}></th>
<th><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_WEIGHT}></th>
<th><{$smarty.const._AM_WFDOWNLOADS_FCATEGORY_DESCRIPTION}></th>
@@ -10,6 +11,7 @@
</tr>
<{foreach item=sorted_category from=$sorted_categories}>
<tr class="<{cycle values='even, odd'}>">
+ <td><{$sorted_category.category.cid}></td>
<td>
<{section name=indent loop=$sorted_category.level-1 step=1}}>-<{/section}>
<a href='../viewcat.php?cid=<{$sorted_category.category.cid}>'><{$sorted_category.category.title}></a>
|
|
From: <luc...@us...> - 2013-09-29 12:56:33
|
Revision: 12107
http://sourceforge.net/p/xoops/svn/12107
Author: luciorota
Date: 2013-09-29 12:56:30 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
fixed error in download submit form
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-29 10:23:10 UTC (rev 12106)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-29 12:56:30 UTC (rev 12107)
@@ -420,7 +420,7 @@
$description_dhtmltextarea->setDescription(_MD_WFDOWNLOADS_DESCRIPTION_DESC);
$sform->addElement($description_dhtmltextarea, true);
$features_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_KEYFEATURESC, 'features', $this->getVar('features', 'e'), 7, 60);
- $features_textarea->setDescription(_MD_WFDOWNLOADS_SUMMARY_DESC_AUTOSUMMARY_ON);
+ $features_textarea->setDescription(_MD_WFDOWNLOADS_KEYFEATURESC_DESC);
$sform->addElement($features_textarea, false);
$requirements_textarea = new XoopsFormTextArea(_MD_WFDOWNLOADS_REQUIREMENTSC, 'requirements', $this->getVar('requirements', 'e'), 7, 60);
$requirements_textarea->setDescription(_MD_WFDOWNLOADS_REQUIREMENTSC_DESC);
@@ -586,6 +586,7 @@
$sform->addElement(new XoopsFormText(_AM_WFDOWNLOADS_FILE_PRICE, 'price', 10, 20, $this->getVar('price', 'e')), false);
+ $mode = 'html';
$summary_tray = new XoopsFormElementTray(_MD_WFDOWNLOADS_SUMMARY, '<br />');
$options['name'] = 'summary';
$options['value'] = $this->getVar('summary', 'e');
@@ -593,6 +594,7 @@
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
+ $options['mode'] = $mode; // for editors that support mode option
$summary_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
$summary_tray->addElement($summary_editor);
if ($this->wfdownloads->getConfig('autosummary') == true) {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-29 10:23:10 UTC (rev 12106)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-29 12:56:30 UTC (rev 12107)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-09-25)</u></b>
+<b><u>=> Version 3.23 Beta (2013-09-29)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-29 10:23:10 UTC (rev 12106)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-29 12:56:30 UTC (rev 12107)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-09-25';
-$modversion['release_date'] = '2013/09/25';
-$modversion['releasedate'] = '2013-09-25';
+$modversion['date'] = '2013-09-29';
+$modversion['release_date'] = '2013/09/29';
+$modversion['releasedate'] = '2013-09-29';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <be...@us...> - 2013-09-29 10:23:14
|
Revision: 12106
http://sourceforge.net/p/xoops/svn/12106
Author: beckmi
Date: 2013-09-29 10:23:10 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
Updating to 0.73 Beta 1
Modified Paths:
--------------
XoopsModules/latestnews/trunk/latestnews/admin/admin.php
XoopsModules/latestnews/trunk/latestnews/admin/header.php
XoopsModules/latestnews/trunk/latestnews/admin/menu.php
XoopsModules/latestnews/trunk/latestnews/blocks/latestnews.php
XoopsModules/latestnews/trunk/latestnews/class/class.latestnews.php
XoopsModules/latestnews/trunk/latestnews/docs/changelog.txt
XoopsModules/latestnews/trunk/latestnews/images/latestnews_logo.png
XoopsModules/latestnews/trunk/latestnews/include/blocksadmin.inc.php
XoopsModules/latestnews/trunk/latestnews/include/functions.php
XoopsModules/latestnews/trunk/latestnews/include/gtickets.php
XoopsModules/latestnews/trunk/latestnews/include/onupdate.inc.php
XoopsModules/latestnews/trunk/latestnews/include/updateblock.inc.php
XoopsModules/latestnews/trunk/latestnews/language/arabic/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/arabic/main.php
XoopsModules/latestnews/trunk/latestnews/language/arabic/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/danish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/danish/main.php
XoopsModules/latestnews/trunk/latestnews/language/danish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/english/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/english/main.php
XoopsModules/latestnews/trunk/latestnews/language/english/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/french/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/french/main.php
XoopsModules/latestnews/trunk/latestnews/language/french/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/persian/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/persian/main.php
XoopsModules/latestnews/trunk/latestnews/language/persian/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/polish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/polish/main.php
XoopsModules/latestnews/trunk/latestnews/language/polish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/main.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/main.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/xoops_version.php
Added Paths:
-----------
XoopsModules/latestnews/trunk/latestnews/admin/about.php
XoopsModules/latestnews/trunk/latestnews/admin/admin_footer.php
XoopsModules/latestnews/trunk/latestnews/admin/admin_header.php
XoopsModules/latestnews/trunk/latestnews/admin/blockform.php
XoopsModules/latestnews/trunk/latestnews/admin/blocksadmin.php
XoopsModules/latestnews/trunk/latestnews/admin/index.php
XoopsModules/latestnews/trunk/latestnews/admin/permissions.php
XoopsModules/latestnews/trunk/latestnews/class/xoopstree.php
XoopsModules/latestnews/trunk/latestnews/docs/credits.txt
XoopsModules/latestnews/trunk/latestnews/docs/install.txt
XoopsModules/latestnews/trunk/latestnews/docs/lang_diff.txt
XoopsModules/latestnews/trunk/latestnews/docs/license.txt
XoopsModules/latestnews/trunk/latestnews/language/arabic/help/
XoopsModules/latestnews/trunk/latestnews/language/arabic/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/arabic/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/danish/help/
XoopsModules/latestnews/trunk/latestnews/language/danish/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/danish/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/english/admin.php
XoopsModules/latestnews/trunk/latestnews/language/english/help/
XoopsModules/latestnews/trunk/latestnews/language/english/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/english/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/french/help/
XoopsModules/latestnews/trunk/latestnews/language/french/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/french/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/persian/help/
XoopsModules/latestnews/trunk/latestnews/language/persian/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/persian/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/polish/help/
XoopsModules/latestnews/trunk/latestnews/language/polish/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/polish/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/help/
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/help/index.html
XoopsModules/latestnews/trunk/latestnews/language/spanish/help/
XoopsModules/latestnews/trunk/latestnews/language/spanish/help/help.html
XoopsModules/latestnews/trunk/latestnews/language/spanish/help/index.html
XoopsModules/latestnews/trunk/latestnews/templates/blocks/block_latestnews.tpl
Removed Paths:
-------------
XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php
XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php
XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php
XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php
XoopsModules/latestnews/trunk/latestnews/admin/mygrouppermform.php
XoopsModules/latestnews/trunk/latestnews/templates/blocks/block_latestnews.html
Added: XoopsModules/latestnews/trunk/latestnews/admin/about.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/about.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/about.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,30 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
+
+include 'admin_footer.php';
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/about.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/latestnews/trunk/latestnews/admin/admin.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/admin.php 2013-09-29 09:28:39 UTC (rev 12105)
+++ XoopsModules/latestnews/trunk/latestnews/admin/admin.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -41,121 +41,119 @@
// include "../../mainfile.php"; GIJ
//include XOOPS_ROOT_PATH."/include/cp_functions.php";
require("header.php");
-include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php";
+include_once XOOPS_ROOT_PATH."/kernel/module.php";
include_once "../include/gtickets.php" ;// GIJ
$admintest = 0;
if (is_object($xoopsUser)) {
- $xoopsModule =& XoopsModule::getByDirname("system");
- if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
- redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
- exit();
- }
- $admintest=1;
+ $xoopsModule =& XoopsModule::getByDirname("system");
+ if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
+ exit();
+ }
+ $admintest=1;
} else {
- redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
- exit();
+ redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
+ exit();
}
// include system category definitions
include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
$error = false;
if ($admintest != 0) {
- if (isset($fct) && $fct != '') {
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
+ if (isset($fct) && $fct != '') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
- if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) {
- include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php";
- } else {
- include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php";
- }
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) {
+ include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php";
+ } else {
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php";
+ }
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
- include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
- } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
- include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
- }
- include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
- $sysperm_handler =& xoops_gethandler('groupperm');
- $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
- unset($modversion);
- if ($category > 0) {
- $groups = $xoopsUser->getGroups();
- if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
+ } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
+ }
+ include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
+ unset($modversion);
+ if ($category > 0) {
+ $groups = $xoopsUser->getGroups();
+ if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))) {
// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
- if (file_exists("../include/{$fct}.inc.php")) {
- include_once "../include/{$fct}.inc.php" ;
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } elseif ($fct == 'version') {
- if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
- include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
- } else {
- $error = true;
- }
+ if (file_exists("../include/{$fct}.inc.php")) {
+ include_once "../include/{$fct}.inc.php" ;
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } elseif ($fct == 'version') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
}
if (false != $error) {
- xoops_cp_header();
+ xoops_cp_header();
mytabs_adminmenu(1);
- echo "<h4>System Configuration</h4>";
- echo '<table class="outer" cellpadding="4" cellspacing="1">';
- echo '<tr>';
- $groups = $xoopsUser->getGroups();
- $all_ok = false;
- if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
- $sysperm_handler =& xoops_gethandler('groupperm');
- $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups);
- } else {
- $all_ok = true;
- }
- $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
- $handle = opendir($admin_dir);
- $counter = 0;
- $class = 'even';
- while ($file = readdir($handle)) {
- if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
- include $admin_dir.'/'.$file.'/xoops_version.php';
- if ($modversion['hasAdmin']) {
- $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
- if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
- echo "<td class='$class' align='center' valign='bottom' width='19%'>";
- echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
- echo "</td>";
- $counter++;
- $class = ($class == 'even') ? 'odd' : 'even';
- }
- if ( $counter > 4 ) {
- $counter = 0;
- echo "</tr>";
- echo "<tr>";
- }
- }
- unset($modversion);
- }
- }
- while ($counter < 5) {
- echo '<td class="'.$class.'"> </td>';
- $class = ($class == 'even') ? 'odd' : 'even';
- $counter++;
- }
- echo '</tr></table>';
+ echo "<h4>System Configuration</h4>";
+ echo '<table class="outer" cellpadding="4" cellspacing="1">';
+ echo '<tr>';
+ $groups = $xoopsUser->getGroups();
+ $all_ok = false;
+ if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups);
+ } else {
+ $all_ok = true;
+ }
+ $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
+ $handle = opendir($admin_dir);
+ $counter = 0;
+ $class = 'even';
+ while ($file = readdir($handle)) {
+ if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
+ include $admin_dir.'/'.$file.'/xoops_version.php';
+ if ($modversion['hasAdmin']) {
+ $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
+ if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
+ echo "<td class='$class' align='center' valign='bottom' width='19%'>";
+ echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
+ echo "</td>";
+ $counter++;
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+ if ($counter > 4) {
+ $counter = 0;
+ echo "</tr>";
+ echo "<tr>";
+ }
+ }
+ unset($modversion);
+ }
+ }
+ while ($counter < 5) {
+ echo '<td class="'.$class.'"> </td>';
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $counter++;
+ }
+ echo '</tr></table>';
xoops_cp_footer();
}
-
-?>
Added: XoopsModules/latestnews/trunk/latestnews/admin/admin_footer.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/admin_footer.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/admin_footer.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,29 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+global $pathIcon32;
+echo "<div class='adminfooter'>\n"
+ ." <div style='text-align: center;'>\n"
+ ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ ." </div>\n"
+ ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
+ ."</div>";
+
+xoops_cp_footer();
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/admin_footer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/admin_header.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/admin_header.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/admin_header.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,48 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+include_once $path . '/mainfile.php';
+include_once $path . '/include/cp_functions.php';
+require_once $path . '/include/cp_header.php';
+include_once $path . '/class/xoopsformloader.php';
+include_once $path . '/class/xoopsform/grouppermform.php';
+
+global $xoopsModule;
+
+$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+//if functions.php file exist
+//require_once dirname(dirname(__FILE__)) . '/include/functions.php';
+
+// Load language files
+xoops_loadLanguage('admin', $thisModuleDir);
+xoops_loadLanguage('modinfo', $thisModuleDir);
+xoops_loadLanguage('main', $thisModuleDir);
+
+//$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon16 = XOOPS_URL.'/'.$xoopsModule->getInfo('icons16root');
+$pathIcon32 = XOOPS_URL.'/'.$xoopsModule->getInfo('icons32root');
+
+//$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/admin_header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/blockform.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/blockform.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/blockform.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,142 @@
+<?php
+/**
+ * Module: XoopsTube
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * PHP version 5
+ *
+ * @category Module
+ * @package Xoopstube
+ * @author Fernando Santos (topet05), fer...@ma...
+ * @copyright Mastop InfoDigital (c) 2003-2007
+ * @link http://www.mastop.com.br
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @since 1.0.6
+ * @version $Id$
+ */
+
+include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
+$form = new XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', "post", true);
+if (isset($block['name'])) {
+ $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_NAME, $block['name']));
+}
+$side_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, "bside", $block['side']);
+$side_select->addOptionArray(
+ array(
+ 0 => _AM_SYSTEM_BLOCKS_SBLEFT,
+ 1 => _AM_SYSTEM_BLOCKS_SBRIGHT,
+ 3 => _AM_SYSTEM_BLOCKS_CBLEFT,
+ 4 => _AM_SYSTEM_BLOCKS_CBRIGHT,
+ 5 => _AM_SYSTEM_BLOCKS_CBCENTER,
+ 7 => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT,
+ 8 => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT,
+ 9 => _AM_SYSTEM_BLOCKS_CBBOTTOM,
+ )
+);
+$form->addElement($side_select);
+$form->addElement(new XoopsFormText(_AM_SYSTEM_BLOCKS_WEIGHT, "bweight", 2, 5, $block['weight']));
+$form->addElement(new XoopsFormRadioYN(_AM_SYSTEM_BLOCKS_VISIBLE, 'bvisible', $block['visible']));
+$mod_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_VISIBLEIN, "bmodule", $block['modules'], 5, true);
+$module_handler =& xoops_gethandler('module');
+$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+$criteria->add(new Criteria('isactive', 1));
+$module_list =& $module_handler->getList($criteria);
+$module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
+$module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
+ksort($module_list);
+$mod_select->addOptionArray($module_list);
+$form->addElement($mod_select);
+$form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false);
+if ($block['is_custom']) {
+ $textarea = new XoopsFormDhtmlTextArea(_AM_SYSTEM_BLOCKS_CONTENT, 'bcontent', $block['content'], 15, 70);
+ $textarea->setDescription(
+ '<span style="font-size:x-small;font-weight:bold;">' . _AM_SYSTEM_BLOCKS_USEFULTAGS
+ . '</span><br /><span style="font-size:x-small;font-weight:normal;">' . sprintf(
+ _AM_BLOCKTAG1,
+ '{X_SITEURL}',
+ XOOPS_URL . '/'
+ ) . '</span>'
+ );
+ $form->addElement($textarea, true);
+ $ctype_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']);
+ $ctype_select->addOptionArray(
+ array(
+ 'H' => _AM_SYSTEM_BLOCKS_HTML,
+ 'P' => _AM_SYSTEM_BLOCKS_PHP,
+ 'S' => _AM_SYSTEM_BLOCKS_AFWSMILE,
+ 'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE
+ )
+ );
+ $form->addElement($ctype_select);
+} else {
+ if ($block['template'] != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
+ if (count($btemplate) > 0) {
+ $form->addElement(
+ new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT,
+ '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&op=edittpl&id='
+ . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>')
+ );
+ } else {
+ $btemplate2 =& $tplfile_handler->find('default', 'block', $block['bid']);
+ if (count($btemplate2) > 0) {
+ $form->addElement(
+ new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT,
+ '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&op=edittpl&id='
+ . $btemplate2[0]->getVar('tpl_id') . '" target="_blank">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>')
+ );
+ }
+ }
+ }
+ if ($block['edit_form'] != false) {
+ $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_OPTIONS, $block['edit_form']));
+ }
+}
+$cache_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
+$cache_select->addOptionArray(
+ array(
+ '0' => _NOCACHE,
+ '30' => sprintf(_SECONDS, 30),
+ '60' => _MINUTE,
+ '300' => sprintf(_MINUTES, 5),
+ '1800' => sprintf(_MINUTES, 30),
+ '3600' => _HOUR,
+ '18000' => sprintf(_HOURS, 5),
+ '86400' => _DAY,
+ '259200' => sprintf(_DAYS, 3),
+ '604800' => _WEEK,
+ '2592000' => _MONTH
+ )
+);
+$form->addElement($cache_select);
+
+$groupperm_handler =& xoops_gethandler('groupperm');
+$groups =& $groupperm_handler->getGroupIds('block_read', $block['bid']);
+
+
+$form->addElement(new XoopsFormSelectGroup( _AM_SYSTEM_BLOCKS_GROUP, 'groups', true, $groups, 5, true) );
+
+if (isset($block['bid'])) {
+ $form->addElement(new XoopsFormHidden('bid', $block['bid']));
+}
+$form->addElement(new XoopsFormHidden('op', $block['op']));
+$form->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+$button_tray = new XoopsFormElementTray('', ' ');
+if ($block['is_custom']) {
+ $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit"));
+}
+
+//Submit buttons
+$button_tray = new XoopsFormElementTray('', '');
+$submit_button = new XoopsFormButton("", "submitblock", _SUBMIT, "submit");
+$button_tray->addElement($submit_button);
+
+$cancel_button = new XoopsFormButton('', '', _CANCEL, 'button');
+$cancel_button->setExtra('onclick="history.go(-1)"');
+$button_tray->addElement($cancel_button);
+
+$form->addElement($button_tray);
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/blockform.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/blocksadmin.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/blocksadmin.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/blocksadmin.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,622 @@
+<?php
+/**
+ * Module: XoopsTube
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * PHP version 5
+ *
+ * @category Module
+ * @package Xoopstube
+ * @author Fernando Santos (topet05), fer...@ma...
+ * @copyright Mastop InfoDigital (c) 2003-2007
+ * @link http://www.mastop.com.br
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @since 1.0.6
+ * @version $Id$
+ */
+
+include_once 'admin_header.php';
+if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) {
+ exit(_AM_XTUBE_ERROR403);
+}
+if ($xoopsUser->isAdmin($xoopsModule->mid())) {
+ include_once XOOPS_ROOT_PATH . '/class/xoopsblock.php';
+ $op = "list";
+ if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
+ $$k = $v;
+ }
+ }
+
+ if (isset($_GET['op'])) {
+ if ($_GET['op'] == "edit" || $_GET['op'] == "delete" || $_GET['op'] == "delete_ok" || $_GET['op'] == "clone"
+ || $_GET['op'] == "edit"
+ ) {
+ $op = $_GET['op'];
+ $bid = isset($_GET['bid']) ? intval($_GET['bid']) : 0;
+ }
+ }
+
+
+ /**
+ *
+ */
+ function listBlocks()
+ {
+ global $xoopsUser, $xoopsConfig, $xoopsModule, $pathIcon16;
+ include_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ if (file_exists(
+ XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
+ )
+ ) {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/groups.php");
+ }
+ $module_handler =& xoops_gethandler('module');
+ $member_handler =& xoops_gethandler('member');
+ $moduleperm_handler =& xoops_gethandler('groupperm');
+ $groups =& $member_handler->getGroups();
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_list =& $module_handler->getList($criteria);
+ $module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
+ $module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
+ ksort($module_list);
+ echo "
+ <h4 style='text-align:left;'>" . _AM_SYSTEM_BLOCKS_ADMIN . "</h4>";
+ $module_handler =& xoops_gethandler('module');
+ echo "<form action='" . $_SERVER['PHP_SELF'] . "' name='blockadmin' method='post'>
+ <table width='100%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'><th align='center'>" . _AM_SYSTEM_BLOCKS_TITLE . "</th><th align='center' nowrap='nowrap'>"
+ . _AM_SYSTEM_BLOCKS_TYPE . "<br />" . _LEFT . "-" . _CENTER . "-" . _RIGHT . "</th><th align='center'>"
+ . _AM_SYSTEM_BLOCKS_WEIGHT . "</th><th align='center'>" . _AM_SYSTEM_BLOCKS_VISIBLE . "</th><th align='center'>"
+ . _AM_SYSTEM_BLOCKS_VISIBLEIN . "</th><th align='center'>" . _AM_SYSTEM_ADGS . "</th><th align='center'>"
+ . _AM_SYSTEM_BLOCKS_BCACHETIME . "</th><th align='center'>" . _AM_LATESTNEWS_ACTION . "</th></tr>
+ ";
+ $block_arr =& XoopsBlock::getByModule($xoopsModule->mid());
+ $block_count = count($block_arr);
+ $class = 'even';
+ $cachetimes = array(
+ '0' => _NOCACHE,
+ '30' => sprintf(_SECONDS, 30),
+ '60' => _MINUTE,
+ '300' => sprintf(_MINUTES, 5),
+ '1800' => sprintf(_MINUTES, 30),
+ '3600' => _HOUR,
+ '18000' => sprintf(_HOURS, 5),
+ '86400' => _DAY,
+ '259200' => sprintf(_DAYS, 3),
+ '604800' => _WEEK,
+ '2592000' => _MONTH
+ );
+ foreach ($block_arr as $i) {
+ $groups_perms =& $moduleperm_handler->getGroupIds('block_read', $i->getVar("bid"));
+ $sql
+ =
+ 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . $i->getVar("bid");
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)) {
+ $modules[] = intval($row['module_id']);
+ }
+
+
+ $cachetime_options = '';
+ foreach ($cachetimes as $cachetime => $cachetime_name) {
+ if ($i->getVar('bcachetime') == $cachetime) {
+ $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n";
+ } else {
+ $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n";
+ }
+ }
+
+
+ $sel0 = $sel1 = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = "";
+ if ($i->getVar("visible") == 1) {
+ $sel1 = " checked='checked'";
+ } else {
+ $sel0 = " checked='checked'";
+ }
+ if ($i->getVar("side") == XOOPS_SIDEBLOCK_LEFT) {
+ $ssel0 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_SIDEBLOCK_RIGHT) {
+ $ssel1 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_LEFT) {
+ $ssel2 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_RIGHT) {
+ $ssel4 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_CENTER) {
+ $ssel3 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMLEFT) {
+ $ssel5 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOMRIGHT) {
+ $ssel6 = " checked='checked'";
+ } elseif ($i->getVar("side") == XOOPS_CENTERBLOCK_BOTTOM) {
+ $ssel7 = " checked='checked'";
+ }
+ if ($i->getVar("title") == "") {
+ $title = " ";
+ } else {
+ $title = $i->getVar("title");
+ }
+ $name = $i->getVar("name");
+ echo
+ "<tr valign='top'><td class='$class' align='center'><input type='text' name='title[" . $i->getVar("bid")
+ . "]' value='" . $title . "'></td><td class='$class' align='center' nowrap='nowrap'>
+ <div align='center' >
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_LEFT . "'$ssel2 />
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_CENTER
+ . "'$ssel3 />
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_RIGHT . "'$ssel4 />
+ </div>
+ <div>
+ <span style='float:right'><input type='radio' name='side[" . $i->getVar("bid") . "]' value='"
+ . XOOPS_SIDEBLOCK_RIGHT . "'$ssel1 /></span>
+ <div align='left'><input type='radio' name='side[" . $i->getVar("bid") . "]' value='"
+ . XOOPS_SIDEBLOCK_LEFT . "'$ssel0 /></div>
+ </div>
+ <div align='center'>
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_BOTTOMLEFT
+ . "'$ssel5 />
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_BOTTOM
+ . "'$ssel7 />
+ <input type='radio' name='side[" . $i->getVar("bid") . "]' value='" . XOOPS_CENTERBLOCK_BOTTOMRIGHT
+ . "'$ssel6 />
+ </div>
+ </td><td class='$class' align='center'><input type='text' name='weight[" . $i->getVar("bid")
+ . "]' value='" . $i->getVar("weight") . "' size='5' maxlength='5' /></td><td class='$class' align='center' nowrap><input type='radio' name='visible["
+ . $i->getVar("bid") . "]' value='1'$sel1>" . _YES . " <input type='radio' name='visible["
+ . $i->getVar("bid") . "]' value='0'$sel0>" . _NO . "</td>";
+
+ echo "<td class='$class' align='center'><select size='5' name='bmodule[" . $i->getVar("bid")
+ . "][]' id='bmodule[" . $i->getVar("bid") . "][]' multiple='multiple'>";
+ foreach ($module_list as $k => $v) {
+ echo "<option value='$k'" . ((in_array($k, $modules)) ? " selected='selected'" : "") . ">$v</option>";
+ }
+ echo "</select></td>";
+
+ echo "<td class='$class' align='center'><select size='5' name='groups[" . $i->getVar("bid")
+ . "][]' id='groups[" . $i->getVar("bid") . "][]' multiple='multiple'>";
+ foreach ($groups as $grp) {
+ echo "<option value='" . $grp->getVar('groupid') . "' " . ((in_array(
+ $grp->getVar('groupid'),
+ $groups_perms
+ )) ? " selected='selected'" : "") . ">" . $grp->getVar('name') . "</option>";
+ }
+ echo "</select></td>";
+
+
+ // Cache lifetime
+ echo '<td class="' . $class . '" align="center"> <select name="bcachetime[' . $i->getVar("bid")
+ . ']" size="1">' . $cachetime_options . '</select>
+ </td>';
+
+// Actions
+
+ echo "<td class='$class' align='center'><a href='blocksadmin.php?op=edit&bid=" . $i->getVar("bid")
+ . "'><img src=" . $pathIcon16 . '/edit.png' . " alt='" . _EDIT . "' title='" . _EDIT . "' />
+ </a> <a href='blocksadmin.php?op=clone&bid=" . $i->getVar("bid") . "'><img src=" . $pathIcon16
+ . '/editcopy.png' . " alt='" . _CLONE . "' title='" . _CLONE . "' />
+ </a>";
+ if ($i->getVar('block_type') != 'S' && $i->getVar('block_type') != 'M') {
+ echo " <a href='" . XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=delete&bid="
+ . $i->getVar("bid") . "'><img src=" . $pathIcon16 . '/delete.png' . " alt='" . _DELETE . "' title='"
+ . _DELETE . "' />
+ </a>";
+ }
+ echo "
+ <input type='hidden' name='oldtitle[" . $i->getVar("bid") . "]' value='" . $i->getVar('title') . "' />
+ <input type='hidden' name='oldside[" . $i->getVar("bid") . "]' value='" . $i->getVar('side') . "' />
+ <input type='hidden' name='oldweight[" . $i->getVar("bid") . "]' value='" . $i->getVar('weight') . "' />
+ <input type='hidden' name='oldvisible[" . $i->getVar("bid") . "]' value='" . $i->getVar('visible') . "' />
+ <input type='hidden' name='oldgroups[" . $i->getVar("groups") . "]' value='" . $i->getVar('groups') . "' />
+ <input type='hidden' name='oldbcachetime[" . $i->getVar("bid") . "]' value='" . $i->getVar('bcachetime') . "' />
+ <input type='hidden' name='bid[" . $i->getVar("bid") . "]' value='" . $i->getVar("bid") . "' />
+ </td></tr>
+ ";
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+ echo "<tr><td class='foot' align='center' colspan='8'>
+ <input type='hidden' name='op' value='order' />
+ " . $GLOBALS['xoopsSecurity']->getTokenHTML() . "
+ <input type='submit' name='submit' value='" . _SUBMIT . "' />
+ </td></tr></table>
+ </form>
+ <br /><br />";
+ }
+
+ /**
+ * @param $bid
+ */
+ function cloneBlock($bid)
+ {
+ include_once dirname(__FILE__) . '/admin_header.php';
+ //include_once 'admin_header.php';
+ xoops_cp_header();
+
+ global $xoopsConfig;
+
+
+//xoops_loadLanguage('admin', XTUBE_DIRNAME);
+//xoops_loadLanguage('modinfo', XTUBE_DIRNAME);
+//xoops_loadLanguage('main', XTUBE_DIRNAME);
+
+ if (file_exists(
+ XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
+ )
+ ) {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/groups.php");
+ }
+// mpu_adm_menu();
+ $myblock = new XoopsBlock($bid);
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . intval($bid);
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)) {
+ $modules[] = intval($row['module_id']);
+ }
+ $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false;
+ $block = array(
+ 'title' => $myblock->getVar('title') . ' Clone',
+ 'form_title' => _AM_XTUBE_BLOCKS_CLONEBLOCK,
+ 'name' => $myblock->getVar('name'),
+ 'side' => $myblock->getVar('side'),
+ 'weight' => $myblock->getVar('weight'),
+ 'visible' => $myblock->getVar('visible'),
+ 'content' => $myblock->getVar('content', 'N'),
+ 'modules' => $modules,
+ 'is_custom' => $is_custom,
+ 'ctype' => $myblock->getVar('c_type'),
+ 'bcachetime' => $myblock->getVar('bcachetime'),
+ 'op' => 'clone_ok',
+ 'bid' => $myblock->getVar('bid'),
+ 'edit_form' => $myblock->getOptions(),
+ 'template' => $myblock->getVar('template'),
+ 'options' => $myblock->getVar('options')
+ );
+ echo '<a href="blocksadmin.php">' . _AM_BADMIN
+ . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_CLONEBLOCK
+ . '<br /><br />';
+ include 'blockform.php';
+ $form->display();
+// xoops_cp_footer();
+ include_once 'admin_footer.php';
+ exit();
+ }
+
+ /**
+ * @param $bid
+ * @param $bside
+ * @param $bweight
+ * @param $bvisible
+ * @param $bcachetime
+ * @param $bmodule
+ * @param $options
+ */
+ function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
+ {
+ global $xoopsUser, $xoopsConfig;
+ if (file_exists(
+ XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
+ )
+ ) {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/blocksadmin.php");
+ //include_once(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/groups.php");
+ }
+ $block = new XoopsBlock($bid);
+ $clone =& $block->xoopsClone();
+ if (empty($bmodule)) {
+ xoops_cp_header();
+ xoops_error(sprintf(_AM_NOTSELNG, _AM_VISIBLEIN));
+ xoops_cp_footer();
+ exit();
+ }
+ $clone->setVar('side', $bside);
+ $clone->setVar('weight', $bweight);
+ $clone->setVar('visible', $bvisible);
+ //$clone->setVar('content', $_POST['bcontent']);
+ $clone->setVar('title', $_POST['btitle']);
+ $clone->setVar('bcachetime', $bcachetime);
+ if (isset($options) && (count($options) > 0)) {
+ $options = implode('|', $options);
+ $clone->setVar('options', $options);
+ }
+ $clone->setVar('bid', 0);
+ if ($block->getVar('block_type') == 'C' || $block->getVar('block_type') == 'E') {
+ $clone->setVar('block_type', 'E');
+ } else {
+ $clone->setVar('block_type', 'D');
+ }
+ $newid = $clone->store();
+ if (!$newid) {
+ xoops_cp_header();
+ $clone->getHtmlErrors();
+ xoops_cp_footer();
+ exit();
+ }
+ if ($clone->getVar('template') != '') {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $bid);
+ if (count($btemplate) > 0) {
+ $tplclone =& $btemplate[0]->xoopsClone();
+ $tplclone->setVar('tpl_id', 0);
+ $tplclone->setVar('tpl_refid', $newid);
+ $tplfile_handler->insert($tplclone);
+ }
+ }
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ foreach ($bmodule as $bmid) {
+ $sql = 'INSERT INTO ' . $db->prefix('block_module_link') . ' (block_id, module_id) VALUES (' . $newid . ', '
+ . $bmid . ')';
+ $db->query($sql);
+ }
+ $groups =& $xoopsUser->getGroups();
+ $count = count($groups);
+ for ($i = 0; $i < $count; $i++) {
+ $sql
+ =
+ "INSERT INTO " . $db->prefix('group_permission')
+ . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (" . $groups[$i] . ", " . $newid
+ . ", 1, 'block_read')";
+ $db->query($sql);
+ }
+ redirect_header('blocksadmin.php?op=listar', 1, _AM_LATESTNEWS_UPDATE_SUCCESS);
+ }
+
+ /**
+ * @param $bid
+ * @param $title
+ * @param $weight
+ * @param $visible
+ * @param $side
+ */
+ function xtubeSetOrder($bid, $title, $weight, $visible, $side, $bcachetime)
+ {
+ $myblock = new XoopsBlock($bid);
+ $myblock->setVar('title', $title);
+ $myblock->setVar('weight', $weight);
+ $myblock->setVar('visible', $visible);
+ $myblock->setVar('side', $side);
+ $myblock->setVar('bcachetime', $bcachetime);
+ $myblock->store();
+ }
+
+
+ function xtubeEditBlock($bid)
+ {
+ include_once dirname(__FILE__) . '/admin_header.php';
+ //include_once 'admin_header.php';
+ xoops_cp_header();
+
+ global $xoopsConfig;
+
+
+//xoops_loadLanguage('admin', XTUBE_DIRNAME);
+//xoops_loadLanguage('modinfo', XTUBE_DIRNAME);
+//xoops_loadLanguage('main', XTUBE_DIRNAME);
+
+ if (file_exists(
+ XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin/blocksadmin.php"
+ )
+ ) {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language'] . "/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/" . $xoopsConfig['language']
+ . "/admin/groups.php");
+ } else {
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/blocksadmin.php");
+ include_once(XOOPS_ROOT_PATH . "/modules/system/language/portuguesebr/admin/groups.php");
+ }
+// mpu_adm_menu();
+ $myblock = new XoopsBlock($bid);
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ $sql = 'SELECT module_id FROM ' . $db->prefix('block_module_link') . ' WHERE block_id=' . intval($bid);
+ $result = $db->query($sql);
+ $modules = array();
+ while ($row = $db->fetchArray($result)) {
+ $modules[] = intval($row['module_id']);
+ }
+ $is_custom = ($myblock->getVar('block_type') == 'C' || $myblock->getVar('block_type') == 'E') ? true : false;
+ $block = array(
+ 'title' => $myblock->getVar('title'),
+ 'form_title' => _AM_SYSTEM_BLOCKS_EDITBLOCK,
+// 'name' => $myblock->getVar('name'),
+ 'side' => $myblock->getVar('side'),
+ 'weight' => $myblock->getVar('weight'),
+ 'visible' => $myblock->getVar('visible'),
+ 'content' => $myblock->getVar('content', 'N'),
+ 'modules' => $modules,
+ 'is_custom' => $is_custom,
+ 'ctype' => $myblock->getVar('c_type'),
+ 'bcachetime' => $myblock->getVar('bcachetime'),
+ 'op' => 'edit_ok',
+ 'bid' => $myblock->getVar('bid'),
+ 'edit_form' => $myblock->getOptions(),
+ 'template' => $myblock->getVar('template'),
+ 'options' => $myblock->getVar('options')
+ );
+ echo '<a href="blocksadmin.php">' . _AM_BADMIN
+ . '</a> <span style="font-weight:bold;">»»</span> ' . _AM_SYSTEM_BLOCKS_EDITBLOCK
+ . '<br /><br />';
+ include 'blockform.php';
+ $form->display();
+// xoops_cp_footer();
+ include_once 'admin_footer.php';
+ exit();
+ }
+
+
+ function xtubeUpdateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $boptions, $groups)
+ {
+ $myblock = new XoopsBlock($bid);
+ $myblock->setVar('title', $btitle);
+ $myblock->setVar('weight', $bweight);
+ $myblock->setVar('visible', $bvisible);
+ $myblock->setVar('side', $bside);
+ $myblock->setVar('bcachetime', $bcachetime);
+ if (isset($boptions) && (count($boptions) > 0)) {
+ $boptions = implode('|', $boptions);
+ $myblock->setVar('options', $boptions);
+ }
+ $myblock->store();
+
+ global $xoopsDB;
+
+
+ if (!empty($bmodule) && count($bmodule) > 0) {
+ $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $xoopsDB->prefix('block_module_link'), $bid);
+ $xoopsDB->query($sql);
+ if (in_array(0, $bmodule)) {
+ $sql = sprintf(
+ "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
+ $xoopsDB->prefix('block_module_link'),
+ $bid,
+ 0
+ );
+ $xoopsDB->query($sql);
+ } else {
+ foreach ($bmodule as $bmid) {
+ $sql = sprintf(
+ "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
+ $xoopsDB->prefix('block_module_link'),
+ $bid,
+ intval($bmid)
+ );
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+ $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid);
+ $xoopsDB->query($sql);
+ if (!empty($groups)) {
+ foreach ($groups as $grp) {
+ $sql = sprintf(
+ "INSERT INTO %s (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')",
+ $xoopsDB->prefix('group_permission'),
+ $grp,
+ $bid
+ );
+ $xoopsDB->query($sql);
+ }
+ }
+ redirect_header($_SERVER['PHP_SELF'], 1, _AM_LATESTNEWS_UPDATE_SUCCESS);
+ exit();
+ }
+
+
+ if ($op == "list") {
+ xoops_cp_header();
+// mpu_adm_menu();
+ listBlocks();
+ include 'admin_footer.php';
+ exit();
+ }
+
+ if ($op == "order") {
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($_SERVER['PHP_SELF'], 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
+ exit();
+ }
+ foreach (array_keys($bid) as $i) {
+ if ($oldtitle[$i] != $title[$i] || $oldweight[$i] != $weight[$i] || $oldvisible[$i] != $visible[$i]
+ || $oldside[$i] != $side[$i]
+ || $oldbcachetime[$i] != $bcachetime[$i]
+ ) {
+ xtubeSetOrder(
+ $bid[$i],
+ $title[$i],
+ $weight[$i],
+ $visible[$i],
+ $side[$i],
+ $bcachetime[$i],
+ $bmodule[$i]
+ );
+ }
+ if (!empty($bmodule[$i]) && count($bmodule[$i]) > 0) {
+ $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $xoopsDB->prefix('block_module_link'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if (in_array(0, $bmodule[$i])) {
+ $sql = sprintf(
+ "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
+ $xoopsDB->prefix('block_module_link'),
+ $bid[$i],
+ 0
+ );
+ $xoopsDB->query($sql);
+ } else {
+ foreach ($bmodule[$i] as $bmid) {
+ $sql = sprintf(
+ "INSERT INTO %s (block_id, module_id) VALUES (%u, %d)",
+ $xoopsDB->prefix('block_module_link'),
+ $bid[$i],
+ intval($bmid)
+ );
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+ $sql = sprintf("DELETE FROM %s WHERE gperm_itemid = %u", $xoopsDB->prefix('group_permission'), $bid[$i]);
+ $xoopsDB->query($sql);
+ if (!empty($groups[$i])) {
+ foreach ($groups[$i] as $grp) {
+ $sql = sprintf(
+ "INSERT INTO %s (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) VALUES (%u, %u, 1, 'block_read')",
+ $xoopsDB->prefix('group_permission'),
+ $grp,
+ $bid[$i]
+ );
+ $xoopsDB->query($sql);
+ }
+ }
+ }
+ redirect_header($_SERVER['PHP_SELF'], 1, _AM_LATESTNEWS_UPDATE_SUCCESS);
+ exit();
+ }
+ if ($op == 'clone') {
+ cloneBlock($bid);
+ }
+
+ if ($op == 'edit') {
+ xtubeEditBlock($bid);
+ }
+
+ if ($op == 'edit_ok') {
+ xtubeUpdateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups);
+
+
+ }
+
+
+ if ($op == 'clone_ok') {
+ isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options);
+ }
+} else {
+ echo _AM_XTUBE_ERROR403;
+}
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/blocksadmin.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/latestnews/trunk/latestnews/admin/header.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/header.php 2013-09-29 09:28:39 UTC (rev 12105)
+++ XoopsModules/latestnews/trunk/latestnews/admin/header.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -6,7 +6,6 @@
require_once("../../../include/cp_header.php");
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
}
-?>
Added: XoopsModules/latestnews/trunk/latestnews/admin/index.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/index.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/index.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -0,0 +1,31 @@
+<?php
+/*
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/**
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package
+ * @since
+ * @author XOOPS Development Team
+ * @version $Id $
+ */
+
+require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+ $indexAdmin = new ModuleAdmin();
+
+ echo $indexAdmin->addNavigation('index.php');
+ echo $indexAdmin->renderIndex();
+
+include "admin_footer.php";
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/index.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: XoopsModules/latestnews/trunk/latestnews/admin/menu.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/menu.php 2013-09-29 09:28:39 UTC (rev 12105)
+++ XoopsModules/latestnews/trunk/latestnews/admin/menu.php 2013-09-29 10:23:10 UTC (rev 12106)
@@ -1,4 +1,37 @@
<?php
-$adminmenu[0]['title'] = _MI_LATESTNEWS_ADMIN_MENU1;
-$adminmenu[0]['link'] = "admin/myblocksadmin.php";
-?>
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+//$path = dirname(dirname(dirname(dirname(__FILE__))));
+//include_once $path . '/mainfile.php';
+
+$module_handler = xoops_gethandler('module');
+$module = $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
+$pathIcon32 = $module->getInfo('icons32');
+//$pathIcon32 = XOOPS_ROOT_PATH.$module->getInfo('icons32');
+
+xoops_loadLanguage('admin', $module->dirname());
+
+$pathModuleAdmin = $module->getInfo('dirmoduleadmin');
+$pathLanguage = dirname(dirname(dirname(dirname(__FILE__)))) . $pathModuleAdmin;
+if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) {
+ $fileinc = $pathLanguage . '/language/english/main.php';
+}
+include_once $fileinc;
+
+$adminmenu = array();
+$i=0;
+$adminmenu[$i]["title"] = _AM_MODULEADMIN_HOME;
+$adminmenu[$i]['link'] = "admi...
[truncated message content] |
|
From: <txm...@us...> - 2013-09-29 09:28:45
|
Revision: 12105
http://sourceforge.net/p/xoops/svn/12105
Author: txmodxoops
Date: 2013-09-29 09:28:39 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
Updated
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_pages.php
XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/building.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -104,12 +104,16 @@
// Creation of pages and templates user
if ( $table_user == 1 && $table_name != null ) {
const_user_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- const_templates_pages($modules, $table_name, $table_fieldname, $table_fields);
+ const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
}
// Creation of search
if ( $table_search == 1 ) {
const_include_search($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $table_image);
- }
+ }
+ // Creation of admin permissions.php
+ if ( $table_permissions == 1) {
+ const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
+ }
// Creation of notifications
if ( $table_notifications == 1 ) {
const_include_notifications($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
@@ -122,11 +126,7 @@
const_blocks($modules, $table_name, $table_fieldname, $table_fields, $table_parameters, $category);
//Creation of template per blocks
const_blocks_templates($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- }
- // Creation of admin permissions.php
- if ( $table_permissions == 1) {
- const_admin_permissions($modules, $table_name, $table_fields, $table_parameters);
- }
+ }
}
$table_name = isset($table_name) ? $table_name : null;
$table_comments = isset($table_comments) ? $table_comments : null;
@@ -137,14 +137,15 @@
$table_fields = isset($table_fields) ? $table_fields : null;
$table_blocks = isset($table_blocks) ? $table_blocks : null;
$table_image = isset($table_image) ? $table_image : null;
+ $table_permissions = isset($table_permissions) ? $table_permissions : null;
$table_notifications = isset($table_notifications) ? $table_notifications : null;
//Creation of architecture of more fields and data
//const_architecture(null, null, $table_admin, $table_blocks, $table_admin, $table_blocks );
// Creation of comments
if ( $table_comments == 1 ) {
const_include_comments($modules, $table_name, $table_fieldname, $table_fields, $table_parameters);
- }
-
+ }
+
if ( $table_waiting == 1 ) {
// Creation of Waiting Plugin
const_waiting($modules, $tables_arr);
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/admin/tables.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -20,6 +20,7 @@
*/
include_once 'header.php';
$op = TDMCreate_CleanVars( $_REQUEST, 'op', 'default', 'string' );
+$table_id = TDMCreate_CleanVars( $_REQUEST, 'table_id', 0 );
echo $adminMenu->addNavigation('tables.php');
switch ($op) {
case 'save_table':
@@ -357,7 +358,7 @@
$adminMenu->addItemButton(_AM_TDMCREATE_TABLES_LIST, 'tables.php?op=table_list', 'list');
echo $adminMenu->renderButton();
- $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("tdmcreate_tables")." WHERE table_name = 'categories'");
+ $result = $xoopsDB->queryF("SELECT COUNT(*) FROM " . $xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_name = 'categories'");
list( $category ) = $xoopsDB->fetchRow($result);
$obj =& $tablesHandler->get($_REQUEST['table_id']);
if ( $category >= 0 ) {
@@ -375,19 +376,24 @@
$GLOBALS['xoTheme']->addScript('modules/TDMCreate/js/functions.js');
// Remove unnecessary tables
- $sql = "SELECT table_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE table_mid = 0";
+ /*$sql = "SELECT table_id FROM ".$xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_mid = 0";
$result = $xoopsDB->queryF($sql);
while ( $myrow = $xoopsDB->fetchArray($result) )
{
- $sql_del = "DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE table_id = ".$myrow['table_id']."";
+ $sql_del = "DELETE FROM ".$xoopsDB->prefix("mod_tdmcreate_tables")." WHERE table_id = ".$myrow['table_id']."";
$xoopsDB->queryF($sql_del);
+ }*/
+ $obj =& $tablesHandler->get($table_id);
+ if ($tablesHandler->deleteAll($obj)) {
+ redirect_header('tables.php', 3, _AM_TDMCREATE_FORMDELOK);
}
$criteria = new CriteriaCompo();
+ $criteria->add( new Criteria('mod_id', 0, '!=') );
$criteria->setSort('mod_id');
$criteria->setOrder('ASC');
- $mod_arr = $modulesHandler->getall($criteria);
- $numrows_modules = $modulesHandler->getCount();
+ $mod_arr = $modulesHandler->getAll($criteria);
+ $numrows_modules = $modulesHandler->getCount($criteria);
if ( $numrows_modules > 0 )
{
@@ -472,7 +478,7 @@
echo '<th width="10%">'._AM_TDMCREATE_BLOCKS.'</th>';
echo '<th width="10%">'._AM_TDMCREATE_NB_FIELDS.'</th>';
echo '<th width="1%">'._AM_TDMCREATE_FORMACTION.'</th>';
- echo '<tr><td class="errorMsg" colspan="8">No modules</td></tr>';
+ echo '<tr><td class="errorMsg" colspan="8">There are no modules</td></tr>';
echo '</tr></table><br><br>';
}
break;
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_admin_pages.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -88,7 +88,7 @@
\$numrows = \${$table_name}Handler->getCount();
\${$table_name}_arr = \${$table_name}Handler->getAll(\$criteria);
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
if ( $table_category != 1 )
{
$text .= <<<EOT
@@ -110,7 +110,7 @@
echo "<tr class='".\$class."'>";
\$class = (\$class == "even") ? "odd" : "even";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
$text .= $fields_data;
$text .= <<<EOT
@@ -148,7 +148,7 @@
\$cat_weight = \$categories_arr[\$i]->getVar('cat_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 1);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 1);
$text .= <<<EOT
\n\t\t\t\t\techo "<td class='center width5'>
<a href='{$table_name}.php?op=edit&{$field_id}=".\$i"'><img src=".\$sysPathIcon16."/edit.png alt='"._EDIT."' title='"._EDIT."'></a>
@@ -175,7 +175,7 @@
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
@@ -192,7 +192,7 @@
\$category_weight = \${$table_name}_arr[\$i]->getVar('{$table_fieldname}_weight');
echo "<tr class='".\$class."'>";\n
EOT;
- $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, 1, 1);
+ $fields_data = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, 1, 1);
$text .= $fields_data;
$text .= <<<EOT
@@ -220,7 +220,7 @@
echo "<table width='100%' cellspacing='1' class='outer'>
<tr>
EOT;
- $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 0);
+ $fcn = const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 0);
$text .= $fcn;
$text .= <<<EOT
\n\t\t\t\t\t<th class='center width5'>".{$language}_FORMACTION."</th>
@@ -252,7 +252,7 @@
\$obj =& \${$table_name}Handler->create();
}
EOT;
- $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $language, '', 2);
+ $text .= const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $field_id, $nb_fields, $fields, $fpa, $fpt, $fpmf, $language, '', 2);
$text .= <<<EOT
\n\t\tif (\${$table_name}Handler->insert(\$obj)) {
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_class.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -168,7 +168,6 @@
}
}
EOT;
-
createFile( $tdmcreate_path, $text,
_AM_TDMCREATE_CONST_OK_CLASSES,
_AM_TDMCREATE_CONST_NOTOK_CLASSES, $file);
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_header.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -22,7 +22,8 @@
{
$mod_name = $module->getVar('mod_name');
$mod_version = $module->getVar('mod_version');
- $mod_min_xoops = $module->getVar('mod_min_xoops');
+ $mod_since = $module->getVar('mod_since');
+ //$mod_min_xoops = $module->getVar('mod_min_xoops');
$mod_author = $module->getVar('mod_author');
$mod_credits = $module->getVar('mod_credits');
$mod_a_m = $module->getVar('mod_author_mail');
@@ -47,11 +48,10 @@
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @license {$mod_license}
* @package {$mod_name}
- * @since {$mod_min_xoops}
+ * @since {$mod_since}
* @author {$mod_author} <{$mod_a_m}> - <{$mod_a_w_url}>
* @version \$Id: {$mod_version} {$filename} {$mod_subversion} {$date}Z {$mod_credits} \$
*/
-EOT
-;
+EOT;
return $text;
}
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_pages.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_pages.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/const/const_templates_pages.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -19,7 +19,7 @@
* @version $Id: const_templates_pages.php 11084 2013-02-23 15:44:20Z timgno $
*/
include_once XOOPS_ROOT_PATH.'/modules/TDMCreate/include/functions_const.php';
-function const_templates_pages($modules, $table_name, $table_fieldname, $table_fields)
+function const_templates_pages($modules, $table_name, $table_fieldname, $table_fields, $table_parameters)
{
$mod_name = $modules->getVar('mod_name');
$language = '_MA_'.strtoupper($mod_name).'_';
@@ -29,32 +29,64 @@
//fields
$fields = explode('|', $table_fields);
$nb_fields = count($fields);
+ //parameters
+ $parameters_total = explode('|', $table_parameters);
+ //Recuperation des parameters affichage dans le formulaire
+ for($i=0; $i<$nb_fields; $i++)
+ {
+ $fields_list = explode(':', $fields[$i]);
+ //$fields[$i] = $fields1[0];
+ //Afficher dans les elements du formulaire et choisir le type
+ if( $i == 0 ) {
+ $fpe[$i] = '0';
+ $fpdf[$i] = '0';
+ $fpif = $fields_list[0]; // fpif = fields parameters auto_increment field
+ } else {
+ $param = explode(':', $parameters_total[$i-1]);
+ //print_r($param);
+ $fpdf[$i] = $param[3]; // fpdf = fields parameters display form
+ $fpe[$i] = $param[0]; // fpe = fields parameters elements
+ $fprf[$i] = $param[6]; // fprf = fields parameters required field
+ if ( $param[4] == 1 ) {
+ $fpmf = $fields_list[0]; // fpmf = fields parameters main field
+ }
+ }
+ }
+
$text = '<{include file="db:'.$mod_name.'_header.html"}>';
if($table_name != null)
{
$text .= '
<div class="outer">
- <table class="'.$mod_name.'" cellpadding="0" cellspacing="0" width="100%">
+ <table class="'.$table_name.'" cellpadding="0" cellspacing="0" width="100%">
<tr class="head">
';
for ($i = 0; $i < $nb_fields; $i++)
{
$structure_fields = explode(':', $fields[$i]);
-$text .= ' <th class="fields"><{$smarty.const.'.$language.strtoupper($structure_fields[0]).'}></th>
- ';
+$text .= ' <th class="center"><{$smarty.const.'.$language.strtoupper($structure_fields[0]).'}></th>
+ ';
}
$text .= '</tr>
<{foreach item='.$table_fieldname.' from=$'.$table_name.'}>
- <tr class="<{cycle values=\'odd, even\'}>">
-';
+ <tr class="<{cycle values=\'odd, even\'}>">
+ ';
for ($i = 0; $i < $nb_fields; $i++)
{
- $structure_fields = explode(':', $fields[$i]);
-$text .= ' <td class="fields"><{$'.$table_fieldname.'.'.$structure_fields[0].'}></td>
- ';
+ $structure_fields = explode(':', $fields[$i]);
+ if( $fpe[$i] == 'XoopsFormUploadImage' ) {
+$text .= ' <td class="center"><img src="<{$xoops_url}>/uploads/'.$mod_name.'/images/'.$table_name.'/<{$'.$table_fieldname.'.'.$structure_fields[0].'}>" alt="'.$table_name.'"></td>
+ ';
+ } else if( $fpe[$i] == 'XoopsFormColorPicker' ) {
+$text .= ' <td class="center"><span style="background-color: <{$'.$table_fieldname.'.'.$structure_fields[0].'}>;"> </span></td>
+ ';
+ } else {
+$text .= ' <td class="center"><{$'.$table_fieldname.'.'.$structure_fields[0].'}></td>
+ ';
+ }
}
-$text .= ' </tr>
+$text .= '</tr>
<{/foreach}>
</table>
</div>';
Modified: XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php 2013-09-28 21:37:53 UTC (rev 12104)
+++ XoopsModules/TDMCreate/branches/timgno/1.39/TDMCreate/include/functions_const.php 2013-09-29 09:28:39 UTC (rev 12105)
@@ -185,10 +185,10 @@
for ($i=0; $i < $j; $i++)
{
if ( $i != $j - 1 ) {
- $key .= ''.$comma[$i].',
+ $key .= $comma[$i].',
';
} else {
- $key .= ''.$comma[$i].'
+ $key .= $comma[$i].'
';
}
}
@@ -200,10 +200,10 @@
}
//
-function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpda, $fields_param_type, $lng, $prefix = '', $option = 0)
+function const_show_fields_parameters($mod_name, $table_name, $table_fieldname, $fields_id, $nb_fields, $fields, $fpda, $fpt, $fpmf, $lng, $prefix = '', $option = 0)
{
$text = '';
-
+
if ( $option == 0 ) {
// Name column of the table
for($i = 0; $i < $nb_fields; $i++)
@@ -230,53 +230,51 @@
} else {
echo "<td class=\'center\'><a href=\'./'.$table_name.'.php?op=update_online&'.$fields_id.'=".$'.$table_name.'_arr[$i]->getVar("'.$fields_id.'")."&'.$table_fieldname.'_online=1\'><img src=".$pathIcon16."/off.png border=\'0\' alt=\'"._OFF."\' title=\'"._OFF."\'></a></td>";
}'; }
- } else if ( $fields[$i] == $table_fieldname.'_title' ) {
+ } else if ( $fields[$i] == $fpmf ) {
if ( $prefix != '' ) {
$text .= 'echo "<td class=\'left\'> ".$prefix." ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
} else {
$text .= 'echo "<td class=\'left\'><img src=\'".'.strtoupper($mod_name).'_URL."/images/icons/16/arrow.gif\'> ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- }
-
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadImage' ) {
- $text .= '$'.$table_fieldname.'_image = $'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\');
- if(file_exists($image = XOOPS_UPLOAD_URL."/'.$mod_name.'/images/'.$table_name.'/".$'.$table_fieldname.'_image)) {
- echo "<td class=\'center\'><img src=\'".$image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
- } else {
- echo "<td class=\'center\'><img src=\'../images/'.$table_name.'/".$'.$table_fieldname.'_image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
}
+ } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
+ $text .= '$image = XOOPS_UPLOAD_URL."/'.$mod_name.'/images/'.$table_name.'/".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\');
+ echo "<td class=\'center\'><img src=\'".$image."\' height=\'30px\' alt=\''.$fields[$i].'\'></td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadFile' )
+ } else if ( $fpt[$i] == 'XoopsFormUploadFile' )
{
$text .= 'echo "<td class=\'center\'>".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormColorPicker' )
+ } else if ( $fpt[$i] == 'XoopsFormColorPicker' )
{
$text .= 'echo "<td class=\'center\'><span style=\'background-color:".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."\'> </span> -> ".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormTextDateSelect' )
+ } else if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
{
$text .= 'echo "<td class=\'center\'>".formatTimeStamp($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormCategory' )
+ } else if ( $fpt[$i] == 'XoopsFormCategory' )
{
$text .= '$'.$table_fieldname.'1 = $categoriesHandler->get($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'));
$'.$table_fieldname.'_categories1 = $'.$table_fieldname.'1->getVar(\''.$table_fieldname.'_title\');
echo "<td class=\'center\'>".$'.$table_fieldname.'_categories1."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormSelectUser' )
+ } else if ( $fpt[$i] == 'XoopsFormSelectUser' )
{
$text .= 'echo "<td class=\'center\'>".XoopsUser::getUnameFromId($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'),"S")."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormText' || $fields_param_type[$i] == 'XoopsFormDhtmlTextArea' || $fields_param_type[$i] == 'XoopsFormTextArea' ) {
+ } else if ( $fpt[$i] == 'XoopsFormText' ) {
+ $text .= 'echo "<td class=\'center\'>".$'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\')."</td>";
+ ';
+ } else if ( $fpt[$i] == 'XoopsFormDhtmlTextArea' || $fpt[$i] == 'XoopsFormTextArea' ) {
$text .= 'echo "<td class=\'center\'>".strip_tags($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\'))."</td>";
';
- } else if ( $fields_param_type[$i] == 'XoopsFormCheckBox' || $fields_param_type[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
$text .= 'echo "<td class=\'center\'>".( ($'.$table_name.'_arr[$i]->getVar(\''.$fields[$i].'\') == 1 ) ? _YES : _NO)."</td>";
';
} else {
- $data = explode("-", $fields_param_type[$i]);
+ $data = explode("-", $fpt[$i]);
// Handler select table
$tablesHandler =& xoops_getModuleHandler('tables', 'TDMCreate');
$criteria = new CriteriaCompo();
@@ -289,21 +287,21 @@
$tables_select_parameters = $tables_select_arr[$k]->getVar('table_parameters');
// Fields
- $fields_total_select = explode("|", $tables_select_fields);
+ $fields_total_select = explode('|', $tables_select_fields);
$nb_fields_select = count($fields_total_select);
// Parameters
- $parameters_total_select = explode("|", $tables_select_parameters);
+ $parameters_total_select = explode('|', $tables_select_parameters);
// Recovery fields names
for($l = 0; $l < $nb_fields_select; $l++)
{
// Fields names
- $fields_select1 = explode(":", $fields_total_select[$l]);
+ $fields_select1 = explode(':', $fields_total_select[$l]);
$fields_select[$l] = $fields_select1[0];
// Show in admin
if( $l != 0 ) {
- $parameters_select = explode(":", $parameters_total_select[$l-1]);
+ $parameters_select = explode(':', $parameters_total_select[$l-1]);
if ( $parameters_select[4] == 1 ) {
$fields_param_main_field = $fields_select1[0];
}
@@ -326,14 +324,14 @@
{
if ( $i != 0 )
{
- if ( $fields_param_type[$i] == 'XoopsFormTextDateSelect' )
+ if ( $fpt[$i] == 'XoopsFormTextDateSelect' )
{
$text .= '
$obj->setVar(\''.$fields[$i].'\', strtotime($_REQUEST[\''.$fields[$i].'\']));';
- } else if ( $fields_param_type[$i] == 'XoopsFormCheckBox' || $fields_param_type[$i] == 'XoopsFormRadioYN' ) {
+ } else if ( $fpt[$i] == 'XoopsFormCheckBox' || $fpt[$i] == 'XoopsFormRadioYN' ) {
$text .= '
$obj->setVar(\''.$fields[$i].'\', (($_REQUEST[\''.$fields[$i].'\'] == 1) ? \'1\' : \'0\'));';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadImage' ) {
+ } else if ( $fpt[$i] == 'XoopsFormUploadImage' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
@@ -353,7 +351,7 @@
$obj->setVar(\''.$fields[$i].'\', $_REQUEST[\''.$fields[$i].'\']);
}
';
- } else if ( $fields_param_type[$i] == 'XoopsFormUploadFile' ) {
+ } else if ( $fpt[$i] == 'XoopsFormUploadFile' ) {
$text .= '
include_once XOOPS_ROOT_PATH.\'/class/uploader.php\';
$uploaddir = XOOPS_UPLOAD_PATH.\'/'.$mod_name.'/files/'.$table_name.'/\';
@@ -500,6 +498,7 @@
break;
case "default":
+ case "XoopsFormTables-".$table_name:
default:
$data = explode('-', $fpe[$i]);
$text .= '// '.ucfirst($struct0).'
@@ -513,16 +512,17 @@
return $text;
}
-function search_field($fields_param_search_field, $options)
+function search_field($fpsf, $options)
{
- $nb_fields_param_search_field = count($fields_param_search_field);
+ // fpsf = fields parameters search field
+ $nb_fpsf = count($fpsf);
$sql = '(';
- for($l=0; $l<$nb_fields_param_search_field; $l++)
+ for($l=0; $l<$nb_fpsf; $l++)
{
- if ( $l != $nb_fields_param_search_field - 1 ) {
- $sql .= ''.$fields_param_search_field[$l].' LIKE \'%$queryarray['.$options.']%\' OR ';
+ if ( $l != $nb_fpsf - 1 ) {
+ $sql .= ''.$fpsf[$l].' LIKE \'%$queryarray['.$options.']%\' OR ';
} else {
- $sql .= ''.$fields_param_search_field[$l].' LIKE \'%$queryarray[0]%\'';
+ $sql .= ''.$fpsf[$l].' LIKE \'%$queryarray[0]%\'';
}
}
$sql .= ')';
|
|
From: <be...@us...> - 2013-09-28 21:37:56
|
Revision: 12104
http://sourceforge.net/p/xoops/svn/12104
Author: beckmi
Date: 2013-09-28 21:37:53 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
fixing a typo
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/tplsets/jquery.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-28 06:05:44 UTC (rev 12103)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-28 21:37:53 UTC (rev 12104)
@@ -38,6 +38,9 @@
- added missing info about new language constants in Fast Comments (irmtfan/mamba)
- fixed Undefined index: uid in file /modules/profile/userinfo.php line 24 (cesag/mamba)
+Security fixes
+ - XSS issues reported by Mehdi Dadkhah (rgriffith)
+
Updated:
- jGrowl to 1.2.13 (mamba)
- jQuery Form to 3.42.0 (mamba)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/tplsets/jquery.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/tplsets/jquery.php 2013-09-28 06:05:44 UTC (rev 12103)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/tplsets/jquery.php 2013-09-28 21:37:53 UTC (rev 12104)
@@ -26,8 +26,8 @@
error_reporting(0);
$GLOBALS['xoopsLogger']->activated = false;
-if ( file_exists("./../../language/".$xoopsConfig['language']."/admin/tplsets.php") ) {
- include_once './../../language/'.$xoopsConfig['language']."/admin/tplsets.php");
+if ( file_exists('./../../language/'.$xoopsConfig['language'].'"/admin/tplsets.php') ) {
+ include_once './../../language/'.$xoopsConfig['language'].'/admin/tplsets.php';
} else {
include_once './../../language/english/admin/tplsets.php';
}
|
|
From: <luc...@us...> - 2013-09-28 06:05:50
|
Revision: 12103
http://sourceforge.net/p/xoops/svn/12103
Author: luciorota
Date: 2013-09-28 06:05:44 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
$codemirror3 is $mode compatible, todo: deep testing
Added Paths:
-----------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitattributes
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitignore
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.travis.yml
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/AUTHORS
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/CONTRIBUTING.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/LICENSE
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/README.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/comment.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/continuecomment.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/dialog/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/dialog/dialog.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/dialog/dialog.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/fullscreen.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/display/placeholder.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/closebrackets.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/closetag.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/continuelist.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/matchbrackets.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/matchtags.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/edit/trailingspace.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/brace-fold.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/comment-fold.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/foldcode.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/foldgutter.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/indent-fold.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/fold/xml-fold.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/anyword-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/css-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/html-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/javascript-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/pig-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/python-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/show-hint.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/show-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/hint/xml-hint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/coffeescript-lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/css-lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/javascript-lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/json-lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/lint.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/lint/lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/merge/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/merge/dep/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/merge/dep/diff_match_patch.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/merge/merge.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/merge/merge.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/mode/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/mode/loadmode.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/mode/multiplex.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/mode/multiplex_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/mode/overlay.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/runmode/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/runmode/colorize.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/runmode/runmode-standalone.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/runmode/runmode.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/runmode/runmode.node.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/scroll/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/scroll/scrollpastend.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/search/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/search/match-highlighter.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/search/search.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/search/searchcursor.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/selection/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/selection/active-line.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/selection/mark-selection.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/tern/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/tern/tern.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/tern/tern.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/tern/worker.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bin/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bin/authors.sh
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bin/compress
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bin/lint
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bin/source-highlight
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/bower.json
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/activeline.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/anywordhint.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/bidi.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/btree.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/buffers.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/changemode.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/closebrackets.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/closetag.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/complete.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/emacs.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/folding.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/fullscreen.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/html5complete.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/indentwrap.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/lint.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/loadmode.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/marker.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/markselection.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/matchhighlighter.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/matchtags.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/merge.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/multiplex.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/mustache.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/placeholder.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/preview.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/resize.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/runmode.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/search.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/spanaffectswrapping_shim.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/tern.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/theme.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/trailingspace.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/variableheight.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/vim.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/visibletabs.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/widget.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/demo/xmlcomplete.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/activebookmark.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/compress.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/docs.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/internals.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/logo.png
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/logo.svg
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/manual.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/realworld.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/releases.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/reporting.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/upgrade_v2.2.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/doc/upgrade_v3.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/keymap/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/keymap/emacs.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/keymap/extra.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/keymap/vim.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/lib/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/lib/codemirror.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/lib/codemirror.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/apl/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/apl/apl.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/apl/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/asterisk/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/asterisk/asterisk.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/asterisk/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clike/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clike/clike.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clike/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clike/scala.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clojure/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clojure/clojure.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/clojure/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/cobol/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/cobol/cobol.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/cobol/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/coffeescript/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/coffeescript/coffeescript.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/coffeescript/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/commonlisp/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/commonlisp/commonlisp.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/commonlisp/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/css.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/scss.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/scss_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/css/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/d/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/d/d.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/d/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/diff/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/diff/diff.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/diff/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/dtd/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/dtd/dtd.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/dtd/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ecl/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ecl/ecl.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ecl/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/erlang/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/erlang/erlang.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/erlang/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/fortran/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/fortran/fortran.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/fortran/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gas/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gas/gas.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gas/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gfm/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gfm/gfm.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gfm/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/gfm/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/go/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/go/go.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/go/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/groovy/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/groovy/groovy.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/groovy/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haml/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haml/haml.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haml/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haml/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haskell/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haskell/haskell.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haskell/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haxe/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haxe/haxe.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/haxe/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlembedded/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlembedded/htmlembedded.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlembedded/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlmixed/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlmixed/htmlmixed.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/htmlmixed/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/http/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/http/http.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/http/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jade/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jade/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jade/jade.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/javascript/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/javascript/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/javascript/javascript.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/javascript/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/javascript/typescript.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jinja2/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jinja2/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/jinja2/jinja2.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/less/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/less/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/less/less.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/livescript/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/livescript/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/livescript/livescript.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/livescript/livescript.ls
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/lua/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/lua/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/lua/lua.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/markdown/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/markdown/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/markdown/markdown.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/markdown/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/meta.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/mirc/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/mirc/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/mirc/mirc.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/nginx/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/nginx/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/nginx/nginx.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ntriples/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ntriples/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ntriples/ntriples.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ocaml/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ocaml/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ocaml/ocaml.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/octave/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/octave/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/octave/octave.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pascal/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pascal/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pascal/pascal.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/perl/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/perl/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/perl/perl.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/php/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/php/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/php/php.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pig/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pig/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/pig/pig.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/properties/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/properties/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/properties/properties.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/python/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/python/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/python/python.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/q/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/q/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/q/q.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/r/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/r/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/r/r.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/changes/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/changes/changes.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/changes/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/spec/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/spec/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/spec/spec.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rpm/spec/spec.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rst/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rst/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rst/rst.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ruby/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ruby/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/ruby/ruby.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rust/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rust/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/rust/rust.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sass/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sass/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sass/sass.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/scheme/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/scheme/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/scheme/scheme.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/shell/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/shell/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/shell/shell.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sieve/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sieve/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sieve/sieve.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smalltalk/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smalltalk/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smalltalk/smalltalk.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smarty/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smarty/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smarty/smarty.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smartymixed/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smartymixed/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/smartymixed/smartymixed.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sparql/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sparql/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sparql/sparql.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sql/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sql/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/sql/sql.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/stex/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/stex/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/stex/stex.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/stex/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tcl/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tcl/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tcl/tcl.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiddlywiki/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiddlywiki/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiddlywiki/tiddlywiki.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiddlywiki/tiddlywiki.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiki/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiki/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiki/tiki.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/tiki/tiki.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/toml/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/toml/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/toml/toml.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/turtle/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/turtle/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/turtle/turtle.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vb/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vb/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vb/vb.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vbscript/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vbscript/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/vbscript/vbscript.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/velocity/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/velocity/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/velocity/velocity.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/verilog/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/verilog/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/verilog/verilog.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xml/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xml/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xml/xml.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xquery/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xquery/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xquery/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/xquery/xquery.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/yaml/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/yaml/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/yaml/yaml.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/z80/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/z80/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/mode/z80/z80.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/package.json
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/comment_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/doc_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/driver.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/emacs_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/lint/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/lint/acorn.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/lint/lint.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/lint/parse-js.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/lint/walk.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/mode_test.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/mode_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/phantom_driver.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/run.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/test/vim_test.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/3024-day.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/3024-night.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/ambiance-mobile.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/ambiance.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/base16-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/base16-light.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/blackboard.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/cobalt.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/eclipse.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/elegant.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/erlang-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/lesser-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/midnight.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/monokai.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/neat.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/night.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/paraiso-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/paraiso-light.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/rubyblue.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/solarized.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/the-matrix.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/tomorrow-night-eighties.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/twilight.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/vibrant-ink.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/xq-dark.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/theme/xq-light.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/english.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/italian.php
Removed Paths:
-------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/editor_registry.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/formcodemirror3.php
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/index.html
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/language/
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitattributes
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitattributes (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitattributes 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,8 @@
+*.txt text
+*.js text
+*.html text
+*.md text
+*.json text
+*.yml text
+*.css text
+*.svg text
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitignore
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitignore (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.gitignore 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,6 @@
+/node_modules
+/npm-debug.log
+test.html
+.tern-*
+*~
+*.swp
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.travis.yml
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.travis.yml (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/.travis.yml 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/AUTHORS
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/AUTHORS (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/AUTHORS 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,254 @@
+List of CodeMirror contributors. Updated before every release.
+
+4r2r
+Aaron Brooks
+Adam King
+adanlobato
+Adán Lobato
+aeroson
+Ahmad Amireh
+Ahmad M. Zawawi
+ahoward
+Akeksandr Motsjonov
+Albert Xing
+Alexander Pavlov
+Alexander Schepanovski
+alexey-k
+Alex Piggott
+Amy
+Ananya Sen
+AndersMad
+Andre von Houck
+Andrey Lushnikov
+Andy Kimball
+Andy Li
+angelozerr
+ang...@gm...
+Ankit Ahuja
+Ansel Santosa
+Anthony Grimes
+areos
+Atul Bhouraskar
+Aurelian Oancea
+Bastian Müller
+benbro
+Benjamin DeCoste
+Ben Keen
+boomyjee
+borawjm
+Brandon Frohs
+Brett Zamir
+Brian Sletten
+Bruce Mitchener
+Chandra Sekhar Pydi
+Charles Skelton
+Chris Coyier
+Chris Granger
+Chris Morgan
+Christopher Brown
+ciaranj
+CodeAnimal
+ComFreek
+dagsta
+Dan Heberden
+Daniel, Dao Quang Minh
+Daniel Faust
+Daniel Huigens
+Daniel Neel
+Daniel Parnell
+Danny Yoo
+David Mignot
+David Pathakjee
+deebugger
+Deep Thought
+Dominator008
+Domizio Demichelis
+Drew Bratcher
+Drew Hintz
+Drew Khoury
+Dror BG
+duralog
+edsharp
+ekhaled
+Eric Allam
+eustas
+Fauntleroy
+fbuchinger
+feizhang365
+Felipe Lalanne
+Felix Raab
+Filip Noetzel
+flack
+ForbesLindesay
+Ford_Lawnmower
+Gabriel Nahmias
+galambalazs
+Gautam Mehta
+Glenn Ruehle
+Golevka
+Gordon Smith
+greengiant
+Guillaume Massé
+Guillaume Massé
+Hans Engel
+Hardest
+Hasan Karahan
+Hocdoc
+Ian Beck
+Ian Wehrman
+Ian Wetherbee
+Ice White
+ICHIKAWA, Yuji
+Ingo Richter
+Irakli Gozalishvili
+Ivan Kurnosov
+Jacob Lee
+Jakub Vrana
+James Campos
+James Thorne
+Jamie Hill
+Jan Jongboom
+jankeromnes
+Jan Keromnes
+Jan T. Sott
+Jason
+Jason Grout
+Jason Johnston
+Jason San Jose
+Jason Siefken
+Jean Boussier
+jeffkenton
+Jeff Pickhardt
+jem (graphite)
+Jochen Berger
+John Connor
+John Lees-Miller
+John Snelson
+jongalloway
+Joost-Wim Boekesteijn
+Joseph Pecoraro
+Joshua Newman
+jots
+Juan Benavides Romero
+Jucovschi Constantin
+jwa...@gm...
+kaniga
+Ken Newman
+Ken Rockot
+Kevin Sawicki
+Klaus Silveira
+Koh Zi Han, Cliff
+komakino
+Konstantin Lopuhin
+koops
+ks-ifware
+kubelsmieci
+Lanny
+leaf corcoran
+Leonya Khachaturov
+Liam Newman
+LM
+Lorenzo Stoakes
+lynschinzer
+Maksim Lin
+Maksym Taran
+Marat Dreizin
+Marco Aurélio
+Marijn Haverbeke
+Mario Pietsch
+Mark Lentczner
+Martin Balek
+Martín Gaitán
+Mason Malone
+Mateusz Paprocki
+mats cronqvist
+Matthew Beale
+Matthias BUSSONNIER
+Matt McDonald
+Matt Pass
+Matt Sacks
+Maximilian Hils
+Max Kirsch
+mbarkhau
+Metatheos
+Micah Dubinko
+Michael Lehenbauer
+Michael Zhou
+Mighty Guava
+Miguel Castillo
+Mike
+Mike Brevoort
+Mike Diaz
+Mike Ivanov
+Mike Kadin
+MinRK
+misfo
+mps
+Narciso Jaramillo
+Nathan Williams
+nerbert
+nguillaumin
+Niels van Groningen
+Nikita Beloglazov
+Nikita Vasilyev
+nlwillia
+pablo
+Page
+Patrick Strawderman
+Paul Garvin
+Paul Ivanov
+Pavel Feldman
+Paweł Bartkiewicz
+peteguhl
+peterkroon
+Peter Kroon
+prasanthj
+Prasanth J
+Rahul
+Randy Edmunds
+Richard Z.H. Wang
+robertop23
+Robert Plummer
+Ruslan Osmanov
+sabaca
+Samuel Ainsworth
+sandeepshetty
+santec
+Sascha Peilicke
+satchmorun
+sathyamoorthi
+SCLINIC\jdecker
+shaund
+shaun gilchrist
+Shmuel Englard
+sonson
+spastorelli
+Stas Kobzar
+Stefan Borsje
+Steffen Beyer
+Steve O'Hara
+stoskov
+Tarmil
+tfjgeorge
+Thaddee Tyl
+think
+Thomas Dvornik
+Thomas Schmid
+Tim Baumann
+Timothy Farrell
+Timothy Hatcher
+TobiasBg
+Tomas-A
+Tomas Varaneckas
+Tom Erik Støwer
+Tom MacWright
+Tony Jian
+Vestimir Markov
+vf
+Volker Mische
+William Jamieson
+Wojtek Ptak
+Xavier Mendez
+Yunchi Luo
+Yuvi Panda
+Zachary Dremann
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/CONTRIBUTING.md
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/CONTRIBUTING.md (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/CONTRIBUTING.md 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,72 @@
+# How to contribute
+
+- [Getting help](#getting-help-)
+- [Submitting bug reports](#submitting-bug-reports-)
+- [Contributing code](#contributing-code-)
+
+## Getting help
+
+Community discussion, questions, and informal bug reporting is done on the
+[CodeMirror Google group](http://groups.google.com/group/codemirror).
+
+## Submitting bug reports
+
+The preferred way to report bugs is to use the
+[GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before
+reporting a bug, read these pointers.
+
+**Note:** The issue tracker is for *bugs*, not requests for help. Questions
+should be asked on the
+[CodeMirror Google group](http://groups.google.com/group/codemirror) instead.
+
+### Reporting bugs effectively
+
+- CodeMirror is maintained by volunteers. They don't owe you anything, so be
+ polite. Reports with an indignant or belligerent tone tend to be moved to the
+ bottom of the pile.
+
+- Include information about **the browser in which the problem occurred**. Even
+ if you tested several browsers, and the problem occurred in all of them,
+ mention this fact in the bug report. Also include browser version numbers and
+ the operating system that you're on.
+
+- Mention which release of CodeMirror you're using. Preferably, try also with
+ the current development snapshot, to ensure the problem has not already been
+ fixed.
+
+- Mention very precisely what went wrong. "X is broken" is not a good bug
+ report. What did you expect to happen? What happened instead? Describe the
+ exact steps a maintainer has to take to make the problem occur. We can not
+ fix something that we can not observe.
+
+- If the problem can not be reproduced in any of the demos included in the
+ CodeMirror distribution, please provide an HTML document that demonstrates
+ the problem. The best way to do this is to go to
+ [jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and
+ include the resulting link in your bug report.
+
+## Contributing code
+
+- Make sure you have a [GitHub Account](https://github.com/signup/free)
+- Fork [CodeMirror](https://github.com/marijnh/CodeMirror/)
+ ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
+- Make your changes
+- If your changes are easy to test or likely to regress, add tests.
+ Tests for the core go into `test/test.js`, some modes have their own
+ test suite under `mode/XXX/test.js`. Feel free to add new test
+ suites to modes that don't have one yet (be sure to link the new
+ tests into `test/index.html`).
+- Follow the general code style of the rest of the project (see
+ below). Run `bin/lint` to verify that the linter is happy.
+- Make sure all tests pass. Visit `test/index.html` in your browser to
+ run them.
+- Submit a pull request
+([how to create a pull request](https://help.github.com/articles/fork-a-repo))
+
+### Coding standards
+
+- 2 spaces per indentation level, no tabs.
+- Include semicolons after statements.
+- Note that the linter (`bin/lint`) which is run after each commit
+ complains about unused variables and functions. Prefix their names
+ with an underscore to muffle it.
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/LICENSE
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/LICENSE (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/LICENSE 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,19 @@
+Copyright (C) 2013 by Marijn Haverbeke <ma...@gm...> and others
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/README.md
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/README.md (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/README.md 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,11 @@
+# CodeMirror
+[](http://travis-ci.org/marijnh/CodeMirror)
+[](http://badge.fury.io/js/codemirror)
+
+CodeMirror is a JavaScript component that provides a code editor in
+the browser. When a mode is available for the language you are coding
+in, it will color your code, and optionally help with indentation.
+
+The project page is http://codemirror.net
+The manual is at http://codemirror.net/doc/manual.html
+The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md)
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/comment.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/comment.js (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/codemirror3/codemirror/addon/comment/comment.js 2013-09-28 06:05:44 UTC (rev 12103)
@@ -0,0 +1,145 @@
+(function() {
+ "use strict";
+
+ var noOptions = {};
+ var nonWS = /[^\s\u00a0]/;
+ var Pos = CodeMirror.Pos;
+
+ function firstNonWS(str) {
+ var found = str.search(nonWS);
+ return found == -1 ? 0 : found;
+ }
+
+ CodeMirror.commands.toggleComment = function(cm) {
+ var from = cm.getCursor("start"), to = cm.getCursor("end");
+ cm.uncomment(from, to) || cm.lineComment(from, to);
+ };
+
+ CodeMirror.defineExtension("lineComment", function(from, to, options) {
+ if (!options) options = noOptions;
+ var self = this, mode = self.getModeAt(from);
+ var commentString = options.lineComment || mode.lineComment;
+ if (!commentString) {
+ if (options.blockCommentStart || mode.blockCommentStart) {
+ options.fullLines = true;
+ self.blockComment(from, to, options);
+ }
+ return;
+ }
+ var firstLine = self.getLine(from.line);
+ if (firstLine == null) return;
+ var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
+ var pad = options.padding == null ? " " : options.padding;
+ var blankLines = options.commentBlankLines || from.line == to.line;
+
+ self.operation(function() {
+ if (options.indent) {
+ var baseString = firstLine.slice(0, firstNonWS(firstLine));
+ for (var i = from.line; i < end; ++i) {
+ var line = self.getLine(i), cut = baseString.length;
+ if (!blankLines && !nonWS.test(line)) continue;
+ if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
+ self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
+ }
+ } else {
+ for (var i = from.line; i < end; ++i) {
+ if (blankLines || nonWS.test(self.getLine(i)))
+ self.replaceRange(commentString + pad, Pos(i, 0));
+ }
+ }
+ });
+ });
+
+ CodeMirror.defineExtension("blockComment", function(from, to, options) {
+ if (!options) options = noOptions;
+ var self = this, mode = self.getModeAt(from);
+ var startString = options.blockCommentStart || mode.blockCommentStart;
+ var endString = options.blockCommentEnd || mode.blockCommentEnd;
+ if (!startString || !endString) {
+ if ((options.lineComment || mode.lineComment) && options.fullLines != false)
+ self.lineComment(from, to, options);
+ return;
+ }
+
+ var end = Math.min(to.line, self.lastLine());
+ if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
+
+ var pad = options.padding == null ? " " : options.padding;
+ if (from.line > end) return;
+
+ self.operation(function() {
+ if (options.fullLines != false) {
+ var lastLineHasText = nonWS.test(self.getLine(end));
+ self.replaceRange(pad + endString, Pos(end));
+ self.replaceRange(startString + pad, Pos(from.line, 0));
+ var lead = options.blockCommentLead || mode.blockCommentLead;
+ if (lead != null) for (var i = from.line + 1; i <= end; ++i)
+ if (i != end || lastLineHasText)
+ self.replaceRange(lead + pad, Pos(i, 0));
+ } else {
+ self.replaceRange(endString, to);
+ self.replaceRange(startString, from);
+ }
+ });
+ });
+
+ CodeMirror.defineExtension("uncomment", function(from, to, options) {
+ if (!options) options = noOptions;
+ var self = this, mode = self.getModeAt(from);
+ var end = Math.min(to.line, self.lastLine()), start = Math.min(from.line, end);
+
+ // Try finding line comments
+ var lineString = options.lineComment || mode.lineComment, lines = [];
+ var pad = options.padding == null ? " " : options.padding, didSomething;
+ lineComment: {
+ if (!lineString) break lineComment;
+ for (var i = start; i <= end; ++i) {
+ var line = self.getLine(i);
+ var found = line.indexOf(lineString);
+ if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;
+ if (i != start && found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
+ lines.push(line);
+ }
+ self.operation(function() {
+ for (var i = start; i <= end; ++i) {
+ var line = lines[i - start];
+ var pos = line.indexOf(lineString), endPos = pos + lineString.length;
+ if (pos < 0) continue;
+ if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
+ didSomething = true;
+ self.replaceRange("", Pos(i, pos), Pos(i, endPos));
+ }
+ });
+ if (didSomething) return true;
+ }
+
+ // Try block comments
+ var startString = options.blockCommentStart || mode.blockCommentStart;
+ var endString = options.blockCommentEnd || mode.blockCommentEnd;
+ if (!startString || !endString) return false;
+ var lead = options.blockCommentLead || mode.blockCommentLead;
+ var startLine = self.getLine(s...
[truncated message content] |
|
From: <luc...@us...> - 2013-09-28 05:34:48
|
Revision: 12102
http://sourceforge.net/p/xoops/svn/12102
Author: luciorota
Date: 2013-09-28 05:34:44 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
added $mode option to XoopsFormEditor class for syntax highlighting editors (like codemirror), better $nohtml check, why use wysiwyg editors in no html textareas?
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-27 21:12:53 UTC (rev 12101)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-28 05:34:44 UTC (rev 12102)
@@ -34,8 +34,11 @@
$editor = @ $xoopsUser->getVar('editor'); // Need set through user profile
}
// Add the editor selection box
- // If dohtml is disabled, set $noHtml = true
- $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false));
+ // If dohtml is disabled, set $noHtml = true; $mode not considered if $noHtml is false
+ xoops_load('XoopsCache');
+ XoopsCache::delete('editorlist');
+ $mode = 'html'; // extension or mimetype
+ $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false, $mode));
// options for the editor
// required configs
$options['editor'] = $editor;
@@ -47,11 +50,10 @@
$options['width'] = '100%'; // default value = 100%
$options['height'] = '400px'; // default value = 400px
-
// "textarea": if the selected editor with name of $editor can not be created, the editor "textarea" will be used
// if no $onFailure is set, then the first available editor will be used
// If dohtml is disabled, set $noHtml to true
- $sample_form->addElement(new XoopsFormEditor(_MD_MESSAGEC, $options['name'], $options, $nohtml = false, $onfailure = 'textarea'), true);
+ $sample_form->addElement(new XoopsFormEditor(_MD_MESSAGEC, $options['name'], $options, $nohtml = false, $onfailure = 'textarea', $mode), true);
$sample_form->addElement(new XoopsFormText('SOME REQUIRED ELEMENTS', 'required_element2', 50, 255, $required_element2), true);
$sample_form->addElement(new XoopsFormButton('', 'save', _SUBMIT, 'submit'));
$sample_form->display();
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-27 21:12:53 UTC (rev 12101)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-28 05:34:44 UTC (rev 12102)
@@ -35,7 +35,7 @@
*
* @param array $configs Editor Options
*/
- function __construct($configs)
+ function __construct($configs, $mode)
{
$current_path = __FILE__;
if (DIRECTORY_SEPARATOR != "/") {
@@ -86,6 +86,23 @@
}
/**
+ * Renders the Javascript function needed for client-side for get content
+ *
+ * I'VE USED THIS EXAMPLE TO WRITE VALIDATION CODE
+ * http://tinymce.moxiecode.com/punbb/viewtopic.php?id=12616
+ *
+ * @return string
+ */
+ function renderGetContentJS()
+ {
+ if ($eltname = $this->getName()) {
+ $ret = "tinyMCE.get('{$eltname}').getContent()";
+ return $ret;
+ }
+ return '';
+ }
+
+ /**
* get language
*
* @return string
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-27 21:12:53 UTC (rev 12101)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-28 05:34:44 UTC (rev 12102)
@@ -269,11 +269,10 @@
$this->init();
if (self::$LastOfElementsTinymce!=$this->setting["elements"]) {
$ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET ".$this->setting["elements"]." -->\n"; //debug
-
return $ret;
- } else {
+ } else {
$this->setting["elements"]=implode(",",self::$ListOfElementsTinymce);
- }
+ }
if ( !empty($this->setting["callback"]) ) {
$callback = $this->setting["callback"];
unset($this->setting["callback"]);
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-27 21:12:53 UTC (rev 12101)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-28 05:34:44 UTC (rev 12102)
@@ -90,6 +90,7 @@
var $root_path = "";
var $nohtml = false;
var $allowed_editors = array();
+ var $mode = null;
/**
* Enter description here...
*
@@ -125,15 +126,16 @@
*
* @param string $name Editor name which is actually the folder name
* @param array $options editor options: $key => $val
+ * @param bool $noHtml dohtml disabled
* @param string $OnFailure a pre-validated editor that will be used if the required editor is failed to create
- * @param bool $noHtml dohtml disabled
+ * @param string Requested mode (or array of them)
*/
- function get($name = '', $options = null, $noHtml = false, $OnFailure = '')
+ function get($name = '', $options = null, $noHtml = false, $OnFailure = '', $mode = null)
{
- if (array_key_exists($name, $this->getList($noHtml)) && $editor = $this->_loadEditor($name, $options)) {
+ if (array_key_exists($name, $this->getList($noHtml, $mode)) && $editor = $this->_loadEditor($name, $options, $mode)) {
return $editor;
}
- $list = array_keys($this->getList($noHtml));
+ $list = array_keys($this->getList($noHtml, $mode));
if (empty($OnFailure) || !in_array($OnFailure, $list)) {
$OnFailure = $list[0];
}
@@ -145,9 +147,10 @@
* XoopsEditorHandler::getList()
*
* @param mixed $noHtml
+ * @param string $mode Requested mode (or array of them)
* @return
*/
- function getList($noHtml = false)
+ function getList($noHtml = false, $mode = null)
{
/*
Do NOT use this method statically, please use
@@ -177,7 +180,17 @@
if (empty($config['order']))
continue;
$order[] = $config['order'];
- $list[$item] = array('title' => $config['title'] , 'nohtml' => $config['nohtml']);
+ if (!isset($config['modes'])) {
+ $config['modes'] = null;
+ }
+ if ($config['nohtml'] == false) {
+ $config['modes'] = array('htm', 'html', 'htmlmixed', 'text/html');
+ }
+ $list[$item] = array(
+ 'title' => $config['title'] ,
+ 'nohtml' => $config['nohtml'],
+ 'modes' => $config['modes']
+ );
}
}
array_multisort($order, $list);
@@ -192,6 +205,10 @@
foreach ($editors as $name) {
if (!empty($noHtml) && empty($list[$name]['nohtml']))
continue;
+ if (!empty($mode) && is_string($mode) && !empty($list[$name]['modes']) && !in_array(strtolower($mode), $list[$name]['modes']))
+ continue;
+ if (!empty($mode) && is_array($mode) && !empty($list[$name]['modes']) && (count(array_intersect($mode, $list[$name]['modes'])) == 0))
+ continue;
$_list[$name] = $list[$name]['title'];
}
return $_list;
@@ -234,7 +251,7 @@
* @param mixed $options
* @return
*/
- function _loadEditor($name, $options = null)
+ function _loadEditor($name, $options = null, $mode = null)
{
$editor = null;
if (empty($name) || !array_key_exists($name, $this->getList())) {
@@ -255,7 +272,7 @@
return $editor;
}
include_once $config['file'];
- $editor = new $config['class']($options);
+ $editor = new $config['class']($options, $mode);
return $editor;
}
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-27 21:12:53 UTC (rev 12101)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-28 05:34:44 UTC (rev 12102)
@@ -38,8 +38,9 @@
* @param array $configs configures: editor - editor identifier; name - textarea field name; width, height - dimensions for textarea; value - text content
* @param bool $noHtml use non-WYSIWYG eitor onfailure
* @param string $OnFailure editor to be used if current one failed
+ * @param string Requested mode, useful for syntax highlighting editors
*/
- function XoopsFormEditor($caption, $name, $configs = null, $nohtml = false, $OnFailure = '')
+ function XoopsFormEditor($caption, $name, $configs = null, $nohtml = false, $OnFailure = '', $mode = null)
{
// Backward compatibility: $name -> editor name; $configs['name'] -> textarea field name
if (! isset($configs['editor'])) {
@@ -52,12 +53,12 @@
$this->XoopsFormTextArea($caption, $name);
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
- $this->editor = $editor_handler->get($configs['editor'], $configs, $nohtml, $OnFailure);
+ $this->editor = $editor_handler->get($configs['editor'], $configs, $nohtml, $OnFailure, $mode);
}
/**
* renderValidationJS
- * TEMPORARY SOLUTION to 'override' original renderValidationJS method
+ * override original renderValidationJS method
* with custom XoopsEditor's renderValidationJS method
*/
function renderValidationJS()
@@ -77,6 +78,27 @@
}
/**
+ * renderGetContentJS
+ * 'override' original renderGetContentJS method
+ * with custom XoopsEditor's renderGetContentJS method
+ */
+ function renderGetContentJS()
+ {
+ if (is_object($this->editor)) {
+ if (method_exists($this->editor, 'renderGetContentJS')) {
+ $this->editor->setName($this->getName());
+ $this->editor->setCaption($this->getCaption());
+ $this->editor->_required = $this->isRequired();
+ $ret = $this->editor->renderGetContentJS();
+ return $ret;
+ } else {
+ parent::renderGetContentJS();
+ }
+ }
+ return false;
+ }
+
+ /**
* XoopsFormEditor::render()
*
* @return
|
|
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2013-09-27 21:24:23
|
Lucio, Don't forget to enter Log messages :) Is everything working now? Michael -----Original Message----- From: luc...@us... [mailto:luc...@us...] Sent: Friday, September 27, 2013 17:13 To: xoo...@li... Subject: [xoops-svn] SF.net SVN: xoops-svn:[12101]XoopsCore/branches/2.5.x/2.5.7/htdocs/class Revision: 12101 http://sourceforge.net/p/xoops/svn/12101 Author: luciorota Date: 2013-09-27 21:12:53 +0000 (Fri, 27 Sep 2013) Log Message: ----------- Modified Paths: -------------- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce. php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php |
|
From: <luc...@us...> - 2013-09-27 21:12:56
|
Revision: 12101
http://sourceforge.net/p/xoops/svn/12101
Author: luciorota
Date: 2013-09-27 21:12:53 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -34,11 +34,8 @@
$editor = @ $xoopsUser->getVar('editor'); // Need set through user profile
}
// Add the editor selection box
- // If dohtml is disabled, set $noHtml = true; $mode not considered if $noHtml is false
- xoops_load('XoopsCache');
- XoopsCache::delete('editorlist');
- $mode = 'html'; // extension or mimetype
- $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false, $mode));
+ // If dohtml is disabled, set $noHtml = true
+ $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false));
// options for the editor
// required configs
$options['editor'] = $editor;
@@ -49,8 +46,8 @@
$options['cols'] = 60; // default value = 50
$options['width'] = '100%'; // default value = 100%
$options['height'] = '400px'; // default value = 400px
- $options['mode'] = $mode; // for editors that support mode option
+
// "textarea": if the selected editor with name of $editor can not be created, the editor "textarea" will be used
// if no $onFailure is set, then the first available editor will be used
// If dohtml is disabled, set $noHtml to true
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -86,23 +86,6 @@
}
/**
- * Renders the Javascript function needed for client-side for get content
- *
- * I'VE USED THIS EXAMPLE TO WRITE VALIDATION CODE
- * http://tinymce.moxiecode.com/punbb/viewtopic.php?id=12616
- *
- * @return string
- */
- function renderGetContentJS()
- {
- if ($eltname = $this->getName()) {
- $ret = "tinyMCE.get('{$eltname}').getContent()";
- return $ret;
- }
- return '';
- }
-
- /**
* get language
*
* @return string
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -269,10 +269,11 @@
$this->init();
if (self::$LastOfElementsTinymce!=$this->setting["elements"]) {
$ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET ".$this->setting["elements"]." -->\n"; //debug
+
return $ret;
- } else {
+ } else {
$this->setting["elements"]=implode(",",self::$ListOfElementsTinymce);
- }
+ }
if ( !empty($this->setting["callback"]) ) {
$callback = $this->setting["callback"];
unset($this->setting["callback"]);
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -90,7 +90,6 @@
var $root_path = "";
var $nohtml = false;
var $allowed_editors = array();
- var $modes = null;
/**
* Enter description here...
*
@@ -126,16 +125,15 @@
*
* @param string $name Editor name which is actually the folder name
* @param array $options editor options: $key => $val
+ * @param string $OnFailure a pre-validated editor that will be used if the required editor is failed to create
* @param bool $noHtml dohtml disabled
- * @param string $OnFailure a pre-validated editor that will be used if the required editor is failed to create
- * @param mixed $modes Requested mode (or array of them)
*/
- function get($name = '', $options = null, $noHtml = false, $OnFailure = '', $modes = null)
+ function get($name = '', $options = null, $noHtml = false, $OnFailure = '')
{
- if (array_key_exists($name, $this->getList($noHtml, $modes)) && $editor = $this->_loadEditor($name, $options)) {
+ if (array_key_exists($name, $this->getList($noHtml)) && $editor = $this->_loadEditor($name, $options)) {
return $editor;
}
- $list = array_keys($this->getList($noHtml, $modes));
+ $list = array_keys($this->getList($noHtml));
if (empty($OnFailure) || !in_array($OnFailure, $list)) {
$OnFailure = $list[0];
}
@@ -147,10 +145,9 @@
* XoopsEditorHandler::getList()
*
* @param mixed $noHtml
- * @param mixed $modes Requested mode (or array of them)
* @return
*/
- function getList($noHtml = false, $modes = null)
+ function getList($noHtml = false)
{
/*
Do NOT use this method statically, please use
@@ -180,17 +177,7 @@
if (empty($config['order']))
continue;
$order[] = $config['order'];
- if (!isset($config['modes'])) {
- $config['modes'] = null;
- }
- if ($config['nohtml'] == false) {
- $config['modes'] = array('htm', 'html', 'htmlmixed', 'text/html');
- }
- $list[$item] = array(
- 'title' => $config['title'] ,
- 'nohtml' => $config['nohtml'],
- 'modes' => $config['modes']
- );
+ $list[$item] = array('title' => $config['title'] , 'nohtml' => $config['nohtml']);
}
}
array_multisort($order, $list);
@@ -205,10 +192,6 @@
foreach ($editors as $name) {
if (!empty($noHtml) && empty($list[$name]['nohtml']))
continue;
- if (!empty($modes) && is_string($modes) && !empty($list[$name]['modes']) && !in_array(strtolower($modes), $list[$name]['modes']))
- continue;
- if (!empty($modes) && is_array($modes) && !empty($list[$name]['modes']) && (count(array_intersect($modes, $list[$name]['modes'])) == 0))
- continue;
$_list[$name] = $list[$name]['title'];
}
return $_list;
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -558,60 +558,6 @@
}
/**
- * Renders the Javascript function needed for client-side for get content
- *
- * Additionally, each element class may provide its own "renderGetContentJS" method
- * that is supposed to return custom get content code for the element.
- *
- * The element get content code can assume that the JS "myform" variable points to the form.
- * Exemple:
- * <script type='text/javascript'>
- * var content[];
- * content = " . renderGetContentJS(false) . "
- * </script>
- *
- * A basic element get content method may contain something like this:
- * <code>
- * function renderGetContentJS() {
- * $name = $this->getName();
- * return "myform.{$name}.value;";
- * }
- * </code>
- *
- * @param boolean $withtags Include the < javascript > tags in the returned string
- * @return string
- */
- function renderGetContentJS($withtags = true)
- {
- $js = '';
- if ($withtags) {
- $js .= "\n<!-- Start Form GetContent JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
- }
- $formname = $this->getName();
- $js .= "function xoopsFormGetContent_{$formname}() {\n";
- $js .= " var myform = window.document.{$formname};\n";
- $js .= " var content = new Object();\n";
- $elements = $this->getElements(true);
- foreach($elements as $elt) {
- if (method_exists($elt, 'renderGetContentJS') && ($elt->getName() != '')) {
- $js .= " content['" . $elt->getName() . "'] = " . $elt->renderGetContentJS() . ";\n";
- }
- }
- $js .= " Object.size = function(obj) {\n";
- $js .= " var size = 0, key;\n";
- $js .= " for (key in obj)\n";
- $js .= " {if (obj.hasOwnProperty(key)) size++;}\n";
- $js .= " return size;\n";
- $js .= " };\n";
- $js .= " return (Object.size(content) > 0) ? content : null;\n";
- $js .= "}\n";
- if ($withtags) {
- $js .= "//--></script>\n<!-- End Form GetContent JavaScript //-->\n";
- }
- return $js;
- }
-
- /**
* assign to smarty form template instead of displaying directly
*
* @param object $ &$tpl reference to a {@link Smarty} object
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -242,33 +242,4 @@
}
return '';
}
-
- /**
- * Render custom javascript validation code
- *
- * @seealso XoopsForm::renderValidationJS
- */
- function renderGetContentJS()
- {
- // render custom validation code if any
- if (! empty($this->customGetContentCode)) {
- return implode(NWLINE, $this->customGetContentCode);
- // generate get content code if required
- } else {
- $eltname = $this->getName();
- return NWLINE . "
- function(){
- var checkboxesChecked = [];
- var checkBox = myform.elements['{$eltname}'];
- if (checkBox.length) {
- for (var i = 0; i < checkBox.length; i++) {
- if (checkBox[i].checked == true) {
- checkboxesChecked.push(checkboxes[i]);
- }
- }
- }
- return (checkboxesChecked.length > 0) ? checkboxesChecked : null;
- }";
- }
- }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -72,18 +72,4 @@
return "if ( !(new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value)) ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
}
-
- /**
- * Returns custom get content Javascript
- *
- * @return string Element get content Javascript
- */
- function renderGetContentJS()
- {
- $eltname = $this->getName();
- return NWLINE . "
- function(){
- return ( (new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value))) ? myform.{$eltname}.value : null;
- }";
- }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -265,19 +265,4 @@
}
return parent::renderValidationJS();
}
-
- /**
- * XoopsFormDhtmlTextArea::renderGetContentJS()
- *
- * @return
- */
- function renderGetContentJS()
- {
- if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderGetContentJS')) {
- if (! isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) {
- return $this->htmlEditor->renderGetContentJS();
- }
- }
- return parent::renderGetContentJS();
- }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -57,7 +57,7 @@
/**
* renderValidationJS
- * override original renderValidationJS method
+ * TEMPORARY SOLUTION to 'override' original renderValidationJS method
* with custom XoopsEditor's renderValidationJS method
*/
function renderValidationJS()
@@ -77,27 +77,6 @@
}
/**
- * renderGetContentJS
- * 'override' original renderGetContentJS method
- * with custom XoopsEditor's renderGetContentJS method
- */
- function renderGetContentJS()
- {
- if (is_object($this->editor)) {
- if (method_exists($this->editor, 'renderGetContentJS')) {
- $this->editor->setName($this->getName());
- $this->editor->setCaption($this->getCaption());
- $this->editor->_required = $this->isRequired();
- $ret = $this->editor->renderGetContentJS();
- return $ret;
- } else {
- parent::renderGetContentJS();
- }
- }
- return false;
- }
-
- /**
* XoopsFormEditor::render()
*
* @return
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -434,37 +434,6 @@
}
/**
- * Render custom javascript get content code
- *
- * @seealso XoopsForm::renderGetContentJS
- */
- function renderGetContentJS()
- {
- // render custom get content code if any
- if (!empty($this->customGetContentCode)) {
- return implode(NWLINE, $this->customGetContentCode);
- // generate get content code if required
- } else if ($eltname = $this->getName()) {
- // $eltname = $this->getName();
- $eltcaption = $this->getCaption();
- $eltmsg = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
- $eltmsg = str_replace(array(':' , '?' , '%'), '', $eltmsg);
- $eltmsg = str_replace('"', '\"', stripslashes($eltmsg));
- $eltmsg = strip_tags($eltmsg);
- echo $this->getFormType();
- switch ($this->getFormType()) {
- case 'checkbox':
- return "myform.{$eltname}.value";
- break;
- default:
- return "myform.{$eltname}.value";
- break;
- } // switch
- }
- return false;
- }
-
- /**
* Generates output for the element.
*
* This method is abstract and must be overwritten by the child classes.
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -238,34 +238,4 @@
}
return '';
}
-
- /**
- * Render custom javascript get content code
- *
- * @seealso XoopsForm::renderGetContentJS
- */
- function renderGetContentJS()
- {
- // render custom validation code if any
- if (! empty($this->customGetContentCode)) {
- return implode("\n", $this->customGetContentCode);
- // generate validation code if required
- } else {
- $eltname = $this->getName();
- return "
- function(){
- var selectSelected = [];
- var selectBox = myform.elements['{$eltname}'];
- if (selectBox.length) {
- for (i = 0; i < selectBox.options.length; i++ ) {
- if (selectBox.options[i].selected == true && selectBox.options[i].value != '') {
- selectSelected.push(selectBox.options[i].value);
- }
- }
- }
- return (selectSelected.length > 0) ? selectSelected : null;
- }";
- }
- return '';
- }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-26 17:27:27 UTC (rev 12100)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-27 21:12:53 UTC (rev 12101)
@@ -27,7 +27,6 @@
*/
class XoopsFormSelectEditor extends XoopsFormElementTray
{
- var $modes = null;
var $allowed_editors = array();
var $form;
var $value;
@@ -41,13 +40,10 @@
* @param string $name editor name
* @param string $value Pre-selected text value
* @param bool $noHtml dohtml disabled
- * @param array $allowed_editors
- * @param mixed $modes Requested mode (or array of them)
*/
- function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array(), $modes = null)
+ function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array())
{
$this->XoopsFormElementTray(_SELECT);
- $this->modes = $modes;
$this->allowed_editors = $allowed_editors;
$this->form = &$form;
$this->name = $name;
@@ -65,13 +61,12 @@
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
$editor_handler->allowed_editors = $this->allowed_editors;
- $editor_handler->modes = $this->modes;
$option_select = new XoopsFormSelect("", $this->name, $this->value);
$extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
window.document.forms.' . $this->form->getName() . '.submit();
}"';
$option_select->setExtra($extra);
- $option_select->addOptionArray($editor_handler->getList($this->nohtml, $this->modes));
+ $option_select->addOptionArray($editor_handler->getList($this->nohtml));
$this->addElement($option_select);
return parent::render();
}
|
|
From: <be...@us...> - 2013-09-26 17:27:28
|
Revision: 12100
http://sourceforge.net/p/xoops/svn/12100
Author: beckmi
Date: 2013-09-26 17:27:27 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Adding Release 0.72 to /releases
Added Paths:
-----------
XoopsModules/latestnews/releases/0.72/latestnews/
|
|
From: <be...@us...> - 2013-09-26 17:25:25
|
Revision: 12099
http://sourceforge.net/p/xoops/svn/12099
Author: beckmi
Date: 2013-09-26 17:25:18 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Adding LatestNews
Modified Paths:
--------------
XoopsModules/xoopshp/trunk/xoopshp/xoops_version.php
Added Paths:
-----------
XoopsModules/latestnews/
XoopsModules/latestnews/branches/
XoopsModules/latestnews/releases/
XoopsModules/latestnews/releases/0.72/
XoopsModules/latestnews/trunk/
XoopsModules/latestnews/trunk/latestnews/
XoopsModules/latestnews/trunk/latestnews/admin/
XoopsModules/latestnews/trunk/latestnews/admin/admin.php
XoopsModules/latestnews/trunk/latestnews/admin/header.php
XoopsModules/latestnews/trunk/latestnews/admin/index.html
XoopsModules/latestnews/trunk/latestnews/admin/menu.php
XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php
XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php
XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php
XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php
XoopsModules/latestnews/trunk/latestnews/admin/mygrouppermform.php
XoopsModules/latestnews/trunk/latestnews/blocks/
XoopsModules/latestnews/trunk/latestnews/blocks/index.html
XoopsModules/latestnews/trunk/latestnews/blocks/latestnews.php
XoopsModules/latestnews/trunk/latestnews/class/
XoopsModules/latestnews/trunk/latestnews/class/class.latestnews.php
XoopsModules/latestnews/trunk/latestnews/class/index.html
XoopsModules/latestnews/trunk/latestnews/docs/
XoopsModules/latestnews/trunk/latestnews/docs/changelog.txt
XoopsModules/latestnews/trunk/latestnews/docs/index.html
XoopsModules/latestnews/trunk/latestnews/docs/readme.txt
XoopsModules/latestnews/trunk/latestnews/docs/readme_arabic.txt
XoopsModules/latestnews/trunk/latestnews/images/
XoopsModules/latestnews/trunk/latestnews/images/delete_block.gif
XoopsModules/latestnews/trunk/latestnews/images/edit_block.gif
XoopsModules/latestnews/trunk/latestnews/images/index.html
XoopsModules/latestnews/trunk/latestnews/images/latestnews_logo.png
XoopsModules/latestnews/trunk/latestnews/include/
XoopsModules/latestnews/trunk/latestnews/include/blocksadmin.inc.php
XoopsModules/latestnews/trunk/latestnews/include/functions.php
XoopsModules/latestnews/trunk/latestnews/include/gtickets.php
XoopsModules/latestnews/trunk/latestnews/include/index.html
XoopsModules/latestnews/trunk/latestnews/include/onupdate.inc.php
XoopsModules/latestnews/trunk/latestnews/include/updateblock.inc.php
XoopsModules/latestnews/trunk/latestnews/index.html
XoopsModules/latestnews/trunk/latestnews/language/
XoopsModules/latestnews/trunk/latestnews/language/arabic/
XoopsModules/latestnews/trunk/latestnews/language/arabic/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/arabic/index.html
XoopsModules/latestnews/trunk/latestnews/language/arabic/main.php
XoopsModules/latestnews/trunk/latestnews/language/arabic/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/danish/
XoopsModules/latestnews/trunk/latestnews/language/danish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/danish/index.html
XoopsModules/latestnews/trunk/latestnews/language/danish/main.php
XoopsModules/latestnews/trunk/latestnews/language/danish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/english/
XoopsModules/latestnews/trunk/latestnews/language/english/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/english/index.html
XoopsModules/latestnews/trunk/latestnews/language/english/main.php
XoopsModules/latestnews/trunk/latestnews/language/english/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/french/
XoopsModules/latestnews/trunk/latestnews/language/french/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/french/index.html
XoopsModules/latestnews/trunk/latestnews/language/french/main.php
XoopsModules/latestnews/trunk/latestnews/language/french/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/index.html
XoopsModules/latestnews/trunk/latestnews/language/persian/
XoopsModules/latestnews/trunk/latestnews/language/persian/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/persian/index.html
XoopsModules/latestnews/trunk/latestnews/language/persian/main.php
XoopsModules/latestnews/trunk/latestnews/language/persian/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/polish/
XoopsModules/latestnews/trunk/latestnews/language/polish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/polish/index.html
XoopsModules/latestnews/trunk/latestnews/language/polish/main.php
XoopsModules/latestnews/trunk/latestnews/language/polish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/index.html
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/main.php
XoopsModules/latestnews/trunk/latestnews/language/portuguesebr/modinfo.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/
XoopsModules/latestnews/trunk/latestnews/language/spanish/blocks.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/index.html
XoopsModules/latestnews/trunk/latestnews/language/spanish/main.php
XoopsModules/latestnews/trunk/latestnews/language/spanish/modinfo.php
XoopsModules/latestnews/trunk/latestnews/templates/
XoopsModules/latestnews/trunk/latestnews/templates/blocks/
XoopsModules/latestnews/trunk/latestnews/templates/blocks/block_latestnews.html
XoopsModules/latestnews/trunk/latestnews/templates/blocks/index.html
XoopsModules/latestnews/trunk/latestnews/templates/index.html
XoopsModules/latestnews/trunk/latestnews/xoops_version.php
Added: XoopsModules/latestnews/trunk/latestnews/admin/admin.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/admin.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/admin.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,161 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+$admin_mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+
+$fct = empty( $_POST['fct'] ) ? '' : trim( $_POST['fct'] ) ;
+$fct = empty( $_GET['fct'] ) ? $fct : trim( $_GET['fct'] ) ;
+if( empty( $fct ) ) $fct = 'preferences' ;
+//if (isset($fct) && $fct == "users") {
+// $xoopsOption['pagetype'] = "user";
+//}
+//include "../../../mainfile.php";
+// include "../../mainfile.php"; GIJ
+//include XOOPS_ROOT_PATH."/include/cp_functions.php";
+require("header.php");
+include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php";
+include_once "../include/gtickets.php" ;// GIJ
+
+$admintest = 0;
+
+if (is_object($xoopsUser)) {
+ $xoopsModule =& XoopsModule::getByDirname("system");
+ if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
+ redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
+ exit();
+ }
+ $admintest=1;
+} else {
+ redirect_header(XOOPS_URL.'/user.php',3,_NOPERM);
+ exit();
+}
+
+// include system category definitions
+include_once XOOPS_ROOT_PATH."/modules/system/constants.php";
+$error = false;
+if ($admintest != 0) {
+ if (isset($fct) && $fct != '') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) {
+
+ if ( file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php") ) {
+ include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin.php";
+ } else {
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin.php";
+ }
+
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php";
+ } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) {
+ include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php";
+ }
+ include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php";
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $category = !empty($modversion['category']) ? intval($modversion['category']) : 0;
+ unset($modversion);
+ if ($category > 0) {
+ $groups = $xoopsUser->getGroups();
+ if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){
+// if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) {
+// include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; GIJ
+ if (file_exists("../include/{$fct}.inc.php")) {
+ include_once "../include/{$fct}.inc.php" ;
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } elseif ($fct == 'version') {
+ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) {
+ include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php";
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+ } else {
+ $error = true;
+ }
+}
+
+if (false != $error) {
+ xoops_cp_header();
+ mytabs_adminmenu(1);
+ echo "<h4>System Configuration</h4>";
+ echo '<table class="outer" cellpadding="4" cellspacing="1">';
+ echo '<tr>';
+ $groups = $xoopsUser->getGroups();
+ $all_ok = false;
+ if (!in_array(XOOPS_GROUP_ADMIN, $groups)) {
+ $sysperm_handler =& xoops_gethandler('groupperm');
+ $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups);
+ } else {
+ $all_ok = true;
+ }
+ $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin";
+ $handle = opendir($admin_dir);
+ $counter = 0;
+ $class = 'even';
+ while ($file = readdir($handle)) {
+ if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) {
+ include $admin_dir.'/'.$file.'/xoops_version.php';
+ if ($modversion['hasAdmin']) {
+ $category = isset($modversion['category']) ? intval($modversion['category']) : 0;
+ if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) {
+ echo "<td class='$class' align='center' valign='bottom' width='19%'>";
+ echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n";
+ echo "</td>";
+ $counter++;
+ $class = ($class == 'even') ? 'odd' : 'even';
+ }
+ if ( $counter > 4 ) {
+ $counter = 0;
+ echo "</tr>";
+ echo "<tr>";
+ }
+ }
+ unset($modversion);
+ }
+ }
+ while ($counter < 5) {
+ echo '<td class="'.$class.'"> </td>';
+ $class = ($class == 'even') ? 'odd' : 'even';
+ $counter++;
+ }
+ echo '</tr></table>';
+ xoops_cp_footer();
+}
+
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/admin.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/header.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/header.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/header.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,12 @@
+<?php
+// Author: Trabis
+// URL: http://www.xuups.com
+// E-Mail: lus...@gm...
+
+require_once("../../../include/cp_header.php");
+
+if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
+}
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/header.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/index.html
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/index.html (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/index.html 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/latestnews/trunk/latestnews/admin/menu.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/menu.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/menu.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,4 @@
+<?php
+$adminmenu[0]['title'] = _MI_LATESTNEWS_ADMIN_MENU1;
+$adminmenu[0]['link'] = "admin/myblocksadmin.php";
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/menu.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,142 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+$usespaw = empty( $_GET['usespaw'] ) ? 0 : 1 ;
+
+require_once XOOPS_ROOT_PATH."/class/xoopsformloader.php";
+//$form = new XoopsThemeForm($block['form_title'], 'blockform', XOOPS_URL."/modules/blocksadmin/admin/admin.php" ) ;
+$form = new XoopsThemeForm($block['form_title'], 'blockform', "admin.php" ) ;
+if (isset($block['name'])) {
+ $form->addElement(new XoopsFormLabel(_AM_NAME, $block['name']));
+}
+$side_select = new XoopsFormSelect(_AM_BLKTYPE, "bside", $block['side']);
+/** Xoops 2.0.13
+$side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, ));
+*/
+$side_select->addOptionArray(array(0 => _AM_SBLEFT, 1 => _AM_SBRIGHT, 3 => _AM_CBLEFT, 4 => _AM_CBRIGHT, 5 => _AM_CBCENTER, 7 => _AM_CBBOTTOMLEFT, 8 => _AM_CBBOTTOMRIGHT, 9 => _AM_CBBOTTOM, ));
+$form->addElement($side_select);
+$form->addElement(new XoopsFormText(_AM_WEIGHT, "bweight", 2, 5, $block['weight']));
+$form->addElement(new XoopsFormRadioYN(_AM_VISIBLE, 'bvisible', $block['visible']));
+$mod_select = new XoopsFormSelect(_AM_VISIBLEIN, "bmodule", $block['modules'], 5, true);
+$module_handler =& xoops_gethandler('module');
+$criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+$criteria->add(new Criteria('isactive', 1));
+$module_list = $module_handler->getList($criteria);
+$module_list[-1] = _AM_TOPPAGE;
+$module_list[0] = _AM_ALLPAGES;
+ksort($module_list);
+$mod_select->addOptionArray($module_list);
+$form->addElement($mod_select);
+$form->addElement(new XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false);
+
+if ( $block['is_custom'] ) {
+
+ // Custom Block's textarea
+ $notice_for_tags = '<span style="font-size:x-small;font-weight:bold;">'._AM_USEFULTAGS.'</span><br /><span style="font-size:x-small;font-weight:normal;">'.sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL.'/').'</span>' ;
+ $current_op = @$_GET['op'] == 'clone' ? 'clone' : 'edit' ;
+ $uri_to_myself = XOOPS_URL . "/modules/blocksadmin/admin/admin.php?fct=blocksadmin&op=$current_op&bid={$block['bid']}" ;
+ // $can_use_spaw = check_browser_can_use_spaw() ;
+ $can_use_spaw = true ;
+ if( $usespaw && $can_use_spaw ) {
+ // SPAW Config
+ include XOOPS_ROOT_PATH.'/common/spaw/spaw_control.class.php' ;
+ ob_start() ;
+ $sw = new SPAW_Wysiwyg( 'bcontent' , $block['content'] ) ;
+ $sw->show() ;
+ $textarea = new XoopsFormLabel( _AM_CONTENT , ob_get_contents() ) ;
+ $textarea->setDescription( $notice_for_tags . "<br /><br /><a href='$uri_to_myself&usespaw=0'>NORMAL</a>" ) ;
+ ob_end_clean() ;
+ } else {
+ $myts =& MyTextSanitizer::getInstance();
+ $textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $myts->htmlSpecialChars( $block['content'] ) , 15, 70);
+ if( $can_use_spaw ) {
+ $textarea->setDescription( $notice_for_tags . "<br /><br /><a href='$uri_to_myself&usespaw=1'>SPAW</a>" ) ;
+ } else {
+ $textarea->setDescription( $notice_for_tags ) ;
+ }
+ }
+ $form->addElement($textarea, true);
+
+ $ctype_select = new XoopsFormSelect(_AM_CTYPE, 'bctype', $block['ctype']);
+ $ctype_select->addOptionArray(array('H' => _AM_HTML, 'P' => _AM_PHP, 'S' => _AM_AFWSMILE, 'T' => _AM_AFNOSMILE));
+ $form->addElement($ctype_select);
+} else {
+ if ($block['template'] != '' && ! defined('XOOPS_ORETEKI') ) {
+ $tplfile_handler =& xoops_gethandler('tplfile');
+ $btemplate = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block['bid']);
+ if (count($btemplate) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate[0]->getVar('tpl_id').'">'._AM_EDITTPL.'</a>'));
+ } else {
+ $btemplate2 = $tplfile_handler->find('default', 'block', $block['bid']);
+ if (count($btemplate2) > 0) {
+ $form->addElement(new XoopsFormLabel(_AM_CONTENT, '<a href="'.XOOPS_URL.'/modules/system/admin.php?fct=tplsets&op=edittpl&id='.$btemplate2[0]->getVar('tpl_id').'" target="_blank">'._AM_EDITTPL.'</a>'));
+ }
+ }
+ }
+ if ($block['edit_form'] != false) {
+ $form->addElement(new XoopsFormLabel(_AM_OPTIONS, $block['edit_form']));
+ }
+}
+$cache_select = new XoopsFormSelect(_AM_BCACHETIME, 'bcachetime', $block['cachetime']);
+$cache_select->addOptionArray(array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH));
+$form->addElement($cache_select);
+if (isset($block['bid'])) {
+ $form->addElement(new XoopsFormHidden('bid', $block['bid']));
+}
+// $form->addElement(new XoopsFormHidden('options', $block['options']));
+$form->addElement(new XoopsFormHidden('op', $block['op']));
+$form->addElement(new XoopsFormHidden('fct', 'blocksadmin'));
+$button_tray = new XoopsFormElementTray('', ' ');
+if ($block['is_custom']) {
+ $button_tray->addElement(new XoopsFormButton('', 'previewblock', _PREVIEW, "submit"));
+}
+$button_tray->addElement(new XoopsFormButton('', 'submitblock', $block['submit_button'], "submit"));
+$form->addElement($button_tray);
+
+
+// checks browser compatibility with the control
+function check_browser_can_use_spaw() {
+ $browser = $_SERVER['HTTP_USER_AGENT'] ;
+ // check if msie
+ if( eregi( "MSIE[^;]*" , $browser , $msie ) ) {
+ // get version
+ if( eregi( "[0-9]+\.[0-9]+" , $msie[0] , $version ) ) {
+ // check version
+ if( (float)$version[0] >= 5.5 ) {
+ // finally check if it's not opera impersonating ie
+ if( ! eregi( "opera" , $browser ) ) {
+ return true ;
+ }
+ }
+ }
+ }
+ return false ;
+}
+
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/myblockform.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,370 @@
+<?php
+// ------------------------------------------------------------------------- //
+// myblocksadmin.php //
+// - XOOPS block admin for each modules - //
+// GIJOE <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+
+include_once( '../../../include/cp_header.php' ) ;
+
+if( substr( XOOPS_VERSION , 6 , 3 ) > 2.0 ) {
+ include 'myblocksadmin2.php' ;
+ exit ;
+}
+
+include_once( 'mygrouppermform.php' ) ;
+include_once( XOOPS_ROOT_PATH.'/class/xoopsblock.php' ) ;
+include_once "../include/gtickets.php" ;// GIJ
+
+
+$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ;
+
+// language files
+$language = $xoopsConfig['language'] ;
+if( ! file_exists( "$xoops_system_path/language/$language/admin/blocksadmin.php") ) $language = 'english' ;
+
+// to prevent from notice that constants already defined
+$error_reporting_level = error_reporting( 0 ) ;
+include_once( "$xoops_system_path/constants.php" ) ;
+include_once( "$xoops_system_path/language/$language/admin.php" ) ;
+include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ;
+error_reporting( $error_reporting_level ) ;
+
+$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ;
+foreach( $group_defs as $def ) {
+ if( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ;
+}
+
+
+// check $xoopsModule
+if( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ;
+
+// set target_module if specified by $_GET['dirname']
+$module_handler =& xoops_gethandler('module');
+if( ! empty( $_GET['dirname'] ) ) {
+ $target_module =& $module_handler->getByDirname($_GET['dirname']);
+}/* else if( ! empty( $_GET['mid'] ) ) {
+ $target_module =& $module_handler->get( intval( $_GET['mid'] ) );
+}*/
+
+if( ! empty( $target_module ) && is_object( $target_module ) ) {
+ // specified by dirname
+ $target_mid = $target_module->getVar( 'mid' ) ;
+ $target_mname = $target_module->getVar( 'name' ) . " " . sprintf( "(%2.2f)" , $target_module->getVar('version') / 100.0 ) ;
+ $query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ;
+} else if( isset( $_GET['mid'] ) && $_GET['mid'] == 0 || $xoopsModule->getVar('dirname') == 'blocksadmin' ) {
+ $target_mid = 0 ;
+ $target_mname = '' ;
+ $query4redirect = '?mid=0' ;
+} else {
+ $target_mid = $xoopsModule->getVar( 'mid' ) ;
+ $target_mname = $xoopsModule->getVar( 'name' ) ;
+ $query4redirect = '' ;
+}
+
+// check access right (needs system_admin of BLOCK)
+$sysperm_handler =& xoops_gethandler('groupperm');
+if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ;
+
+// get blocks owned by the module (Imported from xoopsblock.php then modified)
+//$block_arr =& XoopsBlock::getByModule( $target_mid ) ;
+$db =& Database::getInstance();
+$sql = "SELECT * FROM ".$db->prefix("newblocks")." WHERE mid='$target_mid' ORDER BY visible DESC,side,weight";
+$result = $db->query($sql);
+$block_arr = array();
+while( $myrow = $db->fetchArray($result) ) {
+ $block_arr[] = new XoopsBlock($myrow);
+}
+
+function list_blocks()
+{
+ global $query4redirect , $block_arr , $xoopsGTicket ;
+
+ // cachetime options
+ $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH);
+
+ // displaying TH
+ echo "
+ <form action='admin.php' name='blockadmin' method='post'>
+ <table width='95%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'>
+ <th>"._AM_TITLE."</th>
+ <th align='center' nowrap='nowrap'>"._AM_SIDE."</th>
+ <th align='center'>"._AM_WEIGHT."</th>
+ <th align='center'>"._AM_VISIBLEIN."</th>
+ <th align='center'>"._AM_BCACHETIME."</th>
+ <th align='right'>"._AM_ACTION."</th>
+ </tr>\n" ;
+
+ // blocks displaying loop
+ $class = 'even' ;
+ $block_configs = get_block_configs() ;
+ foreach( array_keys( $block_arr ) as $i ) {
+ $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = "";
+ $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = "#FFFFFF";
+/** add for xoops 2.0.14 */
+ $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = $ssel5 = $ssel6 = $ssel7 = "";
+ $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = $scol5 = $scol6 = $scol7 = "#FFFFFF";
+/** add for xoops 2.0.14 */
+
+ $weight = $block_arr[$i]->getVar("weight") ;
+ $title = $block_arr[$i]->getVar("title") ;
+ $name = $block_arr[$i]->getVar("name") ;
+ $bcachetime = $block_arr[$i]->getVar("bcachetime") ;
+ $bid = $block_arr[$i]->getVar("bid") ;
+
+ // visible and side
+ if ( $block_arr[$i]->getVar("visible") != 1 ) {
+ $sseln = " checked='checked'";
+ $scoln = "#FF0000";
+ } else switch( $block_arr[$i]->getVar("side") ) {
+ default :
+ case XOOPS_SIDEBLOCK_LEFT :
+ $ssel0 = " checked='checked'";
+ $scol0 = "#00FF00";
+ break ;
+ case XOOPS_SIDEBLOCK_RIGHT :
+ $ssel1 = " checked='checked'";
+ $scol1 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_LEFT :
+ $ssel2 = " checked='checked'";
+ $scol2 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_RIGHT :
+ $ssel4 = " checked='checked'";
+ $scol4 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_CENTER :
+ $ssel3 = " checked='checked'";
+ $scol3 = "#00FF00";
+ break ;
+/** add for xoops 2.0.14 */
+ case XOOPS_CENTERBLOCK_BOTTOMLEFT :
+ $ssel5 = " checked='checked'";
+ $scol5 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_BOTTOMRIGHT :
+ $ssel6 = " checked='checked'";
+ $scol6 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_BOTTOM :
+ $ssel7 = " checked='checked'";
+ $scol7 = "#00FF00";
+ break ;
+/** add for xoops 2.0.14 */
+ }
+
+ // bcachetime
+ $cachetime_options = '' ;
+ foreach( $cachetimes as $cachetime => $cachetime_name ) {
+ if( $bcachetime == $cachetime ) {
+ $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ;
+ } else {
+ $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ;
+ }
+ }
+
+ // target modules
+ $db =& Database::getInstance();
+ $result = $db->query( "SELECT module_id FROM ".$db->prefix('block_module_link')." WHERE block_id='$bid'" ) ;
+ $selected_mids = array();
+ while ( list( $selected_mid ) = $db->fetchRow( $result ) ) {
+ $selected_mids[] = intval( $selected_mid ) ;
+ }
+ $module_handler =& xoops_gethandler('module');
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_list = $module_handler->getList($criteria);
+ $module_list[-1] = _AM_TOPPAGE;
+ $module_list[0] = _AM_ALLPAGES;
+ ksort($module_list);
+ $module_options = '' ;
+ foreach( $module_list as $mid => $mname ) {
+ if( in_array( $mid , $selected_mids ) ) {
+ $module_options .= "<option value='$mid' selected='selected'>$mname</option>\n" ;
+ } else {
+ $module_options .= "<option value='$mid'>$mname</option>\n" ;
+ }
+ }
+
+ // delete link if it is cloned block
+ if( $block_arr[$i]->getVar("block_type") == 'D' || $block_arr[$i]->getVar("block_type") == 'C' ) {
+ $delete_link = "<br /><a href='admin.php?fct=blocksadmin&op=delete&bid=$bid'>"._DELETE."</a>" ;
+ } else {
+ $delete_link = '' ;
+ }
+
+ // clone link if it is marked as cloneable block
+ // $modversion['blocks'][n]['can_clone']
+ if( $block_arr[$i]->getVar("block_type") == 'D' || $block_arr[$i]->getVar("block_type") == 'C' ) {
+ $can_clone = true ;
+ } else {
+ $can_clone = false ;
+ foreach( $block_configs as $bconf ) {
+ if( $block_arr[$i]->getVar("show_func") == $bconf['show_func'] && $block_arr[$i]->getVar("func_file") == $bconf['file'] && ( empty( $bconf['template'] ) || $block_arr[$i]->getVar("template") == $bconf['template'] ) ) {
+ if( ! empty( $bconf['can_clone'] ) ) $can_clone = true ;
+ }
+ }
+ }
+ if( $can_clone ) {
+ $clone_link = "<br /><a href='admin.php?fct=blocksadmin&op=clone&bid=$bid'>"._CLONE."</a>" ;
+ } else {
+ $clone_link = '' ;
+ }
+
+ // displaying part
+ echo "
+ <tr valign='middle'>
+ <td class='$class'>
+ $name
+ <br />
+ <input type='text' name='title[$bid]' value='$title' size='20' />
+ </td>
+ <td class='$class' align='center' nowrap='nowrap' width='125px'>";
+ if (! ( /*!defined(ICMS_VERSION) && */(substr( XOOPS_VERSION , 10 , 2 ) < 15) && (substr( XOOPS_VERSION , 8 , 1 ) == 1)) ) {
+
+ echo "
+ <div align='center' >
+ <input style='background-color:$scol2;' type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."'$ssel2 />
+ <input style='background-color:$scol3;'type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."'$ssel3 />
+ <input style='background-color:$scol4;'type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."'$ssel4 />
+ </div>
+ <div>
+ <span style='float:right'>
+ <input style='background-color:$scol1;' type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."'$ssel1 />
+ </span>
+ <div align='left'>
+ <input style='background-color:$scol0;' type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."'$ssel0 />
+ </div>
+ </div>
+ <div align='center'>
+ <input style='background-color:$scol5;' type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMLEFT."'$ssel5 />
+ <input style='background-color:$scol7;' type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOM."'$ssel7 />
+ <input style='background-color:$scol6;' type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_BOTTOMRIGHT."'$ssel6 />
+ </div>";
+ } else {
+ echo "
+ <div style='float:left;background-color:$scol0;'>
+ <input type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_LEFT."' style='background-color:$scol0;' $ssel0 />
+ </div>
+ <div style='float:left;'>-</div>
+ <div style='float:left;background-color:$scol2;'>
+ <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_LEFT."' style='background-color:$scol2;' $ssel2 />
+ </div>
+ <div style='float:left;background-color:$scol3;'>
+ <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_CENTER."' style='background-color:$scol3;' $ssel3 />
+ </div>
+ <div style='float:left;background-color:$scol4;'>
+ <input type='radio' name='side[$bid]' value='".XOOPS_CENTERBLOCK_RIGHT."' style='background-color:$scol4;' $ssel4 />
+ </div>
+ <div style='float:left;'>-</div>
+ <div style='float:left;background-color:$scol1;'>
+ <input type='radio' name='side[$bid]' value='".XOOPS_SIDEBLOCK_RIGHT."' style='background-color:$scol1;' $ssel1 />
+ </div>";
+ }
+
+ echo "
+ <br />
+ <div style='float:left;width:40px;'> </div>
+ <div style='float:left;background-color:$scoln;'>
+ <input type='radio' name='side[$bid]' value='-1' style='background-color:$scoln;' $sseln />
+ </div>
+ <div style='float:left;'>"._NONE."</div>
+ </td>
+ <td class='$class' align='center'>
+ <input type='text' name=weight[$bid] value='$weight' size='3' maxlength='5' style='text-align:right;' />
+ </td>
+ <td class='$class' align='center'>
+ <select name='bmodule[$bid][]' size='5' multiple='multiple'>
+ $module_options
+ </select>
+ </td>
+ <td class='$class' align='center'>
+ <select name='bcachetime[$bid]' size='1'>
+ $cachetime_options
+ </select>
+ </td>
+ <td class='$class' align='right'>
+ <a href='admin.php?fct=blocksadmin&op=edit&bid=$bid'>"._EDIT."</a>{$delete_link}{$clone_link}
+ <input type='hidden' name='bid[$bid]' value='$bid' />
+ </td>
+ </tr>\n" ;
+
+ $class = ( $class == 'even' ) ? 'odd' : 'even' ;
+ }
+
+ echo "
+ <tr>
+ <td class='foot' align='center' colspan='6'>
+ <input type='hidden' name='query4redirect' value='$query4redirect' />
+ <input type='hidden' name='fct' value='blocksadmin' />
+ <input type='hidden' name='op' value='order' />
+ ".$xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'myblocksadmin' )."
+ <input type='submit' name='submit' value='"._SUBMIT."' />
+ </td>
+ </tr>
+ </table>
+ </form>\n" ;
+}
+
+
+function get_block_configs()
+{
+ $error_reporting_level = error_reporting( 0 ) ;
+ if( preg_match( '/^[.0-9a-zA-Z_-]+$/' , @$_GET['dirname'] ) ) {
+ include dirname(dirname(dirname(__FILE__))).'/'.$_GET['dirname'].'/xoops_version.php' ;
+ } else {
+ include '../xoops_version.php' ;
+ }
+ error_reporting( $error_reporting_level ) ;
+ if( empty( $modversion['blocks'] ) ) return array() ;
+ else return $modversion['blocks'] ;
+}
+
+
+function list_groups()
+{
+ global $target_mid , $target_mname , $block_arr ;
+
+ $item_list = array() ;
+ foreach( array_keys( $block_arr ) as $i ) {
+ $item_list[ $block_arr[$i]->getVar("bid") ] = $block_arr[$i]->getVar("title") ;
+ }
+
+ $form = new MyXoopsGroupPermForm( _MD_AM_ADGS , 1 , 'block_read' , '' ) ;
+ if( $target_mid > 1 ) {
+ $form->addAppendix( 'module_admin' , $target_mid , $target_mname . ' ' . _AM_ACTIVERIGHTS ) ;
+ $form->addAppendix( 'module_read' , $target_mid , $target_mname .' ' . _AM_ACCESSRIGHTS ) ;
+ }
+ foreach( $item_list as $item_id => $item_name) {
+ $form->addItem( $item_id , $item_name ) ;
+ }
+ echo $form->render() ;
+}
+
+
+
+if( ! empty( $_POST['submit'] ) ) {
+ if ( ! $xoopsGTicket->check( true , 'myblocksadmin' ) ) {
+ redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
+ }
+
+ include( "mygroupperm.php" ) ;
+ redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php$query4redirect" , 1 , _MD_AM_DBUPDATED );
+}
+
+xoops_cp_header() ;
+if( file_exists( './mymenu.php' ) ) include( './mymenu.php' ) ;
+
+echo "<h3>$target_mname</h3>\n" ;
+
+if( ! empty( $block_arr ) ) {
+ echo "<h4>"._AM_BADMIN."</h4>\n" ;
+ list_blocks() ;
+}
+list_groups() ;
+xoops_cp_footer() ;
+
+
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,347 @@
+<?php
+// ------------------------------------------------------------------------- //
+// myblocksadmin_for_2.2.php //
+// - XOOPS block admin for each modules - //
+// GIJOE <http://www.peak.ne.jp/> //
+// ------------------------------------------------------------------------- //
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+include_once( '../../../include/cp_header.php' ) ;
+
+include_once( 'mygrouppermform.php' ) ;
+include_once( XOOPS_ROOT_PATH.'/class/xoopsblock.php' ) ;
+include_once "../include/gtickets.php" ;
+
+$xoops_system_path = XOOPS_ROOT_PATH . '/modules/system' ;
+
+// language files
+$language = $xoopsConfig['language'] ;
+if( ! file_exists( "$xoops_system_path/language/$language/admin/blocksadmin.php") ) $language = 'english' ;
+
+// to prevent from notice that constants already defined
+$error_reporting_level = error_reporting( 0 ) ;
+include_once( "$xoops_system_path/constants.php" ) ;
+include_once( "$xoops_system_path/language/$language/admin.php" ) ;
+include_once( "$xoops_system_path/language/$language/admin/blocksadmin.php" ) ;
+error_reporting( $error_reporting_level ) ;
+
+$group_defs = file( "$xoops_system_path/language/$language/admin/groups.php" ) ;
+foreach( $group_defs as $def ) {
+ if( strstr( $def , '_AM_ACCESSRIGHTS' ) || strstr( $def , '_AM_ACTIVERIGHTS' ) ) eval( $def ) ;
+}
+
+
+// check $xoopsModule
+if( ! is_object( $xoopsModule ) ) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ;
+
+// set target_module if specified by $_GET['dirname']
+$module_handler =& xoops_gethandler('module');
+if( ! empty( $_GET['dirname'] ) ) {
+ $target_module =& $module_handler->getByDirname($_GET['dirname']);
+}/* else if( ! empty( $_GET['mid'] ) ) {
+ $target_module =& $module_handler->get( intval( $_GET['mid'] ) );
+}*/
+
+if( ! empty( $target_module ) && is_object( $target_module ) ) {
+ // specified by dirname
+ $target_mid = $target_module->getVar( 'mid' ) ;
+ $target_mname = $target_module->getVar( 'name' ) . " " . sprintf( "(%2.2f)" , $target_module->getVar('version') / 100.0 ) ;
+ $query4redirect = '?dirname='.urlencode(strip_tags($_GET['dirname'])) ;
+} else if( isset( $_GET['mid'] ) && $_GET['mid'] == 0 || $xoopsModule->getVar('dirname') == 'blocksadmin' ) {
+ $target_mid = 0 ;
+ $target_mname = '' ;
+ $query4redirect = '?mid=0' ;
+} else {
+ $target_mid = $xoopsModule->getVar( 'mid' ) ;
+ $target_mname = $xoopsModule->getVar( 'name' ) ;
+ $query4redirect = '' ;
+}
+
+// check access right (needs system_admin of BLOCK)
+$sysperm_handler =& xoops_gethandler('groupperm');
+if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_BLOCK, $xoopsUser->getGroups())) redirect_header( XOOPS_URL.'/user.php' , 1 , _NOPERM ) ;
+
+// get blocks owned by the module (Imported from xoopsblock.php then modified)
+$db =& Database::getInstance();
+$sql = "SELECT bid,name,show_func,func_file,template FROM ".$db->prefix("newblocks")." WHERE mid='$target_mid'";
+$result = $db->query($sql);
+$block_arr = array();
+while( list( $bid , $bname , $show_func , $func_file , $template ) = $db->fetchRow( $result ) ) {
+ $block_arr[$bid] = array(
+ 'name' => $bname ,
+ 'show_func' => $show_func ,
+ 'func_file' => $func_file ,
+ 'template' => $template
+ ) ;
+}
+
+
+// for 2.2
+function list_blockinstances()
+{
+ global $query4redirect , $block_arr , $xoopsGTicket ;
+
+ $myts =& MyTextSanitizer::getInstance() ;
+
+ // cachetime options
+ $cachetimes = array('0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH);
+
+ // displaying TH
+ echo "
+ <form action='admin.php' name='blockadmin' method='post'>
+ <table width='95%' class='outer' cellpadding='4' cellspacing='1'>
+ <tr valign='middle'>
+ <th>"._AM_TITLE."</th>
+ <th align='center' nowrap='nowrap'>"._AM_SIDE."</th>
+ <th align='center'>"._AM_WEIGHT."</th>
+ <th align='center'>"._AM_VISIBLEIN."</th>
+ <th align='center'>"._AM_BCACHETIME."</th>
+ <th align='right'>"._AM_ACTION."</th>
+ </tr>\n" ;
+
+ // get block instances
+ $crit = new Criteria("bid", "(".implode(",",array_keys($block_arr)).")", "IN");
+ $criteria = new CriteriaCompo($crit);
+ $criteria->setSort('visible DESC, side ASC, weight');
+ $instance_handler =& xoops_gethandler('blockinstance');
+ $instances =& $instance_handler->getObjects($criteria, true, true);
+
+ //Get modules and pages for visible in
+ $module_list[_AM_SYSTEMLEVEL]["0-2"] = _AM_ADMINBLOCK;
+ $module_list[_AM_SYSTEMLEVEL]["0-1"] = _AM_TOPPAGE;
+ $module_list[_AM_SYSTEMLEVEL]["0-0"] = _AM_ALLPAGES;
+ $criteria = new CriteriaCompo(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+ $module_handler =& xoops_gethandler('module');
+ $module_main =& $module_handler->getObjects($criteria, true, true);
+ if (count($module_main) > 0) {
+ foreach (array_keys($module_main) as $mid) {
+ $module_list[$module_main[$mid]->getVar('name')][$mid."-0"] = _AM_ALLMODULEPAGES;
+ $pages = $module_main[$mid]->getInfo("pages");
+ if ($pages == false) {
+ $pages = $module_main[$mid]->getInfo("sub");
+ }
+ if (is_array($pages) && $pages != array()) {
+ foreach ($pages as $id => $pageinfo) {
+ $module_list[$module_main[$mid]->getVar('name')][$mid."-".$id] = $pageinfo['name'];
+ }
+ }
+ }
+ }
+
+ // blocks displaying loop
+ $class = 'even' ;
+ $block_configs = get_block_configs() ;
+ foreach( array_keys( $instances ) as $i ) {
+ $sseln = $ssel0 = $ssel1 = $ssel2 = $ssel3 = $ssel4 = "";
+ $scoln = $scol0 = $scol1 = $scol2 = $scol3 = $scol4 = "#FFFFFF";
+
+ $weight = $instances[$i]->getVar("weight") ;
+ $title = $instances[$i]->getVar("title") ;
+ $bcachetime = $instances[$i]->getVar("bcachetime") ;
+ $bid = $instances[$i]->getVar("bid") ;
+ $name = $myts->makeTboxData4Edit( $block_arr[$bid]['name'] ) ;
+
+ $visiblein = $instances[$i]->getVisibleIn();
+
+ // visible and side
+ if ( $instances[$i]->getVar("visible") != 1 ) {
+ $sseln = " checked='checked'";
+ $scoln = "#FF0000";
+ } else switch( $instances[$i]->getVar("side") ) {
+ default :
+ case XOOPS_SIDEBLOCK_LEFT :
+ $ssel0 = " checked='checked'";
+ $scol0 = "#00FF00";
+ break ;
+ case XOOPS_SIDEBLOCK_RIGHT :
+ $ssel1 = " checked='checked'";
+ $scol1 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_LEFT :
+ $ssel2 = " checked='checked'";
+ $scol2 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_RIGHT :
+ $ssel4 = " checked='checked'";
+ $scol4 = "#00FF00";
+ break ;
+ case XOOPS_CENTERBLOCK_CENTER :
+ $ssel3 = " checked='checked'";
+ $scol3 = "#00FF00";
+ break ;
+ }
+
+ // bcachetime
+ $cachetime_options = '' ;
+ foreach( $cachetimes as $cachetime => $cachetime_name ) {
+ if( $bcachetime == $cachetime ) {
+ $cachetime_options .= "<option value='$cachetime' selected='selected'>$cachetime_name</option>\n" ;
+ } else {
+ $cachetime_options .= "<option value='$cachetime'>$cachetime_name</option>\n" ;
+ }
+ }
+
+ $module_options = '' ;
+ foreach( $module_list as $mname => $module ) {
+ $module_options .= "<optgroup label='$mname'>\n" ;
+ foreach( $module as $mkey => $mval ) {
+ if( in_array( $mkey , $visiblein ) ) {
+ $module_options .= "<option value='$mkey' selected='selected'>$mval</option>\n" ;
+ } else {
+ $module_options .= "<option label='$mval' value='$mkey'>$mval</option>\n" ;
+ }
+ }
+ $module_options .= "</optgroup>\n" ;
+ }
+
+ // delete link if it is cloned block
+ $delete_link = "<br /><a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=delete&id=$i&selmod=$mid'>"._DELETE."</a>" ;
+
+ // displaying part
+ echo "
+ <tr valign='middle'>
+ <td class='$class'>
+ $name
+ <br />
+ <input type='text' name='title[$i]' value='$title' size='20' />
+ </td>
+ <td class='$class' align='center' nowrap='nowrap' width='125px'>
+ <div style='float:left;background-color:$scol0;'>
+ <input type='radio' name='side[$i]' value='".XOOPS_SIDEBLOCK_LEFT."' style='background-color:$scol0;' $ssel0 />
+ </div>
+ <div style='float:left;'>-</div>
+ <div style='float:left;background-color:$scol2;'>
+ <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_LEFT."' style='background-color:$scol2;' $ssel2 />
+ </div>
+ <div style='float:left;background-color:$scol3;'>
+ <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_CENTER."' style='background-color:$scol3;' $ssel3 />
+ </div>
+ <div style='float:left;background-color:$scol4;'>
+ <input type='radio' name='side[$i]' value='".XOOPS_CENTERBLOCK_RIGHT."' style='background-color:$scol4;' $ssel4 />
+ </div>
+ <div style='float:left;'>-</div>
+ <div style='float:left;background-color:$scol1;'>
+ <input type='radio' name='side[$i]' value='".XOOPS_SIDEBLOCK_RIGHT."' style='background-color:$scol1;' $ssel1 />
+ </div>
+ <br />
+ <br />
+ <div style='float:left;width:40px;'> </div>
+ <div style='float:left;background-color:$scoln;'>
+ <input type='radio' name='side[$i]' value='-1' style='background-color:$scoln;' $sseln />
+ </div>
+ <div style='float:left;'>"._NONE."</div>
+ </td>
+ <td class='$class' align='center'>
+ <input type='text' name=weight[$i] value='$weight' size='3' maxlength='5' style='text-align:right;' />
+ </td>
+ <td class='$class' align='center'>
+ <select name='bmodule[$i][]' size='5' multiple='multiple'>
+ $module_options
+ </select>
+ </td>
+ <td class='$class' align='center'>
+ <select name='bcachetime[$i]' size='1'>
+ $cachetime_options
+ </select>
+ </td>
+ <td class='$class' align='right'>
+ <a href='".XOOPS_URL."/modules/system/admin.php?fct=blocksadmin&op=edit&id=$i'>"._EDIT."</a>{$delete_link}
+ <input type='hidden' name='id[$i]' value='$i' />
+ </td>
+ </tr>\n" ;
+
+ $class = ( $class == 'even' ) ? 'odd' : 'even' ;
+ }
+
+ // list block classes for add (not instances)
+ foreach( $block_arr as $bid => $block ) {
+
+ $description4show = '' ;
+ foreach( $block_configs as $bconf ) {
+ if( $block['show_func'] == $bconf['show_func'] && $block['func_file'] == $bconf['file'] && ( empty( $bconf['template'] ) || $block['template'] == $bconf['template'] ) ) {
+ if( ! empty( $bconf['description'] ) ) $description4show = $myts->makeTboxData4Show( $bconf['description'] ) ;
+ }
+ }
+
+ echo "
+ <tr>
+ <td class='$class' align='left'>
+ ".$myts->makeTboxData4Edit($block['name'])."
+ </td>
+ <td class='$class' align='left' colspan='4'>
+ $description4show
+ </td>
+ <td class='$class' align='center'>
+ <input type='submit' name='addblock[$bid]' value='"._ADD."' />
+ </td>
+ </tr>
+ \n" ;
+ $class = ( $class == 'even' ) ? 'odd' : 'even' ;
+ }
+
+ echo "
+ <tr>
+ <td class='foot' align='center' colspan='6'>
+ <input type='hidden' name='query4redirect' value='$query4redirect' />
+ <input type='hidden' name='fct' value='blocksadmin' />
+ <input type='hidden' name='op' value='order2' />
+ ".$xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'myblocksadmin' )."
+ <input type='submit' name='submit' value='"._SUBMIT."' />
+ </td>
+ </tr>
+ </table>
+ </form>\n" ;
+}
+
+
+// for 2.2
+function list_groups2()
+{
+ global $target_mid , $target_mname , $xoopsDB ;
+
+ $result = $xoopsDB->query( "SELECT i.instanceid,i.title FROM ".$xoopsDB->prefix("block_instance")." i LEFT JOIN ".$xoopsDB->prefix("newblocks")." b ON i.bid=b.bid WHERE b.mid='$target_mid'" ) ;
+
+ $item_list = array() ;
+ while( list( $iid , $title ) = $xoopsDB->fetchRow( $result ) ) {
+ $item_list[ $iid ] = $title ;
+ }
+
+ $form = new MyXoopsGroupPermForm( _MD_AM_ADGS , 1 , 'block_read' , '' ) ;
+ if( $target_mid > 1 ) {
+ $form->addAppendix( 'module_admin' , $target_mid , $target_mname . ' ' . _AM_ACTIVERIGHTS ) ;
+ $form->addAppendix( 'module_read' , $target_mid , $target_mname .' ' . _AM_ACCESSRIGHTS ) ;
+ }
+ foreach( $item_list as $item_id => $item_name) {
+ $form->addItem( $item_id , $item_name ) ;
+ }
+ echo $form->render() ;
+}
+
+
+
+if( ! empty( $_POST['submit'] ) ) {
+ if ( ! $xoopsGTicket->check( true , 'myblocksadmin' ) ) {
+ redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors());
+ }
+
+ include( "mygroupperm.php" ) ;
+ redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/myblocksadmin.php$query4redirect" , 1 , _MD_AM_DBUPDATED );
+}
+
+xoops_cp_header() ;
+if( file_exists( './mymenu.php' ) ) include( './mymenu.php' ) ;
+
+echo "<h3 style='text-align:left;'>$target_mname</h3>\n" ;
+
+if( ! empty( $block_arr ) ) {
+ echo "<h4 style='text-align:left;'>"._AM_BADMIN."</h4>\n" ;
+ list_blockinstances() ;
+}
+
+list_groups2() ;
+xoops_cp_footer() ;
+
+
+?>
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/myblocksadmin2.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,95 @@
+<?php
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+function myDeleteByModule($DB, $gperm_modid, $gperm_name = null, $gperm_itemid = null)
+{
+ $criteria = new CriteriaCompo(new Criteria('gperm_modid', intval($gperm_modid)));
+ if (isset($gperm_name)) {
+ $criteria->add(new Criteria('gperm_name', $gperm_name));
+ if (isset($gperm_itemid)) {
+ $criteria->add(new Criteria('gperm_itemid', intval($gperm_itemid)));
+ }
+ }
+ $sql = "DELETE FROM ".$DB->prefix('group_permission').' '.$criteria->renderWhere();
+ if (!$result = $DB->query($sql)) {
+ return false;
+ }
+ return true;
+}
+
+
+
+// include '../../../include/cp_header.php'; GIJ
+$modid = isset($_POST['modid']) ? intval($_POST['modid']) : 1;
+// we dont want system module permissions to be changed here ( 1 -> 0 GIJ)
+if ($modid <= 0 || !is_object($xoopsUser) || !$xoopsUser->isAdmin($modid)) {
+ redirect_header(XOOPS_URL.'/user.php', 1, _NOPERM);
+ exit();
+}
+$module_handler =& xoops_gethandler('module');
+$module =& $module_handler->get($modid);
+if (!is_object($module) || !$module->getVar('isactive')) {
+ redirect_header(XOOPS_URL.'/admin.php', 1, _MODULENOEXIST);
+ exit();
+}
+$member_handler =& xoops_gethandler('member');
+$group_list = $member_handler->getGroupList();
+if (is_array($_POST['perms']) && !empty($_POST['perms'])) {
+ $gperm_handler = xoops_gethandler('groupperm');
+ foreach ($_POST['perms'] as $perm_name => $perm_data) {
+ foreach( $perm_data['itemname' ] as $item_id => $item_name ) {
+ // checking code
+ // echo "<pre>" ;
+ // var_dump( $_POST['perms'] ) ;
+ // exit ;
+ if (false != myDeleteByModule($gperm_handler->db,$modid,$perm_name,$item_id)) {
+ if( empty( $perm_data['groups'] ) ) continue ;
+ foreach ($perm_data['groups'] as $group_id => $item_ids) {
+ // foreach ($item_ids as $item_id => $selected) {
+ $selected = isset( $item_ids[ $item_id ] ) ? $item_ids[ $item_id ] : 0 ;
+ if ($selected == 1) {
+ // make sure that all parent ids are selected as well
+ if ($perm_data['parents'][$item_id] != '') {
+ $parent_ids = explode(':', $perm_data['parents'][$item_id]);
+ foreach ($parent_ids as $pid) {
+ if ($pid != 0 && !in_array($pid, array_keys($item_ids))) {
+ // one of the parent items were not selected, so skip this item
+ $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>').' ('._MD_AM_PERMADDNGP.')';
+ continue 2;
+ }
+ }
+ }
+ $gperm =& $gperm_handler->create();
+ $gperm->setVar('gperm_groupid', $group_id);
+ $gperm->setVar('gperm_name', $perm_name);
+ $gperm->setVar('gperm_modid', $modid);
+ $gperm->setVar('gperm_itemid', $item_id);
+ if (!$gperm_handler->insert($gperm)) {
+ $msg[] = sprintf(_MD_AM_PERMADDNG, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+ } else {
+ $msg[] = sprintf(_MD_AM_PERMADDOK, '<b>'.$perm_name.'</b>', '<b>'.$perm_data['itemname'][$item_id].'</b>', '<b>'.$group_list[$group_id].'</b>');
+ }
+ unset($gperm);
+ }
+ }
+ } else {
+ $msg[] = sprintf(_MD_AM_PERMRESETNG, $module->getVar('name'));
+ }
+ }
+ }
+}
+/*
+$backlink = XOOPS_URL.'/admin.php';
+if ($module->getVar('hasadmin')) {
+ $adminindex = $module->getInfo('adminindex');
+ if ($adminindex) {
+ $backlink = XOOPS_URL.'/modules/'.$module->getVar('dirname').'/'.$adminindex;
+ }
+}
+
+$msg[] = '<br /><br /><a href="'.$backlink.'">'._BACK.'</a>';
+xoops_cp_header();
+xoops_result($msg);
+xoops_cp_footer(); GIJ */
+?>
\ No newline at end of file
Property changes on: XoopsModules/latestnews/trunk/latestnews/admin/mygroupperm.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: XoopsModules/latestnews/trunk/latestnews/admin/mygrouppermform.php
===================================================================
--- XoopsModules/latestnews/trunk/latestnews/admin/mygrouppermform.php (rev 0)
+++ XoopsModules/latestnews/trunk/latestnews/admin/mygrouppermform.php 2013-09-26 17:25:18 UTC (rev 12099)
@@ -0,0 +1,378 @@
+<?php
+// $Id$
+// ------------------------------------------------------------------------ //
+// XOOPS - PHP Content Management System //
+// Copyright (c) 2000-2003 XOOPS.org //
+// <http://www.xoops.org/> //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelement.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formhidden.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formbutton.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/formelementtray.php';
+require_once XOOPS_ROOT_PATH.'/class/xoopsform/form.php';
+
+/**
+ * Renders a form for setting module specific group permissions
+ *
+ * @author Kazumi Ono <on...@my...>
+ * @copyright copyright (c) 2000-2003 XOOPS.org
+ *
+ * @package kernel
+ * @subpackage form
+ */
+class MyXoopsGroupPermForm extends XoopsForm
+{
+
+ /**
+ * Module ID
+ * @var int
+ */
+ var $_modid;
+ /**
+ * Tree structure of items
+ * @var a...
[truncated message content] |
|
From: <be...@us...> - 2013-09-26 16:06:59
|
Revision: 12098
http://sourceforge.net/p/xoops/svn/12098
Author: beckmi
Date: 2013-09-26 16:06:55 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Changing version to Beta 1, as we'll merge some changes from Zyspec before the Final release
Modified Paths:
--------------
XoopsModules/news/trunk/news/docs/changelog.txt
XoopsModules/news/trunk/news/xoops_version.php
Modified: XoopsModules/news/trunk/news/docs/changelog.txt
===================================================================
--- XoopsModules/news/trunk/news/docs/changelog.txt 2013-09-26 15:56:34 UTC (rev 12097)
+++ XoopsModules/news/trunk/news/docs/changelog.txt 2013-09-26 16:06:55 UTC (rev 12098)
@@ -1,5 +1,5 @@
======================
-1.70 RC 2 2013-09-26
+1.70 Beta1 2 2013-09-26
======================
- changed version to 1.70 to avoid confusion with xNews 1.68 (mamba)
- removed languages other than English (cesag)
Modified: XoopsModules/news/trunk/news/xoops_version.php
===================================================================
--- XoopsModules/news/trunk/news/xoops_version.php 2013-09-26 15:56:34 UTC (rev 12097)
+++ XoopsModules/news/trunk/news/xoops_version.php 2013-09-26 16:06:55 UTC (rev 12098)
@@ -50,8 +50,8 @@
//about
$modversion["module_website_url"] = "www.xoops.org/";
$modversion["module_website_name"] = "XOOPS";
-$modversion["release_date"] = "2012/07/01";
-$modversion["module_status"] = "RC2";
+$modversion["release_date"] = "2012/09/26";
+$modversion["module_status"] = "Beta 1";
$modversion["author_website_url"] = "http://www.xoops.org/";
$modversion["author_website_name"] = "XOOPS";
$modversion['min_php']='5.2';
|
|
From: <be...@us...> - 2013-09-26 15:56:41
|
Revision: 12097
http://sourceforge.net/p/xoops/svn/12097
Author: beckmi
Date: 2013-09-26 15:56:34 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Updating to News 1.70 RC2
Modified Paths:
--------------
XoopsModules/news/trunk/news/admin/about.php
XoopsModules/news/trunk/news/admin/admin_footer.php
XoopsModules/news/trunk/news/admin/admin_header.php
XoopsModules/news/trunk/news/admin/amsimport.php
XoopsModules/news/trunk/news/admin/functions.php
XoopsModules/news/trunk/news/admin/groupperms.php
XoopsModules/news/trunk/news/admin/index.php
XoopsModules/news/trunk/news/admin/menu.php
XoopsModules/news/trunk/news/admin/upgrade.php
XoopsModules/news/trunk/news/archive.php
XoopsModules/news/trunk/news/article.php
XoopsModules/news/trunk/news/backendt.php
XoopsModules/news/trunk/news/blocks/news_archives.php
XoopsModules/news/trunk/news/blocks/news_bigstory.php
XoopsModules/news/trunk/news/blocks/news_block_tag.php
XoopsModules/news/trunk/news/blocks/news_moderate.php
XoopsModules/news/trunk/news/blocks/news_randomnews.php
XoopsModules/news/trunk/news/blocks/news_top.php
XoopsModules/news/trunk/news/blocks/news_topics.php
XoopsModules/news/trunk/news/blocks/news_topicsnav.php
XoopsModules/news/trunk/news/class/blacklist.php
XoopsModules/news/trunk/news/class/class.mimetype.php
XoopsModules/news/trunk/news/class/class.newsstory.php
XoopsModules/news/trunk/news/class/class.newstopic.php
XoopsModules/news/trunk/news/class/class.sfiles.php
XoopsModules/news/trunk/news/class/keyhighlighter.class.php
XoopsModules/news/trunk/news/class/news_stories.php
XoopsModules/news/trunk/news/class/news_topics.php
XoopsModules/news/trunk/news/class/registryfile.php
XoopsModules/news/trunk/news/class/tree.php
XoopsModules/news/trunk/news/class/wideimage/Canvas.class.php
XoopsModules/news/trunk/news/class/wideimage/Dimension.class.php
XoopsModules/news/trunk/news/class/wideimage/Exception.class.php
XoopsModules/news/trunk/news/class/wideimage/FileMapperFactory.class.php
XoopsModules/news/trunk/news/class/wideimage/Image.class.php
XoopsModules/news/trunk/news/class/wideimage/OpFactory.class.php
XoopsModules/news/trunk/news/class/wideimage/PaletteImage.class.php
XoopsModules/news/trunk/news/class/wideimage/TrueColorImage.class.php
XoopsModules/news/trunk/news/class/wideimage/WideImage.inc.php
XoopsModules/news/trunk/news/class/wideimage/fonts/Font_GDF.class.php
XoopsModules/news/trunk/news/class/wideimage/fonts/Font_TTF.class.php
XoopsModules/news/trunk/news/class/wideimage/mappers/ImageFileMapper_GD.class.php
XoopsModules/news/trunk/news/class/wideimage/mappers/ImageFileMapper_GD2.class.php
XoopsModules/news/trunk/news/class/wideimage/mappers/ImageFileMapper_GIF.class.php
XoopsModules/news/trunk/news/class/wideimage/mappers/ImageFileMapper_JPEG.class.php
XoopsModules/news/trunk/news/class/wideimage/mappers/ImageFileMapper_PNG.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/ApplyConvolution.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/ApplyFilter.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/ApplyMask.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/AsGrayscale.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/CopyChannelsPalette.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/CopyChannelsTrueColor.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/CorrectGamma.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Crop.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Flip.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/GetMask.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Merge.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Mirror.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Resize.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Rotate.class.php
XoopsModules/news/trunk/news/class/wideimage/operations/Unsharp.class.php
XoopsModules/news/trunk/news/class/xoopsstory.php
XoopsModules/news/trunk/news/class/xoopstopic.php
XoopsModules/news/trunk/news/class/xoopstree.php
XoopsModules/news/trunk/news/comment_delete.php
XoopsModules/news/trunk/news/comment_edit.php
XoopsModules/news/trunk/news/comment_new.php
XoopsModules/news/trunk/news/comment_post.php
XoopsModules/news/trunk/news/comment_reply.php
XoopsModules/news/trunk/news/config.php
XoopsModules/news/trunk/news/docs/changelog.txt
XoopsModules/news/trunk/news/header.php
XoopsModules/news/trunk/news/include/comment_functions.php
XoopsModules/news/trunk/news/include/functions.php
XoopsModules/news/trunk/news/include/install_function.php
XoopsModules/news/trunk/news/include/notification.inc.php
XoopsModules/news/trunk/news/include/pagenav.php
XoopsModules/news/trunk/news/include/search.inc.php
XoopsModules/news/trunk/news/include/storyform.inc.php
XoopsModules/news/trunk/news/include/storyform.original.php
XoopsModules/news/trunk/news/include/update_function.php
XoopsModules/news/trunk/news/index.php
XoopsModules/news/trunk/news/list.tag.php
XoopsModules/news/trunk/news/makepdf.php
XoopsModules/news/trunk/news/micro_summary.php
XoopsModules/news/trunk/news/newsbythisauthor.php
XoopsModules/news/trunk/news/notification_update.php
XoopsModules/news/trunk/news/print.php
XoopsModules/news/trunk/news/ratenews.php
XoopsModules/news/trunk/news/submit.php
XoopsModules/news/trunk/news/templates/blocks/news_block_randomnews.html
XoopsModules/news/trunk/news/templates/blocks/news_block_top.html
XoopsModules/news/trunk/news/topics_directory.php
XoopsModules/news/trunk/news/view.tag.php
XoopsModules/news/trunk/news/visit.php
XoopsModules/news/trunk/news/whoswho.php
XoopsModules/news/trunk/news/xoops_version.php
Added Paths:
-----------
XoopsModules/news/trunk/news/include/plugin.tag.php
Removed Paths:
-------------
XoopsModules/news/trunk/news/extra/modules/tag/plugin/news.php
Modified: XoopsModules/news/trunk/news/admin/about.php
===================================================================
--- XoopsModules/news/trunk/news/admin/about.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/about.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -19,10 +19,10 @@
include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
-
+
$aboutAdmin = new ModuleAdmin();
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/news/trunk/news/admin/admin_footer.php
===================================================================
--- XoopsModules/news/trunk/news/admin/admin_footer.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/admin_footer.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -1,24 +1,24 @@
-<?php
-/**
- * News module
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
- * @package News
- * @since 1.6.7
- * @author Mamba (www.xoops.org)
- * @version $Id $
-**/
-
-echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n"
- . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
- . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>";
-
-xoops_cp_footer();
\ No newline at end of file
+<?php
+/**
+ * News module
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
+ * @package News
+ * @since 1.6.7
+ * @author Mamba (www.xoops.org)
+ * @version $Id $
+**/
+
+echo"<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n"
+ . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ . " </div>\n" . " " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>";
+
+xoops_cp_footer();
Modified: XoopsModules/news/trunk/news/admin/admin_header.php
===================================================================
--- XoopsModules/news/trunk/news/admin/admin_header.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/admin_header.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -45,7 +45,6 @@
redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, FALSE);
}
-
$topicsHandler=& xoops_getModuleHandler('news_topics','news');
$storiesHandler=& xoops_getModuleHandler('news_stories','news');
@@ -63,8 +62,8 @@
}
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH."/class/template.php");
- $xoopsTpl = new XoopsTpl();
+ include_once(XOOPS_ROOT_PATH."/class/template.php");
+ $xoopsTpl = new XoopsTpl();
}
-$xoopsTpl->assign('pathIcon16', $pathIcon16);
\ No newline at end of file
+$xoopsTpl->assign('pathIcon16', $pathIcon16);
Modified: XoopsModules/news/trunk/news/admin/amsimport.php
===================================================================
--- XoopsModules/news/trunk/news/admin/amsimport.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/amsimport.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -44,210 +44,209 @@
include_once XOOPS_ROOT_PATH.'/class/xoopstree.php';
if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) {
- if(!isset($_POST['go']) ) {
- echo '<h1>Welcome to the AMS 2.41 import script</h1>';
- echo '<br /><br />Select the import options you wan to use :';
- echo "<form method='post' action='amsimport.php'>";
- echo "<br /><input type='checkbox' name='useforum' value='1' /> Import forums links inside news (at the bottom of the news)";
- echo "<br /><input type='checkbox' name='useextlinks' value='1' /> Import external links inside news (at the bottom of the news)";
- echo "<br /><br /><input type='submit' name='go' value='Import' />";
- echo '</form>';
- echo "<br /><br />If you check the two last options then the forum's link and all the external links will be added at the end of the body text.";
- } else {
- // Launch the import
- if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php')) {
- include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php';
- } else {
- include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/main.php';
- }
- if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php')) {
- include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php';
- } else {
- include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/admin.php';
- }
- $db =& XoopsDatabaseFactory::getDatabaseConnection();
- // User's choices
- $use_forum = (isset($_POST['useforum']) && $_POST['useforum']==1) ? 1 : 0;
- $use_extlinks = (isset($_POST['useextlinks']) && $_POST['useextlinks']==1) ? 1 : 0;
- // Retreive News module's ID
- $module_handler =& xoops_gethandler('module');
- $newsModule =& $module_handler->getByDirname('news');
- $news_mid = $newsModule->getVar('mid');
- // Retreive AMS module's ID
- $AmsModule =& $module_handler->getByDirname('AMS');
- $ams_mid = $AmsModule->getVar('mid');
+ if (!isset($_POST['go']) ) {
+ echo '<h1>Welcome to the AMS 2.41 import script</h1>';
+ echo '<br /><br />Select the import options you wan to use :';
+ echo "<form method='post' action='amsimport.php'>";
+ echo "<br /><input type='checkbox' name='useforum' value='1' /> Import forums links inside news (at the bottom of the news)";
+ echo "<br /><input type='checkbox' name='useextlinks' value='1' /> Import external links inside news (at the bottom of the news)";
+ echo "<br /><br /><input type='submit' name='go' value='Import' />";
+ echo '</form>';
+ echo "<br /><br />If you check the two last options then the forum's link and all the external links will be added at the end of the body text.";
+ } else {
+ // Launch the import
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/main.php';
+ } else {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/main.php';
+ }
+ if (file_exists(XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php')) {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/'.$xoopsConfig['language'].'/admin.php';
+ } else {
+ include_once XOOPS_ROOT_PATH.'/modules/AMS/language/english/admin.php';
+ }
+ $db =& XoopsDatabaseFactory::getDatabaseConnection();
+ // User's choices
+ $use_forum = (isset($_POST['useforum']) && $_POST['useforum']==1) ? 1 : 0;
+ $use_extlinks = (isset($_POST['useextlinks']) && $_POST['useextlinks']==1) ? 1 : 0;
+ // Retreive News module's ID
+ $module_handler =& xoops_gethandler('module');
+ $newsModule =& $module_handler->getByDirname('news');
+ $news_mid = $newsModule->getVar('mid');
+ // Retreive AMS module's ID
+ $AmsModule =& $module_handler->getByDirname('AMS');
+ $ams_mid = $AmsModule->getVar('mid');
- // Retreive AMS tables names
- $ams_topics = $xoopsDB->prefix('ams_topics');
- $ams_articles = $xoopsDB->prefix('ams_article');
- $ams_text = $xoopsDB->prefix('ams_text');
- $ams_files = $xoopsDB->prefix('ams_files');
- $ams_links = $xoopsDB->prefix('ams_link');
- $ams_rating = $xoopsDB->prefix('ams_rating');
- // Retreive News tables names
- $news_stories_votedata = $xoopsDB->prefix('mod_news_stories_votedata');
- // Misc
- $comment_handler =& xoops_gethandler('comment');
- $notification_handler =& xoops_gethandler('notification');
- $ams_news_topics=array(); // Key => AMS Id, Value => News ID
+ // Retreive AMS tables names
+ $ams_topics = $xoopsDB->prefix('ams_topics');
+ $ams_articles = $xoopsDB->prefix('ams_article');
+ $ams_text = $xoopsDB->prefix('ams_text');
+ $ams_files = $xoopsDB->prefix('ams_files');
+ $ams_links = $xoopsDB->prefix('ams_link');
+ $ams_rating = $xoopsDB->prefix('ams_rating');
+ // Retreive News tables names
+ $news_stories_votedata = $xoopsDB->prefix('mod_news_stories_votedata');
+ // Misc
+ $comment_handler =& xoops_gethandler('comment');
+ $notification_handler =& xoops_gethandler('notification');
+ $ams_news_topics=array(); // Key => AMS Id, Value => News ID
// The import by itself
// Read topics by their order
$mytree = new XoopsTree($ams_topics,'topic_id','topic_pid');
$ams_topics = $mytree->getChildTreeArray(0,'weight');
- foreach($ams_topics as $one_amstopic) {
- // First we create the topic
- $topicpid=0;
- if($one_amstopic['topic_pid']!=0) { // Search for its the parent
- if(array_key_exists($one_amstopic['topic_pid'],$ams_news_topics)) {
- $topicpid=$ams_news_topics[$one_amstopic['topic_pid']];
- }
- }
- $news_topic = new NewsTopic();
- $news_topic->setTopicPid($topicpid);
- $news_topic->setTopicTitle($one_amstopic['topic_title']);
- $news_topic->setTopicImgurl($one_amstopic['topic_imgurl']);
- $news_topic->setMenu(0);
- $news_topic->setTopicFrontpage(1);
- $news_topic->Settopic_rssurl('');
- $news_topic->setTopicDescription('');
- $news_topic->setTopic_color('000000');
- $news_topic->store();
- echo '<br>- The following topic was imported : '.$news_topic->topic_title();
- $ams_topicid = $one_amstopic['topic_id'];
- $news_topicid = $news_topic->topic_id();
- $ams_news_topics[$ams_topicid] = $news_topicid;
+ foreach ($ams_topics as $one_amstopic) {
+ // First we create the topic
+ $topicpid=0;
+ if ($one_amstopic['topic_pid']!=0) { // Search for its the parent
+ if (array_key_exists($one_amstopic['topic_pid'],$ams_news_topics)) {
+ $topicpid=$ams_news_topics[$one_amstopic['topic_pid']];
+ }
+ }
+ $news_topic = new NewsTopic();
+ $news_topic->setTopicPid($topicpid);
+ $news_topic->setTopicTitle($one_amstopic['topic_title']);
+ $news_topic->setTopicImgurl($one_amstopic['topic_imgurl']);
+ $news_topic->setMenu(0);
+ $news_topic->setTopicFrontpage(1);
+ $news_topic->Settopic_rssurl('');
+ $news_topic->setTopicDescription('');
+ $news_topic->setTopic_color('000000');
+ $news_topic->store();
+ echo '<br>- The following topic was imported : '.$news_topic->topic_title();
+ $ams_topicid = $one_amstopic['topic_id'];
+ $news_topicid = $news_topic->topic_id();
+ $ams_news_topics[$ams_topicid] = $news_topicid;
- // Then we insert all its articles
- $result = $db->query('SELECT * FROM '.$ams_articles.' WHERE topicid='.$ams_topicid.' ORDER BY created');
- while ( $article = $db->fetchArray($result) ) {
- $ams_newsid = $article['storyid'];
+ // Then we insert all its articles
+ $result = $db->query('SELECT * FROM '.$ams_articles.' WHERE topicid='.$ams_topicid.' ORDER BY created');
+ while ( $article = $db->fetchArray($result) ) {
+ $ams_newsid = $article['storyid'];
- // We search for the last version
- $result2 = $db->query('SELECT * FROM '.$ams_text.' WHERE storyid='.$ams_newsid.' AND current=1');
- $text_lastversion = $db->fetchArray($result2);
+ // We search for the last version
+ $result2 = $db->query('SELECT * FROM '.$ams_text.' WHERE storyid='.$ams_newsid.' AND current=1');
+ $text_lastversion = $db->fetchArray($result2);
- // We search for the number of votes
- $result3 = $db->query('SELECT count(*) as cpt FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
- $votes = $db->fetchArray($result3);
+ // We search for the number of votes
+ $result3 = $db->query('SELECT count(*) as cpt FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
+ $votes = $db->fetchArray($result3);
- // The links
- $links='';
- if($use_extlinks) {
- $result7 = $db->query('SELECT * FROM '.$ams_links.' WHERE storyid='.$ams_newsid.' ORDER BY linkid');
- while ( $link = $db->fetchArray($result7) ) {
- if(trim($links)=='') {
- $links="\n\n"._AMS_NW_RELATEDARTICLES."\n\n";
- }
- $links .= _AMS_NW_EXTERNALLINK.' [url='.$link['link_link'].']'.$link['link_title'].'[/url]'."\n";
- }
- }
+ // The links
+ $links='';
+ if ($use_extlinks) {
+ $result7 = $db->query('SELECT * FROM '.$ams_links.' WHERE storyid='.$ams_newsid.' ORDER BY linkid');
+ while ( $link = $db->fetchArray($result7) ) {
+ if (trim($links)=='') {
+ $links="\n\n"._AMS_NW_RELATEDARTICLES."\n\n";
+ }
+ $links .= _AMS_NW_EXTERNALLINK.' [url='.$link['link_link'].']'.$link['link_title'].'[/url]'."\n";
+ }
+ }
- // The forum
- $forum='';
- if($use_forum && $one_amstopic['forum_id']!=0) {
- $forum = "\n\n".'[url='.XOOPS_URL.'/modules/newbb/viewforum.php?forum='.$one_amstopic['forum_id'].']'._AMS_AM_LINKEDFORUM.'[/url]'."\n";
- }
+ // The forum
+ $forum='';
+ if ($use_forum && $one_amstopic['forum_id']!=0) {
+ $forum = "\n\n".'[url='.XOOPS_URL.'/modules/newbb/viewforum.php?forum='.$one_amstopic['forum_id'].']'._AMS_AM_LINKEDFORUM.'[/url]'."\n";
+ }
- // We create the story
- $news = new NewsStory();
- $news->setUid($text_lastversion['uid']);
- $news->setTitle($article['title']);
- $news->created=$article['created'];
- $news->setPublished($article['published']);
- $news->setExpired($article['expired']);
- $news->setHostname($article['hostname']);
- $news->setNohtml($article['nohtml']);
- $news->setNosmiley($article['nosmiley']);
- $news->setHometext($text_lastversion['hometext']);
- $news->setBodytext($text_lastversion['bodytext'].$links.$forum);
- $news->setKeywords('');
- $news->setDescription('');
- $news->counter=$article['counter'];
- $news->setTopicId($news_topicid);
- $news->setIhome($article['ihome']);
- $news->setNotifyPub($article['notifypub']);
- $news->story_type=$article['story_type'];
- $news->setTopicdisplay($article['topicdisplay']);
- $news->setTopicalign($article['topicalign']);
- $news->setComments($article['comments']);
- $news->rating=$article['rating'];
- $news->votes=$votes['cpt'];
- $approved = $article['published']>0 ? true : false;
- $news->approved=$approved;
- $news->store($approved);
- echo '<br> This story was imported : '.$news->title();
- $news_newsid=$news->storyid(); // ********************
+ // We create the story
+ $news = new NewsStory();
+ $news->setUid($text_lastversion['uid']);
+ $news->setTitle($article['title']);
+ $news->created=$article['created'];
+ $news->setPublished($article['published']);
+ $news->setExpired($article['expired']);
+ $news->setHostname($article['hostname']);
+ $news->setNohtml($article['nohtml']);
+ $news->setNosmiley($article['nosmiley']);
+ $news->setHometext($text_lastversion['hometext']);
+ $news->setBodytext($text_lastversion['bodytext'].$links.$forum);
+ $news->setKeywords('');
+ $news->setDescription('');
+ $news->counter=$article['counter'];
+ $news->setTopicId($news_topicid);
+ $news->setIhome($article['ihome']);
+ $news->setNotifyPub($article['notifypub']);
+ $news->story_type=$article['story_type'];
+ $news->setTopicdisplay($article['topicdisplay']);
+ $news->setTopicalign($article['topicalign']);
+ $news->setComments($article['comments']);
+ $news->rating=$article['rating'];
+ $news->votes=$votes['cpt'];
+ $approved = $article['published']>0 ? true : false;
+ $news->approved=$approved;
+ $news->store($approved);
+ echo '<br> This story was imported : '.$news->title();
+ $news_newsid=$news->storyid(); // ********************
- // The files
- $result4 = $db->query('SELECT * FROM '.$ams_files.' WHERE storyid='.$ams_newsid);
- while ( $file = $db->fetchArray($result4) ) {
- $sfile = new sFiles();
- $sfile->setFileRealName($file['filerealname']);
- $sfile->setStoryid($news_newsid);
- $sfile->date=$file['date'];
- $sfile->setMimetype($file['mimetype']);
- $sfile->setDownloadname($file['downloadname']);
- $sfile->counter=$file['counter'];
- $sfile->store();
- echo '<br> This file was imported : '.$sfile->getDownloadname();
- $news_fileid=$sfile->fileid;
- }
+ // The files
+ $result4 = $db->query('SELECT * FROM '.$ams_files.' WHERE storyid='.$ams_newsid);
+ while ( $file = $db->fetchArray($result4) ) {
+ $sfile = new sFiles();
+ $sfile->setFileRealName($file['filerealname']);
+ $sfile->setStoryid($news_newsid);
+ $sfile->date=$file['date'];
+ $sfile->setMimetype($file['mimetype']);
+ $sfile->setDownloadname($file['downloadname']);
+ $sfile->counter=$file['counter'];
+ $sfile->store();
+ echo '<br> This file was imported : '.$sfile->getDownloadname();
+ $news_fileid=$sfile->fileid;
+ }
- // The ratings
- $result5 = $db->query('SELECT * FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
- while ( $ratings = $db->fetchArray($result5) ) {
- $result6 = $db->queryF('INSERT INTO '.$news_stories_votedata." (storyid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (".$news_newsid.','.$ratings['ratinguser'].','.$ratings['rating'].','.$ratings['ratinghostname'].','.$ratings['ratingtimestamp'].')');
- }
+ // The ratings
+ $result5 = $db->query('SELECT * FROM '.$ams_rating.' WHERE storyid='.$ams_newsid);
+ while ( $ratings = $db->fetchArray($result5) ) {
+ $result6 = $db->queryF('INSERT INTO '.$news_stories_votedata." (storyid, ratinguser, rating, ratinghostname, ratingtimestamp) VALUES (".$news_newsid.','.$ratings['ratinguser'].','.$ratings['rating'].','.$ratings['ratinghostname'].','.$ratings['ratingtimestamp'].')');
+ }
- // The comments
- $comments =& $comment_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
- if(is_array($comments) && count($comments)>0) {
- foreach($comments as $onecomment) {
- $onecomment->setNew();
- $onecomment->setVar('com_modid',$news_mid);
- $onecomment->setVar('com_itemid',$news_newsid);
- $comment_handler->insert($onecomment);
- }
- }
- unset($comments);
+ // The comments
+ $comments =& $comment_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
+ if (is_array($comments) && count($comments)>0) {
+ foreach ($comments as $onecomment) {
+ $onecomment->setNew();
+ $onecomment->setVar('com_modid',$news_mid);
+ $onecomment->setVar('com_itemid',$news_newsid);
+ $comment_handler->insert($onecomment);
+ }
+ }
+ unset($comments);
- // The notifications of this news
- //$notifications =& $notification_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
- $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
- $criteria->add(new Criteria('not_itemid', $ams_newsid));
- $criteria->setOrder('ASC');
- $notifications = $notification_handler->getObjects($criteria);
- if(is_array($notifications) && count($notifications)>0) {
- foreach($notifications as $onenotification) {
- $onenotification->setNew();
- $onenotification->setVar('not_modid',$news_mid);
- $onenotification->setVar('not_itemid',$news_newsid);
- $notification_handler->insert($onenotification);
- }
- }
- unset($notifications);
- }
- }
- // Finally, import all the globals notifications
- $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
- $criteria->add(new Criteria('not_category', 'global'));
- $criteria->setOrder('ASC');
- $notifications = $notification_handler->getObjects($criteria);
- if(is_array($notifications) && count($notifications)>0) {
- foreach($notifications as $onenotification) {
- $onenotification->setNew();
- $onenotification->setVar('not_modid',$news_mid);
- $onenotification->setVar('not_itemid',$news_newsid);
- $notification_handler->insert($onenotification);
- }
- }
- unset($notifications);
- echo "<p><a href='".XOOPS_URL."/modules/news/admin/groupperms.php'>The import is finished, don't forget to verify and set the topics permissions !</a></p>";
- }
+ // The notifications of this news
+ //$notifications =& $notification_handler->getByItemId($ams_mid, $ams_newsid, 'ASC');
+ $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
+ $criteria->add(new Criteria('not_itemid', $ams_newsid));
+ $criteria->setOrder('ASC');
+ $notifications = $notification_handler->getObjects($criteria);
+ if (is_array($notifications) && count($notifications)>0) {
+ foreach ($notifications as $onenotification) {
+ $onenotification->setNew();
+ $onenotification->setVar('not_modid',$news_mid);
+ $onenotification->setVar('not_itemid',$news_newsid);
+ $notification_handler->insert($onenotification);
+ }
+ }
+ unset($notifications);
+ }
+ }
+ // Finally, import all the globals notifications
+ $criteria = new CriteriaCompo(new Criteria('not_modid', $ams_mid));
+ $criteria->add(new Criteria('not_category', 'global'));
+ $criteria->setOrder('ASC');
+ $notifications = $notification_handler->getObjects($criteria);
+ if (is_array($notifications) && count($notifications)>0) {
+ foreach ($notifications as $onenotification) {
+ $onenotification->setNew();
+ $onenotification->setVar('not_modid',$news_mid);
+ $onenotification->setVar('not_itemid',$news_newsid);
+ $notification_handler->insert($onenotification);
+ }
+ }
+ unset($notifications);
+ echo "<p><a href='".XOOPS_URL."/modules/news/admin/groupperms.php'>The import is finished, don't forget to verify and set the topics permissions !</a></p>";
+ }
} else {
redirect_header(XOOPS_URL.'/modules/news/index.php', 3, _NOPERM);
exit();
}
xoops_cp_footer();
-?>
Modified: XoopsModules/news/trunk/news/admin/functions.php
===================================================================
--- XoopsModules/news/trunk/news/admin/functions.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/functions.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -36,51 +36,51 @@
* @author Herv\xE9 Thouzard (http://www.herve-thouzard.com) & Dojo Javscript Toolkit
* @copyright (c) Herv\xE9 Thouzard (http://www.herve-thouzard.com)
*/
-
+
function news_collapsableBar($tablename = '', $iconname = '')
{
?>
- <script type="text/javascript"><!--
- function goto_URL(object)
- {
- window.location.href = object.options[object.selectedIndex].value;
- }
+ <script type="text/javascript"><!--
+ function goto_URL(object)
+ {
+ window.location.href = object.options[object.selectedIndex].value;
+ }
- function toggle(id)
- {
- if (document.getElementById) { obj = document.getElementById(id); }
- if (document.all) { obj = document.all[id]; }
- if (document.layers) { obj = document.layers[id]; }
- if (obj) {
- if (obj.style.display == "none") {
- obj.style.display = "";
- } else {
- obj.style.display = "none";
- }
- }
- return false;
- }
+ function toggle(id)
+ {
+ if (document.getElementById) { obj = document.getElementById(id); }
+ if (document.all) { obj = document.all[id]; }
+ if (document.layers) { obj = document.layers[id]; }
+ if (obj) {
+ if (obj.style.display == "none") {
+ obj.style.display = "";
+ } else {
+ obj.style.display = "none";
+ }
+ }
- var iconClose = new Image();
- iconClose.src = '../images/icons/close12.gif';
- var iconOpen = new Image();
- iconOpen.src = '../images/icons/open12.gif';
+ return false;
+ }
- function toggleIcon ( iconName )
- {
- if ( document.images[iconName].src == window.iconOpen.src ) {
- document.images[iconName].src = window.iconClose.src;
- } else if ( document.images[iconName].src == window.iconClose.src ) {
- document.images[iconName].src = window.iconOpen.src;
- }
- return;
- }
+ var iconClose = new Image();
+ iconClose.src = '../images/icons/close12.gif';
+ var iconOpen = new Image();
+ iconOpen.src = '../images/icons/open12.gif';
- //-->
- </script>
- <?php
+ function toggleIcon ( iconName )
+ {
+ if (document.images[iconName].src == window.iconOpen.src) {
+ document.images[iconName].src = window.iconClose.src;
+ } elseif (document.images[iconName].src == window.iconClose.src) {
+ document.images[iconName].src = window.iconOpen.src;
+ }
+
+ return;
+ }
+
+ //-->
+ </script>
+ <?php
echo "<h4 style=\"color: #2F5376; margin: 6px 0 0 0; \"><a href='#' onClick=\"toggle('" . $tablename . "'); toggleIcon('" . $iconname . "');\">";
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/news/trunk/news/admin/groupperms.php
===================================================================
--- XoopsModules/news/trunk/news/admin/groupperms.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/groupperms.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -41,8 +41,7 @@
echo "<form method='post' name='fselperm' action='groupperms.php'><select name='permtoset' onChange='javascript: document.fselperm.submit()'><option value='1'".$selected[0].">"._AM_APPROVEFORM."</option><option value='2'".$selected[1].">"._AM_SUBMITFORM."</option><option value='3'".$selected[2].">"._AM_VIEWFORM."</option></select> <input type='submit' name='go'></form>";
$module_id = $xoopsModule->getVar('mid');
-switch($permtoset)
-{
+switch ($permtoset) {
case 1:
$title_of_form = _AM_APPROVEFORM;
$perm_name = 'news_approve';
@@ -64,8 +63,6 @@
$xt = new MyXoopsTopic($xoopsDB -> prefix('mod_news_topics'));
$alltopics =& $xt->getTopicsList();
-
-
if ($alltopics) {
foreach ($alltopics as $topic_id => $topic) {
$permform->addItem($topic_id, $topic['title'], $topic['pid']);
@@ -78,8 +75,4 @@
redirect_header("index.php?op=topicsmanager", 5,_NW_NEWS_NO_TOPICS, false);
}
-
-
-
-
-include 'admin_footer.php';
\ No newline at end of file
+include 'admin_footer.php';
Modified: XoopsModules/news/trunk/news/admin/index.php
===================================================================
--- XoopsModules/news/trunk/news/admin/index.php 2013-09-26 12:53:19 UTC (rev 12096)
+++ XoopsModules/news/trunk/news/admin/index.php 2013-09-26 15:56:34 UTC (rev 12097)
@@ -1,1637 +1,1632 @@
-<?php
-// $Id$
-// ------------------------------------------------------------------------ //
-// XOOPS - PHP Content Management System //
-// Copyright (c) 2000 XOOPS.org //
-// <http://www.xoops.org/> //
-// ------------------------------------------------------------------------ //
-// This program is free software; you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation; either version 2 of the License, or //
-// (at your option) any later version. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
-include_once '../../../include/cp_header.php';
-include_once 'admin_header.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/xoopstopic.php';
-include_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/config.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/class.sfiles.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/blacklist.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/registryfile.php';
-include_once XOOPS_ROOT_PATH.'/class/uploader.php';
-include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/admin/functions.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';
-include_once XOOPS_ROOT_PATH.'/modules/news/class/tree.php';
-$dateformat=news_getmoduleoption('dateformat');
-$myts =& MyTextSanitizer::getInstance();
-$topicscount=0;
-
-$storiesTableName = $xoopsDB->prefix('mod_news_stories');
-if(!news_FieldExists('picture', $storiesTableName)) {
- news_AddField('`picture` VARCHAR( 50 ) NOT NULL', $storiesTableName);
-}
-
-/**
- * Show new submissions
- *
- * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
- * Submissions are news that was submit by users but who are not approved, so you need to edit
- * them to approve them.
- * Actually you can see the the story's title, the topic, the posted date, the author and a
- * link to delete the story. If you click on the story's title, you will be able to edit the news.
- * The table contains the last x new submissions.
- * The system's block called "Waiting Contents" is listing the number of those news.
- */
-function newSubmissions()
-{
- global $dateformat, $pathIcon16;
- $start = isset($_GET['startnew']) ? intval($_GET['startnew']) : 0;
- $newsubcount = NewsStory :: getAllStoriesCount(3,false);
- $storyarray = NewsStory :: getAllSubmitted(news_getmoduleoption('storycountadmin'),true,news_getmoduleoption('restrictindex'),$start);
- if ( count($storyarray)> 0) {
- $pagenav = new XoopsPageNav( $newsubcount, news_getmoduleoption('storycountadmin'), $start, 'startnew', 'op=newarticle');
- news_collapsableBar('newsub', 'topnewsubicon');
- echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='topnewsubicon' name='topnewsubicon' src='" . $pathIcon16."/close12.gif' alt='' /></a> "._AM_NEWSUB."</h4>";
- echo "<div id='newsub'>";
- echo '<br />';
- echo "<div style='text-align: center;'><table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTED . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center'>" . _AM_ACTION . "</th></tr>\n";
- $class='';
- foreach( $storyarray as $newstory ) {
- $class = ($class == 'even') ? 'odd' : 'even';
- echo "<tr class='".$class."'><td align='left'>\n";
- $title = $newstory->title();
- if (!isset($title) || ($title == '' )) {
- echo "<a href='".XOOPS_URL."/modules/news/admin/index.php?op=edit&returnside=1&storyid=" . $newstory -> storyid() . "'>" . _AD_NOSUBJECT . "</a>\n";
- } else {
- echo " <a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $newstory -> storyid() . "'>" . $title . "</a>\n";
- }
- echo "</td><td>" . $newstory->topic_title() . "</td><td align='center' class='nw'>" . formatTimestamp($newstory->created(),$dateformat) . "</td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $newstory->uid() . "'>" . $newstory->uname() . "</a></td><td align='center'><a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $newstory->storyid() . "'><img src='" . $pathIcon16."/edit.png' title='"._AM_EDIT."'></a><a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $newstory->storyid() . "'><img src='" . $pathIcon16."/delete.png' title='"._AM_DELETE."'></a></td></tr>\n";
- }
-
- echo '</table></div>';
- echo "<div align='right'>".$pagenav->renderNav().'</div><br />';
- echo '<br /></div><br />';
- }
-}
-
-/**
- * Shows all automated stories
- *
- * Automated stories are stories that have a publication's date greater than "now"
- * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
- * Actually you can see the story's ID, its title, the topic, the author, the
- * programmed date and time, the expiration's date and two links. The first link is
- * used to edit the story while the second is used to remove the story.
- * The list only contains the last (x) automated news
- */
-function autoStories()
-{
- global $dateformat, $pathIcon16;
-
- $start = isset($_GET['startauto']) ? intval($_GET['startauto']) : 0;
- $storiescount = NewsStory :: getAllStoriesCount(2,false);
- $storyarray = NewsStory :: getAllAutoStory(news_getmoduleoption('storycountadmin'),true,$start);
- $class='';
- if(count($storyarray) > 0) {
- $pagenav = new XoopsPageNav($storiescount, news_getmoduleoption('storycountadmin'), $start, 'startauto', 'op=newarticle');
- news_collapsableBar('autostories', 'topautostories');
- echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='topautostories' name='topautostories' src='" . $pathIcon16."/close12.gif' alt='' /></a> "._AM_AUTOARTICLES."</h4>";
- echo "<div id='autostories'>";
- echo '<br />';
- echo "<div style='text-align: center;'>\n";
- echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_STORYID . "</th><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center' class='nw'>" . _AM_PROGRAMMED . "</th><th align='center' class='nw'>" . _AM_EXPIRED . "</th><th align='center'>" . _AM_ACTION . "</th></tr>";
- foreach($storyarray as $autostory) {
- $topic = $autostory -> topic();
- $expire = ( $autostory->expired() > 0 ) ? formatTimestamp($autostory->expired(),$dateformat) : '';
- $class = ($class == 'even') ? 'odd' : 'even';
- echo "<tr class='".$class."'>";
- echo "<td align='center'><b>" . $autostory -> storyid() . "</b>
- </td><td align='left'><a href='" . XOOPS_URL . "/modules/news/article.php?storyid=" . $autostory->storyid() . "'>" . $autostory->title() . "</a>
- </td><td align='center'>" . $topic->topic_title() . "
- </td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $autostory->uid() . "'>" . $autostory->uname() . "</a></td><td align='center' class='nw'>" . formatTimestamp($autostory->published(),$dateformat) . "</td><td align='center'>" . $expire . "</td><td align='center'><a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/edit.png' title="._AM_EDIT."> </a> <a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $autostory->storyid() . "'><img src='" . $pathIcon16."/delete.png' title='"._AM_DELETE."'></a>";
-
- echo "</td></tr>\n";
- }
- echo '</table></div>';
- echo "<div align='right'>".$pagenav->renderNav().'</div><br />';
- echo '</div><br />';
- }
-}
-
-/**
- * Shows last x published stories
- *
- * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
- * Actually you can see the the story's ID, its title, the topic, the author, the number of hits
- * and two links. The first link is used to edit the story while the second is used to remove the story.
- * The table only contains the last X published stories.
- * You can modify the number of visible stories with the module's option named
- * "Number of new articles to display in admin area".
- * As the number of displayed stories is limited, below this list you can find a text box
- * that you can use to enter a story's Id, then with the scrolling list you can select
- * if you want to edit or delete the story.
- */
-function lastStories()
-{
- global $dateformat, $pathIcon16;
- news_collapsableBar('laststories', 'toplaststories');
- echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='toplaststories' name='toplaststories' src='" . $pathIcon16."/close12.gif' alt='' /></a> ".sprintf(_AM_LAST10ARTS,news_getmoduleoption('storycountadmin'))."</h4>";
- echo "<div id='laststories'>";
- echo '<br />';
- echo "<div style='text-align: center;'>";
- $start = isset($_GET['start']) ? intval($_GET['start']) : 0;
- $storyarray = NewsStory :: getAllPublished(news_getmoduleoption('storycountadmin'), $start, false, 0, 1 );
- $storiescount = NewsStory :: getAllStoriesCount(4,false);
- $pagenav = new XoopsPageNav( $storiescount, news_getmoduleoption('storycountadmin'), $start, 'start', 'op=newarticle');
- $class='';
- echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_STORYID . "</th><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center' class='nw'>" . _AM_PUBLISHED . "</th><th align='center' class='nw'>" . _AM_HITS . "</th><th align='center'>" . _AM_ACTION . "</th></tr>";
- foreach( $storyarray as $eachstory ) {
- $published = formatTimestamp($eachstory->published(),$dateformat );
- // $expired = ( $eachstory -> expired() > 0 ) ? formatTimestamp($eachstory->expired(),$dateformat) : '---';
- $topic = $eachstory -> topic();
- $class = ($class == 'even') ? 'odd' : 'even';
- echo "<tr class='".$class."'>";
- echo "<td align='center'><b>" . $eachstory -> storyid() . "</b>
- </td><td align='left'><a href='" . XOOPS_URL . "/modules/news/article.php?storyid=" . $eachstory -> storyid() . "'>" . $eachstory -> title() . "</a>
- </td><td align='center'>" . $topic -> topic_title() . "
- </td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $eachstory -> uid() . "'>" . $eachstory -> uname() . "</a></td><td align='center' class='nw'>" . $published . "</td><td align='center'>" . $eachstory -> counter() . "</td><td align='center'>
- <a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $eachstory -> storyid() . "'> <img src='" . $pathIcon16."/edit.png' title="._AM_EDIT."> </a>
- <a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $eachstory -> storyid() . "'><img src='" . $pathIcon16."/delete.png' title='"._AM_DELETE."'></a>";
-
- echo "</td></tr>\n";
- }
- echo '</table><br />';
- echo "<div align='right'>".$pagenav->renderNav().'</div><br />';
-
- echo "<form action='index.php' method='get'>" . _AM_STORYID . " <input type='text' name='storyid' size='10' />
- <select name='op'>
- <option value='edit' selected='selected'>" . _AM_EDIT . "</option>
- <option value='delete'>" . _AM_DELETE . "</option>
- </select>
- <input type='hidden' name='returnside' value='1'>
- <input type='submit' value='" . _AM_GO . "' />
- </form>
- </div>";
- echo '</div><br />';
-}
-
-
-/**
- * Display a list of the expired stories
- *
- * This list can be view in the module's admin when you click on the tab named "Post/Edit News"
- * Actually you can see the story's ID, the title, the topic, the author,
- * the creation and expiration's date and you have two links, one to delete
- * the story and the other to edit the story.
- * The table only contains the last X expired stories.
- * You can modify the number of visible stories with the module's option named
- * "Number of new articles to display in admin area".
- * As the number of displayed stories is limited, below this list you can find a text box
- * that you can use to enter a story's Id, then with the scrolling list you can select
- * if you want to edit or delete the story.
- */
-function expStories()
-{
- global $dateformat, $pathIcon16;
- $start = isset($_GET['startexp']) ? intval($_GET['startexp']) : 0;
- $expiredcount = NewsStory :: getAllStoriesCount(1,false);
- $storyarray = NewsStory :: getAllExpired(news_getmoduleoption('storycountadmin'), $start, 0, 1 );
- $pagenav = new XoopsPageNav( $expiredcount, news_getmoduleoption('storycountadmin'), $start, 'startexp', 'op=newarticle');
-
- if(count($storyarray) > 0) {
- $class='';
- news_collapsableBar('expstories', 'topexpstories');
- echo "<img onclick=\"toggle('toptable'); toggleIcon('toptableicon');\" id='topexpstories' name='topexpstories' src='" . $pathIcon16."/close12.gif' alt='' /></a> "._AM_EXPARTS."</h4>";
- echo "<div id='expstories'>";
- echo '<br />';
- echo "<div style='text-align: center;'>";
- echo "<table width='100%' cellspacing='1' cellpadding='3' border='0' class='outer'><tr class='bg3'><th align='center'>" . _AM_STORYID . "</th><th align='center'>" . _AM_TITLE . "</th><th align='center'>" . _AM_TOPIC . "</th><th align='center'>" . _AM_POSTER . "</th><th align='center' class='nw'>" . _AM_CREATED . "</th><th align='center' class='nw'>" . _AM_EXPIRED . "</th><th align='center'>" . _AM_ACTION . "</th></tr>";
- foreach( $storyarray as $eachstory ) {
- $created = formatTimestamp($eachstory->created(),$dateformat);
- $expired = formatTimestamp($eachstory->expired(),$dateformat);
- $topic = $eachstory -> topic();
- // added exired value field to table
- $class = ($class == 'even') ? 'odd' : 'even';
- echo "<tr class='".$class."'>";
- echo "<td align='center'><b>" . $eachstory -> storyid() . "</b>
- </td><td align='left'><a href='" . XOOPS_URL . "/modules/news/article.php?returnside=1&storyid=" . $eachstory -> storyid() . "'>" . $eachstory -> title() . "</a>
- </td><td align='center'>" . $topic -> topic_title() . "
- </td><td align='center'><a href='" . XOOPS_URL . "/userinfo.php?uid=" . $eachstory -> uid() . "'>" . $eachstory -> uname() . "</a></td><td align='center' class='nw'>" . $created . "</td><td align='center' class='nw'>" . $expired . "</td><td align='center'>
- <a href='".XOOPS_URL."/modules/news/submit.php?returnside=1&op=edit&storyid=" . $eachstory -> storyid() . "'> <img src='" . $pathIcon16."/edit.png' title="._AM_EDIT."></a>
- <a href='".XOOPS_URL."/modules/news/admin/index.php?op=delete&storyid=" . $eachstory -> storyid() . "'><img src='" . $pathIcon16."/delete.png' title='"._AM_DELETE."'></a>";
-
-
-
- echo "</td></tr>\n";
- }
- echo '</table><br />';
- echo "<div align='right'>".$pagenav->renderNav().'</div><br />';
- echo "<form action='index.php' method='get'>
- " . _AM_STORYID . " <input type='text' name='storyid' size='10' />
- <select name='op'>
- <option value='edit' selected='selected'>" . _AM_EDIT . "</option>
- <option value='delete'>" . _AM_DELETE . "</option>
- </select>
- <input type='hidden' name='returnside' value='1'>
- <input type='submit' value='" . _AM_GO . "' />
- </form>
- </div>";
- echo '</div><br />';
- }
-}
-
-/**
- * Delete (purge/prune) old stories
- *
- * You can use this function in the module's admin when you click on the tab named "Prune News"
- * It's useful to remove old stories. It is, of course, recommended
- * to backup (or export) your news before to purge news.
- * You must first specify a date. This date will be used as a reference, everything
- * that was published before this date will be deleted.
- * The option "Only remove stories who have expired" will enable you to only remove
- * expired stories published before the given date.
- * Finally, you can select the topics inside wich you will remove news.
- * Once you have set all the parameters, the script will first show you a confirmation's
- * message with the number of news that will be removed.
- * Note, the topics are not deleted (even if there are no more news inside them).
- */
-function PruneManager()
-{
- include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
- xoops_cp_header();
- $pruneAdmin = new ModuleAdmin();
- echo $pruneAdmin->addNavigation('index.php?op=prune');
- echo '<br /><br /><br />';
- $sform = new XoopsThemeForm(_AM_NEWS_PRUNENEWS, 'pruneform', XOOPS_URL.'/modules/news/admin/index.php', 'post');
- $sform->addElement(new XoopsFormTextDateSelect(_AM_NEWS_PRUNE_BEFORE, 'prune_date',15,time()), true);
- $onlyexpired=new xoopsFormCheckBox('', 'onlyexpired');
- $onlyexpired->addOption(1, _AM_NEWS_PRUNE_EXPIREDONLY);
- $sform->addElement($onlyexpired, false);
- $sform->addElement(new XoopsFormHidden('op', 'confirmbeforetoprune'), false);
- $topiclist=new XoopsFormSelect(_AM_NEWS_PRUNE_TOPICS, 'pruned_topics','',5,true);
- $topics_arr=array();
- $xt = new NewsTopic();
- $allTopics = $xt->getAllTopics(false); // The webmaster can see everything
- $topic_tree = new MyXoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
- $topics_arr = $topic_tree->getAllChild(0);
- if(count($topics_arr)) {
- foreach ($topics_arr as $onetopic) {
- $topiclist->addOption($onetopic->topic_id(),$onetopic->topic_title());
- }
- }
- $topiclist->setDescription(_AM_NEWS_EXPORT_PRUNE_DSC);
- $sform->addElement($topiclist,false);
- $button_tray = new XoopsFormElementTray('' ,'');
- $submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');
- $button_tray->addElement($submit_btn);
- $sform->addElement($button_tray);
- $sform->display();
-}
-
-// A confirmation is asked before to prune stories
-function ConfirmBeforeToPrune()
-{
- global $dateformat;
- $story = new NewsStory();
- xoops_cp_header();
- $topiclist='';
- if(isset($_POST['pruned_topics'])) {
- $topiclist=implode(',',$_POST['pruned_topics']);
- }
- echo '<h4>' . _AM_NEWS_PRUNENEWS . '</h4>';
- $expired=0;
- if(isset($_POST['onlyexpired'])) {
- $expired = intval($_POST['onlyexpired']);
- }
- $date=$_POST['prune_date'];
- $timestamp=mktime(0,0,0,intval(substr($date,5,2)), intval(substr($date,8,2)), intval(substr($date,0,4)));
- $count=$story->GetCountStoriesPublishedBefore($timestamp, $expired, $topiclist);
- if($count) {
- $displaydate=formatTimestamp($timestamp,$dateformat);
- $msg=sprintf(_AM_NEWS_PRUNE_CONFIRM,$displaydate, $count);
- xoops_confirm(array( 'op' => 'prunenews', 'expired' => $expired, 'pruned_topics' => $topiclist, 'prune_date' => $timestamp, 'ok' => 1), 'index.php', $msg);
- } else {
- printf(_AM_NEWS_NOTHING_PRUNE);
- }
- unset($story);
-}
-
-// Effectively delete stories (published before a date), no more confirmation
-function PruneNews()
-{
- $story = new NewsStory();
- $timestamp=intval($_POST['prune_date']);
- $expired= intval($_POST['expired']);
- $topiclist='';
- if(isset($_POST['pruned_topics'])) {
- $topiclist=$_POST['pruned_topics'];
- }
-
- if(intval($_POST['ok'])==1) {
- $story = new NewsStory();
- xoops_cp_header();
- $count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist);
- $msg=sprintf(_AM_NEWS_PRUNE_DELETED,$count);
- $story->DeleteBeforeDate($timestamp,$expired,$topiclist);
- unset($story);
- news_updateCache();
- redirect_header( 'index.php', 3, $msg);
- }
-}
-
-/**
-* Newsletter's configuration
-*
-* You can create a newsletter's content from the admin part of the News module when you click on the tab named "Newsletter"
-* First, let be clear, this module'functionality will not send the newsletter but it will prepare its content for you.
-* To send the newsletter, you can use many specialized modules like evennews.
-* You first select a range of dates and if you want, a selection of topics to use for the search.
-* Once it's done, the script will use the file named /xoops/modules/language/yourlanguage/newsletter.php to create
-* the newsletter's content. When it's finished, the script generates a file in the upload folder.
-*/
-function Newsletter()
-{
- include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
- xoops_cp_header();
- $newsletterAdmin = new ModuleAdmin();
- echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter');
- echo '<br /><br /><br />';
- $sform = new XoopsThemeForm(_AM_NEWS_NEWSLETTER, 'newsletterform', XOOPS_URL.'/modules/news/admin/index.php', 'post');
- $dates_tray = new XoopsFormElementTray(_AM_NEWS_NEWSLETTER_BETWEEN);
- $date1 = new XoopsFormTextDateSelect('', 'date1',15,time());
- $date2 = new XoopsFormTextDateSelect(_AM_NEWS_EXPORT_AND, 'date2',15,time());
- $dates_tray->addElement($date1);
- $dates_tray->addElement($date2);
- $sform->addElement($dates_tray);
-
- $topiclist=new XoopsFormSelect(_AM_NEWS_PRUNE_TOPICS, 'export_topics','',5,true);
- $topics_arr=array();
- $xt = new NewsTopic();
- $allTopics = $xt->getAllTopics(false); // The webmaster can see everything
- $topic_tree = new MyXoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
- $topics_arr = $topic_tree->getAllChild(0);
- if(count($topics_arr)) {
- foreach ($topics_arr as $onetopic) {
- $topiclist->addOption($onetopic->topic_id(),$onetopic->topic_title());
- }
- }
- $topiclist->setDescription(_AM_NEWS_EXPORT_PRUNE_DSC);
- $sform->addElement($topiclist,false);
- $sform->addElement(new XoopsFormHidden('op', 'launchnewsletter'), false);
- $sform->addElement(new XoopsFormRadioYN(_AM_NEWS_REMOVE_BR, 'removebr',1),false);
- $sform->addElement(new XoopsFormRadioYN(_AM_NEWS_NEWSLETTER_HTML_TAGS, 'removehtml',0),false);
- $sform->addElement(new XoopsFormTextArea(_AM_NEWS_NEWSLETTER_HEADER, 'header', '', 4, 70), false);
- $sform->addElement(new XoopsFormTextArea(_AM_NEWS_NEWSLETTER_FOOTER, 'footer', '', 4, 70), false);
- $button_tray = new XoopsFormElementTray('' ,'');
- $submit_btn = new XoopsFormButton('', 'post', _SUBMIT, 'submit');
- $button_tray->addElement($submit_btn);
- $sform->addElement($button_tray);
- $sform->display();
-}
-
-
-/**
- * Launch the creation of the newsletter's content
- */
-function LaunchNewsletter()
-{
- global $xoopsConfig, $dateformat;
- xoops_cp_header();
- $newsletterAdmin = new ModuleAdmin();
- echo $newsletterAdmin->addNavigation('index.php?op=configurenewsletter');
- $newslettertemplate = '';
- if (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php')) {
- include_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/newsletter.php';
- } else {
- include_once XOOPS_ROOT_PATH.'/modules/news/language/english/newsletter.php';
- }
- echo '<br ...
[truncated message content] |
|
From: <luc...@us...> - 2013-09-26 12:53:23
|
Revision: 12096
http://sourceforge.net/p/xoops/svn/12096
Author: luciorota
Date: 2013-09-26 12:53:19 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
+ added renderGetContentJS method to form objects (Renders the Javascript function needed to get contents)
+ added "mode" option to editor...
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/sampleform.inc.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -34,8 +34,11 @@
$editor = @ $xoopsUser->getVar('editor'); // Need set through user profile
}
// Add the editor selection box
- // If dohtml is disabled, set $noHtml = true
- $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false));
+ // If dohtml is disabled, set $noHtml = true; $mode not considered if $noHtml is false
+ xoops_load('XoopsCache');
+ XoopsCache::delete('editorlist');
+ $mode = 'html'; // extension or mimetype
+ $sample_form->addElement(new XoopsFormSelectEditor($sample_form, 'editor', $editor, $noHtml = false, $mode));
// options for the editor
// required configs
$options['editor'] = $editor;
@@ -46,8 +49,8 @@
$options['cols'] = 60; // default value = 50
$options['width'] = '100%'; // default value = 100%
$options['height'] = '400px'; // default value = 400px
+ $options['mode'] = $mode; // for editors that support mode option
-
// "textarea": if the selected editor with name of $editor can not be created, the editor "textarea" will be used
// if no $onFailure is set, then the first available editor will be used
// If dohtml is disabled, set $noHtml to true
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -86,6 +86,23 @@
}
/**
+ * Renders the Javascript function needed for client-side for get content
+ *
+ * I'VE USED THIS EXAMPLE TO WRITE VALIDATION CODE
+ * http://tinymce.moxiecode.com/punbb/viewtopic.php?id=12616
+ *
+ * @return string
+ */
+ function renderGetContentJS()
+ {
+ if ($eltname = $this->getName()) {
+ $ret = "tinyMCE.get('{$eltname}').getContent()";
+ return $ret;
+ }
+ return '';
+ }
+
+ /**
* get language
*
* @return string
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -269,11 +269,10 @@
$this->init();
if (self::$LastOfElementsTinymce!=$this->setting["elements"]) {
$ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET ".$this->setting["elements"]." -->\n"; //debug
-
return $ret;
- } else {
+ } else {
$this->setting["elements"]=implode(",",self::$ListOfElementsTinymce);
- }
+ }
if ( !empty($this->setting["callback"]) ) {
$callback = $this->setting["callback"];
unset($this->setting["callback"]);
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/xoopseditor.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -90,6 +90,7 @@
var $root_path = "";
var $nohtml = false;
var $allowed_editors = array();
+ var $modes = null;
/**
* Enter description here...
*
@@ -125,15 +126,16 @@
*
* @param string $name Editor name which is actually the folder name
* @param array $options editor options: $key => $val
+ * @param bool $noHtml dohtml disabled
* @param string $OnFailure a pre-validated editor that will be used if the required editor is failed to create
- * @param bool $noHtml dohtml disabled
+ * @param mixed $modes Requested mode (or array of them)
*/
- function get($name = '', $options = null, $noHtml = false, $OnFailure = '')
+ function get($name = '', $options = null, $noHtml = false, $OnFailure = '', $modes = null)
{
- if (array_key_exists($name, $this->getList($noHtml)) && $editor = $this->_loadEditor($name, $options)) {
+ if (array_key_exists($name, $this->getList($noHtml, $modes)) && $editor = $this->_loadEditor($name, $options)) {
return $editor;
}
- $list = array_keys($this->getList($noHtml));
+ $list = array_keys($this->getList($noHtml, $modes));
if (empty($OnFailure) || !in_array($OnFailure, $list)) {
$OnFailure = $list[0];
}
@@ -145,9 +147,10 @@
* XoopsEditorHandler::getList()
*
* @param mixed $noHtml
+ * @param mixed $modes Requested mode (or array of them)
* @return
*/
- function getList($noHtml = false)
+ function getList($noHtml = false, $modes = null)
{
/*
Do NOT use this method statically, please use
@@ -177,7 +180,17 @@
if (empty($config['order']))
continue;
$order[] = $config['order'];
- $list[$item] = array('title' => $config['title'] , 'nohtml' => $config['nohtml']);
+ if (!isset($config['modes'])) {
+ $config['modes'] = null;
+ }
+ if ($config['nohtml'] == false) {
+ $config['modes'] = array('htm', 'html', 'htmlmixed', 'text/html');
+ }
+ $list[$item] = array(
+ 'title' => $config['title'] ,
+ 'nohtml' => $config['nohtml'],
+ 'modes' => $config['modes']
+ );
}
}
array_multisort($order, $list);
@@ -192,6 +205,10 @@
foreach ($editors as $name) {
if (!empty($noHtml) && empty($list[$name]['nohtml']))
continue;
+ if (!empty($modes) && is_string($modes) && !empty($list[$name]['modes']) && !in_array(strtolower($modes), $list[$name]['modes']))
+ continue;
+ if (!empty($modes) && is_array($modes) && !empty($list[$name]['modes']) && (count(array_intersect($modes, $list[$name]['modes'])) == 0))
+ continue;
$_list[$name] = $list[$name]['title'];
}
return $_list;
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/form.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -558,6 +558,60 @@
}
/**
+ * Renders the Javascript function needed for client-side for get content
+ *
+ * Additionally, each element class may provide its own "renderGetContentJS" method
+ * that is supposed to return custom get content code for the element.
+ *
+ * The element get content code can assume that the JS "myform" variable points to the form.
+ * Exemple:
+ * <script type='text/javascript'>
+ * var content[];
+ * content = " . renderGetContentJS(false) . "
+ * </script>
+ *
+ * A basic element get content method may contain something like this:
+ * <code>
+ * function renderGetContentJS() {
+ * $name = $this->getName();
+ * return "myform.{$name}.value;";
+ * }
+ * </code>
+ *
+ * @param boolean $withtags Include the < javascript > tags in the returned string
+ * @return string
+ */
+ function renderGetContentJS($withtags = true)
+ {
+ $js = '';
+ if ($withtags) {
+ $js .= "\n<!-- Start Form GetContent JavaScript //-->\n<script type='text/javascript'>\n<!--//\n";
+ }
+ $formname = $this->getName();
+ $js .= "function xoopsFormGetContent_{$formname}() {\n";
+ $js .= " var myform = window.document.{$formname};\n";
+ $js .= " var content = new Object();\n";
+ $elements = $this->getElements(true);
+ foreach($elements as $elt) {
+ if (method_exists($elt, 'renderGetContentJS') && ($elt->getName() != '')) {
+ $js .= " content['" . $elt->getName() . "'] = " . $elt->renderGetContentJS() . ";\n";
+ }
+ }
+ $js .= " Object.size = function(obj) {\n";
+ $js .= " var size = 0, key;\n";
+ $js .= " for (key in obj)\n";
+ $js .= " {if (obj.hasOwnProperty(key)) size++;}\n";
+ $js .= " return size;\n";
+ $js .= " };\n";
+ $js .= " return (Object.size(content) > 0) ? content : null;\n";
+ $js .= "}\n";
+ if ($withtags) {
+ $js .= "//--></script>\n<!-- End Form GetContent JavaScript //-->\n";
+ }
+ return $js;
+ }
+
+ /**
* assign to smarty form template instead of displaying directly
*
* @param object $ &$tpl reference to a {@link Smarty} object
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcheckbox.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -242,4 +242,33 @@
}
return '';
}
+
+ /**
+ * Render custom javascript validation code
+ *
+ * @seealso XoopsForm::renderValidationJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode(NWLINE, $this->customGetContentCode);
+ // generate get content code if required
+ } else {
+ $eltname = $this->getName();
+ return NWLINE . "
+ function(){
+ var checkboxesChecked = [];
+ var checkBox = myform.elements['{$eltname}'];
+ if (checkBox.length) {
+ for (var i = 0; i < checkBox.length; i++) {
+ if (checkBox[i].checked == true) {
+ checkboxesChecked.push(checkboxes[i]);
+ }
+ }
+ }
+ return (checkboxesChecked.length > 0) ? checkboxesChecked : null;
+ }";
+ }
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formcolorpicker.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -72,4 +72,18 @@
return "if ( !(new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value)) ) { window.alert(\"{$eltmsg}\"); myform.{$eltname}.focus(); return false; }";
}
+
+ /**
+ * Returns custom get content Javascript
+ *
+ * @return string Element get content Javascript
+ */
+ function renderGetContentJS()
+ {
+ $eltname = $this->getName();
+ return NWLINE . "
+ function(){
+ return ( (new RegExp(\"^#[0-9a-fA-F]{6}\",\"i\").test(myform.{$eltname}.value))) ? myform.{$eltname}.value : null;
+ }";
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -265,4 +265,19 @@
}
return parent::renderValidationJS();
}
+
+ /**
+ * XoopsFormDhtmlTextArea::renderGetContentJS()
+ *
+ * @return
+ */
+ function renderGetContentJS()
+ {
+ if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderGetContentJS')) {
+ if (! isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) {
+ return $this->htmlEditor->renderGetContentJS();
+ }
+ }
+ return parent::renderGetContentJS();
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formeditor.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -57,7 +57,7 @@
/**
* renderValidationJS
- * TEMPORARY SOLUTION to 'override' original renderValidationJS method
+ * override original renderValidationJS method
* with custom XoopsEditor's renderValidationJS method
*/
function renderValidationJS()
@@ -77,6 +77,27 @@
}
/**
+ * renderGetContentJS
+ * 'override' original renderGetContentJS method
+ * with custom XoopsEditor's renderGetContentJS method
+ */
+ function renderGetContentJS()
+ {
+ if (is_object($this->editor)) {
+ if (method_exists($this->editor, 'renderGetContentJS')) {
+ $this->editor->setName($this->getName());
+ $this->editor->setCaption($this->getCaption());
+ $this->editor->_required = $this->isRequired();
+ $ret = $this->editor->renderGetContentJS();
+ return $ret;
+ } else {
+ parent::renderGetContentJS();
+ }
+ }
+ return false;
+ }
+
+ /**
* XoopsFormEditor::render()
*
* @return
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formelement.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -434,6 +434,37 @@
}
/**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom get content code if any
+ if (!empty($this->customGetContentCode)) {
+ return implode(NWLINE, $this->customGetContentCode);
+ // generate get content code if required
+ } else if ($eltname = $this->getName()) {
+ // $eltname = $this->getName();
+ $eltcaption = $this->getCaption();
+ $eltmsg = empty($eltcaption) ? sprintf(_FORM_ENTER, $eltname) : sprintf(_FORM_ENTER, $eltcaption);
+ $eltmsg = str_replace(array(':' , '?' , '%'), '', $eltmsg);
+ $eltmsg = str_replace('"', '\"', stripslashes($eltmsg));
+ $eltmsg = strip_tags($eltmsg);
+ echo $this->getFormType();
+ switch ($this->getFormType()) {
+ case 'checkbox':
+ return "myform.{$eltname}.value";
+ break;
+ default:
+ return "myform.{$eltname}.value";
+ break;
+ } // switch
+ }
+ return false;
+ }
+
+ /**
* Generates output for the element.
*
* This method is abstract and must be overwritten by the child classes.
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselect.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -238,4 +238,34 @@
}
return '';
}
+
+ /**
+ * Render custom javascript get content code
+ *
+ * @seealso XoopsForm::renderGetContentJS
+ */
+ function renderGetContentJS()
+ {
+ // render custom validation code if any
+ if (! empty($this->customGetContentCode)) {
+ return implode("\n", $this->customGetContentCode);
+ // generate validation code if required
+ } else {
+ $eltname = $this->getName();
+ return "
+ function(){
+ var selectSelected = [];
+ var selectBox = myform.elements['{$eltname}'];
+ if (selectBox.length) {
+ for (i = 0; i < selectBox.options.length; i++ ) {
+ if (selectBox.options[i].selected == true && selectBox.options[i].value != '') {
+ selectSelected.push(selectBox.options[i].value);
+ }
+ }
+ }
+ return (selectSelected.length > 0) ? selectSelected : null;
+ }";
+ }
+ return '';
+ }
}
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-26 12:38:11 UTC (rev 12095)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formselecteditor.php 2013-09-26 12:53:19 UTC (rev 12096)
@@ -27,6 +27,7 @@
*/
class XoopsFormSelectEditor extends XoopsFormElementTray
{
+ var $modes = null;
var $allowed_editors = array();
var $form;
var $value;
@@ -40,10 +41,13 @@
* @param string $name editor name
* @param string $value Pre-selected text value
* @param bool $noHtml dohtml disabled
+ * @param array $allowed_editors
+ * @param mixed $modes Requested mode (or array of them)
*/
- function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array())
+ function XoopsFormSelectEditor(&$form, $name = 'editor', $value = null, $nohtml = false, $allowed_editors = array(), $modes = null)
{
$this->XoopsFormElementTray(_SELECT);
+ $this->modes = $modes;
$this->allowed_editors = $allowed_editors;
$this->form = &$form;
$this->name = $name;
@@ -61,12 +65,13 @@
xoops_load('XoopsEditorHandler');
$editor_handler = XoopsEditorHandler::getInstance();
$editor_handler->allowed_editors = $this->allowed_editors;
+ $editor_handler->modes = $this->modes;
$option_select = new XoopsFormSelect("", $this->name, $this->value);
$extra = 'onchange="if(this.options[this.selectedIndex].value.length > 0 ){
window.document.forms.' . $this->form->getName() . '.submit();
}"';
$option_select->setExtra($extra);
- $option_select->addOptionArray($editor_handler->getList($this->nohtml));
+ $option_select->addOptionArray($editor_handler->getList($this->nohtml, $this->modes));
$this->addElement($option_select);
return parent::render();
}
|
|
From: <luc...@us...> - 2013-09-26 12:38:15
|
Revision: 12095
http://sourceforge.net/p/xoops/svn/12095
Author: luciorota
Date: 2013-09-26 12:38:11 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
fixed new late night bugs :-(
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-25 17:04:40 UTC (rev 12094)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-26 12:38:11 UTC (rev 12095)
@@ -119,12 +119,12 @@
// Just to add spacing to the list, to better show the directory tree.
if(is_dir("$path/$file")) {
// Its a directory, so we need to keep reading down...
- $ret[] = "<strong>{$spaces $file}</strong>";
+ $ret[] = "<strong>{$spaces} {$file}</strong>";
$ret = array_merge($ret, wfdownloads_getDir($path . DIRECTORY_SEPARATOR . $file, ($level+1)));
// Re-call this same function but on a new directory.
// this is what makes function recursive.
} else {
- $ret[] = "{$spaces $file}";
+ $ret[] = "{$spaces} {$file}";
// Just print out the filename
}
}
@@ -865,8 +865,8 @@
$criteria->add($expiredCriteria);
if (is_array($cids) && count($cids) > 0) {
$criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
- } elseif ($cid > 0) {
- $criteria->add(new Criteria('cid', (int)$cid));
+ } elseif ($cids > 0) {
+ $criteria->add(new Criteria('cid', (int)$cids));
} else {
return false;
}
|
|
From: <luc...@us...> - 2013-09-25 17:04:44
|
Revision: 12094
http://sourceforge.net/p/xoops/svn/12094
Author: luciorota
Date: 2013-09-25 17:04:40 +0000 (Wed, 25 Sep 2013)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-25 01:50:08 UTC (rev 12093)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-25 17:04:40 UTC (rev 12094)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-09-24)</u></b>
+<b><u>=> Version 3.23 Beta (2013-09-25)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-25 01:50:08 UTC (rev 12093)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-25 17:04:40 UTC (rev 12094)
@@ -32,33 +32,6 @@
-function wfdownloads_cleanVars(&$global, $key, $default = '', $type = 'int') {
- switch ($type) {
- case 'array':
- $ret = (isset($global[$key]) && is_array($global[$key])) ? $global[$key] : $default;
- break;
- case 'date':
- $ret = (isset($global[$key])) ? strtotime($global[$key]) : $default;
- break;
- case 'formatdate':
- $t = strptime( $global[$key] , _MI_REGPRES_SHORTDATESTRING_STRPTIME );
- $ret = mktime($t['tm_sec'], $t['tm_min'], $t['tm_hour'], $t['tm_mon']+1, $t['tm_mday'], $t['tm_year'] + 1900);
- break;
- case 'string':
- $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_MAGIC_QUOTES) : $default;
- break;
- case 'int': default:
- $ret = (isset($global[$key])) ? filter_var($global[$key], FILTER_SANITIZE_NUMBER_INT) : $default;
- break;
- }
- if ($ret === false) {
- return $default;
- }
- return $ret;
-}
-
-
-
/**
* This function transforms a numerical size (like 2048) to a letteral size (like 2MB)
* @param integer $bytes numerical size
@@ -146,12 +119,12 @@
// Just to add spacing to the list, to better show the directory tree.
if(is_dir("$path/$file")) {
// Its a directory, so we need to keep reading down...
- $ret[] = "<strong>$spaces $file</strong>";
+ $ret[] = "<strong>{$spaces $file}</strong>";
$ret = array_merge($ret, wfdownloads_getDir($path . DIRECTORY_SEPARATOR . $file, ($level+1)));
// Re-call this same function but on a new directory.
// this is what makes function recursive.
} else {
- $ret[] = "$spaces $file";
+ $ret[] = "{$spaces $file}";
// Just print out the filename
}
}
@@ -211,12 +184,11 @@
@mkdir($destination);
while(false !== ( $file = readdir($dirHandler)) ) {
if (( $file != '.' ) && ( $file != '..' )) {
- if ( is_dir($source . '/' . $file) ) {
- if (!wfdownloads_copyDir($source . '/' . $file, $destination . '/' . $file))
+ if ( is_dir("{$source}/{$file}") ) {
+ if (!wfdownloads_copyDir("{$source}/{$file}", "{$destination}/{$file}"))
return false;
- }
- else {
- if (!copy($source . '/' . $file, $destination . '/' . $file))
+ } else {
+ if (!copy("{$source}/{$file}", "{$destination}/{$file}"))
return false;
}
}
@@ -237,7 +209,7 @@
if (!is_dir($dir)) return unlink($dir);
foreach (scandir($dir) as $item) {
if ($item == '.' || $item == '..') continue;
- if (!wfdownloads_delDir($dir . '/' . $item)) return false;
+ if (!wfdownloads_delDir("{$dir}/{$item}")) return false;
}
} else {
// NOP
@@ -402,7 +374,7 @@
if (!$withLink) {
return $wfdownloadsModuleName;
} else {
- return '<a href="' . WFDOWNLOADS_URL . '/">' . $wfdownloadsModuleName . '</a>';
+ return '<a href="' . WFDOWNLOADS_URL . '/">{$wfdownloadsModuleName}</a>';
}
}
@@ -491,27 +463,6 @@
-function wfdownloads_getHandler($name, $optional = false )
-{
- static $handlers;
- $name = strtolower(trim($name));
- if (!isset($handlers[$name])) {
- if ( file_exists( $hnd_file = WFDOWNLOADS_ROOT_PATH . '/class/' . $name . '.php' ) ) {
- require_once $hnd_file;
- }
- $class = "Wfdownloads" . ucfirst($name).'Handler';
- if (class_exists($class)) {
- $handlers[$name] = new $class($GLOBALS['xoopsDB']);
- }
- }
- if (!isset($handlers[$name]) && !$optional ) {
- trigger_error('Class <b>' . $class . '</b> does not exist<br />Handler Name: '.$name . ' | Module path : ' . WFDOWNLOADS_ROOT_PATH . '/', E_USER_ERROR);
- }
- return isset($handlers[$name]) ? $handlers[$name] : false;
-}
-
-
-
function wfdownloads_setCookieVar($name, $value, $time=0)
{
if ($time == 0) {
@@ -566,8 +517,8 @@
function wfdownloads_formatErrors($errors=array())
{
$ret = '';
- foreach ($errors as $key=>$value) {
- $ret .= "<br /> - " . $value;
+ foreach ($errors as $key => $value) {
+ $ret .= "<br /> - {$value}";
}
return $ret;
@@ -657,9 +608,9 @@
$toolbar = "[ ";
if ($submissions == 1) {
$category_suffix = !empty($_GET['cid']) ? "?cid=" . (int)$_GET['cid']: ""; //Added by Lankford
- $toolbar .= "<a href='submit.php$category_suffix'>" . _MD_WFDOWNLOADS_SUBMITDOWNLOAD . "</a> | ";
+ $toolbar .= "<a href='submit.php{$category_suffix}'>" . _MD_WFDOWNLOADS_SUBMITDOWNLOAD . "</a> | ";
}
- $toolbar .= "<a href='newlist.php'>" . _MD_WFDOWNLOADS_LATESTLIST . "</a>";
+ $toolbar.= "<a href='newlist.php'>" . _MD_WFDOWNLOADS_LATESTLIST . "</a>";
$toolbar.= " | ";
$toolbar.= "<a href='topten.php?list=hit'>" . _MD_WFDOWNLOADS_POPULARITY . "</a>";
if ($wfdownloads->getConfig('enable_ratings')) {
@@ -767,7 +718,7 @@
}
}
}
- $icons = $new . " " . $pop;
+ $icons = "{$new} {$pop}";
return $icons;
}
@@ -1279,25 +1230,25 @@
-function wfdownloads_getForum($forumId)
+function wfdownloads_getForum($selectedForumId)
{
global $xoopsDB;
- $forumId = (int)$forumId;
+ $selectedForumId = (int)$selectedForumId;
echo "<select name='forumid'>";
echo "<option value='0'>----------------------</option>";
$result = $xoopsDB->query("SELECT forum_name, forum_id FROM " . $xoopsDB->prefix("bb_forums") . " ORDER BY forum_id");
- while (list($forum_name, $forum_id) = $xoopsDB->fetchRow($result)) {
- if ($forum_id == $forumId) {
- $opt_selected = "selected='selected'";
+ while (list($forumName, $forumId) = $xoopsDB->fetchRow($result)) {
+ if ($forumId == $selectedForumId) {
+ $optionSelected = "selected='selected'";
} else {
- $opt_selected = "";
+ $optionSelected = "";
}
- echo "<option value='" . $forum_id . "' $opt_selected>" . $forum_name . "</option>";
+ echo "<option value='{$forumId}' {$optionSelected}>{$forumName}</option>";
}
echo "</select></div>";
- return $forumId;
+ return $selectedForumId;
}
@@ -1388,7 +1339,7 @@
$total_length += $content_length;
}
// if the maximum length is reached, get off the loop
- if($total_length>= $length) {
+ if($total_length >= $length) {
break;
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-25 01:50:08 UTC (rev 12093)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-25 17:04:40 UTC (rev 12094)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-09-24';
-$modversion['release_date'] = '2013/09/24';
-$modversion['releasedate'] = '2013-09-24';
+$modversion['date'] = '2013-09-25';
+$modversion['release_date'] = '2013/09/25';
+$modversion['releasedate'] = '2013-09-25';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|