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) |
From: <dj...@us...> - 2012-05-02 15:28:30
|
Revision: 9425 http://xoops.svn.sourceforge.net/xoops/?rev=9425&view=rev Author: djculex Date: 2012-05-02 15:28:19 +0000 (Wed, 02 May 2012) Log Message: ----------- Bugfix: utf-8 chars Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/comment_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/comment_ajax.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -51,7 +51,7 @@ if($data) { $wc['msg_id_fk'] = $data['msg_id_fk']; $wc['com_id'] = $data['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($data['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($data['comment']), $data['uid']); $wc['time'] = smallworld_time_stamp($data['created']); $wc['username'] = $data['username']; $wc['uid'] = $data['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -99,7 +99,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -64,7 +64,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -91,7 +91,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment']),$cdata['uid_fk']); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -57,7 +57,7 @@ foreach ($insdata as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -84,7 +84,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment']), $cdata['uid_fk']); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -69,7 +69,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -92,7 +92,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment']), $cdata['uid_fk']); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-05-02 12:45:54 UTC (rev 9424) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-05-02 15:28:19 UTC (rev 9425) @@ -138,7 +138,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment']), $cdata['uid_fk']); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-05-02 12:46:01
|
Revision: 9424 http://xoops.svn.sourceforge.net/xoops/?rev=9424&view=rev Author: djculex Date: 2012-05-02 12:45:54 +0000 (Wed, 02 May 2012) Log Message: ----------- Bugfix: More utf-8 special entities not displayed correct Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/permalink.php XoopsModules/smallworld/trunk/smallworld/smallworldshare.php Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-01 23:12:18 UTC (rev 9423) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-02 12:45:54 UTC (rev 9424) @@ -64,7 +64,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlentities($data['message']), $data['uid_fk']); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -91,7 +91,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlentities($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-01 23:12:18 UTC (rev 9423) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-02 12:45:54 UTC (rev 9424) @@ -57,7 +57,7 @@ foreach ($insdata as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/permalink.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-05-01 23:12:18 UTC (rev 9423) +++ XoopsModules/smallworld/trunk/smallworld/permalink.php 2012-05-02 12:45:54 UTC (rev 9424) @@ -69,7 +69,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); - $wm['message'] = smallworld_tolink(htmlentities($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; @@ -92,7 +92,7 @@ foreach($wm['commentsarray'] as $cdata) { $wc['msg_id_fk'] = $cdata['msg_id_fk']; $wc['com_id'] = $cdata['com_id']; - $wc['comment'] = smallworld_tolink(htmlentities($cdata['comment'] )); + $wc['comment'] = smallworld_tolink(htmlspecialchars_decode($cdata['comment'] )); $wc['time'] = smallworld_time_stamp($cdata['created']); $wc['username'] = $cdata['username']; $wc['uid'] = $cdata['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/smallworldshare.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-05-01 23:12:18 UTC (rev 9423) +++ XoopsModules/smallworld/trunk/smallworld/smallworldshare.php 2012-05-02 12:45:54 UTC (rev 9424) @@ -44,7 +44,7 @@ $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); $wm['message'] = str_replace(array('<','>'),array('<','>'),$data['message']); - $wm['message'] = Smallworld_cleanup($wm['message']); + $wm['message'] = Smallworld_cleanup(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-05-01 23:12:25
|
Revision: 9423 http://xoops.svn.sourceforge.net/xoops/?rev=9423&view=rev Author: txmodxoops Date: 2012-05-01 23:12:18 +0000 (Tue, 01 May 2012) Log Message: ----------- Fixed bug editors Fixed bug globals variables Modified Paths: -------------- XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php XoopsModules/xpdf/trunk/modules/xpdf/rss.php XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -30,5 +30,5 @@ xoops_cp_header(); $aboutAdmin = new ModuleAdmin(); echo $aboutAdmin->addNavigation("about.php"); -echo $aboutAdmin->renderabout('6KJ7RW5DR3VTJ', false); +echo $aboutAdmin->renderabout('25J998Y3QEDZW', false); include "admin_footer.php"; \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -29,7 +29,7 @@ global $pathImageAdmin; echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> <img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; -echo "<div class='center small italic pad5'> - <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XPDF_MAINTAINEDBY." - <a href='http://www.txmodxoops.org/modules/newbb' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +echo "<div class='center pad5'> + <span class='bold'>" . $xoopsModule->getVar('name') . "</span><span class='small italic'> "._AM_XPDF_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></span></div>"; xoops_cp_footer(); Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -27,7 +27,7 @@ */ include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; -include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_header.php'; include_once XOOPS_ROOT_PATH . '/class/tree.php'; include_once '../include/config.php'; include_once '../include/functions.php'; Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -25,10 +25,9 @@ * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ * **************************************************************************** */ - include "admin_header.php"; xoops_cp_header(); -global $pathImageIcon, $xoopsModuleConfig; +global $pathImageIcon; // We recovered the value of the argument op in the URL$ $op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); @@ -42,8 +41,8 @@ echo $catAdmin->renderButton(); $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; $criteria = new CriteriaCompo(); - $criteria->setSort("cat_weight ASC, cat_title"); - $criteria->setOrder("ASC"); + $criteria->setSort("cat_weight DESC, cat_title"); + $criteria->setOrder("DESC"); $numrows = $catHandler->getCount(); $start = xpdf_CleanVars ( $_REQUEST, 'start', 0, 'int' ); $criteria->setStart($start); @@ -110,7 +109,7 @@ $obj =& $catHandler->create(); $form = $obj->getForm(); - $form->display(); + echo $form->display(); break; case "save_cat": @@ -129,8 +128,8 @@ $obj->setVar("cat_title", $_REQUEST["cat_title"]); //Form cat_image include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XPDF_UPLOAD_CAT_PATH."/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], 104857600, null, null); + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_CAT_PATH."/", $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix("cat_image_") ; $uploader->fetchMedia($_POST['xoops_upload_file'][0]); @@ -154,7 +153,7 @@ echo $obj->getHtmlErrors(); $form =& $obj->getForm(); - $form->display(); + echo $form->display(); break; case "edit_cat": @@ -164,7 +163,7 @@ echo $catAdmin->renderButton(); $obj = $catHandler->get($_REQUEST["cat_id"]); $form = $obj->getForm(); - $form->display(); + echo $form->display(); break; case "delete_cat": Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -143,7 +143,7 @@ $obj =& $docHandler->create(); $form = $obj->getForm(); - $form->display(); + echo $form->display(); break; case "save_doc": @@ -168,9 +168,8 @@ $obj->setVar("doc_pdftext", $_REQUEST["doc_pdftext"]); //Form doc_image include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], - $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_DOC_PATH."/", $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix("doc_image_") ; $uploader->fetchMedia($_POST['xoops_upload_file'][0]); @@ -225,7 +224,7 @@ echo $obj->getHtmlErrors(); $form =& $obj->getForm(); - $form->display(); + echo $form->display(); break; case "edit_doc": @@ -235,7 +234,7 @@ echo $docAdmin->renderButton(); $obj = $docHandler->get($_REQUEST["doc_id"]); $form = $obj->getForm(); - $form->display(); + echo $form->display(); break; case "delete_doc": Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -39,11 +39,10 @@ unset($criteria); $r = '#FF0000'; // Red $g = '#00AA00'; // Green - $indexAdmin->addInfoBox(_AM_XPDF_CAT); - $indexAdmin->addInfoBoxLine(_AM_XPDF_CAT,_AM_XPDF_THEREARE_CAT, $count_cat, ($count_cat == 0) ? $r : $g); - $indexAdmin->addInfoBox(_AM_XPDF_DOC); - $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC, $count_doc, ($count_doc == 0) ? $r : $g); - $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC_ONLINE, $doc_online, ($count_doc == 0) ? $r : $g); + $indexAdmin->addInfoBox(_AM_XPDF_STATISTICS); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_CAT, $count_cat, ($count_cat == 0) ? $r : $g); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC, $count_doc, ($count_doc == 0) ? $r : $g); + $indexAdmin->addInfoBoxLine(_AM_XPDF_STATISTICS,_AM_XPDF_THEREARE_DOC_ONLINE, $doc_online, ($count_doc == 0) ? $r : $g); echo $indexAdmin->addNavigation("index.php"); echo $indexAdmin->renderIndex(); include "admin_footer.php"; Modified: XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -66,9 +66,7 @@ } function getForm($action = false) - { - global $xoopsDB, $xoopsModuleConfig; - + { if ($action === false) { $action = $_SERVER["REQUEST_URI"]; } @@ -228,11 +226,11 @@ $pdf_data['doimages'] = $pdfdoc->getVar('doc_doimages'); $pdf_data['dobreak'] = $pdfdoc->getVar('doc_dobreak'); - define ('PDF_CREATOR', $pdf_data['creator']); - define ('PDF_AUTHOR', $pdf_data['author']); - define ('PDF_HEADER_TITLE', $pdf_data['title']); - define ('PDF_HEADER_STRING', $pdf_data['subject']); - define ('PDF_HEADER_LOGO', 'logo.gif'); + define ('XPDF_CREATOR', $pdf_data['creator']); + define ('XPDF_AUTHOR', $pdf_data['author']); + define ('XPDF_HEADER_TITLE', $pdf_data['title']); + define ('XPDF_HEADER_STRING', $pdf_data['subject']); + define ('XPDF_HEADER_LOGO', 'logo.gif'); define ('K_PATH_IMAGES', XOOPS_ROOT_PATH.'/images/'); $myts =& MyTextSanitizer::getInstance(); @@ -258,7 +256,7 @@ $pdf->SetKeywords($doc_keywords); // set default header data - $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); + $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, XPDF_HEADER_TITLE, XPDF_HEADER_STRING); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP + 10, PDF_MARGIN_RIGHT); Modified: XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -27,18 +27,16 @@ */ //Index -define("_AM_XPDF_CAT","Categories Statistics"); +define("_AM_XPDF_STATISTICS","Statistics xPdf"); define("_AM_XPDF_THEREARE_CAT","There are <span class='bold'>%s</span> Categories in the Database"); -define("_AM_XPDF_DOC","Documents Statistics"); define("_AM_XPDF_THEREARE_DOC","There are <span class='bold'>%s</span> Documents in the Database"); define("_AM_XPDF_THEREARE_DOC_ONLINE","There are <span class='bold'>%s</span> Documents online"); //Buttons -define("_AM_XPDF_NEWCAT","Add New Categories"); +define("_AM_XPDF_NEWCAT","Add New Category"); define("_AM_XPDF_CATLIST","List Categories"); //Buttons -define("_AM_XPDF_NEWDOC","Add New Documents"); +define("_AM_XPDF_NEWDOC","Add New Document"); define("_AM_XPDF_DOCLIST","List Documents"); - //General define("_AM_XPDF_FORMOK","Registered successfull"); define("_AM_XPDF_FORMDELOK","Deleted successfull"); @@ -50,9 +48,9 @@ define("_AM_XPDF_OFF","Offline"); define("_AM_XPDF_ON","Online"); -define("_AM_XPDF_CAT_ADD","Add a Categories"); -define("_AM_XPDF_CAT_EDIT","Edit a Categories"); -define("_AM_XPDF_CAT_DELETE","Delete a Categories"); +define("_AM_XPDF_CAT_ADD","Add a Category"); +define("_AM_XPDF_CAT_EDIT","Edit Category"); +define("_AM_XPDF_CAT_DELETE","Delete Category"); define("_AM_XPDF_CAT_ID","Id"); define("_AM_XPDF_CAT_PID","Main Category"); define("_AM_XPDF_CAT_TITLE","Category Title"); @@ -60,10 +58,9 @@ define("_AM_XPDF_CAT_DESCRIPTION","Description"); define("_AM_XPDF_CAT_WEIGHT","Weight"); - -define("_AM_XPDF_DOC_ADD","Add a Documents"); -define("_AM_XPDF_DOC_EDIT","Edit a Documents"); -define("_AM_XPDF_DOC_DELETE","Delete a Documents"); +define("_AM_XPDF_DOC_ADD","Add a Document"); +define("_AM_XPDF_DOC_EDIT","Edit Document"); +define("_AM_XPDF_DOC_DELETE","Delete Document"); define("_AM_XPDF_DOC_ID","Id"); define("_AM_XPDF_DOC_CID","Category"); define("_AM_XPDF_DOC_FILENAME","Filename"); @@ -72,8 +69,8 @@ define("_AM_XPDF_DOC_PDFTEXT","Pdf Content"); define("_AM_XPDF_DOC_IMAGE","Image"); define("_AM_XPDF_DOC_SUBJECT","Subject"); -define("_AM_XPDF_DOC_FONTNAME","Fontname"); -define("_AM_XPDF_DOC_FONTSIZE","Fontsize"); +define("_AM_XPDF_DOC_FONTNAME","Name: "); +define("_AM_XPDF_DOC_FONTSIZE","Size: "); define("_AM_XPDF_DOC_KEYWORDS","Keywords"); define("_AM_XPDF_DOC_SUBMITTER","Submitter"); define("_AM_XPDF_DOC_CREATED","Created"); @@ -113,6 +110,6 @@ define('_AM_XPDF_VIEWFORM_DESC',"Permission to view a document"); //Error NoFrameworks -define("_AM_XPDF_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); +define("_AM_XPDF_NOFRAMEWORKS","Error: You don't use the Frameworks 'Admin Module'. Please install this Frameworks"); define("_AM_XPDF_MAINTAINEDBY", "is maintained by the"); ?> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/rss.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/rss.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/rss.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -23,10 +23,10 @@ * **************************************************************************** */ include_once dirname(__FILE__) . '/header.php'; -$cid = isset($_GET['doc_cid']) ? intval($_GET['doc_cid']) : 0; +$did = xpdf_CleanVars($_REQUEST, 'doc_id', 0, 'int'); +$cid = xpdf_CleanVars($_REQUEST, 'doc_cid', 0, 'int'); include_once XOOPS_ROOT_PATH.'/class/template.php'; -$items_count = $GLOBALS['xoopsModuleConfig']['rssperpage']; - +$catHandler =& xoops_getModuleHandler('xpdf_cat', XPDF_DIRNAME); if (function_exists('mb_http_output')) { mb_http_output('pass'); } @@ -42,7 +42,7 @@ $criteria->add(new Criteria('doc_cid', '(' . implode(',', $cats) . ')','IN')); if ($cid != 0){ $criteria->add(new Criteria('doc_cid', $cid)); - $cat = $docscat_Handler->get($cid); + $cat = $catHandler->get($cid); $title = $GLOBALS['xoopsConfig']['sitename'] . ' - ' . $GLOBALS['xoopsModule']->getVar('name') . ' - ' . $cat->getVar('cat_title'); }else{ $title = $GLOBALS['xoopsConfig']['sitename'] . ' - ' . $GLOBALS['xoopsModule']->getVar('name'); @@ -88,11 +88,13 @@ if (strpos($slogan,'[pagebreak]') == false){ $slogan_short = $slogan; }else{ - $slogan_short = substr($slogan,0,strpos($slogan,'[pagebreak]')); + $slogan_short = substr($slogan, 0, strpos($slogan,'[pagebreak]')); } + $doc_id = $docs_arr[$i]->getVar('doc_id'); + $doc_cid = $docs_arr[$i]->getVar('doc_cid'); $tpl->append('items', array('title' => htmlspecialchars($docs_arr[$i]->getVar('doc_title'), ENT_QUOTES), - 'link' => XOOPS_URL . '/modules/xpdf/singledoc.php?cid=' . $docs_arr[$i]->getVar('doc_cid') . '&did=' . $docs_arr[$i]->getVar('doc_id'), - 'guid' => XOOPS_URL . '/modules/xpdf/singledoc.php?cid=' . $docs_arr[$i]->getVar('doc_cid') . '&did=' . $docs_arr[$i]->getVar('doc_id'), + 'link' => XOOPS_URL . '/modules/xpdf/viewdoc.php?doc_cid=' . $doc_cid . '&doc_id=' . $doc_id, + 'guid' => XOOPS_URL . '/modules/xpdf/viewdoc.php?doc_cid=' . $doc_cid . '&doc_id=' . $doc_id, 'pubdate' => formatTimestamp($docs_arr[$i]->getVar('doc_published'), 'rss'), 'description' => htmlspecialchars($slogan_short, ENT_QUOTES))); } Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html 2012-05-01 23:12:18 UTC (rev 9423) @@ -44,7 +44,7 @@ <!-- RSS logo --> <div class="xpdf-rss right"> - <a title="<{$smarty.const._MA_XPDF_RSS}>" href="<{$xpdf_url}>/rss.php?cid=<{$cid}>"><img src="<{$xpdf_url}>/images/rss.gif" alt="<{$smarty.const._MA_XPDF_RSS}>" /></a> + <a title="<{$smarty.const._MA_XPDF_RSS}>" href="<{$xpdf_url}>/rss.php?cid=<{$cid}>" rel="external"><img src="<{$xpdf_url}>/images/rss.gif" alt="<{$smarty.const._MA_XPDF_RSS}>" /></a> </div> <div class="xpdf-thereare"><{$lang_thereare}></div> <{if $file != ""}> Modified: XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-05-01 18:10:53 UTC (rev 9422) +++ XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-05-01 23:12:18 UTC (rev 9423) @@ -172,12 +172,12 @@ } $datetime = formatTimestamp($doc_arr[$i]->getVar('doc_published'),'s'); $submitter = XoopsUser::getUnameFromId($doc_arr[$i]->getVar('doc_submitter')); - $description = $doc_arr[$i]->getVar('doc_slogan'); + $slogan = $doc_arr[$i]->getVar('doc_slogan'); //to view only the short description - if (strpos($description,'[pagebreak]')==false){ - $slogan = $description; + if (strpos($slogan,'[pagebreak]')==false){ + $slogan_short = $slogan; }else{ - $slogan = substr($description,0,strpos($description,'[pagebreak]')); + $slogan_short = substr($slogan,0,strpos($slogan,'[pagebreak]')); } // pour les vignettes "new" et "mis \xE0 jour" $new = xpdf_NewOrUpdate($doc_arr[$i]->getVar('doc_published'), $doc_arr[$i]->getVar('doc_status')); @@ -185,7 +185,7 @@ // Set if the user is an admin. if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { - $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&did=' . $doc_arr[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; + $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&doc_id=' . $doc_arr[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; } else { $adminlink = ''; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-01 18:11:01
|
Revision: 9422 http://xoops.svn.sourceforge.net/xoops/?rev=9422&view=rev Author: mageg Date: 2012-05-01 18:10:53 +0000 (Tue, 01 May 2012) Log Message: ----------- update profile module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php 2012-05-01 17:40:16 UTC (rev 9421) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/menu.php 2012-05-01 18:10:53 UTC (rev 9422) @@ -21,36 +21,33 @@ * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; - $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _PROFILE_MI_HOME; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; +$adminmenu[$i]['icon'] = '/home.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_USERS; $adminmenu[$i]['link'] = "admin/user.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/users.png'; +$adminmenu[$i]['icon'] = '/users.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_CATEGORIES; $adminmenu[$i]['link'] = "admin/category.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/category.png'; +$adminmenu[$i]['icon'] = '/category.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_FIELDS; $adminmenu[$i]['link'] = "admin/field.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/index.png'; +$adminmenu[$i]['icon'] = '/index.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_STEPS; $adminmenu[$i]['link'] = "admin/step.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/stats.png'; +$adminmenu[$i]['icon'] = '/stats.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_PERMISSIONS; $adminmenu[$i]['link'] = "admin/permissions.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/permissions.png'; +$adminmenu[$i]['icon'] = '/permissions.png'; $i++; $adminmenu[$i]['title'] = _PROFILE_MI_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; -?> \ No newline at end of file +$adminmenu[$i]['icon'] = '/about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/language/english/help/help.html 2012-05-01 17:40:16 UTC (rev 9421) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/language/english/help/help.html 2012-05-01 18:10:53 UTC (rev 9422) @@ -1,21 +1,18 @@ -<div id="help-template" class="outer"> - <h1 class="head">Help: <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/profile/admin/index.php" title="Back to the Administration of Profile"> Profile <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of Profile"/></a></h1> - <!-- -----Help Content ---------- --> - <h4 class="odd">Description</h4> - <p class="even">The Profile module is for managing custom user profile fields.</p> - <h4 class="odd">Install/uninstall</h4> - <p>No special measures necessary, follow the standard installation process – extract the /profile folder into the ../modules directory. Install the module through Admin -> System Module -> Modules.</p> - <p>Detailed instructions on installing modules are available in the <a href="http://goo.gl/adT2i" title="XOOPS Operations Manual">XOOPS Operations Manual</a> </p> - <h4 class="odd">Operating instructions</h4> - <p class="even">To set up this module you need to:</p> - <ul> - <li>Configure your preferences for the module (see ‘Preferences’) and optionally the Profile block if you intend to use it (see ‘Blocks’).</li> - <li>Edit existing Categories or add new ones.</li> - <li>Edit existing Fields or add new ones. Here you can specify which fields will be visible in which category, and if they will be visible during user registration.</li> - <li>Define the order of Registration steps.</li> - <li>And finally, you can set permissions for individual fields - which ones are editable, which ones are searchable.</li> - </ul> - <h4 class="odd">Tutorial</h4> - <p class="even">Tutorial coming soon.</p> - <!-- -----Help Content ---------- --> -</div> \ No newline at end of file +<!-- -----Help Content ---------- --> +<h4 class="odd">Description</h4> +<p class="even">The Profile module is for managing custom user profile fields.</p> +<h4 class="odd">Install/uninstall</h4> +<p>No special measures necessary, follow the standard installation process – extract the /profile folder into the ../modules directory. Install the module through Admin -> System Module -> Modules.</p> +<p>Detailed instructions on installing modules are available in the <a href="http://goo.gl/adT2i" title="XOOPS Operations Manual">XOOPS Operations Manual</a> </p> +<h4 class="odd">Operating instructions</h4> +<p class="even">To set up this module you need to:</p> +<ul> + <li>Configure your preferences for the module (see ‘Preferences’) and optionally the Profile block if you intend to use it (see ‘Blocks’).</li> + <li>Edit existing Categories or add new ones.</li> + <li>Edit existing Fields or add new ones. Here you can specify which fields will be visible in which category, and if they will be visible during user registration.</li> + <li>Define the order of Registration steps.</li> + <li>And finally, you can set permissions for individual fields - which ones are editable, which ones are searchable.</li> +</ul> +<h4 class="odd">Tutorial</h4> +<p class="even">Tutorial coming soon.</p> +<!-- -----Help Content ---------- --> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html 2012-05-01 17:40:16 UTC (rev 9421) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/categorylist.html 2012-05-01 18:10:53 UTC (rev 9422) @@ -7,8 +7,8 @@ <table class="outer"> <thead> <tr> - <th><{$smarty.const._PROFILE_AM_TITLE}></th> - <th><{$smarty.const._PROFILE_AM_DESCRIPTION}></th> + <th class="txtcenter"><{$smarty.const._PROFILE_AM_TITLE}></th> + <th class="txtleft"><{$smarty.const._PROFILE_AM_DESCRIPTION}></th> <th><{$smarty.const._PROFILE_AM_WEIGHT}></th> <th></th> </tr> @@ -16,12 +16,16 @@ <tbody> <{foreach item=category from=$categories}> <tr class="<{cycle values='odd, even'}>"> - <td><{$category.cat_title}></td> - <td><{$category.cat_description}></td> - <td><{$category.cat_weight}></td> - <td> - <a href="category.php?id=<{$category.cat_id}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a> - <a href="category.php?op=delete&id=<{$category.cat_id}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a> + <td class="txtcenter width20"><{$category.cat_title}></td> + <td class="txtleft"><{$category.cat_description}></td> + <td class="txtcenter width5"><{$category.cat_weight}></td> + <td class="xo-actions txtcenter width5"> + <a href="category.php?id=<{$category.cat_id}>" title="<{$smarty.const._EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>"> + </a> + <a href="category.php?op=delete&id=<{$category.cat_id}>" title="<{$smarty.const._DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>"> + </a> </td> </tr> <{/foreach}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html 2012-05-01 17:40:16 UTC (rev 9421) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/fieldlist.html 2012-05-01 18:10:53 UTC (rev 9422) @@ -36,15 +36,19 @@ <input class="span2" type="text" name="weight[<{$field.field_id}>]" maxlength="5" value="<{$field.field_weight}>" /> <{/if}> </td> - <td> + <td class="xo-actions txtcenter width5"> <{if $field.canEdit}> <input type="hidden" name="oldweight[<{$field.field_id}>]" value="<{$field.field_weight}>" /> <input type="hidden" name="oldcat[<{$field.field_id}>]" value="<{$field.cat_id}>" /> <input type="hidden" name="field_ids[]" value="<{$field.field_id}>" /> - <a href="field.php?id=<{$field.field_id}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a> + <a href="field.php?id=<{$field.field_id}>" title="<{$smarty.const._EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>"> + </a> <{/if}> <{if $field.canDelete}> - <a href="field.php?op=delete&id=<{$field.field_id}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a> + <a href="field.php?op=delete&id=<{$field.field_id}>" title="<{$smarty.const._DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>"> + </a> <{/if}> </td> </tr> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html 2012-05-01 17:40:16 UTC (rev 9421) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/templates/admin/steplist.html 2012-05-01 18:10:53 UTC (rev 9422) @@ -18,11 +18,15 @@ <{foreach item=step from=$steps}> <tr class="<{cycle values='odd, even'}>"> <td><{$step.step_name}></td> - <td><{$step.step_order}></td> - <td><{if $step.step_save == 1}><img src="<{xoAppUrl modules/profile/images/yes.png}>" alt="<{$smarty.const._YES}>" /><{else}><img src="<{xoAppUrl modules/profile/images/no.png}>" alt="<{$smarty.const._NO}>" /><{/if}></td> - <td> - <a href="step.php?id=<{$step.step_id}>" title="<{$smarty.const._EDIT}>"><{$smarty.const._EDIT}></a> - <a href="step.php?op=delete&id=<{$step.step_id}>" title="<{$smarty.const._DELETE}>"><{$smarty.const._DELETE}></a> + <td class="txtcenter width10"><{$step.step_order}></td> + <td class="txtcenter width10"><{if $step.step_save == 1}><img src="<{xoAppUrl modules/profile/images/yes.png}>" alt="<{$smarty.const._YES}>" /><{else}><img src="<{xoAppUrl modules/profile/images/no.png}>" alt="<{$smarty.const._NO}>" /><{/if}></td> + <td class="xo-actions txtcenter width5"> + <a href="step.php?id=<{$step.step_id}>" title="<{$smarty.const._EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>"> + </a> + <a href="step.php?op=delete&id=<{$step.step_id}>" title="<{$smarty.const._DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>"> + </a> </td> </tr> <{/foreach}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dj...@us...> - 2012-05-01 17:40:22
|
Revision: 9421 http://xoops.svn.sourceforge.net/xoops/?rev=9421&view=rev Author: djculex Date: 2012-05-01 17:40:16 +0000 (Tue, 01 May 2012) Log Message: ----------- Bugfix: Problems with wrong username in image uploads->wall Updates Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/include/functions.php XoopsModules/smallworld/trunk/smallworld/index.php XoopsModules/smallworld/trunk/smallworld/loadmore.php XoopsModules/smallworld/trunk/smallworld/message_ajax.php XoopsModules/smallworld/trunk/smallworld/userprofile.php Modified: XoopsModules/smallworld/trunk/smallworld/include/functions.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-05-01 17:36:52 UTC (rev 9420) +++ XoopsModules/smallworld/trunk/smallworld/include/functions.php 2012-05-01 17:40:16 UTC (rev 9421) @@ -227,16 +227,18 @@ // Return only url/link // If url is image link return <img> -function smallworld_tolink($text) +function smallworld_tolink($text, $uid) { global $xoopsUser; $ext = substr($text,-4,4); $ext2 = substr($text,-5,5); + $usr = new $xoopsUser($uid); + $userID = $xoopsUser->getVar('uid'); $user = new XoopsUser($userID); $username = $user->getVar('uname'); - $gallery = XOOPS_URL."/modules/smallworld/galleryshow.php?username=".$username; + $gallery = XOOPS_URL."/modules/smallworld/galleryshow.php?username=".$usr->getVar('uname'); if (in_array($ext,array('.jpg','.bmp','.gif','.png')) || in_array($ext2,array('.jpeg'))){ if (strpos($text, 'UPLIMAGE') !== false ) { @@ -244,7 +246,7 @@ $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">' - . $username . _SMALLWORLD_UPLOADEDSOMEIMAGES + . $usr->getVar('uname') . _SMALLWORLD_UPLOADEDSOMEIMAGES . '</a><br></span>', $text ); $text = preg_replace('/(((f|ht){1}tps:\/\/)[-a-zA-Z0-9@:%_\+.~#?&\/\/=]+)/i', Modified: XoopsModules/smallworld/trunk/smallworld/index.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/index.php 2012-05-01 17:36:52 UTC (rev 9420) +++ XoopsModules/smallworld/trunk/smallworld/index.php 2012-05-01 17:40:16 UTC (rev 9421) @@ -73,7 +73,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',Smallworld_stripWordsKeepUrl($data['message'])); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['message'] = str_replace(array('<','>'),array('<','>'), $wm['message']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; Modified: XoopsModules/smallworld/trunk/smallworld/loadmore.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-01 17:36:52 UTC (rev 9420) +++ XoopsModules/smallworld/trunk/smallworld/loadmore.php 2012-05-01 17:40:16 UTC (rev 9421) @@ -64,7 +64,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlentities($data['message'])); + $wm['message'] = smallworld_tolink(htmlentities($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/message_ajax.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-01 17:36:52 UTC (rev 9420) +++ XoopsModules/smallworld/trunk/smallworld/message_ajax.php 2012-05-01 17:40:16 UTC (rev 9421) @@ -57,7 +57,7 @@ foreach ($insdata as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; Modified: XoopsModules/smallworld/trunk/smallworld/userprofile.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-05-01 17:36:52 UTC (rev 9420) +++ XoopsModules/smallworld/trunk/smallworld/userprofile.php 2012-05-01 17:40:16 UTC (rev 9421) @@ -112,7 +112,7 @@ foreach ($updatesarray as $data) { $wm['msg_id'] = $data['msg_id']; $wm['orimessage'] = str_replace(array("\r", "\n"), '',$data['message']); - $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message'])); + $wm['message'] = smallworld_tolink(htmlspecialchars_decode($data['message']), $data['uid_fk']); $wm['created'] = smallworld_time_stamp($data['created']); $wm['username'] = $data['username']; $wm['uid_fk'] = $data['uid_fk']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-05-01 17:36:59
|
Revision: 9420 http://xoops.svn.sourceforge.net/xoops/?rev=9420&view=rev Author: txmodxoops Date: 2012-05-01 17:36:52 +0000 (Tue, 01 May 2012) Log Message: ----------- Testing Updated categories permissions Added admin/permissions.php Modified Paths: -------------- XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php XoopsModules/xpdf/trunk/modules/xpdf/css/style.css XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php XoopsModules/xpdf/trunk/modules/xpdf/index.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/main.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/modinfo.php XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php Added Paths: ----------- XoopsModules/xpdf/trunk/modules/xpdf/admin/permissions.php Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -41,5 +41,8 @@ $adminmenu[$i]["link"] = "admin/documents.php"; $adminmenu[$i]["icon"] = "images/32/pdf_document.png"; $i++; $adminmenu[$i]["title"] = _MI_XPDF_ADMENU4; +$adminmenu[$i]["link"] = "admin/permissions.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/permissions.png"; $i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU5; $adminmenu[$i]["link"] = "admin/about.php"; $adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; unset( $i ); Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/permissions.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/permissions.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/permissions.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -0,0 +1,93 @@ +<?php +/** + * **************************************************************************** + * - A project for the Xoops CMS - (http://www.xoops.org) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include 'admin_header.php'; +include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php'; +if( !empty($_POST["submit"]) ) { + redirect_header( XOOPS_URL."/modules/".$xoopsModule->dirname()."/admin/permissions.php" , 1 , _MP_GPERMUPDATED ); +} +xoops_cp_header(); +$permAdmin = new ModuleAdmin(); +echo $permAdmin->addNavigation("permissions.php"); + +$permtoset= isset($_POST["permtoset"]) ? intval($_POST["permtoset"]) : 1; +$selected=array("","","",""); +$selected[$permtoset-1]=" selected"; + +echo " +<form method='post' name='fselperm' action='permissions.php'> + <table border=0> + <tr> + <td> + <select name='permtoset' onChange='javascript: document.fselperm.submit()'> + <option value='1'".$selected[0].">"._AM_XPDF_APPROVEFORM."</option> + <option value='2'".$selected[1].">"._AM_XPDF_SUBMITFORM."</option> + <option value='3'".$selected[2].">"._AM_XPDF_VIEWFORM."</option> + </select> + </td> + </tr> + </table> +</form>"; + +$module_id = $xoopsModule->getVar("mid"); + +switch($permtoset) +{ + case 1: + $titleForm = _AM_XPDF_APPROVEFORM; + $perm_name = "xpdf_approve"; + $perm_desc = _AM_XPDF_APPROVEFORM_DESC; + break; + case 2: + $titleForm = _AM_XPDF_SUBMITFORM; + $perm_name = "xpdf_submit"; + $perm_desc = _AM_XPDF_SUBMITFORM_DESC; + break; + case 3: + $titleForm = _AM_XPDF_VIEWFORM; + $perm_name = "xpdf_view"; + $perm_desc = _AM_XPDF_VIEWFORM_DESC; + break; +} + +$permform = new XoopsGroupPermForm($titleForm, $module_id, $perm_name, $perm_desc, "admin/permissions.php"); +if ($permtoset == 5){ + foreach( $global_perms_array as $perm_id => $perm_name ) { + $permform->addItem($perm_id , $perm_name) ; + } +} else { + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_title'); + $criteria->setOrder('ASC'); + $cat_arr = $catHandler->getall($criteria); + foreach (array_keys($cat_arr) as $i) { + $permform->addItem($cat_arr[$i]->getVar('cat_id'), $cat_arr[$i]->getVar('cat_title')); + } +} +echo $permform->render(); +echo "<br /><br /><br /><br />\n"; +unset ($permform); + +include("admin_footer.php"); +?> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/css/style.css =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/css/style.css 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/css/style.css 2012-05-01 17:36:52 UTC (rev 9420) @@ -17,14 +17,6 @@ height: 50px; } -.xpdf-adv { - text-align: center; - padding: 2px; - border-right: 1px solid #aaa; - border-bottom: 1px solid #aaa; - border-left: 1px solid #aaa; -} - .xpdf-body { margin: 0; } @@ -112,6 +104,14 @@ border: 1px solid #ccc; } +.xpdf-itemAdv { + text-align: center; + padding: 2px; + border-right: 1px solid #aaa; + border-bottom: 1px solid #aaa; + border-left: 1px solid #aaa; +} + .xpdf-itemTop { margin: 2px; padding: 2px; Modified: XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -62,11 +62,11 @@ if(in_array($cid, $categories)) { $child = $mytree->getAllChild($cid); foreach (array_keys($entries) as $i) { - if ($entries[$i]->getVar('cid') == $cid){ + if ($entries[$i]->getVar('doc_cid') == $cid){ $count++; } foreach (array_keys($child) as $j) { - if ($entries[$i]->getVar('cid') == $j){ + if ($entries[$i]->getVar('doc_cid') == $j){ $count++; } } Modified: XoopsModules/xpdf/trunk/modules/xpdf/index.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/index.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/index.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -31,14 +31,13 @@ $xoTheme->addStylesheet( $style, null ); $xoTheme->addScript( $script, null ); -//$cid = xpdf_CleanVars($_REQUEST, 'cat_id', 0, 'int'); // For permissions $categories = xpdf_MygetItemIds('xpdf_view', XPDF_DIRNAME); // Documents table $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); -$criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); +$criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); $docArray = $docHandler->getall($criteria); $docCount = $docHandler->getCount($criteria); $xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_INDEX_THEREARE, $docCount)); @@ -47,7 +46,7 @@ $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_id', $_REQUEST['cat_id'])); +$criteria->add(new Criteria('cat_id', '(' . implode(',', $categories) . ')','IN')); $catArray = $catHandler->getall($criteria); $totalcategories = $catHandler->getCount($criteria); $mytree = new XoopsObjectTree($catArray, 'cat_id', 'cat_pid'); @@ -97,7 +96,7 @@ } $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); - $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); + $criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); $criteria->setLimit($GLOBALS['xoopsModuleConfig']['newdocuments']); $criteria->setSort('doc_published DESC, doc_title'); $criteria->setOrder('DESC'); @@ -126,7 +125,21 @@ $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&doc_id=' . $docArray[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; } else { $adminlink = ''; - } + } + // Permission to view + if (xoops_getModuleOption('xpdf_view', XPDF_DIRNAME)) { + if (!in_array($docArray[$i]->getVar('doc_cid'), $categories)) { + $perm_view = true; + }else{ + $perm_view = false; + } + }else{ + if (!in_array($docArray[$i]->getVar('doc_id'), $item)) { + $perm_view = true; + }else{ + $perm_view = false; + } + } $doc_dohtml = $docArray[$i]->getVar('doc_dohtml'); $doc_dosmiley = $docArray[$i]->getVar('doc_dosmiley'); $doc_doxcodes = $docArray[$i]->getVar('doc_doxcodes'); @@ -140,9 +153,9 @@ $pdfdoc = "<a href='" . XPDF_URL . "/viewdoc.php?did=".$did."' title='"._MA_XPDF_IMG_VIEWPDF."' target='_blank'>"; $pdfdoc .= "<img src='" . XPDF_URL . "/images/22/view_pdf.png' width='22px' height='22px' border='0' alt='".$title."'/></a>"; // Render Display - $xoopsTpl->append('file', array('did' => $did, 'cid' => $cid, 'title' => $title, 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan_short, 'adminlink' => $adminlink, 'submitter' => $submitter, 'online' => $online, 'count' => $count, 'pdfdoc' => $pdfdoc)); + $xoopsTpl->append('file', array('did' => $did, 'cid' => $cid, 'title' => $title, 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan_short, 'adminlink' => $adminlink, 'submitter' => $submitter, 'perm_view' => $perm_view, 'online' => $online, 'count' => $count, 'pdfdoc' => $pdfdoc)); // For keywords - //$keywords .= $docArray[$i]->getVar('title') . ',';$keywords. + //$keywords .= $docArray[$i]->getVar('title') . ',';$keywords.perm_view $count++; } } Modified: XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -105,6 +105,13 @@ define("_AM_XPDF_DOC_BLOCK_RANDOM","Documents random"); define("_AM_XPDF_DOC_BLOCK_RECENT","Documents recents"); +define('_AM_XPDF_APPROVEFORM',"Permissions to approve"); +define('_AM_XPDF_APPROVEFORM_DESC',"Permissions to approve the document sented"); +define('_AM_XPDF_SUBMITFORM',"Permissions to submit"); +define('_AM_XPDF_SUBMITFORM_DESC',"Permission to submit a document"); +define('_AM_XPDF_VIEWFORM',"Permission to view"); +define('_AM_XPDF_VIEWFORM_DESC',"Permission to view a document"); + //Error NoFrameworks define("_AM_XPDF_NOFRAMEWORKS","Error: You don't use the Frameworks \"admin module\". Please install this Frameworks"); define("_AM_XPDF_MAINTAINEDBY", "is maintained by the"); Modified: XoopsModules/xpdf/trunk/modules/xpdf/language/english/main.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/language/english/main.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/language/english/main.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -51,7 +51,7 @@ // viewcat.php: define("_MA_XPDF_CAT_CURSORTBY","Files currently sorted by : %s"); -define("_MA_XPDF_CAT_LIST","List"); +define("_MA_XPDF_CAT_LIST","Listed in this category"); define("_MA_XPDF_CAT_NONEXISTENT","This category does not exist"); define("_MA_XPDF_CAT_THEREARE","There are <b>%s</b> document(s) in this category"); Modified: XoopsModules/xpdf/trunk/modules/xpdf/language/english/modinfo.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/language/english/modinfo.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/language/english/modinfo.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -34,7 +34,9 @@ define("_MI_XPDF_ADMENU1","Dashboard"); define("_MI_XPDF_ADMENU2","Categories"); define("_MI_XPDF_ADMENU3","Documents"); -define("_MI_XPDF_ADMENU4","About"); +define("_MI_XPDF_ADMENU4","Permissions"); +define("_MI_XPDF_ADMENU5","About"); + define("_MI_XPDF_MAXSIZE","Mime max size"); define("_MI_XPDF_MIMETYPES","Mime Types"); //Config Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html 2012-05-01 17:36:52 UTC (rev 9420) @@ -29,7 +29,9 @@ <div class="clear"></div> <div class="xpdf-itemBottom"><span><{$doc.adminlink}></span> <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITTER}></span>:<span class="itemPoster"><{$doc.submitter}></span> - <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITDATE}></span>:<span class="itemPostDate"><{$doc.updated}></span> + <{if $doc.perm_view == true}> <span class="floatright"><{$doc.pdfdoc}></span> + <{/if}> <div class="clear"></div> </div> </div> Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html 2012-05-01 17:36:52 UTC (rev 9420) @@ -2,7 +2,6 @@ <span class="left"><b>Title</b>: <{$smarty.const._MA_XPDF_TITLE}></span><br /> <span class="left"><b>Description</b>: <{$smarty.const._MA_XPDF_DESC}></span> </div> -<br /> <{if $adv != ''}> -<div class="center"><{$adv}></div><br /> +<br /><div class="xpdf-itemAdv center"><{$adv}></div><br /> <{/if}> Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html 2012-05-01 17:36:52 UTC (rev 9420) @@ -47,7 +47,7 @@ <tr> <!-- Start new link loop --> <{section name=i loop=$file}> - <td class="col_width<{$nb_dowcol}> top center"> + <td class="col_width<{$nb_coldoc}> top center"> <{include file="db:xpdf_doclist.html" doc=$file[i]}> </td> <{if $file[i].count is div by $nb_coldoc}> Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html 2012-05-01 17:36:52 UTC (rev 9420) @@ -43,23 +43,22 @@ <!-- End Show categories information --> <!-- RSS logo --> - <div class="xpdf-rss"> + <div class="xpdf-rss right"> <a title="<{$smarty.const._MA_XPDF_RSS}>" href="<{$xpdf_url}>/rss.php?cid=<{$cid}>"><img src="<{$xpdf_url}>/images/rss.gif" alt="<{$smarty.const._MA_XPDF_RSS}>" /></a> </div> <div class="xpdf-thereare"><{$lang_thereare}></div> <{if $file != ""}> <!-- Start Show new files in Category page --> - <div class="xpdf-linetitle"><{$smarty.const._MA_XPDF_CAT_LIST}></div> + <div class="xpdf-latest"><{$smarty.const._MA_XPDF_CAT_LIST}></div> <table> <tr> <!-- Start new link loop --> <{section name=i loop=$file}> <td class="col_width<{$nb_coldoc}> top center"> - <{include file="db:xpdf_doc.html" doc=$file[i]}> + <{include file="db:xpdf_doclist.html" doc=$file[i]}> </td> <{if $file[i].count is div by $nb_coldoc}> - </tr> - <tr> + </tr><tr> <{/if}> <{/section}> <!-- End new link loop --> @@ -72,6 +71,6 @@ <{/if}> <!-- End Show new files in Category page --> - <{/if}> + <{/if}> </div> <{include file="db:xpdf_footer.html"}> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-05-01 17:21:31 UTC (rev 9419) +++ XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-05-01 17:36:52 UTC (rev 9420) @@ -30,7 +30,7 @@ $xoopsOption['template_main'] = 'xpdf_viewcat.html'; include_once XOOPS_ROOT_PATH."/header.php"; $xoTheme->addStylesheet( $style, null ); -$xoTheme->addScript( $js, null ); +$xoTheme->addScript( $script, null ); $cid = xpdf_CleanVars($_REQUEST, 'cid', 0, 'int'); // For permissions @@ -38,7 +38,7 @@ // Redirection if the category does not exist $criteria = new CriteriaCompo(new Criteria('cat_id', intval($cid))); -/*if ($catHandler->getCount($criteria) == 0 || $cid == 0){ +if ($catHandler->getCount($criteria) == 0 || $cid == 0){ redirect_header('index.php', 3, _MA_XPDF_CAT_NOTEXISTENT); exit(); } @@ -46,20 +46,20 @@ if(!in_array(intval($cid), $categories)) { redirect_header('index.php', 2, _NOPERM); exit(); -}*/ +}/**/ // Category Table $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_id', $_REQUEST['cat_id'])); +$criteria->add(new Criteria('cat_id', '(' . implode(',', $categories) . ')','IN')); $cat_arr = $catHandler->getall($criteria); $mytree = new XoopsObjectTree($cat_arr, 'cat_id', 'cat_pid'); // Doocument table $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); -$criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); +$criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); $doc_arr = $docHandler->getall($criteria); $xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_INDEX_THEREARE, count($doc_arr))); @@ -111,7 +111,7 @@ } $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); - $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); + $criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); $criteria->add(new Criteria('doc_cid', intval($_REQUEST['cid']))); $numrows = $docHandler->getCount($criteria); $xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_CAT_THEREARE, $numrows)); @@ -162,8 +162,8 @@ $summary = ''; $cpt = 0; - $categories = xpdf_MygetItemIds('xpdf_download', XPDF_DIRNAME); - $item = xpdf_MygetItemIds('xpdf_download_item', XPDF_DIRNAME); + $categories = xpdf_MygetItemIds('xpdf_view', XPDF_DIRNAME); + $item = xpdf_MygetItemIds('xpdf_doc_item', XPDF_DIRNAME); foreach (array_keys($doc_arr) as $i) { if ($doc_arr[$i]->getVar('doc_image') == 'blank.gif'){ $doc_image = ''; @@ -188,11 +188,36 @@ $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&did=' . $doc_arr[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; } else { $adminlink = ''; - } + } + // Permission to view + if (xoops_getModuleOption('xpdf_view', XPDF_DIRNAME)) { + if (!in_array($doc_arr[$i]->getVar('doc_cid'), $categories)) { + $perm_view = true; + }else{ + $perm_view = false; + } + }else{ + if (!in_array($doc_arr[$i]->getVar('doc_id'), $item)) { + $perm_view = true; + }else{ + $perm_view = false; + } + } // utilisation du sommaire - $cpt++; - $xoopsTpl->append('file', array('id' => $doc_arr[$i]->getVar('doc_id'),'cid' => $doc_arr[$i]->getVar('doc_cid'), 'title' => $doc_arr[$i]->getVar('doc_title'), 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan, - 'adminlink' => $adminlink, 'submitter' => $submitter, 'count' => $cpt)); + $cpt++; + $doc_dohtml = $doc_arr[$i]->getVar('doc_dohtml'); + $doc_dosmiley = $doc_arr[$i]->getVar('doc_dosmiley'); + $doc_doxcodes = $doc_arr[$i]->getVar('doc_doxcodes'); + $doc_doimages = $doc_arr[$i]->getVar('doc_doimages'); + $doc_dobreak = $doc_arr[$i]->getVar('doc_dobreak'); + $slogan_short = $myts->displayTarea($slogan_short, $doc_dohtml, $doc_dosmiley, $doc_doxcodes, $doc_doimages, $doc_dobreak); + $online = $doc_arr[$i]->getVar('doc_online'); + $did = $doc_arr[$i]->getVar('doc_id'); + $cid = $doc_arr[$i]->getVar('doc_cid'); + $title = $doc_arr[$i]->getVar('doc_title'); + $pdfdoc = "<a href='" . XPDF_URL . "/viewdoc.php?did=".$did."' title='"._MA_XPDF_IMG_VIEWPDF."' target='_blank'>"; + $pdfdoc .= "<img src='" . XPDF_URL . "/images/22/view_pdf.png' width='22px' height='22px' border='0' alt='".$title."'/></a>"; + $xoopsTpl->append('file', array('did' => $did, 'cid' => $cid, 'title' => $title, 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan_short, 'adminlink' => $adminlink, 'submitter' => $submitter, 'perm_view' => $perm_view, 'online' => $online, 'count' => $cpt, 'pdfdoc' => $pdfdoc)); //For keywords $keywords .= $doc_arr[$i]->getVar('title') . ','; } @@ -209,7 +234,7 @@ $xoopsTpl->assign('xpdf_url', XPDF_URL); if($GLOBALS['xoopsModuleConfig']['show_social']== 1){ -$social = $GLOBALS['xoopsModuleConfig']['code_social']; +$social = $GLOBALS['xoopsModuleConfig']['social_code']; $xoopsTpl->assign('social', $social); } include_once XOOPS_ROOT_PATH."/footer.php"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-05-01 17:21:37
|
Revision: 9419 http://xoops.svn.sourceforge.net/xoops/?rev=9419&view=rev Author: mageg Date: 2012-05-01 17:21:31 +0000 (Tue, 01 May 2012) Log Message: ----------- update pm module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/menu.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/menu.php 2012-05-01 14:06:30 UTC (rev 9418) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/menu.php 2012-05-01 17:21:31 UTC (rev 9419) @@ -20,20 +20,17 @@ * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; - $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _PM_MI_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; +$adminmenu[$i]['icon'] = '/home.png'; $i++; $adminmenu[$i]['title'] = _PM_MI_PRUNE; $adminmenu[$i]['link'] = "admin/prune.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . '/prune.png'; +$adminmenu[$i]['icon'] = '/prune.png'; $i++; $adminmenu[$i]['title'] = _PM_MI_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; -?> \ No newline at end of file +$adminmenu[$i]['icon'] = '/about.png'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-05-01 14:06:39
|
Revision: 9418 http://xoops.svn.sourceforge.net/xoops/?rev=9418&view=rev Author: txmodxoops Date: 2012-05-01 14:06:30 +0000 (Tue, 01 May 2012) Log Message: ----------- working version alpha 1 only for testing Updated categories.php Rss files Viewcat.php Modified Paths: -------------- XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php XoopsModules/xpdf/trunk/modules/xpdf/include/install.php XoopsModules/xpdf/trunk/modules/xpdf/index.php XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php XoopsModules/xpdf/trunk/modules/xpdf/xoops_version.php Added Paths: ----------- XoopsModules/xpdf/trunk/modules/xpdf/rss.php XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_rss.html Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -28,7 +28,7 @@ include "admin_header.php"; xoops_cp_header(); -global $pathImageIcon; +global $pathImageIcon, $xoopsModuleConfig; // We recovered the value of the argument op in the URL$ $op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); @@ -77,7 +77,7 @@ $class = ($class == "even") ? "odd" : "even"; echo "<td class='center'>".$i."</td>"; echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; - echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_arr[$i]->getVar("cat_image")."' height='30px' title='cat_image' alt='cat_image'></td>"; + echo "<td class='center'><img src='".XPDF_UPLOAD_CAT_URL."/".$cat_arr[$i]->getVar("cat_image")."' height='30px' title='cat_image' alt='cat_image'></td>"; echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; @@ -127,11 +127,10 @@ $obj->setVar("cat_pid", $_REQUEST["cat_pid"]); //Form cat_title $obj->setVar("cat_title", $_REQUEST["cat_title"]); - //Form cat_image + //Form cat_image include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/cat/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], - $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + $uploaddir = XPDF_UPLOAD_CAT_PATH."/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], 104857600, null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix("cat_image_") ; $uploader->fetchMedia($_POST['xoops_upload_file'][0]); Modified: XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -96,9 +96,9 @@ echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_published"),"S")."</td>"; if ( $doc_arr[$i]->getVar("doc_status") == 1 ) { - echo "<td class='center'><img src=".$pathImageIcon."/green_ball.png border='0' alt='"._AM_XPDF_DELETEPDF."' /></td>"; + echo "<td class='center'><img src='../images/16/green_ball.png' border='0' alt='"._AM_XPDF_DELETEPDF."' /></td>"; } else { - echo "<td class='center'><img src=".$pathImageIcon."/red_ball.png border='0' alt='"._AM_XPDF_CREATEPDF."' /></td>"; + echo "<td class='center'><img src='../images/16/red_ball.png' border='0' alt='"._AM_XPDF_CREATEPDF."' /></td>"; } echo "<td class='center'>".$doc_arr[$i]->getVar("doc_weight")."</td>"; Modified: XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -62,18 +62,18 @@ include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); $form = new XoopsThemeForm($title, "form_cat", $action, "post", true); $form->setExtra('enctype="multipart/form-data"'); - + // Title $form->addElement(new XoopsFormText(_AM_XPDF_CAT_TITLE, "cat_title", 50, 255, $this->getVar("cat_title")), true); // Subcategories include_once(XOOPS_ROOT_PATH."/class/tree.php"); $catHandler =& xoops_getModuleHandler("xpdf_cat", XPDF_DIRNAME); $criteria = new CriteriaCompo(); - $criteria->setSort('cat_id'); + $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); $cat_arr = $catHandler->getall(); $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_AM_XPDF_CAT_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),false))); - + $form->addElement(new XoopsFormLabel(_AM_XPDF_CAT_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),true))); + // Image $cat_image = $this->getVar("cat_image") ? $this->getVar("cat_image") : 'blank.gif'; $uploadirectory = '/uploads/xpdf/images/cat'; $imgtray = new XoopsFormElementTray(_AM_XPDF_CAT_IMAGE,'<br />'); @@ -91,7 +91,7 @@ $fileseltray->addElement(new XoopsFormLabel(''), false); $imgtray->addElement($fileseltray); $form->addElement($imgtray); - + // Description $editor_configs=array(); $editor_configs["name"] = "cat_description"; $editor_configs["value"] = $this->getVar("cat_description", "e"); @@ -101,7 +101,7 @@ $editor_configs["height"] = "400px"; $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["xpdf_editor"]; $form->addElement( new XoopsFormEditor(_AM_XPDF_CAT_DESCRIPTION, "cat_description", $editor_configs), false ); - + // Weight $form->addElement(new XoopsFormText(_AM_XPDF_CAT_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); $form->addElement(new XoopsFormHidden("op", "save_cat")); Modified: XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -50,7 +50,7 @@ $this->initVar("doc_submitter", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_published", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_hits", XOBJ_DTYPE_INT, null, false, 11); - $this->initVar("doc_weight", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("doc_weight", XOBJ_DTYPE_INT, 0, false, 11); $this->initVar("doc_status", XOBJ_DTYPE_INT, null, false, 1); $this->initVar("doc_online", XOBJ_DTYPE_INT, null, false, 1); $this->initVar("doc_dohtml", XOBJ_DTYPE_INT, null, false, 1); Modified: XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -222,4 +222,51 @@ $Path .= $first_category; return $Path; } + +function xpdf_PathTreeUrl($mytree, $key, $category_array, $title, $prefix = '', $link = false, $order = 'ASC', $lasturl = false) +{ + global $xoopsModule; + $category_parent = $mytree->getAllParent($key); + if ($order == 'ASC'){ + $category_parent = array_reverse($category_parent); + if ($link == true) { + $Path = '<a href="index.php">' . $xoopsModule->name() . '</a>' . $prefix; + }else{ + $Path = $xoopsModule->name() . $prefix; + } + }else{ + if (array_key_exists($key, $category_array)){ + $first_category = $category_array[$key]->getVar($title); + }else{ + $first_category = ''; + } + $Path = $first_category . $prefix; + } + foreach (array_keys($category_parent) as $j) { + if ($link == true) { + $Path .= '<a href="viewcat.php?cid=' . $category_parent[$j]->getVar('cat_cid') . '">' . $category_parent[$j]->getVar($title) . '</a>' . $prefix; + }else{ + $Path .= $category_parent[$j]->getVar($title) . $prefix; + } + } + if ($order == 'ASC'){ + if (array_key_exists($key, $category_array)){ + if ($lasturl == true){ + $first_category = '<a href="viewcat.php?cid=' . $category_array[$key]->getVar('cat_cid') . '">' . $category_array[$key]->getVar($title) . '</a>'; + }else{ + $first_category = $category_array[$key]->getVar($title); + } + }else{ + $first_category = ''; + } + $Path .= $first_category; + }else{ + if ($link == true) { + $Path .= '<a href="index.php">' . $xoopsModule->name() . '</a>'; + }else{ + $Path .= $xoopsModule->name(); + } + } + return $Path; +} ?> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/include/install.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/include/install.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/include/install.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -24,25 +24,15 @@ * * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ * **************************************************************************** - */ - + */ $indexFile = XOOPS_UPLOAD_PATH."/index.html"; $blankFile = XOOPS_UPLOAD_PATH."/blank.gif"; - //Creation of folder "uploads" for the module to the site root $module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/index.html"); - -//Creation of the file cat in uploads directory -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/cat"; -if(!is_dir($module_uploads)) - mkdir($module_uploads, 0777); - chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/cat/index.html"); - +copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/index.html"); //Creation of the folder cat_image in uploads directory for images $module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images"; if(!is_dir($module_uploads)) @@ -50,20 +40,23 @@ chmod($module_uploads, 0777); copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/index.html"); copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/blank.gif"); - +//Creation of the file cat in uploads directory +$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images/cat"; +if(!is_dir($module_uploads)) + mkdir($module_uploads, 0777); + chmod($module_uploads, 0777); +copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/cat/index.html"); +copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/cat/blank.gif"); //Creation of the file doc in uploads directory -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/doc"; +$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images/doc"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/doc/index.html"); - +copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/doc/index.html"); +copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/doc/blank.gif"); //Creation of the folder doc_image in uploads directory for images -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images"; +$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/files"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/index.html"); -copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/blank.gif"); - -?> \ No newline at end of file +copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/files/index.html"); \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/index.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/index.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/index.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -31,13 +31,14 @@ $xoTheme->addStylesheet( $style, null ); $xoTheme->addScript( $script, null ); +//$cid = xpdf_CleanVars($_REQUEST, 'cat_id', 0, 'int'); // For permissions $categories = xpdf_MygetItemIds('xpdf_view', XPDF_DIRNAME); // Documents table $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); -//$criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); +$criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); $docArray = $docHandler->getall($criteria); $docCount = $docHandler->getCount($criteria); $xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_INDEX_THEREARE, $docCount)); @@ -46,7 +47,7 @@ $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); -$criteria->add(new Criteria('cat_id', '(' . implode(',', $categories) . ')','IN')); +$criteria->add(new Criteria('cat_id', $_REQUEST['cat_id'])); $catArray = $catHandler->getall($criteria); $totalcategories = $catHandler->getCount($criteria); $mytree = new XoopsObjectTree($catArray, 'cat_id', 'cat_pid'); @@ -96,7 +97,7 @@ } $criteria = new CriteriaCompo(); $criteria->add(new Criteria('doc_status', 0, '!=')); - //$criteria->add(new Criteria('doc_cid', '(' . implode(',', $categories) . ')','IN')); + $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); $criteria->setLimit($GLOBALS['xoopsModuleConfig']['newdocuments']); $criteria->setSort('doc_published DESC, doc_title'); $criteria->setOrder('DESC'); @@ -120,7 +121,7 @@ $new = xpdf_NewOrUpdate($docArray[$i]->getVar('doc_published'), $docArray[$i]->getVar('doc_status')); $pop = xpdf_Popular($docArray[$i]->getVar('doc_hits')); - // Set if the person is an admin. + // Set if the user is an admin. if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&doc_id=' . $docArray[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; } else { @@ -136,7 +137,7 @@ $did = $docArray[$i]->getVar('doc_id'); $cid = $docArray[$i]->getVar('doc_cid'); $title = $docArray[$i]->getVar('doc_title'); - $pdfdoc = "<a href='" . XPDF_URL . "/viewdoc.php?cid=".$cid."&did=".$did."' title='"._MA_XPDF_VIEWPDF."' target='_blank'>"; + $pdfdoc = "<a href='" . XPDF_URL . "/viewdoc.php?did=".$did."' title='"._MA_XPDF_IMG_VIEWPDF."' target='_blank'>"; $pdfdoc .= "<img src='" . XPDF_URL . "/images/22/view_pdf.png' width='22px' height='22px' border='0' alt='".$title."'/></a>"; // Render Display $xoopsTpl->append('file', array('did' => $did, 'cid' => $cid, 'title' => $title, 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan_short, 'adminlink' => $adminlink, 'submitter' => $submitter, 'online' => $online, 'count' => $count, 'pdfdoc' => $pdfdoc)); Added: XoopsModules/xpdf/trunk/modules/xpdf/rss.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/rss.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/rss.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -0,0 +1,102 @@ +<?php +/** + * **************************************************************************** + * - A project for the Xoops CMS - (http://www.xoops.org) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once dirname(__FILE__) . '/header.php'; +$cid = isset($_GET['doc_cid']) ? intval($_GET['doc_cid']) : 0; +include_once XOOPS_ROOT_PATH.'/class/template.php'; +$items_count = $GLOBALS['xoopsModuleConfig']['rssperpage']; + +if (function_exists('mb_http_output')) { + mb_http_output('pass'); +} +//header ('Content-Type:text/xml; charset=UTF-8'); +$GLOBALS['xoopsModuleConfig']["utf8"] = false; + +$tpl = new XoopsTpl(); +$tpl->xoops_setCaching(2); //1 = Cache global, 2 = Cache individual (for template) +$tpl->xoops_setCacheTime($GLOBALS['xoopsModuleConfig']['timecacherss']*60); // Time of cache on seconds +$cats = xpdf_MygetItemIds('xpdf_view', XPDF_DIRNAME); +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('doc_status', 0, '!=')); +$criteria->add(new Criteria('doc_cid', '(' . implode(',', $cats) . ')','IN')); +if ($cid != 0){ + $criteria->add(new Criteria('doc_cid', $cid)); + $cat = $docscat_Handler->get($cid); + $title = $GLOBALS['xoopsConfig']['sitename'] . ' - ' . $GLOBALS['xoopsModule']->getVar('name') . ' - ' . $cat->getVar('cat_title'); +}else{ + $title = $GLOBALS['xoopsConfig']['sitename'] . ' - ' . $GLOBALS['xoopsModule']->getVar('name'); +} +$docHandler =& xoops_getModuleHandler("xpdf_doc", XPDF_DIRNAME); +$criteria->setLimit($GLOBALS['xoopsModuleConfig']['rssperpage']); +$criteria->setSort('doc_published'); +$criteria->setOrder('DESC'); +$docs_arr = $docHandler->getall($criteria); + +if (!$tpl->is_cached('db:xpdf_rss.html', $cid)) { + $tpl->assign('channel_title', htmlspecialchars($title, ENT_QUOTES)); + $tpl->assign('channel_link', XOOPS_URL.'/'); + $tpl->assign('channel_desc', htmlspecialchars($GLOBALS['xoopsConfig']['slogan'], ENT_QUOTES)); + $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); + $tpl->assign('channel_webmaster', $GLOBALS['xoopsConfig']['adminmail']); + $tpl->assign('channel_editor', $GLOBALS['xoopsConfig']['adminmail']); + $tpl->assign('channel_category', 'Event'); + $tpl->assign('channel_generator', 'XOOPS - ' . htmlspecialchars($GLOBALS['xoopsModule']->getVar('name'), ENT_QUOTES)); + $tpl->assign('channel_language', _LANGCODE); + if ( _LANGCODE == 'fr' ) { + $tpl->assign('docs', 'http://www.scriptol.fr/rss/RSS-2.0.html'); + } else { + $tpl->assign('docs', 'http://cyber.law.harvard.edu/rss/rss.html'); + } + $tpl->assign('image_url', XOOPS_URL . $GLOBALS['xoopsModuleConfig']['logorss']); + $dimention = getimagesize(XOOPS_ROOT_PATH . $GLOBALS['xoopsModuleConfig']['logorss']); + if (empty($dimention[0])) { + $width = 88; + } else { + $width = ($dimention[0] > 144) ? 144 : $dimention[0]; + } + if (empty($dimention[1])) { + $height = 31; + } else { + $height = ($dimention[1] > 400) ? 400 : $dimention[1]; + } + $tpl->assign('image_width', $width); + $tpl->assign('image_height', $height); + foreach (array_keys($docs_arr) as $i) { + $slogan = $docs_arr[$i]->getVar('doc_slogan'); + // To view only the short description + if (strpos($slogan,'[pagebreak]') == false){ + $slogan_short = $slogan; + }else{ + $slogan_short = substr($slogan,0,strpos($slogan,'[pagebreak]')); + } + $tpl->append('items', array('title' => htmlspecialchars($docs_arr[$i]->getVar('doc_title'), ENT_QUOTES), + 'link' => XOOPS_URL . '/modules/xpdf/singledoc.php?cid=' . $docs_arr[$i]->getVar('doc_cid') . '&did=' . $docs_arr[$i]->getVar('doc_id'), + 'guid' => XOOPS_URL . '/modules/xpdf/singledoc.php?cid=' . $docs_arr[$i]->getVar('doc_cid') . '&did=' . $docs_arr[$i]->getVar('doc_id'), + 'pubdate' => formatTimestamp($docs_arr[$i]->getVar('doc_published'), 'rss'), + 'description' => htmlspecialchars($slogan_short, ENT_QUOTES))); + } +} +header("Content-Type:text/xml; charset=" . _CHARSET); +$tpl->display('db:xpdf_rss.html', $cid); +?> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html 2012-05-01 14:06:30 UTC (rev 9418) @@ -23,11 +23,14 @@ <span class="x-itemPermaLink"><{$doc.slogan}> </span> </div> </div> - <div class="xpdf-itemViewImg"> - <a href="<{$xpdf_url}>/viewdoc.php?did=<{$doc.did}>" title="<{$smarty.const._MA_XPDF_IMG_VIEWPDF}>" rel="directory"><img src="<{$xpdf_url}>/images/22/view_pdf.png" border="0" alt="<{$smarty.const._MA_XPDF_IMG_VIEWPDF}>" /></a> + <div class=""> + </div> <div class="clear"></div> <div class="xpdf-itemBottom"><span><{$doc.adminlink}></span> - <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITTER}></span>:<span class="itemPoster"><{$doc.submitter}></span> - <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITDATE}></span>:<span class="itemPostDate"><{$doc.updated}></span></div> + <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITTER}></span>:<span class="itemPoster"><{$doc.submitter}></span> - <span class="bold"><{$smarty.const._MA_XPDF_INDEX_SUBMITDATE}></span>:<span class="itemPostDate"><{$doc.updated}></span> + <span class="floatright"><{$doc.pdfdoc}></span> + <div class="clear"></div> + </div> </div> <{/if}> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html 2012-05-01 14:06:30 UTC (rev 9418) @@ -1,6 +1,6 @@ -<div class="box-header"> +<div class="xpdf-header"> <span class="left"><b>Title</b>: <{$smarty.const._MA_XPDF_TITLE}></span><br /> - <span class="left">Description: <{$smarty.const._MA_XPDF_DESC}></span> + <span class="left"><b>Description</b>: <{$smarty.const._MA_XPDF_DESC}></span> </div> <br /> <{if $adv != ''}> Modified: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html 2012-05-01 14:06:30 UTC (rev 9418) @@ -36,7 +36,7 @@ <!-- End Show categories information --> <!-- RSS logo --> <div class="xpdf-rss right"> - <a title="<{$smarty.const._MA_XPDF_RSS}>" href="<{$xpdf_url}>/rss.php?cid=<{$cid}>"><img src="<{$xpdf_url}>/images/rss.gif" alt="<{$smarty.const._MA_XPDF_RSS}>" /></a> + <a title="<{$smarty.const._MA_XPDF_RSS}>" href="<{$xpdf_url}>/rss.php?cid=0" rel="external"><img src="<{$xpdf_url}>/images/rss.gif" alt="<{$smarty.const._MA_XPDF_RSS}>" /></a> </div> <!-- End Summary informations --> <div class="xpdf-thereare"><{$lang_thereare}></div> Added: XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_rss.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_rss.html (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_rss.html 2012-05-01 14:06:30 UTC (rev 9418) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="<{$smarty.const._CHARSET}>"?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title><{$channel_title}></title> + <link><{$channel_link}></link> + <description><{$channel_desc}></description> + <lastBuildDate><{$channel_lastbuild}></lastBuildDate> + <docs><{$docs}></docs> + <generator><{$channel_generator}></generator> + <category><{$channel_category}></category> + <managingEditor><{$channel_editor}></managingEditor> + <webMaster><{$channel_webmaster}></webMaster> + <language><{$channel_language}></language> + <atom:link href="<{$xoops_url}><{$smarty.server.REQUEST_URI}>" rel="self" type="application/rss+xml" /> + <{if $image_url != ""}> + <image> + <title><{$channel_title}></title> + <url><{$image_url}></url> + <link><{$channel_link}></link> + <width><{$image_width}></width> + <height><{$image_height}></height> + </image> + <{/if}> + <{foreach item=item from=$items}> + <item> + <title><{$item.title}></title> + <link><{$item.link}></link> + <description><{$item.description}></description> + <pubDate><{$item.pubdate}></pubDate> + <guid><{$item.guid}></guid> + </item> + <{/foreach}> + </channel> +</rss> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -1,126 +1,216 @@ <?php /** + * **************************************************************************** + * - A project for the Xoops CMS - (http://www.xoops.org) * **************************************************************************** - * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) - * **************************************************************************** - * XPDF - MODULE FOR XOOPS - * Copyright (c) 2007 - 2012 - * TXMod Xoops ( http://www.txmodxoops.org ) + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) * - * 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. + * 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. * - * 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. - * --------------------------------------------------------------------------- - * @copyright TXMod Xoops ( http://www.txmodxoops.org ) - * @license GNU GPL see License - * @package xpdf - * @author TXMod Xoops ( su...@tx... ) + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) * - * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ * **************************************************************************** */ +include_once dirname(__FILE__) . '/header.php'; +global $xoopsModuleConfig; -include_once "header.php"; -$xoopsOption['template_main'] = 'xpdf_cat.html'; +$catHandler =& xoops_getModuleHandler('xpdf_cat', XPDF_DIRNAME); +$docHandler =& xoops_getModuleHandler('xpdf_doc', XPDF_DIRNAME); +$xoopsOption['template_main'] = 'xpdf_viewcat.html'; include_once XOOPS_ROOT_PATH."/header.php"; -$xoTheme->addStylesheet($style); -$xoTheme->addScript($script); -$xoopsTpl->assign('xpdf_url', XPDF_URL); -$op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); +$xoTheme->addStylesheet( $style, null ); +$xoTheme->addScript( $js, null ); -switch ($op) -{ - case "save_cat": - if ( !$GLOBALS["xoopsSecurity"]->check() ) { - redirect_header("cat.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); +$cid = xpdf_CleanVars($_REQUEST, 'cid', 0, 'int'); +// For permissions +$categories = xpdf_MygetItemIds('xpdf_view', XPDF_DIRNAME); + +// Redirection if the category does not exist +$criteria = new CriteriaCompo(new Criteria('cat_id', intval($cid))); +/*if ($catHandler->getCount($criteria) == 0 || $cid == 0){ + redirect_header('index.php', 3, _MA_XPDF_CAT_NOTEXISTENT); + exit(); +} +// For permissions (if not in law, redirection) +if(!in_array(intval($cid), $categories)) { + redirect_header('index.php', 2, _NOPERM); + exit(); +}*/ + +// Category Table +$criteria = new CriteriaCompo(); +$criteria->setSort('cat_weight ASC, cat_title'); +$criteria->setOrder('ASC'); +$criteria->add(new Criteria('cat_id', $_REQUEST['cat_id'])); +$cat_arr = $catHandler->getall($criteria); +$mytree = new XoopsObjectTree($cat_arr, 'cat_id', 'cat_pid'); + +// Doocument table +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('doc_status', 0, '!=')); +$criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); +$doc_arr = $docHandler->getall($criteria); +$xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_INDEX_THEREARE, count($doc_arr))); + +// Navigation +$nav_category = xpdf_PathTreeUrl($mytree, $cid, $cat_arr, 'cat_title', $prefix = ' <img src="images/icons/arrow.gif" alt="arrow" /> ', true, 'ASC'); +$xoopsTpl->assign('category_path', $nav_category); + +// Info category +$xoopsTpl->assign('cid', $cid); +$cat_info = $catHandler->get($cid); +$xoopsTpl->assign('cat_description', $cat_info->getVar('cat_description')); + +// Category View +$xoopsTpl->assign('nb_colcat', $GLOBALS['xoopsModuleConfig']['nb_colcat']); +$count = 1; +$keywords = ''; +foreach (array_keys($cat_arr) as $i) { + if ($cat_arr[$i]->getVar('cat_pid') == $cid) + { + $cat_id = $cat_arr[$i]->getVar('cat_id'); + $totaldocuments = xpdf_NumbersOfEntries($mytree, $categories, $doc_arr, $cat_id); + $subcategories_arr = $mytree->getFirstChild($cat_id); + $chcount = 0; + $subcategories = ''; + // For keywords + $keywords .= $cat_arr[$i]->getVar('cat_title') . ','; + foreach (array_keys($subcategories_arr) as $j) { + if ($chcount >= $GLOBALS['xoopsModuleConfig']['nb_subcat']) { + $subcategories .= '<li>[<a href="'. XPDF_URL .'/viewcat.php?cid=' . $cat_id . '">+</a>]</li>'; + break; + } + $subcategories .= '<li><a href="'. XPDF_URL .'/viewcat.php?cid=' . $subcategories_arr[$j]->getVar('cat_id') . '">' . $subcategories_arr[$j]->getVar('cat_title') . '</a></li>'; + $keywords .= $cat_arr[$i]->getVar('cat_title') . ','; + $chcount++; } - if (isset($_REQUEST["cat_id"])) { - $obj =& $catHandler->get($_REQUEST["cat_id"]); - } else { - $obj =& $catHandler->create(); + $xoopsTpl->append('subcategories', array('image' => $cat_arr[$i]->getVar('cat_image'), 'cid' => $cat_id, 'title' => $cat_arr[$i]->getVar('cat_title'), 'description' => $cat_arr[$i]->getVar('cat_description'), 'infercategories' => $subcategories, 'totaldocuments' => $totaldocuments, 'count' => $count)); + $count++; + } +} + +// display des t\xE9l\xE9chargements +if ($GLOBALS['xoopsModuleConfig']['userperpage'] > 0){ + $xoopsTpl->assign('nb_coldoc', $GLOBALS['xoopsModuleConfig']['nb_coldoc']); + //Utilisation d'une copie d'\xE9cran avec la largeur selon les pr\xE9f\xE9rences + if ($GLOBALS['xoopsModuleConfig']['usedocshots'] == 1) { + $xoopsTpl->assign('shotwidth', $GLOBALS['xoopsModuleConfig']['shotwidth']); + $xoopsTpl->assign('show_screenshot', true); + $xoopsTpl->assign('img_float' , $GLOBALS['xoopsModuleConfig']['img_float']); + } + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('doc_status', 0, '!=')); + $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); + $criteria->add(new Criteria('doc_cid', intval($_REQUEST['cid']))); + $numrows = $docHandler->getCount($criteria); + $xoopsTpl->assign('lang_thereare', sprintf(_MA_XPDF_CAT_THEREARE, $numrows)); + + // Pour un display sur plusieurs pages + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['userperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['userperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + //$url = XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['baseurl'].'/start'.$start.'/cat,'.$cid.$GLOBALS['xoopsModuleConfig']['endofurl']; + } else { + $criteria->setStart(0); + $start = 0; + //$url = XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['baseurl'].'/cat,'.$cid.$GLOBALS['xoopsModuleConfig']['endofurl']; + } + if (isset($_REQUEST['sort'])) { + $criteria->setSort($_REQUEST['sort']); + $sort = $_REQUEST['sort']; + }else{ + $criteria->setSort('doc_published'); + $sort = 'date'; + } + if (isset($_REQUEST['order'])) { + $criteria->setOrder($_REQUEST['order']); + $order = $_REQUEST['order']; + }else{ + $criteria->setOrder('DESC'); + $order = 'DESC'; + } + //$url = XOOPS_URL.'/'.$GLOBALS['xoopsModuleConfig']['baseurl'].'/cat,'.$cid.'/start,'.$start.$GLOBALS['xoopsModuleConfig']['endofurl']; + $doc_arr = $docHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . "/class/pagenav.php"; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'limit=' . $limit . '&cid=' . intval($cid) . '&sort=' . $sort . '&order=' . $order); + $pagenav = $pagenav->renderNav(4); + + } else { + $pagenav = ''; + // + } + $xoopsTpl->assign('pagenav', $pagenav); + + $summary = ''; + $cpt = 0; + $categories = xpdf_MygetItemIds('xpdf_download', XPDF_DIRNAME); + $item = xpdf_MygetItemIds('xpdf_download_item', XPDF_DIRNAME); + foreach (array_keys($doc_arr) as $i) { + if ($doc_arr[$i]->getVar('doc_image') == 'blank.gif'){ + $doc_image = ''; + }else{ + $doc_image = XPDF_UPLOAD_DOC_PATH ."/". $doc_arr[$i]->getVar('doc_image'); } - - //Form cat_pid - $obj->setVar("cat_pid", $_REQUEST["cat_pid"]); - //Form cat_title - $obj->setVar("cat_title", $_REQUEST["cat_title"]); - //Form cat_image - include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], - $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - $uploader->setPrefix("cat_image_") ; - $uploader->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader->upload()) { - $errors = $uploader->getErrors(); - redirect_header("javascript:history.go(-1)",3, $errors); - } else { - $obj->setVar("cat_image", $uploader->getSavedFileName()); - } - } else { - $obj->setVar("cat_image", $_REQUEST["cat_image"]); - } - //Form cat_description - $obj->setVar("cat_description", $_REQUEST["cat_description"]); - //Form cat_weight - $obj->setVar("cat_weight", $_REQUEST["cat_weight"]); - //Form cat_submitter - $obj->setVar("cat_submitter", $_REQUEST["cat_submitter"]); - //Form cat_created - $obj->setVar("cat_created", xpdf_convertDate($_REQUEST["cat_created"])); - //Form cat_online - $verif_cat_online = ($_REQUEST["cat_online"] == 1) ? "1" : "0"; - $obj->setVar("cat_online", $verif_cat_online); - - - if ($catHandler->insert($obj)) { - redirect_header("cat.php?op=list", 2, _MA_XPDF_FORMOK); + $datetime = formatTimestamp($doc_arr[$i]->getVar('doc_published'),'s'); + $submitter = XoopsUser::getUnameFromId($doc_arr[$i]->getVar('doc_submitter')); + $description = $doc_arr[$i]->getVar('doc_slogan'); + //to view only the short description + if (strpos($description,'[pagebreak]')==false){ + $slogan = $description; + }else{ + $slogan = substr($description,0,strpos($description,'[pagebreak]')); } + // pour les vignettes "new" et "mis \xE0 jour" + $new = xpdf_NewOrUpdate($doc_arr[$i]->getVar('doc_published'), $doc_arr[$i]->getVar('doc_status')); + $pop = xpdf_Popular($doc_arr[$i]->getVar('doc_hits')); - echo $obj->getHtmlErrors(); - $form =& $obj->getForm(); - break; - - case "list": - default: - $criteria = new CriteriaCompo(); - $criteria->setSort("cat_id ASC, cat_pid"); - $criteria->setOrder("ASC"); - $numrows = $catHandler->getCount(); - $cat_arr = $catHandler->getall($criteria); - - // Table View - if ($numrows>0) - { - echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> - <tr> - <th class='center'>"._MA_XPDF_CAT_PID."</th> - <th class='center'>"._MA_XPDF_CAT_TITLE."</th> - <th class='center'>"._MA_XPDF_CAT_IMAGE."</th> - <th class='center'>"._MA_XPDF_CAT_DESCRIPTION."</th> - <th class='center'>"._MA_XPDF_CAT_WEIGHT."</th> - <th class='center'>"._MA_XPDF_CAT_SUBMITTER."</th> - <th class='center'>"._MA_XPDF_CAT_CREATED."</th> - <th class='center'>"._MA_XPDF_CAT_ONLINE."</th> - - </tr>"; - - $class = "odd"; - echo "</table><br /><br />"; - } - break; + // Set if the user is an admin. + if (is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->mid())) { + $adminlink = '<a href="' . XPDF_URL . '/admin/documents.php?op=edit_doc&did=' . $doc_arr[$i]->getVar('doc_id') . '" title="' . _EDIT . '"><img src="images/editicon.png" border="0" alt="' . _EDIT . '" /></a>'; + } else { + $adminlink = ''; + } + // utilisation du sommaire + $cpt++; + $xoopsTpl->append('file', array('id' => $doc_arr[$i]->getVar('doc_id'),'cid' => $doc_arr[$i]->getVar('doc_cid'), 'title' => $doc_arr[$i]->getVar('doc_title'), 'new' => $new, 'pop' => $pop, 'image' => $doc_image, 'updated' => $datetime, 'slogan' => $slogan, + 'adminlink' => $adminlink, 'submitter' => $submitter, 'count' => $cpt)); + //For keywords + $keywords .= $doc_arr[$i]->getVar('title') . ','; + } } -if($xoopsModuleConfig['social_active']== 1) { - $xoopsTpl->assign('social_active', $xoopsModuleConfig['social_active']); - $xoopsTpl->assign('social_code', $xoopsModuleConfig['social_code']); -} -include_once XOOPS_ROOT_PATH."/footer.php"; +$pagetitle = xpdf_PathTreeUrl($mytree, $cid, $cat_arr, 'cat_title', $prefix = ' - ', false, 'DESC'); +$xoopsTpl->assign('xoops_pagetitle', $pagetitle); +//description +$xoTheme->addMeta( 'meta', 'description', strip_tags($cat_arr[$cid]->getVar('cat_description'))); +//keywords +$keywords = substr($keywords,0,-1); +$xoTheme->addMeta( 'meta', 'keywords', $keywords); + +$xoopsTpl->assign('xpdf_url', XPDF_URL); + +if($GLOBALS['xoopsModuleConfig']['show_social']== 1){ +$social = $GLOBALS['xoopsModuleConfig']['code_social']; +$xoopsTpl->assign('social', $social); } + +include_once XOOPS_ROOT_PATH."/footer.php"; ?> \ No newline at end of file Modified: XoopsModules/xpdf/trunk/modules/xpdf/xoops_version.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/xoops_version.php 2012-04-30 19:51:13 UTC (rev 9417) +++ XoopsModules/xpdf/trunk/modules/xpdf/xoops_version.php 2012-05-01 14:06:30 UTC (rev 9418) @@ -97,6 +97,9 @@ $modversion['templates'][$i]['file'] = "xpdf_doclist.html"; $modversion['templates'][$i]['description'] = "Xpdf doclist page"; $i++; +$modversion['templates'][$i]['file'] = "xpdf_rss.html"; +$modversion['templates'][$i]['description'] = "Xpdf rss page"; +$i++; $modversion['templates'][$i]['file'] = "xpdf_viewcat.html"; $modversion['templates'][$i]['description'] = "Xpdf cat page"; $i++; @@ -131,7 +134,7 @@ $modversion['config'][$i]['description'] = "_MI_XPDF_MAXSIZE_DESC"; $modversion['config'][$i]['formtype'] = "textbox"; $modversion['config'][$i]['valuetype'] = "int"; -$modversion['config'][$i]['default'] = "10485760"; +$modversion['config'][$i]['default'] = "104857600"; $i++; //Uploads : mimetypes cat_image $modversion['config'][$i]['name'] = "mimetypes"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 19:51:23
|
Revision: 9417 http://xoops.svn.sourceforge.net/xoops/?rev=9417&view=rev Author: txmodxoops Date: 2012-04-30 19:51:13 +0000 (Mon, 30 Apr 2012) Log Message: ----------- working version alpha 1 only for testing Added Paths: ----------- XoopsModules/xpdf/trunk/modules/xpdf/ XoopsModules/xpdf/trunk/modules/xpdf/admin/ XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php XoopsModules/xpdf/trunk/modules/xpdf/admin/index.html XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php XoopsModules/xpdf/trunk/modules/xpdf/blocks/ XoopsModules/xpdf/trunk/modules/xpdf/blocks/blocks_doc.php XoopsModules/xpdf/trunk/modules/xpdf/blocks/index.html XoopsModules/xpdf/trunk/modules/xpdf/class/ XoopsModules/xpdf/trunk/modules/xpdf/class/index.html XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/trunk/modules/xpdf/css/ XoopsModules/xpdf/trunk/modules/xpdf/css/index.html XoopsModules/xpdf/trunk/modules/xpdf/css/style.css XoopsModules/xpdf/trunk/modules/xpdf/docs/ XoopsModules/xpdf/trunk/modules/xpdf/docs/changelog.txt XoopsModules/xpdf/trunk/modules/xpdf/docs/credits.txt XoopsModules/xpdf/trunk/modules/xpdf/docs/index.html XoopsModules/xpdf/trunk/modules/xpdf/docs/install.txt XoopsModules/xpdf/trunk/modules/xpdf/docs/lang_diff.txt XoopsModules/xpdf/trunk/modules/xpdf/docs/licence.txt XoopsModules/xpdf/trunk/modules/xpdf/docs/readme.txt XoopsModules/xpdf/trunk/modules/xpdf/header.php XoopsModules/xpdf/trunk/modules/xpdf/images/ XoopsModules/xpdf/trunk/modules/xpdf/images/16/ XoopsModules/xpdf/trunk/modules/xpdf/images/16/display.png XoopsModules/xpdf/trunk/modules/xpdf/images/16/green_ball.png XoopsModules/xpdf/trunk/modules/xpdf/images/16/grey_ball.png XoopsModules/xpdf/trunk/modules/xpdf/images/16/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/16/orange_ball.png XoopsModules/xpdf/trunk/modules/xpdf/images/16/red_ball.png XoopsModules/xpdf/trunk/modules/xpdf/images/22/ XoopsModules/xpdf/trunk/modules/xpdf/images/22/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/22/view_pdf.png XoopsModules/xpdf/trunk/modules/xpdf/images/32/ XoopsModules/xpdf/trunk/modules/xpdf/images/32/dashboard.png XoopsModules/xpdf/trunk/modules/xpdf/images/32/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/32/pdf_category.png XoopsModules/xpdf/trunk/modules/xpdf/images/32/pdf_document.png XoopsModules/xpdf/trunk/modules/xpdf/images/48/ XoopsModules/xpdf/trunk/modules/xpdf/images/48/down_pdf.png XoopsModules/xpdf/trunk/modules/xpdf/images/48/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/blank.gif XoopsModules/xpdf/trunk/modules/xpdf/images/bookmarks/ XoopsModules/xpdf/trunk/modules/xpdf/images/bookmarks/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/editicon.png XoopsModules/xpdf/trunk/modules/xpdf/images/icons/ XoopsModules/xpdf/trunk/modules/xpdf/images/icons/arrow.gif XoopsModules/xpdf/trunk/modules/xpdf/images/icons/bg.png XoopsModules/xpdf/trunk/modules/xpdf/images/icons/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/icons/off.png XoopsModules/xpdf/trunk/modules/xpdf/images/icons/on.png XoopsModules/xpdf/trunk/modules/xpdf/images/icons/rss.gif XoopsModules/xpdf/trunk/modules/xpdf/images/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/menu/ XoopsModules/xpdf/trunk/modules/xpdf/images/menu/bg.png XoopsModules/xpdf/trunk/modules/xpdf/images/menu/index.html XoopsModules/xpdf/trunk/modules/xpdf/images/menu/left_both.png XoopsModules/xpdf/trunk/modules/xpdf/images/menu/right_both.png XoopsModules/xpdf/trunk/modules/xpdf/images/rss.gif XoopsModules/xpdf/trunk/modules/xpdf/images/txmodxoops_logo.png XoopsModules/xpdf/trunk/modules/xpdf/images/xpdf_slogo.png XoopsModules/xpdf/trunk/modules/xpdf/include/ XoopsModules/xpdf/trunk/modules/xpdf/include/config.php XoopsModules/xpdf/trunk/modules/xpdf/include/functions.php XoopsModules/xpdf/trunk/modules/xpdf/include/index.html XoopsModules/xpdf/trunk/modules/xpdf/include/install.php XoopsModules/xpdf/trunk/modules/xpdf/include/search.inc.php XoopsModules/xpdf/trunk/modules/xpdf/index.php XoopsModules/xpdf/trunk/modules/xpdf/js/ XoopsModules/xpdf/trunk/modules/xpdf/js/index.html XoopsModules/xpdf/trunk/modules/xpdf/js/script.js XoopsModules/xpdf/trunk/modules/xpdf/language/ XoopsModules/xpdf/trunk/modules/xpdf/language/english/ XoopsModules/xpdf/trunk/modules/xpdf/language/english/admin.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/blank.gif XoopsModules/xpdf/trunk/modules/xpdf/language/english/blocks.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/help/ XoopsModules/xpdf/trunk/modules/xpdf/language/english/help/help.html XoopsModules/xpdf/trunk/modules/xpdf/language/english/help/index.html XoopsModules/xpdf/trunk/modules/xpdf/language/english/index.html XoopsModules/xpdf/trunk/modules/xpdf/language/english/main.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/modinfo.php XoopsModules/xpdf/trunk/modules/xpdf/language/english/new.png XoopsModules/xpdf/trunk/modules/xpdf/language/english/popular.png XoopsModules/xpdf/trunk/modules/xpdf/language/english/updated.png XoopsModules/xpdf/trunk/modules/xpdf/language/index.html XoopsModules/xpdf/trunk/modules/xpdf/sql/ XoopsModules/xpdf/trunk/modules/xpdf/sql/index.html XoopsModules/xpdf/trunk/modules/xpdf/sql/mysql.sql XoopsModules/xpdf/trunk/modules/xpdf/templates/ XoopsModules/xpdf/trunk/modules/xpdf/templates/admin/ XoopsModules/xpdf/trunk/modules/xpdf/templates/admin/index.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/ XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/index.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_cat_block_day.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_cat_block_random.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_cat_block_recent.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_doc_block_day.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_doc_block_random.html XoopsModules/xpdf/trunk/modules/xpdf/templates/blocks/xpdf_doc_block_recent.html XoopsModules/xpdf/trunk/modules/xpdf/templates/index.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_doclist.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_footer.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_header.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_index.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/trunk/modules/xpdf/templates/xpdf_viewdoc.html XoopsModules/xpdf/trunk/modules/xpdf/viewcat.php XoopsModules/xpdf/trunk/modules/xpdf/viewdoc.php XoopsModules/xpdf/trunk/modules/xpdf/xoops_version.php Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/about.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,34 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +include "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 Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_footer.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,35 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +global $pathImageAdmin; +echo "<div align='center'><a href='http://www.xoops.org' target='_blank'> + <img src='".$pathImageAdmin."/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a></div>"; +echo "<div class='center small italic pad5'> + <strong>" . $xoopsModule->getVar('name') . "</strong> "._AM_XPDF_MAINTAINEDBY." + <a href='http://www.txmodxoops.org/modules/newbb' title='Visit TXMod Xoops Community' class='tooltip' rel='external'>TXMod Xoops Community</a></div>"; +xoops_cp_footer(); Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/admin_header.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,88 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php'; +include_once XOOPS_ROOT_PATH . '/include/cp_functions.php'; +include_once XOOPS_ROOT_PATH . '/class/tree.php'; +include_once '../include/config.php'; +include_once '../include/functions.php'; + +$pathDir = $GLOBALS['xoops']->path('/Frameworks/moduleclasses/moduleadmin'); +$globlang = $GLOBALS['xoopsConfig']['language']; + +if ( file_exists($pathDir.'/language/'.$globlang.'/main.php')){ + include_once $pathDir.'/language/'.$globlang.'/main.php'; +} else { + include_once $pathDir.'/language/english/main.php'; +} + +if ( file_exists($pathDir.'/moduleadmin.php')){ + include_once $pathDir.'/moduleadmin.php'; + //return true; +}else{ + xoops_cp_header(); + echo xoops_error(_AM_XPDF_NOFRAMEWORKS); + xoops_cp_footer(); + //return false; +} + +$dirname = basename(dirname(dirname( __FILE__ ) )); +$module_handler =& xoops_gethandler('module'); +$xoopsModule = & $module_handler->getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid')); +$pathImageIcon = XOOPS_URL .'/'. $moduleInfo->getInfo('icons16'); +$pathImageAdmin = XOOPS_URL .'/'. $moduleInfo->getInfo('icons32'); + +$catHandler=& xoops_getModuleHandler('xpdf_cat', $dirname); +$docHandler=& xoops_getModuleHandler('xpdf_doc', $dirname); +$myts =& MyTextSanitizer::getInstance(); + +if ($xoopsUser) { + $moduleperm_handler =& xoops_gethandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $xoopsModule->getVar( 'mid' ), $xoopsUser->getGroups())) { + redirect_header(XOOPS_URL, 1, _NOPERM); + exit(); + } +} else { + redirect_header(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); +} + +if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { + include_once(XOOPS_ROOT_PATH."/class/template.php"); + $xoopsTpl = new XoopsTpl(); +} + +$xoopsTpl->assign('pathImageIcon', $pathImageIcon); +$xoopsTpl->assign('pathImageAdmin', $pathImageAdmin); +//xoops_cp_header(); + +//Load languages +xoops_loadLanguage('admin', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('modinfo', $xoopsModule->getVar("dirname")); +xoops_loadLanguage('main', $xoopsModule->getVar("dirname")); Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/categories.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,188 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; +// We recovered the value of the argument op in the URL$ +$op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); + +$catAdmin = new ModuleAdmin(); +switch ($op) +{ + case "list": + default: + echo $catAdmin->addNavigation('categories.php'); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + echo $catAdmin->renderButton(); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + $criteria = new CriteriaCompo(); + $criteria->setSort("cat_weight ASC, cat_title"); + $criteria->setOrder("ASC"); + $numrows = $catHandler->getCount(); + $start = xpdf_CleanVars ( $_REQUEST, 'start', 0, 'int' ); + $criteria->setStart($start); + $criteria->setLimit($limit); + $cat_arr = $catHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . "/class/pagenav.php"; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list'); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + + // View Table + if ($numrows>0) + { + echo "<table class='outer width100' cellspacing='1'> + <tr> + <th class='center width2'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center width5'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + + $class = "odd"; + foreach (array_keys($cat_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class='center'>".$i."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_arr[$i]->getVar("cat_image")."' height='30px' title='cat_image' alt='cat_image'></td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; + + echo "<td class='center width5'> + <a href='categories.php?op=edit_cat&cat_id=".$i."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='categories.php?op=delete_cat&cat_id=".$i."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + echo "<br /><div class='center'>" . $pagenav . "</div><br />"; + } else { + echo "<table class='outer width100' cellspacing='1'> + <tr> + <th class='center width2'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center width5'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + echo "</table><br /><br />"; + } + break; + + case "new_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); + + $obj =& $catHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_cat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["cat_id"])) { + $obj =& $catHandler->get($_REQUEST["cat_id"]); + } else { + $obj =& $catHandler->create(); + } + + //Form cat_pid + $obj->setVar("cat_pid", $_REQUEST["cat_pid"]); + //Form cat_title + $obj->setVar("cat_title", $_REQUEST["cat_title"]); + //Form cat_image + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/cat/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("cat_image_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("cat_image", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("cat_image", $_REQUEST["cat_image"]); + } + //Form cat_description + $obj->setVar("cat_description", $_REQUEST["cat_description"]); + //Form cat_weight + $obj->setVar("cat_weight", $_REQUEST["cat_weight"]); + + if ($catHandler->insert($obj)) { + redirect_header("categories.php?op=list", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); + $obj = $catHandler->get($_REQUEST["cat_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_cat": + $obj =& $catHandler->get($_REQUEST["cat_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($catHandler->delete($obj)) { + redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat_title"))); + } + break; +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/documents.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,269 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); +global $pathImageIcon; +// We recovered the value of the argument op in the URL$ +$op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); + +$docAdmin = new ModuleAdmin(); +switch ($op) +{ + case "list": + default: + echo $docAdmin->addNavigation('documents.php'); + $docAdmin->addItemButton(_AM_XPDF_NEWDOC, 'documents.php?op=new_doc', 'add'); + echo $docAdmin->renderButton(); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + $cat_arr = $catHandler->getall(); + $numrowscat = count( $cat_arr ); + // Redirect if there aren't categories + if ( $numrowscat == 0 ) { + redirect_header('categories.php?op=new_cat', 2, _AM_XPDF_REDIRECT_NOCAT ); + } + $criteria = new CriteriaCompo(); + $criteria->setSort("doc_weight ASC, doc_title"); + $criteria->setOrder("ASC"); + $numrows = $docHandler->getCount(); + $start = xpdf_CleanVars ( $_REQUEST, 'start', 0, 'int' ); + $criteria->setStart($start); + $criteria->setLimit($limit); + $doc_arr = $docHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . "/class/pagenav.php"; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=list'); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } + + // View Table + if ($numrows>0) + { + echo "<table class='outer width100' cellspacing='1'> + <tr> + <th class='center width2'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_CID."</th> + <th class='center'>"._AM_XPDF_DOC_IMAGE."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center width5'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + + $class = "odd"; + foreach (array_keys($doc_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td class='center'>".$i."</td>"; + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_title")."</td>"; + $mytree = new XoopsObjectTree($cat_arr, 'cat_id', 'cat_pid'); + $category = xpdf_PathTree($mytree, $doc_arr[$i]->getVar('doc_cid'), $cat_arr, 'cat_title', $prefix = ' <img src="../images/icons/arrow.gif"> ' ); + echo "<td class='center'>".$category."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/doc/".$doc_arr[$i]->getVar("doc_image")."' height='30px' title='doc_image' alt='doc_image'></td>"; + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_subject")."</td>"; + echo "<td class='center'>".XoopsUser::getUnameFromId($doc_arr[$i]->getVar("doc_submitter"),"S")."</td>"; + echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_published"),"S")."</td>"; + + if ( $doc_arr[$i]->getVar("doc_status") == 1 ) { + echo "<td class='center'><img src=".$pathImageIcon."/green_ball.png border='0' alt='"._AM_XPDF_DELETEPDF."' /></td>"; + } else { + echo "<td class='center'><img src=".$pathImageIcon."/red_ball.png border='0' alt='"._AM_XPDF_CREATEPDF."' /></td>"; + } + + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_weight")."</td>"; + + if ( $doc_arr[$i]->getVar("doc_online") == 1 ) { + echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$i."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; + } else { + echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$i."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; + } + + echo "<td class='center width5'> + <a href='documents.php?op=edit_doc&doc_id=".$i."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='documents.php?op=delete_doc&doc_id=".$i."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br /><br />"; + echo "<br /><div class='center'>" . $pagenav . "</div><br />"; + } else { + echo "<table class='outer width100' cellspacing='1'> + <tr> + <th class='center width2'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_CID."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_IMAGE."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center width5'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + echo "</table><br /><br />"; + } + break; + + case "new_doc": + echo $docAdmin->addNavigation("documents.php"); + $docAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + echo $docAdmin->renderButton(); + + $obj =& $docHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_doc": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } else { + $obj =& $docHandler->create(); + } + + //Form doc_cid + $obj->setVar("doc_cid", $_REQUEST["doc_cid"]); + //Form doc_filename + $obj->setVar("doc_filename", $_REQUEST["doc_filename"]); + //Form doc_title + $obj->setVar("doc_title", $_REQUEST["doc_title"]); + //Form doc_slogan + $obj->setVar("doc_slogan", $_REQUEST["doc_slogan"]); + //Form doc_pdftext + $obj->setVar("doc_pdftext", $_REQUEST["doc_pdftext"]); + //Form doc_image + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']['mimetypes'], + $GLOBALS['xoopsModuleConfig']['maxsize'], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("doc_image_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("doc_image", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("doc_image", $_REQUEST["doc_image"]); + } + //Form doc_subject + $obj->setVar("doc_subject", $_REQUEST["doc_subject"]); + //Form doc_fontname + $obj->setVar("doc_fontname", $_REQUEST["doc_fontname"]); + //Form doc_fontsize + $obj->setVar("doc_fontsize", $_REQUEST["doc_fontsize"]); + //Form doc_keywords + $obj->setVar("doc_keywords", $_REQUEST["doc_keywords"]); + //Form doc_submitter + $obj->setVar("doc_submitter", $_REQUEST["doc_submitter"]); + //Form doc_published + $obj->setVar("doc_published", xpdf_convertDate($_REQUEST["doc_published"])); + //Form doc_weight + $obj->setVar("doc_weight", $_REQUEST["doc_weight"]); + //Form doc_status + $verif_doc_status = ($_REQUEST["doc_status"] == 1) ? "1" : "0"; + $obj->setVar("doc_status", $verif_doc_status); + //Form doc_dohtml + $verif_doc_dohtml = ($_REQUEST["doc_dohtml"] == 1) ? "1" : "0"; + $obj->setVar("doc_dohtml", $verif_doc_dohtml); + //Form doc_smilies + $verif_doc_smilies = ($_REQUEST["doc_smilies"] == 1) ? "1" : "0"; + $obj->setVar("doc_smilies", $verif_doc_smilies); + //Form doc_doxcodes + $verif_doc_doxcodes = ($_REQUEST["doc_doxcodes"] == 1) ? "1" : "0"; + $obj->setVar("doc_doxcodes", $verif_doc_doxcodes); + //Form doc_doimages + $verif_doc_doimages = ($_REQUEST["doc_doimages"] == 1) ? "1" : "0"; + $obj->setVar("doc_doimages", $verif_doc_doimages); + //Form doc_dobreak + $verif_doc_dobreak = ($_REQUEST["doc_dobreak"] == 1) ? "1" : "0"; + $obj->setVar("doc_dobreak", $verif_doc_dobreak); + //Form doc_online + $verif_doc_online = ($_REQUEST["doc_online"] == 1) ? "1" : "0"; + $obj->setVar("doc_online", $verif_doc_online); + + if ($docHandler->insert($obj)) { + redirect_header("documents.php?op=list", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_doc": + echo $docAdmin->addNavigation("documents.php"); + $docAdmin->addItemButton(_AM_XPDF_NEWDOC, 'documents.php?op=new_doc', 'add'); + $docAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + echo $docAdmin->renderButton(); + $obj = $docHandler->get($_REQUEST["doc_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_doc": + $obj =& $docHandler->get($_REQUEST["doc_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($docHandler->delete($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } + } else { + xoops_confirm(array("ok" => 1, "doc_id" => $_REQUEST["doc_id"], "op" => "delete_doc"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("doc_title"))); + } + break; + + case "update_online": + if (isset($_REQUEST["doc_id"])) { + $obj =& $docHandler->get($_REQUEST["doc_id"]); + } + $obj->setVar("doc_online", $_REQUEST["doc_online"]); + if ($docHandler->insert($obj)) { + redirect_header("documents.php", 3, _AM_XPDF_FORMOK); + } + echo $obj->getHtmlErrors(); + break; +} +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/index.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/index.html (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/index.html 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/index.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,50 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ +include "admin_header.php"; +xoops_cp_header(); + $indexAdmin = new ModuleAdmin(); + //count "total" + $count_cat = $catHandler->getCount(); + //count "total" + $count_doc = $docHandler->getCount(); + //count "online" + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria("doc_online", 1)); + $doc_online = $docHandler->getCount($criteria); + unset($criteria); + $r = '#FF0000'; // Red + $g = '#00AA00'; // Green + $indexAdmin->addInfoBox(_AM_XPDF_CAT); + $indexAdmin->addInfoBoxLine(_AM_XPDF_CAT,_AM_XPDF_THEREARE_CAT, $count_cat, ($count_cat == 0) ? $r : $g); + $indexAdmin->addInfoBox(_AM_XPDF_DOC); + $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC, $count_doc, ($count_doc == 0) ? $r : $g); + $indexAdmin->addInfoBoxLine(_AM_XPDF_DOC,_AM_XPDF_THEREARE_DOC_ONLINE, $doc_online, ($count_doc == 0) ? $r : $g); + echo $indexAdmin->addNavigation("index.php"); + echo $indexAdmin->renderIndex(); +include "admin_footer.php"; +?> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/admin/menu.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,45 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ +$dirname = basename( dirname( dirname( __FILE__ ) ) ) ; +$module_handler =& xoops_gethandler("module"); +$xoopsModule =& XoopsModule::getByDirname($dirname); +$moduleInfo =& $module_handler->get($xoopsModule->getVar("mid")); +$pathImageAdmin = $moduleInfo->getInfo("icons32"); +$adminmenu = array(); $i = 1; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU1; +$adminmenu[$i]["link"] = "admin/index.php"; +$adminmenu[$i]["icon"] = "images/32/dashboard.png"; $i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU2; +$adminmenu[$i]["link"] = "admin/categories.php"; +$adminmenu[$i]["icon"] = "images/32/pdf_category.png"; $i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU3; +$adminmenu[$i]["link"] = "admin/documents.php"; +$adminmenu[$i]["icon"] = "images/32/pdf_document.png"; $i++; +$adminmenu[$i]["title"] = _MI_XPDF_ADMENU4; +$adminmenu[$i]["link"] = "admin/about.php"; +$adminmenu[$i]["icon"] = "../../".$pathImageAdmin."/about.png"; unset( $i ); Added: XoopsModules/xpdf/trunk/modules/xpdf/blocks/blocks_doc.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/blocks/blocks_doc.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/blocks/blocks_doc.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,99 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +include_once XOOPS_ROOT_PATH."/modules/xpdf/include/functions.php"; + +function b_xpdf_doc($options) { + include_once XOOPS_ROOT_PATH."/modules/xpdf/class/doc.php"; + $myts =& MyTextSanitizer::getInstance(); + + $doc = array(); + $type_block = $options[0]; + $nb_doc = $options[1]; + $lenght_title = $options[2]; + + $docHandler =& xoops_getModuleHandler("xpdf_doc", "xpdf"); + $criteria = new CriteriaCompo(); + array_shift($options); + array_shift($options); + array_shift($options); + + switch ($type_block) + { + // For the block: doc recents + case "recent": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->setSort("doc_created"); + $criteria->setOrder("DESC"); + break; + // For the block: doc of today + case "day": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->add(new Criteria("doc_created", strtotime(date("Y/m/d")), ">=")); + $criteria->add(new Criteria("doc_created", strtotime(date("Y/m/d"))+86400, "<=")); + $criteria->setSort("doc_created"); + $criteria->setOrder("ASC"); + break; + // For the block: doc random + case "random": + $criteria->add(new Criteria("doc_online", 1)); + $criteria->setSort("RAND()"); + break; + } + + $criteria->setLimit($nb_doc); + $doc_arr = $docHandler->getall($criteria); + foreach (array_keys($doc_arr) as $i) + { + $doc[$i]["doc_id"] = $doc_arr[$i]->getVar("doc_id"); + $doc[$i]["doc_cid"] = $doc_arr[$i]->getVar("doc_cid"); + $doc[$i]["doc_filename"] = $doc_arr[$i]->getVar("doc_filename"); + $doc[$i]["doc_submitter"] = $doc_arr[$i]->getVar("doc_submitter"); + $doc[$i]["doc_created"] = $doc_arr[$i]->getVar("doc_created"); + $doc[$i]["doc_online"] = $doc_arr[$i]->getVar("doc_online"); + } + return $doc; +} + +function b_xpdf_doc_edit($options) { + $form = ""._MB_XPDF_DOC_DISPLAY."\n"; + $form .= "<input type=\"hidden\" name=\"options[0]\" value=\"".$options[0]."\" />"; + $form .= "<input name=\"options[1]\" size=\"5\" maxlength=\"255\" value=\"".$options[1]."\" type=\"text\" /> <br />"; + $form .= ""._MB_XPDF_DOC_TITLELENGTH." : <input name=\"options[2]\" size=\"5\" maxlength=\"255\" value=\"".$options[2]."\" type=\"text\" /><br /><br />"; + array_shift($options); + array_shift($options); + array_shift($options); + $form .= ""._MB_XPDF_DOC_CATTODISPLAY."<br /><select name=\"options[]\" multiple=\"multiple\" size=\"5\">"; + $form .= "<option value=\"0\" " . (array_search(0, $options) === false ? "" : "selected=\"selected\"") . ">" ._MB_XPDF_DOC_ALLCAT . "</option>"; + foreach (array_keys($cat_arr) as $i) { + $form .= "<option value=\"" . $cat_arr[$i]->getVar("cat_id") . "\" " . (array_search($cat_arr[$i]->getVar("cat_id"), $options) === false ? "" : "selected=\"selected\"") . ">".$cat_arr[$i]->getVar("cat_title")."</option>"; + } + $form .= "</select>"; + return $form; +} +?> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/blocks/index.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/blocks/index.html (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/blocks/index.html 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/class/index.html =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/index.html (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/index.html 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_cat.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,119 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +class xpdf_cat extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("cat_id", XOBJ_DTYPE_INT, null, false, 8); + $this->initVar("cat_pid", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("cat_title", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("cat_image", XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar("cat_description", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("cat_weight", XOBJ_DTYPE_INT, 0, false, 11); + } + + function xpdf_cat() + { + $this->__construct(); + } + + function getForm($action = false) + { + global $xoopsDB, $xoopsModuleConfig; + + if ($action === false) { + $action = $_SERVER["REQUEST_URI"]; + } + + $title = $this->isNew() ? sprintf(_AM_XPDF_CAT_ADD) : sprintf(_AM_XPDF_CAT_EDIT); + + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + $form = new XoopsThemeForm($title, "form_cat", $action, "post", true); + $form->setExtra('enctype="multipart/form-data"'); + + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_TITLE, "cat_title", 50, 255, $this->getVar("cat_title")), true); + // Subcategories + include_once(XOOPS_ROOT_PATH."/class/tree.php"); + $catHandler =& xoops_getModuleHandler("xpdf_cat", XPDF_DIRNAME); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_id'); + $criteria->setOrder('ASC'); + $cat_arr = $catHandler->getall(); + $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); + $form->addElement(new XoopsFormLabel(_AM_XPDF_CAT_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),false))); + + $cat_image = $this->getVar("cat_image") ? $this->getVar("cat_image") : 'blank.gif'; + $uploadirectory = '/uploads/xpdf/images/cat'; + $imgtray = new XoopsFormElementTray(_AM_XPDF_CAT_IMAGE,'<br />'); + $imgpath = sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory."/"); + $imageselect = new XoopsFormSelect($imgpath, 'cat_image', $cat_image); + $image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); + foreach( $image_array as $image ) { + $imageselect->addOption("$image", $image); + } + $imageselect->setExtra( "onchange='showImgSelected(\"image1\", \"cat_image\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")'" ); + $imgtray->addElement($imageselect, false); + $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$cat_image."' name='image1' id='image1' alt='' />" ) ); + $fileseltray = new XoopsFormElementTray('','<br />'); + $fileseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , "cat_image", $GLOBALS['xoopsModuleConfig']['maxsize']),false); + $fileseltray->addElement(new XoopsFormLabel(''), false); + $imgtray->addElement($fileseltray); + $form->addElement($imgtray); + + $editor_configs=array(); + $editor_configs["name"] = "cat_description"; + $editor_configs["value"] = $this->getVar("cat_description", "e"); + $editor_configs["rows"] = 10; + $editor_configs["cols"] = 80; + $editor_configs["width"] = "100%"; + $editor_configs["height"] = "400px"; + $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["xpdf_editor"]; + $form->addElement( new XoopsFormEditor(_AM_XPDF_CAT_DESCRIPTION, "cat_description", $editor_configs), false ); + + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); + + $form->addElement(new XoopsFormHidden("op", "save_cat")); + $form->addElement(new XoopsFormButton("", "submit", _SUBMIT, "submit")); + return $form; + } +} +class xpdfxpdf_catHandler extends XoopsPersistableObjectHandler +{ + function __construct(&$db) + { + parent::__construct($db, "xpdf_cat", "xpdf_cat", "cat_id", "cat_pid"); + } +} +?> \ No newline at end of file Added: XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php (rev 0) +++ XoopsModules/xpdf/trunk/modules/xpdf/class/xpdf_doc.php 2012-04-30 19:51:13 UTC (rev 9417) @@ -0,0 +1,300 @@ +<?php +/** + * **************************************************************************** + * - A Project by Developers TEAM For Xoops - ( http://www.xoops.org ) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops ( http://www.txmodxoops.org ) + * + * 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. + * --------------------------------------------------------------------------- + * @copyright TXMod Xoops ( http://www.txmodxoops.org ) + * @license GNU GPL see License + * @package xpdf + * @author TXMod Xoops ( su...@tx... ) + * + * Version : 1.01 Mon 2012/04/30 15:11:55 : timgno Exp $ + * **************************************************************************** + */ + +if (!defined("XOOPS_ROOT_PATH")) { + die("XOOPS root path not defined"); +} + +class xpdf_doc extends XoopsObject +{ + //Constructor + function __construct() + { + $this->XoopsObject(); + $this->initVar("doc_id", XOBJ_DTYPE_INT, null, false, 8); + $this->initVar("doc_cid", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("doc_filename", XOBJ_DTYPE_TXTBOX, null, false, 50); + $this->initVar("doc_title", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("doc_slogan", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("doc_pdftext", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("doc_image", XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar("doc_subject", XOBJ_DTYPE_TXTBOX, null, false, 100); + $this->initVar("doc_fontname", XOBJ_DTYPE_TXTBOX, null, false, 50); + $this->initVar("doc_fontsize", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("doc_keywords", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("doc_submitter", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_published", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_hits", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("doc_weight", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("doc_status", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_online", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_dohtml", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_smilies", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_doxcodes", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_doimages", XOBJ_DTYPE_INT, null, false, 1); + $this->initVar("doc_dobreak", XOBJ_DTYPE_INT, null, false, 1); + } + + function xpdf_doc() + { + $this->__construct(); + } + + function getForm($action = false) + { + global $xoopsDB, $xoopsModuleConfig; + + if ($action === false) { + $action = $_SERVER["REQUEST_URI"]; + } + + $title = $this->isNew() ? sprintf(_AM_XPDF_DOC_ADD) : sprintf(_AM_XPDF_DOC_EDIT); + + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); + $form = new XoopsThemeForm($title, "form_doc", $action, "post", true); + $form->setExtra('enctype="multipart/form-data"'); + + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_FILENAME, "doc_filename", 50, 255, $this->getVar("doc_filename")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); + + $catHandler =& xoops_getModuleHandler("xpdf_cat", XPDF_DIRNAME); + $criteria = new CriteriaCompo(); + $criteria->setSort('cat_weight ASC, cat_title'); + $criteria->setOrder('ASC'); + $cat_arr = $catHandler->getall($criteria); + $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); + $form->addElement(new XoopsFormLabel(_AM_XPDF_DOC_CID, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); + + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_SUBJECT, "doc_subject", 50, 255, $this->getVar("doc_subject")), true); + // Font Name + $font_tray = new XoopsFormElementTray(_FONT, ' '); + $doc_fontname = $this->getVar('doc_fontname') ? $this->getVar('doc_fontname') : $GLOBALS['xoopsModuleConfig']['fontname']; + $fontnameselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTNAME, 'doc_fontname', $doc_fontname); + $fonts_array = XoopsLists::getFontList(); + foreach( $fonts_array as $font ) { + $fontnameselect->addOption("$font", $font); + } + $font_tray->addElement($fontnameselect); + // Font Size + $doc_fontsize = $this->getVar('doc_fontsize') ? $this->getVar('doc_fontsize') : $GLOBALS['xoopsModuleConfig']['fontsize']; + $fontsizeselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTSIZE, 'doc_fontsize', $doc_fontsize); + $fontsizeselect->addOptionArray($this->getFontSize()); + $font_tray->addElement($fontsizeselect); + $form->addElement($font_tray); + + $form->addElement(new XoopsFormTextArea(_AM_XPDF_DOC_SLOGAN, "doc_slogan", $this->getVar("doc_slogan"), 4, 47), true); + + $editor_configs=array(); + $editor_configs["name"] ="doc_pdftext"; + $editor_configs["value"] = $this->getVar("doc_pdftext", "e"); + $editor_configs["rows"] = 10; + $editor_configs["cols"] = 80; + $editor_configs["width"] = "100%"; + $editor_configs["height"] = "400px"; + $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["xpdf_editor"]; + $form->addElement( new XoopsFormEditor(_AM_XPDF_DOC_PDFTEXT, "doc_pdftext", $editor_configs), true ); + + $doc_image = $this->getVar("doc_image") ? $this->getVar("doc_image") : 'blank.gif'; + + $uploadirectory = '/uploads/xpdf/images/doc'; + $imgtray = new XoopsFormElementTray(_AM_XPDF_DOC_IMAGE,'<br />'); + $imgpath = sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory."/"); + $imageselect = new XoopsFormSelect($imgpath, 'doc_image', $doc_image); + $image_array = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); + foreach( $image_array as $image ) { + $imageselect->addOption("$image", $image); + } + $imageselect->setExtra( "onchange='showImgSelected(\"image1\", \"doc_image\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")'" ); + $imgtray->addElement($imageselect, false); + $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$doc_image."' name='image1' id='image1' alt='' />" ) ); + $fileseltray = new XoopsFormElementTray('','<br />'); + $fileseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , "doc_image", $GLOBALS['xoopsModuleConfig']['maxsize']),false); + $fileseltray->addElement(new XoopsFormLabel(''), false); + $imgtray->addElement($fileseltray); + $form->addElement($imgtray); + + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_KEYWORDS, "doc_keywords", 50, 255, $this->getVar("doc_keywords")), true); + + $form->addElement(new XoopsFormSelectUser(_AM_XPDF_DOC_SUBMITTER, "doc_submitter", false, $this->getVar("doc_submitter"), 1, false), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_WEIGHT, "doc_weight", 10, 25, $this->getVar("doc_weight")), true); + + // Options + $options_tray = new XoopsFormElementTray(_AM_XPDF_DOC_OPTIONS,'<br />'); + $options_tray->setDescription(_AM_XPDF_DOC_OPTIONS_DESC); + + $doc_status = $this->isNew() ? 0 : $this->getVar("doc_status"); + $check_doc_status = new XoopsFormCheckBox(" ", "doc_status", $doc_status); + $check_doc_status->addOption(1, _AM_XPDF_DOC_STATUS); + $options_tray->addElement($check_doc_status); + + $options_tray->addElement(new XoopsFormTextDateSelect(_AM_XPDF_DOC_PUBLISHED, "doc_published", "", $this->getVar("doc_published"))); + + $doc_dohtml = $this->isNew() ? 0 : $this->getVar("doc_dohtml"); + $check_doc_dohtml = new XoopsFormCheckBox(" ", "doc_dohtml", $doc_dohtml); + $check_doc_dohtml->addOption(1, _AM_XPDF_DOC_DOHTML); + $options_tray->addElement($check_doc_dohtml); + + $doc_smilies = $this->isNew() ? 0 : $this->getVar("doc_smilies"); + $check_doc_smilies = new XoopsFormCheckBox(" ", "doc_smilies", $doc_smilies); + $check_doc_smilies->addOption(1, _AM_XPDF_DOC_SMILIES); + $options_tray->addElement($check_doc_smilies); + + $doc_doxcodes = $this->isNew() ? 0 : $this->getVar("doc_doxcodes"); + $check_doc_doxcodes = new XoopsFormCheckBox(" ", "doc_doxcodes", $doc_doxcodes); + $check_doc_doxcodes->addOption(1, _AM_XPDF_DOC_DOXCODES); + $options_tray->addElement($check_doc_doxcodes); + + $doc_doimages = ... [truncated message content] |
From: <txm...@us...> - 2012-04-30 19:37:45
|
Revision: 9416 http://xoops.svn.sourceforge.net/xoops/?rev=9416&view=rev Author: txmodxoops Date: 2012-04-30 19:37:40 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Deleted old test version Removed Paths: ------------- XoopsModules/xpdf/trunk/modules/xpdf/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 13:33:38
|
Revision: 9415 http://xoops.svn.sourceforge.net/xoops/?rev=9415&view=rev Author: txmodxoops Date: 2012-04-30 13:33:32 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Added pagenav Redirect if there aren't modules Modified Paths: -------------- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/building.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -204,7 +204,13 @@ case "default": default: - + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 3, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); $action = $_SERVER['REQUEST_URI']; @@ -212,20 +218,7 @@ $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name'); $mods_select->addOptionArray($modulesHandler->getList()); - $form->addElement($mods_select, true); - - /*$modules_name = xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); - $criteria = new CriteriaCompo(new Criteria('modules_name', $modules_name)); - $criteria->setSort('tables_name'); - $criteria->setOrder('ASC'); - $tbls_name_arr = $tablesHandler->getAll($criteria); - foreach (array_keys($tbls_name_arr) as $i) - { - $tbls_option_name = $tbls_name_arr[$i]->getVar('tables_name'); - } - $tbls_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', 'tables_name'); - $tbls_select->addOptionArray($tablesHandler->getList($criteria)); // $tbls_option_name - $form->addElement($tbls_select, false);*/ + $form->addElement($mods_select, true); $form->addElement(new XoopsFormHidden('op', 'creation')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/modules.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -93,8 +93,8 @@ $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); echo $modulesAdmin->renderButton(); - $obj =& $modulesHandler->create(); - $form = $obj->getForm(); + $obj =& $modulesHandler->create(); + $form = $obj->getForm(); break; case "modules_edit": $obj =& $modulesHandler->get($_REQUEST['modules_id']); @@ -124,11 +124,31 @@ echo $modulesAdmin->renderButton(); $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); - $modules_arr = $modulesHandler->getall($criteria); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); $numrows_modules = $modulesHandler->getCount(); - + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $modules_arr = $modulesHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { echo '<table width="100%" cellspacing="1" class="outer">'; @@ -165,6 +185,7 @@ echo '</tr>'; } echo '</table><br><br>'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr class="center">'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/admin/tables.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -433,6 +433,13 @@ $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); echo $tablesAdmin->renderButton(); + + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } //Retirer les tables inutiles $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0"; @@ -441,13 +448,34 @@ { $sql_del = "DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_id = ".$myrow['tables_id'].""; $xoopsDB->queryF($sql_del); - } - - $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); + } + + $criteria = new CriteriaCompo(); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); + $numrows_modules = $modulesHandler->getCount(); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } $modules_arr = $modulesHandler->getall($criteria); - $numrows_modules = $modulesHandler->getCount(); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { @@ -525,6 +553,7 @@ } } echo '</table><br /><br />'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr>'; Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/english/admin.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -193,7 +193,6 @@ define("_AM_TDMCREATE_EDITOR", "Editor:"); //------------ new additions: Ver. 1.15 ----------------------- - define("_AM_TDMCREATE_ABOUT_WEBSITE_FORUM", "Forum Web Site"); //------------ new additions: Ver. 1.37 ----------------------- @@ -202,4 +201,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Tables List"); define("_AM_TDMCREATE_TABLES_NEW", "New Table"); define("_AM_TDMCREATE_TABLES_TOPICS", "New Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "No module created, must create at least one before"); ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:32:38 UTC (rev 9414) +++ XoopsModules/TDMCreate/releases/1.38/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:33:32 UTC (rev 9415) @@ -198,4 +198,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Lista Tabelle"); define("_AM_TDMCREATE_TABLES_NEW", "Nuova Tabella"); define("_AM_TDMCREATE_TABLES_TOPICS", "Nuovo Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "Nessun modulo creato, è necessario crearne almeno uno prima"); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 13:32:44
|
Revision: 9414 http://xoops.svn.sourceforge.net/xoops/?rev=9414&view=rev Author: txmodxoops Date: 2012-04-30 13:32:38 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Added pagenav Redirect if there aren't modules Modified Paths: -------------- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/building.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -204,7 +204,13 @@ case "default": default: - + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 3, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } + include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); $action = $_SERVER['REQUEST_URI']; @@ -212,20 +218,7 @@ $mods_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_MODULES, 'modules_name', 'modules_name'); $mods_select->addOptionArray($modulesHandler->getList()); - $form->addElement($mods_select, true); - - /*$modules_name = xoops_getModuleHandler('tdmcreate_modules', 'TDMCreate'); - $criteria = new CriteriaCompo(new Criteria('modules_name', $modules_name)); - $criteria->setSort('tables_name'); - $criteria->setOrder('ASC'); - $tbls_name_arr = $tablesHandler->getAll($criteria); - foreach (array_keys($tbls_name_arr) as $i) - { - $tbls_option_name = $tbls_name_arr[$i]->getVar('tables_name'); - } - $tbls_select = new XoopsFormSelect(_AM_TDMCREATE_CONST_TABLES, 'tables_name', 'tables_name'); - $tbls_select->addOptionArray($tablesHandler->getList($criteria)); // $tbls_option_name - $form->addElement($tbls_select, false);*/ + $form->addElement($mods_select, true); $form->addElement(new XoopsFormHidden('op', 'creation')); $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/modules.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -93,8 +93,8 @@ $modulesAdmin->addItemButton(_AM_TDMCREATE_MODULES_LIST, 'modules.php?op=modules_list', 'list'); echo $modulesAdmin->renderButton(); - $obj =& $modulesHandler->create(); - $form = $obj->getForm(); + $obj =& $modulesHandler->create(); + $form = $obj->getForm(); break; case "modules_edit": $obj =& $modulesHandler->get($_REQUEST['modules_id']); @@ -124,11 +124,31 @@ echo $modulesAdmin->renderButton(); $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); - $modules_arr = $modulesHandler->getall($criteria); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); $numrows_modules = $modulesHandler->getCount(); - + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $modules_arr = $modulesHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { echo '<table width="100%" cellspacing="1" class="outer">'; @@ -165,6 +185,7 @@ echo '</tr>'; } echo '</table><br><br>'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr class="center">'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/admin/tables.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -433,6 +433,13 @@ $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_NEW, 'tables.php?op=tables_create', 'add'); $tablesAdmin->addItemButton(_AM_TDMCREATE_TABLES_TOPICS, 'tables.php?op=topics_create', 'add'); echo $tablesAdmin->renderButton(); + + $mod_arr = $modulesHandler->getall(); + $numrowsmod = count( $mod_arr ); + // Redirect if there aren't modules + if ( $numrowsmod == 0 ) { + redirect_header('modules.php?op=modules_create', 2, _AM_TDMCREATE_REDIRECT_NOMODULES ); + } //Retirer les tables inutiles $sql = "SELECT tables_id FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_modules = 0"; @@ -441,13 +448,34 @@ { $sql_del = "DELETE FROM ".$xoopsDB->prefix("tdmcreate_tables")." WHERE tables_id = ".$myrow['tables_id'].""; $xoopsDB->queryF($sql_del); - } - - $criteria = new CriteriaCompo(); - $criteria->setSort('modules_name'); - $criteria->setOrder('ASC'); + } + + $criteria = new CriteriaCompo(); + $criteria->setSort('modules_id ASC, modules_name'); + $criteria->setOrder('ASC'); + $numrows_modules = $modulesHandler->getCount(); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } $modules_arr = $modulesHandler->getall($criteria); - $numrows_modules = $modulesHandler->getCount(); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows_modules, $limit, $start, 'start', 'op=list&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; + } if ( $numrows_modules > 0 ) { @@ -525,6 +553,7 @@ } } echo '</table><br /><br />'; + echo "<div class='center'>".$pagenav."</div>"; } else { echo '<table width="100%" cellspacing="1" class="outer">'; echo '<tr>'; Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/english/admin.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -193,7 +193,6 @@ define("_AM_TDMCREATE_EDITOR", "Editor:"); //------------ new additions: Ver. 1.15 ----------------------- - define("_AM_TDMCREATE_ABOUT_WEBSITE_FORUM", "Forum Web Site"); //------------ new additions: Ver. 1.37 ----------------------- @@ -202,4 +201,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Tables List"); define("_AM_TDMCREATE_TABLES_NEW", "New Table"); define("_AM_TDMCREATE_TABLES_TOPICS", "New Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "No module created, must create at least one before"); ?> \ No newline at end of file Modified: XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php =================================================================== --- XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-30 11:26:06 UTC (rev 9413) +++ XoopsModules/TDMCreate/branches/timgno/modules/TDMCreate/language/italian/admin.php 2012-04-30 13:32:38 UTC (rev 9414) @@ -198,4 +198,7 @@ define("_AM_TDMCREATE_TABLES_LIST", "Lista Tabelle"); define("_AM_TDMCREATE_TABLES_NEW", "Nuova Tabella"); define("_AM_TDMCREATE_TABLES_TOPICS", "Nuovo Topics"); + +//------------ new additions: Ver. 1.38 ----------------------- +define("_AM_TDMCREATE_REDIRECT_NOMODULES", "Nessun modulo creato, è necessario crearne almeno uno prima"); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <txm...@us...> - 2012-04-30 11:26:15
|
Revision: 9413 http://xoops.svn.sourceforge.net/xoops/?rev=9413&view=rev Author: txmodxoops Date: 2012-04-30 11:26:06 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Work in Progress Updated only for local test Modified Paths: -------------- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_mod.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/css/style.css XoopsModules/xpdf/releases/1.01b/modules/xpdf/docs/changelog.txt XoopsModules/xpdf/releases/1.01b/modules/xpdf/header.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/configs.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/functions.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/include/notification.inc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/index.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/admin.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/help/help.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/main.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/english/modinfo.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/admin.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/main.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/language/italian/modinfo.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/makepdf.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/singledoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/sql/mysql.sql XoopsModules/xpdf/releases/1.01b/modules/xpdf/submit.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_doc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_footer.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_index.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_singledoc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_submit.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_viewcat.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/viewcat.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/xoops_version.php Added Paths: ----------- XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_downlimit.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/ XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/down_pdf.png XoopsModules/xpdf/releases/1.01b/modules/xpdf/images/48/index.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/notification_update.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/ratedoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/search.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_archive.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_ratedoc.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_search.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/templates/xpdf_topten.html XoopsModules/xpdf/releases/1.01b/modules/xpdf/topten.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/viewdoc.php XoopsModules/xpdf/releases/1.01b/modules/xpdf/visit.php Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/admin_header.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -35,6 +35,9 @@ echo xoops_error(_AM_ERROR_NOFRAMEWORKS); xoops_cp_footer(); } + +$tcpdfpathDir = $GLOBALS['xoops']->path('/Frameworks/tcpdf'); + $dirname = basename(dirname(dirname( __FILE__ ) )); $module_handler =& xoops_gethandler('module'); $xoopsModule = & $module_handler->getByDirname($dirname); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/broken.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -32,7 +32,11 @@ // View list case "list": //Affichage de la partie haute de l'administration de Xoops - echo $brokenAdmin->addNavigation('broken.php'); + echo $brokenAdmin->addNavigation('broken.php'); + $brokenAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + $brokenAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + $brokenAdmin->addItemButton(_AM_XPDF_FILESLIST, 'filesname.php?op=list', 'list'); + echo $brokenAdmin->renderButton(); $criteria = new CriteriaCompo(); if (isset($_REQUEST['limit'])) { $criteria->setLimit($_REQUEST['limit']); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/categories.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -23,170 +23,175 @@ * **************************************************************************** */ include "admin_header.php"; -xoops_cp_header(); -global $pathImageIcon; -// CleanVars -$op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); -$catAdmin = new ModuleAdmin(); -switch ($op) -{ - case "list": - default: - echo $catAdmin->addNavigation('categories.php'); - $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); - echo $catAdmin->renderButton(); - $criteria = new CriteriaCompo(); - $criteria->setSort("cat_id"); - $criteria->setOrder("ASC"); - $numrows = $catHandler->getCount($criteria); - if (isset($_REQUEST['limit'])) { - $criteria->setLimit($_REQUEST['limit']); - $limit = $_REQUEST['limit']; - } else { - $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); - $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; - } - if (isset($_REQUEST['start'])) { - $criteria->setStart($_REQUEST['start']); - $start = $_REQUEST['start']; - } else { - $criteria->setStart(0); - $start = 0; - } - $cat_arr = $catHandler->getall($criteria); - if ( $numrows > $limit ) { - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; - $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); - $pagenav = $pagenav->renderNav(4); - } else { - $pagenav = ''; - } - $cat_arr = $catHandler->getall($criteria); - //Table View - if ($numrows>0) - { - echo "<table width='100%' cellspacing='1' class='outer'> - <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._IMAGE."</th> - <th class='center'>"._DESCRIPTION."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._FORMACTION."</th> - </tr>"; - $class = "odd"; - foreach (array_keys($cat_arr) as $i) - { - echo "<tr class='".$class."'>"; - $class = ($class == "even") ? "odd" : "even"; - $cat =& $catHandler->get($cat_arr[$i]->getVar("cat_pid")); - $cat_cat = $cat->getVar("cat_pid"); - $cat_img = $cat_arr[$i]->getVar("cat_image"); - $cat_img_name = substr($cat_img, 0, strpos($cat_img, '.')); - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_id")."</td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; - echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_img."' height='30px' title='".$cat_img_name."' alt='".$cat_img_name."'></td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; - echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; - - echo "<td align='center' width='10%'> - <a href='categories.php?op=edit_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> - <a href='categories.php?op=delete_cat&cat_id=".$cat_arr[$i]->getVar("cat_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> - </td>"; - echo "</tr>"; +if ( file_exists($tcpdfpathDir.'/tcpdf.php') ) +{ + xoops_cp_header(); + global $pathImageIcon; + // CleanVars + $op = xpdf_CleanVars($_REQUEST, 'op', 'list', 'string'); + $catAdmin = new ModuleAdmin(); + switch ($op) + { + case "list": + default: + echo $catAdmin->addNavigation('categories.php'); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + echo $catAdmin->renderButton(); + $criteria = new CriteriaCompo(); + $criteria->setSort("cat_weight ASC, cat_title"); + $criteria->setOrder("ASC"); + $numrows = $catHandler->getCount($criteria); + if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; + } else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['adminperpage']); + $limit = $GLOBALS['xoopsModuleConfig']['adminperpage']; + } + if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; + } else { + $criteria->setStart(0); + $start = 0; + } + $cat_arr = $catHandler->getall($criteria); + if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'op=liste&limit=' . $limit); + $pagenav = $pagenav->renderNav(4); + } else { + $pagenav = ''; } - echo "</table><br><br>"; - } else { - echo "<table width='100%' cellspacing='1' class='outer'> - <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._IMAGE."</th> - <th class='center'>"._DESCRIPTION."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._FORMACTION."</th> - </tr>"; - echo "</table><br><br>"; - } - break; + $cat_arr = $catHandler->getall($criteria); + //Table View + if ($numrows>0) + { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + $class = "odd"; + foreach (array_keys($cat_arr) as $i) + { + echo "<tr class='".$class."'>"; + $class = ($class == "even") ? "odd" : "even"; + $cat =& $catHandler->get($cat_arr[$i]->getVar("cat_pid")); + $cat_cat = $cat->getVar("cat_pid"); + $cat_img = $cat_arr[$i]->getVar("cat_image"); + $cat_img_name = substr($cat_img, 0, strpos($cat_img, '.')); + echo "<td class='center'>".$i."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_title")."</td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xpdf/images/cat/".$cat_img."' height='30px' title='".$cat_img_name."' alt='".$cat_img_name."'></td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_description")."</td>"; + echo "<td class='center'>".$cat_arr[$i]->getVar("cat_weight")."</td>"; + + echo "<td align='center' width='10%'> + <a href='categories.php?op=edit_cat&cat_id=".$i."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='categories.php?op=delete_cat&cat_id=".$i."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + </td>"; + echo "</tr>"; + } + echo "</table><br><br>"; + } else { + echo "<table width='100%' cellspacing='1' class='outer'> + <tr> + <th class='center'>"._AM_XPDF_CAT_ID."</th> + <th class='center'>"._AM_XPDF_CAT_TITLE."</th> + <th class='center'>"._AM_XPDF_CAT_IMAGE."</th> + <th class='center'>"._AM_XPDF_CAT_DESCRIPTION."</th> + <th class='center'>"._AM_XPDF_CAT_WEIGHT."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> + </tr>"; + echo "</table><br><br>"; + } + break; - case "new_cat": - echo $catAdmin->addNavigation("categories.php"); - $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); - echo $catAdmin->renderButton(); + case "new_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); - $obj =& $catHandler->create(); - $form = $obj->getForm(); - $form->display(); - break; - - case "save_cat": - if ( !$GLOBALS["xoopsSecurity"]->check() ) { - redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); - } - if (isset($_REQUEST["cat_id"])) { - $obj =& $catHandler->get($_REQUEST["cat_id"]); - } else { - $obj =& $catHandler->create(); - } - global $xoopsModuleConfig; - //Form setCat - $catArray1 = array("cat_pid" => $_REQUEST["cat_pid"], "cat_title" => $_REQUEST["cat_title"]); - $obj->setVars($catArray1); - //Form cat_image $GLOBALS["xoopsModuleConfig"]["maxsize"] - include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/cat/"; - $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); - if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { - $uploader->setPrefix("cat_image_") ; - $uploader->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader->upload()) { - $errors = $uploader->getErrors(); - redirect_header("javascript:history.go(-1)",3, $errors); + $obj =& $catHandler->create(); + $form = $obj->getForm(); + $form->display(); + break; + + case "save_cat": + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if (isset($_REQUEST["cat_id"])) { + $obj =& $catHandler->get($_REQUEST["cat_id"]); } else { - $obj->setVar("cat_image", $uploader->getSavedFileName()); + $obj =& $catHandler->create(); } - } else { - $obj->setVar("cat_image", $_REQUEST["cat_image"]); - } - //Form setCat - $catArray2 = array("cat_description" => $_REQUEST["cat_description"], "cat_weight" => $_REQUEST["cat_weight"], "cat_dohtml" => $_REQUEST["cat_dohtml"], "cat_dosmiley" => $_REQUEST["cat_dosmiley"], "cat_doxcodes" => $_REQUEST["cat_doxcodes"], "cat_doimages" => $_REQUEST["cat_doimages"], "cat_dobreak" => $_REQUEST["cat_dobreak"]); - $obj->setVars($catArray2); - - if ($catHandler->insert($obj)) { - redirect_header("categories.php?op=list", 2, _AM_XPDF_FORMOK); - } - - echo $obj->getHtmlErrors(); - $form =& $obj->getForm(); - $form->display(); - break; - - case "edit_cat": - echo $catAdmin->addNavigation("categories.php"); - $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); - $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); - echo $catAdmin->renderButton(); - $obj = $catHandler->get($_REQUEST["cat_id"]); - $form = $obj->getForm(); - $form->display(); - break; - - case "delete_cat": - $obj =& $catHandler->get($_REQUEST["cat_id"]); - if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { - if ( !$GLOBALS["xoopsSecurity"]->check() ) { - redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + global $xoopsModuleConfig; + //Form setCat + $catArray1 = array("cat_pid" => $_REQUEST["cat_pid"], "cat_title" => $_REQUEST["cat_title"]); + $obj->setVars($catArray1); + //Form cat_image $GLOBALS["xoopsModuleConfig"]["maxsize"] + include_once XOOPS_ROOT_PATH."/class/uploader.php"; + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_CAT_PATH."/", $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("cat_image_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); + redirect_header("javascript:history.go(-1)",3, $errors); + } else { + $obj->setVar("cat_image", $uploader->getSavedFileName()); + } + } else { + $obj->setVar("cat_image", $_REQUEST["cat_image"]); } - if ($catHandler->delete($obj)) { - redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + //Form setCat + $catArray2 = array("cat_description" => $_REQUEST["cat_description"], "cat_weight" => $_REQUEST["cat_weight"], "cat_dohtml" => $_REQUEST["cat_dohtml"], "cat_dosmiley" => $_REQUEST["cat_dosmiley"], "cat_doxcodes" => $_REQUEST["cat_doxcodes"], "cat_doimages" => $_REQUEST["cat_doimages"], "cat_dobreak" => $_REQUEST["cat_dobreak"]); + $obj->setVars($catArray2); + + if ($catHandler->insert($obj)) { + redirect_header("categories.php?op=list", 2, _AM_XPDF_FORMOK); + } + + echo $obj->getHtmlErrors(); + $form =& $obj->getForm(); + $form->display(); + break; + + case "edit_cat": + echo $catAdmin->addNavigation("categories.php"); + $catAdmin->addItemButton(_AM_XPDF_NEWCAT, 'categories.php?op=new_cat', 'add'); + $catAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + echo $catAdmin->renderButton(); + $obj = $catHandler->get($_REQUEST["cat_id"]); + $form = $obj->getForm(); + $form->display(); + break; + + case "delete_cat": + $obj =& $catHandler->get($_REQUEST["cat_id"]); + if (isset($_REQUEST["ok"]) && $_REQUEST["ok"] == 1) { + if ( !$GLOBALS["xoopsSecurity"]->check() ) { + redirect_header("categories.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); + } + if ($catHandler->delete($obj)) { + redirect_header("categories.php", 3, _AM_XPDF_FORMDELOK); + } else { + echo $obj->getHtmlErrors(); + } } else { - echo $obj->getHtmlErrors(); + xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat_title"))); } - } else { - xoops_confirm(array("ok" => 1, "cat_id" => $_REQUEST["cat_id"], "op" => "delete_cat"), $_SERVER["REQUEST_URI"], sprintf(_AM_XPDF_FORMSUREDEL, $obj->getVar("cat_title"))); - } - break; + break; + } +} else { + xoops_cp_header(); + echo xoops_error(_AM_ERROR_NOTCPDFFRAMEWORKS); } include "admin_footer.php"; ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/documents.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -89,18 +89,18 @@ { echo "<table cellspacing='1' class='outer width100'> <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._CATEGORY."</th> - <th class='center'>"._SUBJECT."</th> - <th class='center'>"._SUBMITTER."</th> - <th class='center'>"._CREATED."</th> - <th class='center'>"._PUBLISHED."</th> - <th class='center'>"._STATUS."</th> - <th class='center'>"._WAITING."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._ONLINE."</th> - <th class='center'>"._FORMACTION."</th> + <th class='center'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_CATEGORY."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_CREATED."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WAITING."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> </tr>"; $class = "odd"; foreach (array_keys($doc_arr) as $i) @@ -112,10 +112,7 @@ include_once(XOOPS_ROOT_PATH."/class/tree.php"); $mytree = new XoopsObjectTree($cat_arr, 'cat_id', 'cat_pid'); $category = xpdf_PathTree($mytree, $doc_arr[$i]->getVar('doc_cid'), $cat_arr, 'cat_title', $prefix = ' <img src="../images/icons/arrow.gif"> ' ); - /* $key = $doc_arr[$i]->getVar('doc_cid'); - if (array_key_exists($key, $cat_arr)){ - $category = $cat_arr[$key]->getVar('cat_title'); - } */ + echo "<td class='center'>".$doc_arr[$i]->getVar("doc_title")."</td>"; echo "<td class='center'>".$category."</td>"; echo "<td class='center'>".$doc_arr[$i]->getVar("doc_subject")."</td>"; @@ -124,26 +121,31 @@ echo "<td class='center'>".formatTimeStamp($doc_arr[$i]->getVar("doc_published"),"S")."</td>"; if ( $doc_arr[$i]->getVar("doc_status") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=delete_pdf_file&doc_id='".$doc_id."&doc_status=0' title='"._AM_XPDF_DELETEPDF."'><img src=".$pathImageIcon."/green_ball.png border='0' alt='"._AM_XPDF_DELETEPDF."' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=delete_pdf_file&did='".$doc_id."&doc_status=0' title='"._AM_XPDF_DELETEPDF."'><img src='".XPDF_URL."/images/16/green_ball.png' border='0' alt='"._AM_XPDF_DELETEPDF."' /></a></td>"; } else { - echo "<td class='center'><a href='./documents.php?op=create_pdf_file&doc_id='".$doc_id."&doc_status=1' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/red_ball.png border='0' alt='"._AM_XPDF_CREATEPDF."' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=create_pdf_file&did='".$doc_id."&doc_status=1' title='"._AM_XPDF_CREATEPDF."'><img src='".XPDF_URL."/images/16/red_ball.png' border='0' alt='"._AM_XPDF_CREATEPDF."' /></a></td>"; } if ( $doc_arr[$i]->getVar("doc_waiting") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=approve_doc&doc_id='".$doc_id."&doc_waiting=0' title='"._AM_XPDF_CREATEPDF."'><img src=".$pathImageIcon."/orange_ball.png border='0' alt='' /></a></td>"; + echo "<td class='center'><a href='./documents.php?op=approve_doc&did='".$doc_id."&doc_waiting=0' title='"._AM_XPDF_CREATEPDF."'><img src='".XPDF_URL."/images/16/orange_ball.png' border='0' alt='' /></a></td>"; } else { - echo "<td class='center'><img src=".$pathImageIcon."/grey_ball.png border='0' alt='' /></td>"; + echo "<td class='center'><img src='".XPDF_URL."/images/16/grey_ball.png' border='0' alt='' /></td>"; } echo "<td class='center'>".$doc_arr[$i]->getVar("doc_weight")."</td>"; if ( $doc_arr[$i]->getVar("doc_online") == 1 ) { - echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$doc_id."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; + echo "<td class='center'><a href='./documents.php?op=update_online&did=".$doc_id."&doc_online=0'><img src=".$pathImageIcon."/on.png border='0' alt='"._ONLINE."' title='"._ONLINE."'></a></td>"; } else { - echo "<td class='center'><a href='./documents.php?op=update_online&doc_id=".$doc_id."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; + echo "<td class='center'><a href='./documents.php?op=update_online&did=".$doc_id."&doc_online=1'><img src=".$pathImageIcon."/off.png border='0' alt='"._OFFLINE."' title='"._OFFLINE."'></a></td>"; } - - echo "<td class='center width8'> - <a href='documents.php?op=edit_doc&doc_id=".$doc_id."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> - <a href='documents.php?op=delete_doc&doc_id=".$doc_id."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> + $file_created = 0; + echo "<td class='center width6'>"; + if ( $file_created == 1 ) { + echo "<a href='./documents.php?op=display_pdf_file&did=".$doc_id."'><img src=".$pathImageIcon."/search.png border='0' alt='"._AM_XPDF_DISPLAYPDF."' title='"._AM_XPDF_DISPLAYPDF."'></a>"; + } else { + echo "<a href='./documents.php?op=create_pdf_file&did=".$doc_id."'><img src=".$pathImageIcon."/pdf.png border='0' alt='"._AM_XPDF_CREATEPDF."' title='"._AM_XPDF_CREATEPDF."'></a>\t\t"; + } + echo "<a href='documents.php?op=edit_doc&did=".$doc_id."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> + <a href='documents.php?op=delete_doc&did=".$doc_id."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> </td>"; echo "</tr>"; } @@ -151,18 +153,18 @@ } else { echo "<table cellspacing='1' class='outer width100'> <tr> - <th class='center'>"._ID."</th> - <th class='center'>"._CATEGORY."</th> - <th class='center'>"._TITLE."</th> - <th class='center'>"._SUBJECT."</th> - <th class='center'>"._SUBMITTER."</th> - <th class='center'>"._CREATED."</th> - <th class='center'>"._PUBLISHED."</th> - <th class='center'>"._STATUS."</th> - <th class='center'>"._WAITING."</th> - <th class='center'>"._WEIGHT."</th> - <th class='center'>"._ONLINE."</th> - <th class='center'>"._FORMACTION."</th> + <th class='center'>"._AM_XPDF_DOC_ID."</th> + <th class='center'>"._AM_XPDF_DOC_CATEGORY."</th> + <th class='center'>"._AM_XPDF_DOC_TITLE."</th> + <th class='center'>"._AM_XPDF_DOC_SUBJECT."</th> + <th class='center'>"._AM_XPDF_DOC_SUBMITTER."</th> + <th class='center'>"._AM_XPDF_DOC_CREATED."</th> + <th class='center'>"._AM_XPDF_DOC_PUBLISHED."</th> + <th class='center'>"._AM_XPDF_DOC_STATUS."</th> + <th class='center'>"._AM_XPDF_DOC_WAITING."</th> + <th class='center'>"._AM_XPDF_DOC_WEIGHT."</th> + <th class='center'>"._AM_XPDF_DOC_ONLINE."</th> + <th class='center'>"._AM_XPDF_FORMACTION."</th> </tr> <tr><td class='errorMsg center' colspan='12'>" . _AM_XPDF_ERROR_NODOCUMENTS . "</td></tr>"; echo "</table><br />"; @@ -176,7 +178,7 @@ echo $docAdmin->renderButton(); $obj =& $docsHandler->create(); - $form = $obj->getForm($given, false); + $form = $obj->getForm($given = array(), false); $form->display(); break; @@ -190,14 +192,15 @@ } else { $obj =& $docsHandler->create(); } - + $error = false; + $error_msg = ''; + $given = array(); $docArray1 = array("doc_cid" => $_POST["doc_cid"], "doc_filename" => strtolower($_POST["doc_filename"]), "doc_title" => $_POST["doc_title"], "doc_slogan" => $_POST["doc_slogan"], "doc_description" => $_POST["doc_description"]); //Form docs_vars $obj->setVars($docArray1); //Form doc_image include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir = XOOPS_UPLOAD_PATH."/xpdf/images/doc/"; - $uploader = new XoopsMediaUploader($uploaddir, "gif|jpeg|pjpeg|png", 104857600, null, null); + $uploader = new XoopsMediaUploader(XPDF_UPLOAD_DOC_PATH."/", $GLOBALS["xoopsModuleConfig"]["mimetypes"], 104857600, null, null); if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix("doc_image_"); $uploader->fetchMedia($_POST['xoops_upload_file'][0]); @@ -211,6 +214,45 @@ $obj->setVar("doc_image", $_POST["doc_image"]); } + if (isset($_POST['doc_submitter'])){ + $obj->setVar('doc_submitter', $_POST['doc_submitter']); + $given['doc_submitter'] = $_POST['doc_submitter']; + }else{ + $obj->setVar('doc_submitter', !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0); + $given['doc_submitter'] = !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; + } + + if (!isset($_REQUEST['document_modified'])) { + $obj->setVar('doc_published', time()); + if (isset($_POST['doc_status'])) { + $obj->setVar('doc_status', 1); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + }else{ + if ($_POST['date_update'] == 'Y'){ + $obj->setVar('doc_published', xpdf_convertDate($_POST["doc_published"])); + if (isset($_POST['doc_status'])){ + $obj->setVar('doc_status', 2); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + }else{ + if (isset($_POST['doc_status'])){ + $obj->setVar('doc_status', 1); + $given['doc_status'] = 1; + }else{ + $obj->setVar('doc_status', 0); + $given['doc_status'] = 0; + } + } + $given['date_update'] = $_POST['date_update']; + } + $check_doc_status = ($_REQUEST["doc_status"] == 1) ? "1" : "0"; $check_doc_waiting = ($_REQUEST["doc_waiting"] == 1) ? "1" : "0"; $check_doc_online = ($_REQUEST["doc_online"] == 1) ? "1" : "0"; @@ -220,7 +262,7 @@ $check_doc_doimages = ($_REQUEST["doc_doimages"] == 1) ? "1" : "0"; $check_doc_dobreak = ($_REQUEST["doc_dobreak"] == 1) ? "1" : "0"; - $docArray2 = array("doc_subject" => $_POST["doc_subject"], "doc_fontname" => strtolower($_POST["doc_fontname"]), "doc_fontsize" => $_POST["doc_fontsize"], "doc_keywords" => $_POST["doc_keywords"], "doc_submitter" => $_POST["doc_submitter"], "doc_created" => xpdf_convertDate($_POST["doc_created"]), "doc_published" => xpdf_convertDate($_POST["doc_published"]), "doc_view" => $_POST["doc_view"], "doc_comments" => $_POST["doc_comments"], "doc_weight" => $_POST["doc_weight"], "doc_status" => $check_doc_status, "doc_waiting" => $check_doc_waiting, "doc_online" => $check_doc_online, "doc_dohtml" => $check_doc_dohtml, "doc_dosmiley" => $check_doc_dosmiley, "doc_doxcodes" => $check_doc_doxcodes, "doc_doimages" => $check_doc_doimages, "doc_dobreak" => $check_doc_dobreak, "doc_paypal" => $_POST["doc_paypal"], "doc_price" => $_POST["doc_price"], "doc_currency" => $_POST["doc_currency"], "doc_catalogue_number" => $_POST["doc_catalogue_number"]); + $docArray2 = array("doc_subject" => $_POST["doc_subject"], "doc_fontname" => strtolower($_POST["doc_fontname"]), "doc_fontsize" => $_POST["doc_fontsize"], "doc_keywords" => $_POST["doc_keywords"], "doc_created" => xpdf_convertDate($_POST["doc_created"]), "doc_expired" => xpdf_convertDate($_POST["doc_expired"]), "doc_hits" => $_POST["doc_hits"], "doc_rating" => $_POST["doc_rating"], "doc_votes" => $_POST["doc_votes"], "doc_view" => $_POST["doc_view"], "doc_comments" => $_POST["doc_comments"], "doc_weight" => $_POST["doc_weight"], "doc_status" => $check_doc_status, "doc_waiting" => $check_doc_waiting, "doc_online" => $check_doc_online, "doc_dohtml" => $check_doc_dohtml, "doc_dosmiley" => $check_doc_dosmiley, "doc_doxcodes" => $check_doc_doxcodes, "doc_doimages" => $check_doc_doimages, "doc_dobreak" => $check_doc_dobreak, "doc_paypal" => $_POST["doc_paypal"], "doc_price" => $_POST["doc_price"], "doc_currency" => $_POST["doc_currency"], "doc_catalogue_number" => $_POST["doc_catalogue_number"]); //Form docs_vars $obj->setVars($docArray2); @@ -234,112 +276,32 @@ } echo $obj->getHtmlErrors(); - $form =& $obj->getForm($given, true); + $form =& $obj->getForm($given = array(), true); $form->display(); break; case "create_pdf_file": + $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 1, 'int'); if (isset($_REQUEST["doc_id"])) { - $obj =& $docHandler->get($_REQUEST["doc_id"]); + $obj =& $docsHandler->get($doc_id); } $obj->setVar("doc_status", $_REQUEST["doc_status"]); - if ($docHandler->insert($obj)) { + if ($docsHandler->insert($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FILECREATEDOK); } echo $obj->getHtmlErrors(); - //include_once XOOPS_URL.'/Frameworks/tcpdf/tcpdf.php'; - require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/tcpdf.php'; - $filename = XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/'._LANGCODE.'.php'; - if(file_exists($filename)) { - require_once $filename; - } else { - require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/en.php'; - } - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('doc_status', 0, '!=')); - $criteria->add(new Criteria('doc_id', $_REQUEST['doc_id'])); - $criteria->add(new Criteria('doc_cid', $_REQUEST['doc_cid'])); - $doc_all = $docHandler->getall($criteria); - - foreach($doc_all as $doc) { - $pdf_data['title'] = $doc->getVar('doc_title'); - $pdf_data['filename'] = $doc->getVar('doc_filename'); - $pdf_data['subject'] = $doc->getVar('doc_subject'); - $pdf_data['fontname'] = $doc->getVar('doc_fontname'); - $pdf_data['fontsize'] = $doc->getVar('doc_fontsize'); - $pdf_data['published'] = formatTimestamp($doc->getVar('doc_published')); - $pdf_data['creator'] = $GLOBALS['xoopsConfig']['sitename']; - $pdf_data['content'] = $doc->getVar('doc_description', 'n'); - $pdf_data['author'] = $doc->getVar('doc_submitter'); - $pdf_data['keywords'] = $doc->getVar('doc_keywords'); - } - - define ('PDF_CREATOR', $pdf_data['creator']); - define ('PDF_AUTHOR', $pdf_data['author']); - define ('PDF_HEADER_TITLE', $pdf_data['title']); - define ('PDF_HEADER_STRING', $pdf_data['subject']); - define ('PDF_HEADER_LOGO', 'logo.gif'); - define ('K_PATH_IMAGES', XOOPS_ROOT_PATH.'/images/'); - - $content = ''; - $content .= $myts->undoHtmlSpecialChars($pdf_data['content']); - - $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, _CHARSET, false); - $doc_title = $myts->undoHtmlSpecialChars($pdf_data['title']); - $doc_keywords = $myts->undoHtmlSpecialChars($pdf_data['keywords']); - // For schinese - if (_LANGCODE == "cn") { - $pdf->SetFont('gbsn00lp', '', $pdf_data['fontsize']); - } else { - $pdf->SetFont($pdf_data['fontname'], '', $pdf_data['fontsize']); - } - - // set document information - $pdf->SetCreator($pdf_data['submitter']); - $pdf->SetAuthor($pdf_data['author']); - $pdf->SetTitle($pdf_data['title']); - $pdf->SetSubject($pdf_data['subject']); - $pdf->SetKeywords($doc_keywords); - - // set default header data - $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING); - - //set margins - $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP + 10, PDF_MARGIN_RIGHT); - //set auto page breaks - $pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); - $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); - $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); - $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set image scale factor - - // For schinese - if (_LANGCODE == "cn") { - $pdf->setHeaderFont(array('gbsn00lp', '', $pdf_data['fontsize'])); - $pdf->setFooterFont(array('gbsn00lp', '', $pdf_data['fontsize'])); - } else { - $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); - $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - } - //set language items - $pdf->setLanguageArray($l); - - // Initialize document - $pdf->AliasNbPages(); - // Add Page document - $pdf->AddPage(); - $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $content, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true); - // Pdf Filename - $pdf_filename = XOOPS_UPLOAD_PATH."/xpdf/files/".strtolower($pdf_data['filename']).".pdf"; - // Output - $pdf->Output($pdf_filename, 'F'); + if(isset($_REQUEST["doc_status"]) == 1) { + echo $obj->getPdf('F'); + } break; // Delete pdf file case "delete_pdf_file": + $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 1, 'int'); if (isset($_REQUEST["doc_id"])) { - $obj =& $docsHandler->get($_REQUEST["doc_id"]); + $obj =& $docsHandler->get($doc_id); } $obj->setVar("doc_status", $_REQUEST["doc_status"]); - $filename = XOOPS_UPLOAD_PATH."/xpdf/files/".strtolower($obj->getVar("doc_filename")).".pdf"; + $filename = XPDF_UPLOAD_FILES_PATH."/".strtolower($obj->getVar("doc_filename")).".pdf"; if(is_dir($filename)){ if (isset($_REQUEST['ok']) && $_REQUEST['ok'] == 1) { if (!$GLOBALS['xoopsSecurity']->check()) { @@ -363,7 +325,7 @@ echo $docAdmin->renderButton(); $doc_id = xpdf_CleanVars($_REQUEST, 'doc_id', 0, 'int'); $obj = $docsHandler->get($doc_id); - $form = $obj->getForm($given, false); + $form = $obj->getForm($given = array(), false); $form->display(); break; @@ -371,8 +333,8 @@ if (isset($_REQUEST["doc_id"])) { $obj =& $docsHandler->get($_REQUEST["doc_id"]); } - $obj->setVar("doc_waiting", $_REQUEST["doc_waiting"]); - if ($docHandler->insert($obj)) { + $obj->setVar("doc_status", $_REQUEST["doc_status"]); + if ($docsHandler->insert($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FILEAPPROVATEDOK); } echo $obj->getHtmlErrors(); @@ -384,7 +346,7 @@ if ( !$GLOBALS["xoopsSecurity"]->check() ) { redirect_header("documents.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); } - if ($docHandler->delete($obj)) { + if ($docsHandler->delete($obj)) { redirect_header("documents.php", 3, _AM_XPDF_FORMDELOK); } else { echo $obj->getHtmlErrors(); Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/index.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -53,14 +53,10 @@ unset($criteria); // count "total broken" $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("doc_waiting", 0, '=')); - $criteria->add(new Criteria("doc_status", 0, '!=')); $count_broken = $brokHandler->getCount($criteria); unset($criteria); // count "total modified" $criteria = new CriteriaCompo(); - $criteria->add(new Criteria("doc_waiting", 0, '=')); - $criteria->add(new Criteria("doc_status", 0, '!=')); $count_modified = $modHandler->getCount($criteria); unset($criteria); // Colors Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/admin/modified.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -33,6 +33,10 @@ // Vue liste case "list": echo $modifiedAdmin->addNavigation('modified.php'); + $modifiedAdmin->addItemButton(_AM_XPDF_CATLIST, 'categories.php?op=list', 'list'); + $modifiedAdmin->addItemButton(_AM_XPDF_DOCLIST, 'documents.php?op=list', 'list'); + $modifiedAdmin->addItemButton(_AM_XPDF_FILESLIST, 'filesname.php?op=list', 'list'); + echo $modifiedAdmin->renderButton(); $criteria = new CriteriaCompo(); $criteria->setSort('requestid'); $criteria->setOrder('ASC'); Added: XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php (rev 0) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/archive.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -0,0 +1,32 @@ +<?php +/** + * **************************************************************************** + * - A project for the Xoops CMS - (http://www.xoops.org) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * 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 TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ +include_once dirname(__FILE__) . '/header.php'; +$xoopsOption['template_main'] = 'xpdf_archive.html'; + +include_once XOOPS_ROOT_PATH . '/header.php'; +xoops_loadLanguage('calendar'); + +include_once XOOPS_ROOT_PATH . '/footer.php'; +?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_cat.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -63,7 +63,7 @@ $form->setExtra('enctype="multipart/form-data"'); // Title $cat_title = $this->getVar("cat_title"); - $form->addElement(new XoopsFormText(_TITLE, "cat_title", 50, 255, $cat_title), true); + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_TITLE, "cat_title", 50, 255, $cat_title), true); // Subcategories include_once(XOOPS_ROOT_PATH."/class/tree.php"); @@ -73,11 +73,11 @@ $criteria->setOrder('ASC'); $cat_arr = $catHandler->getall(); $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),true))); + $form->addElement(new XoopsFormLabel(_AM_XPDF_CAT_PID, $mytree->makeSelBox("cat_pid", "cat_title","--", $this->getVar("cat_pid"),true))); // Categories Images $cat_image = $this->getVar("cat_image") ? $this->getVar("cat_image") : 'blank.gif'; $uploadirectory = '/uploads/xpdf/images/cat'; - $imgtray = new XoopsFormElementTray(_IMAGE,'<br />'); + $imgtray = new XoopsFormElementTray(_AM_XPDF_CAT_IMAGE,'<br />'); $imgpath = sprintf(_AM_XPDF_FORMIMAGE_PATH, '.'.$uploadirectory); $imageselect = new XoopsFormSelect($imgpath, 'cat_image', $cat_image); $image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory ); @@ -88,7 +88,7 @@ $imgtray->addElement($imageselect, false); $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory."/".$cat_image."' name='image' id='image' alt='' />" ) ); $documentoseltray = new XoopsFormElementTray('','<br />'); - $documentoseltray->addElement(new XoopsFormFile(_FORMUPLOAD , "cat_image", $GLOBALS['xoopsModuleConfig']['maxsize']), false); + $documentoseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , "cat_image", $GLOBALS['xoopsModuleConfig']['maxsize']), false); $documentoseltray->addElement(new XoopsFormLabel(''), false); $imgtray->addElement($documentoseltray); $form->addElement($imgtray); @@ -101,34 +101,34 @@ $editor_configs["width"] = "100%"; $editor_configs["height"] = "400px"; $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']["xpdf_editor"]; - $form->addElement( new XoopsFormEditor(_DESCRIPTION, "cat_description", $editor_configs), false ); + $form->addElement( new XoopsFormEditor(_AM_XPDF_CAT_DESCRIPTION, "cat_description", $editor_configs), false ); // Weight - $form->addElement(new XoopsFormText(_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_CAT_WEIGHT, "cat_weight", 10, 25, $this->getVar("cat_weight")), true); $options_tray = new XoopsFormElementTray( _OPTIONS, '<br />' ); // cat_dohtml $dohtml = $this->isNew() ? 0 : $this->getVar("cat_dohtml"); $check_cat_dohtml = new XoopsFormCheckBox( '', 'cat_dohtml', $dohtml ); - $check_cat_dohtml->addOption( 1, _DOHTML ); + $check_cat_dohtml->addOption( 1, _AM_XPDF_DOHTML ); $options_tray->addElement( $check_cat_dohtml ); // cat_dosmiley $dosmiley = $this->isNew() ? 0 : $this->getVar("cat_dosmiley"); $check_cat_dosmiley = new XoopsFormCheckBox( '', 'cat_dosmiley', $dosmiley ); - $check_cat_dosmiley->addOption( 1, _DOSMILEY ); + $check_cat_dosmiley->addOption( 1, _AM_XPDF_DOSMILEY ); $options_tray->addElement( $check_cat_dosmiley ); // cat_doxcodes $doxcodes = $this->isNew() ? 0 : $this->getVar("cat_doxcodes"); $check_cat_doxcodes = new XoopsFormCheckBox( '', 'cat_doxcodes', $doxcodes ); - $check_cat_doxcodes->addOption( 1, _DOXCODE ); + $check_cat_doxcodes->addOption( 1, _AM_XPDF_DOXCODE ); $options_tray->addElement( $check_cat_doxcodes ); // cat_doimages $doimages = $this->isNew() ? 0 : $this->getVar("cat_doimages"); $check_cat_doimages = new XoopsFormCheckBox( '', 'cat_doimages', $doimages ); - $check_cat_doimages->addOption( 1, _DOIMAGES ); + $check_cat_doimages->addOption( 1, _AM_XPDF_DOIMAGES ); $options_tray->addElement( $check_cat_doimages ); // cat_dobreaks $dobreak = $this->isNew() ? 1 : $this->getVar("cat_dobreak"); $check_cat_dobreaks = new XoopsFormCheckBox( '', 'cat_dobreak', $dobreak ); - $check_cat_dobreaks->addOption( 1, _DOBREAK ); + $check_cat_dobreaks->addOption( 1, _AM_XPDF_DOBREAK ); $options_tray->addElement( $check_cat_dobreaks ); $form->addElement( $options_tray ); //Permissions Modified: XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-30 04:07:58 UTC (rev 9412) +++ XoopsModules/xpdf/releases/1.01b/modules/xpdf/class/xpdf_doc.php 2012-04-30 11:26:06 UTC (rev 9413) @@ -46,6 +46,10 @@ $this->initVar("doc_submitter", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_created", XOBJ_DTYPE_INT, null, false, 10); $this->initVar("doc_published", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_expired", XOBJ_DTYPE_INT, null, false, 10); + $this->initVar("doc_hits", XOBJ_DTYPE_INT, null, false, 11); + $this->initVar("doc_rating", XOBJ_DTYPE_DECIMAL, null, false, 6.4); + $this->initVar("doc_votes", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_view", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_comments", XOBJ_DTYPE_INT, null, false, 11); $this->initVar("doc_weight", XOBJ_DTYPE_INT, null, false, 11); @@ -67,9 +71,16 @@ { $this->__construct(); } + + function get_new_reg() + { + $new_reg = $GLOBALS['xoopsDB']->getInsertId(); + return $new_reg; + } function getForm($given = array(), $error = false, $action = false) { + global $xoopsModuleConfig; if ($action === false) { $action = $_SERVER["REQUEST_URI"]; } @@ -94,18 +105,18 @@ $form = new XoopsThemeForm($title, "form", $action, "post", true); $form->setExtra('enctype="multipart/form-data"'); // - $form->addElement(new XoopsFormText(_FILENAME, "doc_filename", 50, 255, $this->getVar("doc_filename")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_FILENAME, "doc_filename", 50, 255, $this->getVar("doc_filename")), true); // - $form->addElement(new XoopsFormText(_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); // include_once(XOOPS_ROOT_PATH."/class/tree.php"); $catHandler =& xoops_getModuleHandler("xpdf_cat", "xpdf"); - $cats = xpdf_MygetItemIds('xpdf_submit', 'xpdf'); + $cats = xpdf_MygetItemIds('xpdf_submit', XPDF_DIRNAME); $criteria = new CriteriaCompo(); $criteria->setSort('cat_weight ASC, cat_title'); $criteria->setOrder('ASC'); - if ($xoopsUser) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ($GLOBALS['xoopsUser']) { + if ( !$GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) { $criteria->add(new Criteria('cat_id', '(' . implode(',', $cats) . ')','IN')); } } else { @@ -116,24 +127,23 @@ redirect_header('index.php', 2, _NOPERM); } $mytree = new XoopsObjectTree($cat_arr, "cat_id", "cat_pid"); - $form->addElement(new XoopsFormLabel(_CATEGORY, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); + $form->addElement(new XoopsFormLabel(_AM_XPDF_DOC_CATEGORY, $mytree->makeSelBox("doc_cid", "cat_title","--", $this->getVar("doc_cid"),false))); // Subject - $form->addElement(new XoopsFormText(_SUBJECT, "doc_subject", 50, 100, $this->getVar("doc_subject")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_SUBJECT, "doc_subject", 50, 100, $this->getVar("doc_subject")), true); // Font Name $font_tray = new XoopsFormElementTray(_FONT, ' '); - $doc_fontname = $this->getVar('doc_fontname') ? $this->getVar('doc_fontname') : 'helvetica'; - $fontnameselect = new XoopsFormSelect(_AM_XPDF_FONTNAME, 'doc_fontname', $doc_fontname); + $doc_fontname = $this->getVar('doc_fontname') ? $this->getVar('doc_fontname') : $GLOBALS['xoopsModuleConfig']['fontname']; + $fontnameselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTNAME, 'doc_fontname', $doc_fontname); $fonts_array = XoopsLists::getFontList(); foreach( $fonts_array as $font ) { $fontnameselect->addOption("$font", $font); } $font_tray->addElement($fontnameselect); - // Font Size - $array_fontsize = array('8' => 8, '10' => 10, '12' => 12, '14' => 14, '16' => 16, '18' => 18, '20' => 20, '22' => 22); - $doc_fontsize = $this->getVar('doc_fontsize') ? $this->getVar('doc_fontsize') : '10'; - $fontsizeselect = new XoopsFormSelect(_AM_XPDF_FONTSIZE, 'doc_font', $doc_fontsize); - $fontsizeselect->addOptionArray($array_fontsize); + // Font Size + $doc_fontsize = $this->getVar('doc_fontsize') ? $this->getVar('doc_fontsize') : $GLOBALS['xoopsModuleConfig']['fontsize']; + $fontsizeselect = new XoopsFormSelect(_AM_XPDF_DOC_FONTSIZE, 'doc_fontsize', $doc_fontsize); + $fontsizeselect->addOptionArray($this->getFontSize()); $font_tray->addElement($fontsizeselect); $form->addElement($font_tray); // Name slogan @@ -157,7 +167,7 @@ $editor_configs["cols"] = 80; $editor_configs["width"] = "100%"; $editor_configs["height"] = "400px"; - $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["xpdf_editor"]; + $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['xpdf_editor']; $desc = new XoopsFormEditor(_AM_XPDF_DOC_DESCRIPTION, "doc_description", $editor_configs); $desc->setDescription(_AM_XPDF_DOC_DESCRIPTION_DESC); $form->addElement($desc, true); @@ -176,34 +186,32 @@ $form->addElement(new XoopsFormTag('tag', 60, 255, $tagId, 0)); } // doc_image - $uploaddir = XOOPS_ROOT_PATH . '/uploads/xpdf/images/doc/' .$this->getVar('doc_image'); + $uploaddir = XPDF_UPLOAD_DOC_PATH . '/' .$this->getVar('doc_image'); $docs_img = $this->getVar('doc_image') ? $this->getVar('doc_image') : 'blank.gif'; - $uploadirectory='/uploads/xpdf/images/doc'; + $uploadirectory = '/uploads/xpdf/images/doc'; if (!is_file($uploaddir)){ $docs_img = 'blank.gif'; } $imgtray = new XoopsFormElementTray(_IMAGE,'<br />'); - $imgpath=sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory ); + $imgpath=sprintf(_AM_XPDF_FORMIMAGE_PATH, ".".$uploadirectory."/" ); $imageselect= new XoopsFormSelect($imgpath, 'doc_image',$docs_img); - $topics_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . $uploadirectory ); + $topics_array = XoopsLists::getImgListAsArray( XPDF_UPLOAD_DOC_PATH ); foreach( $topics_array as $image ) { $imageselect->addOption("{$image}", $image); } - $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"doc_image\", \"" . $uploadirectory . "\", \"\", \"" . XOOPS_URL . "\")'" ); + $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"doc_image\", \"".$uploadirectory."\", \"\", \"".XOOPS_URL."\")'" ); $imgtray->addElement($imageselect,false); - $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_URL . "/" . $uploadirectory . "/" . $docs_img . "' name='image3' id='image3' alt='' />" ) ); - $documentoseltray= new XoopsFormElementTray('','<br />'); + $imgtray->addElement( new XoopsFormLabel('',"<br /><img src='".XPDF_UPLOAD_DOC_URL."/".$docs_img."' name='image3' id='image3' alt='' />" ) ); + $docseltray= new XoopsFormElementTray('','<br />'); if ($perm_upload == true) { - $documentoseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , 'attachedimage', $GLOBALS['xoopsModuleConfig']['maxsize']), false); + $docseltray->addElement(new XoopsFormFile(_AM_XPDF_FORMUPLOAD , 'attachedimage', $GLOBALS['xoopsModuleConfig']['maxsize']), false); } - $imgtray->addElement($documentoseltray); - $form->addElement($imgtray); - // doc_submitter - $form->addElement(new XoopsFormSelectUser(_SUBMITTER, "doc_submitter", false, $this->getVar("doc_submitter"), 1, false), true); + $imgtray->addElement($docseltray); + $form->addElement($imgtray); // doc_keywords - $form->addElement(new XoopsFormText(_KEYWORDS, "doc_keywords", 50, 255, $this->getVar("doc_keywords")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_KEYWORDS, "doc_keywords", 50, 255, $this->getVar("doc_keywords")), true); // doc_weight - $form->addElement(new XoopsFormText(_WEIGHT, "doc_weight", 10, 25, $this->getVar("doc_weight")), true); + $form->addElement(new XoopsFormText(_AM_XPDF_DOC_WEIGHT, "doc_weight", 10, 25, $this->getVar("doc_weight")), true); // doc_paypal if ($GLOBALS['xoopsModuleConfig']['use_paypal'] == true && $GLOBALS['xoopsModuleConfig']['xpayment'] == false ) { $form->addElement(new XoopsFormText(_AM_XPDF_FORMPAYPAL, 'doc_paypal', 50, 255, $this->getVar('doc_paypal')), false); @@ -220,47 +228,104 @@ $form->addElement(new XoopsFormHidden('doc_catalogue_number', $this->getVar('doc_catalogue_number')), false); } // status - $options_tray = new XoopsFormElementTray(_OPTIONS,'<br />'); - // doc_status - $doc_status = $this->isNew() ? 0 : $this->getVar("doc_status"); - $check_doc_status = new XoopsFormCheckBox('', "doc_status", $doc_status); - $check_doc_status->addOption(1, _STATUS); - $options_tray->addElement($check_doc_status); + $options_tray = new XoopsFormElementTray(_AM_XPDF_DOC_DATE,'<br />'); + $options_tray->setDescription(_AM_XPDF_DOC_DATE_DESC); + if ($GLOBALS['xoopsUser']) { + if ( $GLOBALS['xoopsUser']->isAdmin($GLOBALS['xoopsModule']->mid()) ) { + // Submitter + if ($this->isNew()) { + $submitter = !empty($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : 0; + $given['date_update'] = 0; + }else{ + $submitter = $this->getVar('doc_submitter'); + $v_date = $this->getVar('doc_published'); + } + if ($error == true) { + $date_update = $given['date_update']; + $v_status = $given['doc_status']; + $submitter = $given['doc_submitter']; + }else{ + $date_update = 'N'; + $v_status = 1; + } + $form->addElement(new XoopsFormSelectUser(_AM_XPDF_DOC_SUBMITTER, 'doc_submitter', true, $submitter, 1, false), true); + // Published + if (!$this->isNew()) { + $selection_date = new XoopsFormElementTray(_AM_XPDF_FORMDATEUPDATE); + $date = new XoopsFormRadio('', 'date_update', $date_update); + $options = array('N' =>_AM_XPDF_FORMDATEUPDATE_NO . ' (' . formatTimestamp($v_date,'s') . ')', 'Y' => _AM_XPDF_FORMDATEUPDATE_YES); + $date->addOptionArray($options); + $selection_date->addElement($date); + $selection_date->addElement(new XoopsFormTextDateSelect('', 'doc_published', '', strtotime(formatTimestamp(time())))); + $form->addElement($selection_date); + } + $status = new XoopsFormCheckBox(_AM_XPDF_DOC_STATUS, 'doc_status', $v_status); + $status->addOption(1, _AM_XPDF_DOC_STATUS_OK); + $form->addElement($status); + //Permissions to download + if ($GLOBALS['xoopsModuleConfig']['permission_download'] == 2) { + $member_handler = & xoops_gethandler('member'); + $group_list = &$member_handler->getGroupList(); + $gperm_handler = &xoops_gethandler('groupperm'); + $full_list = array_keys($group_list); + if(!$this->isNew()) { + $item_ids_doc = $gperm_handler->getGroupIds('xpdf_doc_item', $this->getVar('doc_id'), $GLOBALS['xoopsModule']->getVar('mid')); + $item_ids_doc = array_values($item_ids_doc); + $item_can_doc_checkbox = new XoopsFormCheckBox(_AM_XPDF_FORMPERMDOWNLOAD, 'item_download[]', $item_ids_doc); + } else { + $item_can_doc_checkbox = new XoopsFormCheckBox(_AM_XPDF_FORMPERMDOWNLOAD, 'item_download[]', $full_list); + } + $item_can_doc_checkbox->addOptionArray($group_list); + $form->addElement($item_can_doc_checkbox); + } + } + } + // doc_status + /*$doc_status = $this->isNew() ? 0 : $this->getVar("doc_status"); + $check_doc_status = new XoopsFormCheckBox('', "doc_status", $doc_status); + $check_doc_status->addOption(1, _AM_XPDF_DOC_STATUS); + $options_tray->addElement($check_doc_status);*/ // doc_created - $options_tray->addElement(new XoopsFormTextDateSelect(_CREATED, "doc_created", "", $this->getVar("doc_created"))); + $options_tray->addElement(new XoopsFormTextDateSelect(_AM_XPDF_DOC_CREATED, "doc_created", "", $this->getVar("doc_created"))); // doc_published - $options_tray->addElement(new XoopsFormTextDateSelect(_PUBLISHED, "doc_published", "", $this->getVar("doc_published"))); + $options_tray->addElement(new XoopsFormTextDateSelect(_AM_XPDF_DOC_PUBLISHED, "doc_published", "", $this->getVar("doc_published"))); + // doc_expired + $options_tray->addElement(new ... [truncated message content] |
From: <be...@us...> - 2012-04-30 04:08:05
|
Revision: 9412 http://xoops.svn.sourceforge.net/xoops/?rev=9412&view=rev Author: beckmi Date: 2012-04-30 04:07:58 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Fix for deprecated >xoops_setCaching($value) Modified Paths: -------------- XoopsModules/smallworld/trunk/smallworld/admin/help.php XoopsModules/smallworld/trunk/smallworld/admin/main.php XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php Modified: XoopsModules/smallworld/trunk/smallworld/admin/help.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/help.php 2012-04-29 20:17:44 UTC (rev 9411) +++ XoopsModules/smallworld/trunk/smallworld/admin/help.php 2012-04-30 04:07:58 UTC (rev 9412) @@ -26,7 +26,7 @@ require_once XOOPS_ROOT_PATH . '/class/template.php'; if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); +$xoopsTpl->caching=0; xoops_cp_header(); Modified: XoopsModules/smallworld/trunk/smallworld/admin/main.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-04-29 20:17:44 UTC (rev 9411) +++ XoopsModules/smallworld/trunk/smallworld/admin/main.php 2012-04-30 04:07:58 UTC (rev 9412) @@ -26,7 +26,7 @@ require_once XOOPS_ROOT_PATH . '/class/template.php'; if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); +$xoopsTpl->caching=0; xoops_cp_header(); Modified: XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php 2012-04-29 20:17:44 UTC (rev 9411) +++ XoopsModules/smallworld/trunk/smallworld/admin/moduleinfo.php 2012-04-30 04:07:58 UTC (rev 9412) @@ -26,7 +26,7 @@ require_once XOOPS_ROOT_PATH . '/class/template.php'; if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); +$xoopsTpl->caching=0; xoops_cp_header(); Modified: XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php =================================================================== --- XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-04-29 20:17:44 UTC (rev 9411) +++ XoopsModules/smallworld/trunk/smallworld/admin/useradmin.php 2012-04-30 04:07:58 UTC (rev 9412) @@ -26,7 +26,7 @@ require_once XOOPS_ROOT_PATH . '/class/template.php'; if (!isset($xoopsTpl)) {$xoopsTpl = new XoopsTpl();} -$xoopsTpl->xoops_setCaching(0); +$xoopsTpl->caching=0; xoops_cp_header(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 20:17:51
|
Revision: 9411 http://xoops.svn.sourceforge.net/xoops/?rev=9411&view=rev Author: mageg Date: 2012-04-29 20:17:44 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Update avatar Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/menu.php 2012-04-29 20:11:00 UTC (rev 9410) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/admin/menu.php 2012-04-29 20:17:44 UTC (rev 9411) @@ -19,22 +19,21 @@ * @author Mage Grégory (AKA Mage) * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _MI_AVATARS_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; +$adminmenu[$i]['icon'] = 'home.png'; $i++; $adminmenu[$i]['title'] = _MI_AVATARS_SYSTEM; $adminmenu[$i]['link'] = "admin/avatar_system.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'avatar_system.png'; +$adminmenu[$i]['icon'] = 'avatar_system.png'; $i++; $adminmenu[$i]['title'] = _MI_AVATARS_CUSTOM; $adminmenu[$i]['link'] = "admin/avatar_custom.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'avatar_custom.png'; +$adminmenu[$i]['icon'] = 'avatar_custom.png'; $i++; $adminmenu[$i]['title'] = _MI_AVATARS_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; \ No newline at end of file +$adminmenu[$i]['icon'] = 'about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/help/help.html 2012-04-29 20:11:00 UTC (rev 9410) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/language/english/help/help.html 2012-04-29 20:17:44 UTC (rev 9411) @@ -1,22 +1,15 @@ -<div id="help-template" class="outer"> - <h1 class="head">Help: - <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/avatars/admin/index.php" title="Back to the administration of Avatars"> - Avatars <img src="<{xoAdminIcons home.png}>" alt="Back to the administration of Avatars"/> - </a> - </h1> - <!-- ===== Help Content ======= --> - <h4 class="odd">Description</h4><br/> - Avatars are small graphics or pictures that can be used in various content settings around the site. They are often used next to a user name to add a bit of "visual identification." Typical applications are the forum. - <br/><br/> - The Avatar Manager allows the Site administrator to add, edit or delete System Avatars as well as Custom Avatars. - <br/><br/> - <h4 class="odd">System Avatar</h4><br/> - System Avatars are images uploaded by the Site administrator in the Avatar Manager section. - <br/><br/> - <h4 class="odd">Custom Avatar</h4><br/> - Custom Avatars are images directly uploaded by a user. For a user to be able to upload an avatar, the correct option must be configured in the User Info Settings of the Site Preferences. - <br/><br/> - <h4 class="odd">Edit and delete Avatars</h4><br/> - The Site administrator can edit the name and the display order of all the System Avatars, as well as deleting anyone of them. Note that if the Site administrator deleted an avatar that is used by a user, this user will lose his avatar. - <!-- ===== Help Content ======= --> -</div> \ No newline at end of file +<!-- ===== Help Content ======= --> +<h4>Description</h4><br/> +Avatars are small graphics or pictures that can be used in various content settings around the site. They are often used next to a user name to add a bit of "visual identification." Typical applications are the forum. +<br/><br/> +The Avatar Manager allows the Site administrator to add, edit or delete System Avatars as well as Custom Avatars. +<br/><br/> +<h4>System Avatar</h4><br/> +System Avatars are images uploaded by the Site administrator in the Avatar Manager section. +<br/><br/> +<h4>Custom Avatar</h4><br/> +Custom Avatars are images directly uploaded by a user. For a user to be able to upload an avatar, the correct option must be configured in the User Info Settings of the Site Preferences. +<br/><br/> +<h4>Edit and delete Avatars</h4><br/> +The Site administrator can edit the name and the display order of all the System Avatars, as well as deleting anyone of them. Note that if the Site administrator deleted an avatar that is used by a user, this user will lose his avatar. +<!-- ===== Help Content ======= --> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html 2012-04-29 20:11:00 UTC (rev 9410) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_custom.html 2012-04-29 20:17:44 UTC (rev 9411) @@ -18,19 +18,19 @@ <{foreach item=avatar from=$avatars_list}> <div class="cp-avatar"> <div class="xo-thumbimg"> - <img class="tooltip" src="../../system/class/thumbs/phpThumb.php?src=<{$xoops_rootpath}>/uploads/<{$avatar.avatar_file}>&h=120&w=120" alt="<{$avatar.avatar_name}>" title="<{$avatar.avatar_name}>"/> + <img class="xo-tooltip" src="../../system/class/thumbs/phpThumb.php?src=<{$xoops_rootpath}>/uploads/<{$avatar.avatar_file}>&h=120&w=120" alt="<{$avatar.avatar_name}>" title="<{$avatar.avatar_name}>"/> </div> <div class="xo-actions txtcenter"> <div class="spacer bold"><{$avatar.avatar_name}></div> <img id="loading_avt<{$avatar.avatar_id}>" src="<{xoAppUrl media/xoops/images/spinner.gif}>" style="display:none;" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> - <img class="cursorpointer tooltip" id="avt<{$avatar.avatar_id}>" onclick="Xoops.changeStatus( 'avatar_custom.php', { op: 'update_display', avatar_id: <{$avatar.avatar_id}> }, 'avt<{$avatar.avatar_id}>', 'avatar_custom.php' )" src="<{if $avatar.avatar_display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" title="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" /> - <a class="tooltip" href="<{$xoops_url}>/modules/profile/userinfo.php?uid=<{$avatar.user}>" title="<{$smarty.const._AM_AVATARS_USERS}>"> + <img class="cursorpointer xo-tooltip" id="avt<{$avatar.avatar_id}>" onclick="Xoops.changeStatus( 'avatar_custom.php', { op: 'update_display', avatar_id: <{$avatar.avatar_id}> }, 'avt<{$avatar.avatar_id}>', 'avatar_custom.php' )" src="<{if $avatar.avatar_display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" title="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" /> + <a class="xo-tooltip" href="<{$xoops_url}>/modules/profile/userinfo.php?uid=<{$avatar.user}>" title="<{$smarty.const._AM_AVATARS_USERS}>"> <img src="<{xoAdminIcons user_edit.png}>" alt="<{$smarty.const._AM_AVATARS_USERS}>" title="<{$smarty.const._AM_AVATARS_USERS}>" /> </a> - <a class="tooltip" href="avatar_custom.php?op=edit&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_EDIT}>"> + <a class="xo-tooltip" href="avatar_custom.php?op=edit&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_AVATARS_EDIT}>" /> </a> - <a class="tooltip" href="avatar_custom.php?op=delete&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_DELETE}>"> + <a class="xo-tooltip" href="avatar_custom.php?op=delete&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_DELETE}>"> <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_AVATARS_DELETE}>" /> </a> </div> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html 2012-04-29 20:11:00 UTC (rev 9410) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/avatars/templates/admin/avatars_system.html 2012-04-29 20:17:44 UTC (rev 9411) @@ -18,17 +18,17 @@ <{foreach item=avatar from=$avatars_list}> <div class="cp-avatar"> <div class="xo-thumbimg"> - <img class="tooltip" src="../../system/class/thumbs/phpThumb.php?src=<{$xoops_rootpath}>/uploads/<{$avatar.avatar_file}>&h=120&w=120" alt="<{$avatar.avatar_name}>" title="<{$avatar.avatar_name}>"/> + <img class="xo-tooltip" src="../../system/class/thumbs/phpThumb.php?src=<{$xoops_rootpath}>/uploads/<{$avatar.avatar_file}>&h=120&w=120" alt="<{$avatar.avatar_name}>" title="<{$avatar.avatar_name}>"/> </div> <div class="xo-actions txtcenter"> <div class="spacer bold"><{$avatar.avatar_name}></div> <img id="loading_avt<{$avatar.avatar_id}>" src="<{xoAppUrl media/xoops/images/spinner.gif}>" style="display:none;" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> - <img class="cursorpointer tooltip" id="avt<{$avatar.avatar_id}>" onclick="Xoops.changeStatus( 'avatar_system.php', { op: 'update_display', avatar_id: <{$avatar.avatar_id}> }, 'avt<{$avatar.avatar_id}>', 'avatar_system.php' )" src="<{if $avatar.avatar_display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" title="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" /> - <img class="cursorhelp tooltip" src="<{xoAdminIcons forum.png}>" alt="<{$avatar.count}> <{$smarty.const._AM_AVATARS_USERS}>" title="<{$avatar.count}> <{$smarty.const._AM_AVATARS_USERS}>" /> - <a class="tooltip" href="avatar_system.php?op=edit&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_EDIT}>"> + <img class="cursorpointer" id="avt<{$avatar.avatar_id}>" onclick="Xoops.changeStatus( 'avatar_system.php', { op: 'update_display', avatar_id: <{$avatar.avatar_id}> }, 'avt<{$avatar.avatar_id}>', 'avatar_system.php' )" src="<{if $avatar.avatar_display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" title="<{if $avatar.avatar_display}><{$smarty.const._AM_AVATARS_OFF}><{else}><{$smarty.const._AM_AVATARS_ON}><{/if}>" /> + <img class="cursorhelp xo-tooltip" src="<{xoAdminIcons forum.png}>" alt="<{$avatar.count}> <{$smarty.const._AM_AVATARS_USERS}>" title="<{$avatar.count}> <{$smarty.const._AM_AVATARS_USERS}>" /> + <a class="xo-tooltip" href="avatar_system.php?op=edit&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_AVATARS_EDIT}>" /> </a> - <a class="tooltip" href="avatar_system.php?op=delete&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_DELETE}>"> + <a class="xo-tooltip" href="avatar_system.php?op=delete&avatar_id=<{$avatar.avatar_id}>" title="<{$smarty.const._AM_AVATARS_DELETE}>"> <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_AVATARS_DELETE}>" /> </a> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 20:11:06
|
Revision: 9410 http://xoops.svn.sourceforge.net/xoops/?rev=9410&view=rev Author: mageg Date: 2012-04-29 20:11:00 +0000 (Sun, 29 Apr 2012) Log Message: ----------- update banners Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/menu.php 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/admin/menu.php 2012-04-29 20:11:00 UTC (rev 9410) @@ -19,22 +19,21 @@ * @author Mage Gr\xE9gory (AKA Mage) * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; $adminmenu = array(); $i = 1; $adminmenu[$i]['title'] = _MI_BANNERS_INDEX; $adminmenu[$i]['link'] = "admin/index.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'home.png'; +$adminmenu[$i]['icon'] = 'home.png'; $i++; $adminmenu[$i]['title'] = _MI_BANNERS_CLIENTS; $adminmenu[$i]['link'] = "admin/clients.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'index.png'; +$adminmenu[$i]['icon'] = 'index.png'; $i++; $adminmenu[$i]['title'] = _MI_BANNERS_BANNERS; $adminmenu[$i]['link'] = "admin/banners.php"; -$adminmenu[$i]['icon'] = $pathIcon32 . 'banners.png'; +$adminmenu[$i]['icon'] = 'banners.png'; $i++; $adminmenu[$i]['title'] = _MI_BANNERS_ABOUT; $adminmenu[$i]['link'] = 'admin/about.php'; -$adminmenu[$i]['icon'] = $pathIcon32 . 'about.png'; \ No newline at end of file +$adminmenu[$i]['icon'] = 'about.png'; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/class/form/banner.php 2012-04-29 20:11:00 UTC (rev 9410) @@ -57,9 +57,11 @@ $client_select = new XoopsFormSelect( _AM_BANNERS_CLIENTS_NAME, 'cid', $obj->getVar('cid') ); $client_select->addOptionArray($client_Handler->getList()); $this->addElement($client_select, true); + + $imptotal = new XoopsFormText( _AM_BANNERS_BANNERS_IMPRESSIONSP, 'imptotal', 20, 255, $obj->getVar('imptotal') ); + $imptotal->setPattern('^[0-9]*[0-9]+$|^[0-9]+[0-9]*$', _AM_BANNERS_BANNERS_IMPRESSIONSP_PATTERN); + $this->addElement($imptotal, true ); - $this->addElement(new XoopsFormText( _AM_BANNERS_BANNERS_IMPRESSIONSP, 'imptotal', 20, 255, $obj->getVar('imptotal') ), true ); - $imgtray_img = new XoopsFormElementTray( _AM_BANNERS_BANNERS_IMAGE, '<br /><br />' ); $imgtray_img->addElement(new XoopsFormText( _AM_BANNERS_BANNERS_IMGURL, 'imageurl', 80, 255, $obj->getVar('imageurl'))); $imgpath_img = sprintf( _AM_BANNERS_BANNERS_IMAGE_PATH, XOOPS_UPLOAD_PATH . '/banners/' ); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/admin.php 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/admin.php 2012-04-29 20:11:00 UTC (rev 9410) @@ -59,6 +59,7 @@ define("_AM_BANNERS_BANNERS_IMPRESIONLEFT","Impressions left"); define("_AM_BANNERS_BANNERS_IMPRESSIONS","Impressions"); define("_AM_BANNERS_BANNERS_IMPRESSIONSP","Impressions purchased"); +define("_AM_BANNERS_BANNERS_IMPRESSIONSP_PATTERN","You must enter an integer"); define("_AM_BANNERS_BANNERS_LIST","List of banners"); define("_AM_BANNERS_BANNERS_NCLICKS","% Clicks"); define("_AM_BANNERS_BANNERS_RELOAD","Reload banner"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/help/help.html 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/language/english/help/help.html 2012-04-29 20:11:00 UTC (rev 9410) @@ -1,17 +1,10 @@ -<div id="help-template" class="outer"> - <h1 class="head">Help: - <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/banners/admin/index.php" title="Back to the administration of Banners"> - Banners <img src="<{xoAdminIcons home.png}>"alt="Back to the administration of Banners"/> - </a> - </h1> - <!-- ===== Help Content ======= --> - <h4 class="odd">Description</h4> - <p class="even"> - Banners are advertisements displayed in the top section of the page. They may be images or flash movies, e.g. the wildly gyrating XOOPS banner that is part of the default installation. XOOPS has a built in system for managing banners and creating accounts for advertising clients, which is found in the System Module -> Banners. You can have multiple banners on a XOOPS site – the display area rotates through each of the active banners in turn each time a new page is loaded.<br /><br /> +<!-- ===== Help Content ======= --> +<h4>Description</h4> +<p> +Banners are advertisements displayed in the top section of the page. They may be images or flash movies, e.g. the wildly gyrating XOOPS banner that is part of the default installation. XOOPS has a built in system for managing banners and creating accounts for advertising clients, which is found in the System Module -> Banners. You can have multiple banners on a XOOPS site – the display area rotates through each of the active banners in turn each time a new page is loaded.<br /><br /> - Each time a banner is displayed to a visitor this counts as one ‘impression’, which is the common trading currency of banners. Clients typically pay for a certain number of impressions – i.e. to have their advertisement displayed a certain number of times.<br /><br /> +Each time a banner is displayed to a visitor this counts as one ‘impression’, which is the common trading currency of banners. Clients typically pay for a certain number of impressions – i.e. to have their advertisement displayed a certain number of times.<br /><br /> - Please note: If you are in the business of selling banners based on the number of impressions there is one important thing you should do: Go to System Module -> Preferences -> General Settings and fill in the ‘Your IP Address’ field (if you have one). This will prevent your visits to the site from being included in the impression count. Failure to do this could be considered somewhat dishonest (noting, however, that many Administrators don’t have a permanent IP – e.g. those using dial up modems). - </p> - <!-- ===== Help Content ======= --> -</div> +Please note: If you are in the business of selling banners based on the number of impressions there is one important thing you should do: Go to System Module -> Preferences -> General Settings and fill in the ‘Your IP Address’ field (if you have one). This will prevent your visits to the site from being included in the impression count. Failure to do this could be considered somewhat dishonest (noting, however, that many Administrators don’t have a permanent IP – e.g. those using dial up modems). +</p> +<!-- ===== Help Content ======= --> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_banners.html 2012-04-29 20:11:00 UTC (rev 9410) @@ -24,11 +24,11 @@ <td class="txtcenter"><{$banner.percent}>%</td> <td class="txtcenter"><{$banner.name}></td> <td class="xo-actions txtcenter"> - <img class="tooltip" onclick="display_dialog(<{$banner.bid}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> - <a class="tooltip" href="banners.php?op=edit&bid=<{$banner.bid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> + <img onclick="display_dialog(<{$banner.bid}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> + <a href="banners.php?op=edit&bid=<{$banner.bid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_BANNERS_EDIT}>" /> </a> - <a class="tooltip" href="banners.php?op=delete&bid=<{$banner.bid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> + <a href="banners.php?op=delete&bid=<{$banner.bid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_BANNERS_DELETE}>" /> </a> </td> @@ -74,11 +74,11 @@ <td class="txtcenter"><{$banner_finish.percent}>%</td> <td class="txtcenter"><{$banner_finish.name}></td> <td class="xo-actions txtcenter"> - <img class="tooltip" onclick="display_dialog(<{$banner_finish.bid}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> - <a class="tooltip" href="banners.php?op=reload&bid=<{$banner_finish.bid}>" title="<{$smarty.const._AM_BANNERS_BANNERS_RELOAD}>"> + <img onclick="display_dialog(<{$banner_finish.bid}>, true, true, 'slide', 'slide', 200, 520);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> + <a href="banners.php?op=reload&bid=<{$banner_finish.bid}>" title="<{$smarty.const._AM_BANNERS_BANNERS_RELOAD}>"> <img src="<{xoAdminIcons reload.png}>" alt="<{$smarty.const._AM_BANNERS_BANNERS_RELOAD}>"/> </a> - <a class="tooltip" href="banners.php?op=delete&bid=<{$banner_finish.bid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> + <a href="banners.php?op=delete&bid=<{$banner_finish.bid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_BANNERS_DELETE}>" /> </a> </td> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-04-29 20:09:15 UTC (rev 9409) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/banners/templates/admin/banners_admin_clients.html 2012-04-29 20:11:00 UTC (rev 9410) @@ -25,11 +25,11 @@ <td class="txtcenter"><{$client.banner_active}></td> <td class="txtcenter"><{$client.email}></td> <td class="xo-actions txtcenter"> - <img class="tooltip" onclick="display_dialog(<{$client.cid}>, true, true, 'slide', 'slide', 250, 400);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> - <a class="tooltip" href="clients.php?op=edit&cid=<{$client.cid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> + <img onclick="display_dialog(<{$client.cid}>, true, true, 'slide', 'slide', 250, 400);" src="<{xoAdminIcons display.png}>" alt="<{$smarty.const._AM_BANNERS_VIEW}>" title="<{$smarty.const._AM_BANNERS_VIEW}>" /> + <a href="clients.php?op=edit&cid=<{$client.cid}>" title="<{$smarty.const._AM_BANNERS_EDIT}>"> <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_BANNERS_EDIT}>" /> </a> - <a class="tooltip" href="clients.php?op=delete&cid=<{$client.cid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> + <a href="clients.php?op=delete&cid=<{$client.cid}>" title="<{$smarty.const._AM_BANNERS_DELETE}>"> <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_BANNERS_DELETE}>" /> </a> </td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 20:09:22
|
Revision: 9409 http://xoops.svn.sourceforge.net/xoops/?rev=9409&view=rev Author: mageg Date: 2012-04-29 20:09:15 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Update smilies Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2012-04-29 19:52:09 UTC (rev 9408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/admin/menu.php 2012-04-29 20:09:15 UTC (rev 9409) @@ -19,7 +19,7 @@ * @author Mage Grégory (AKA Mage) * @version $Id$ */ -$pathIcon32 = '../../media/xoops/images/icons/32/'; +$pathIcon32 = ''; $adminmenu = array(); $i = 1; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html 2012-04-29 19:52:09 UTC (rev 9408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/language/english/help/help.html 2012-04-29 20:09:15 UTC (rev 9409) @@ -1,15 +1,10 @@ -<div id="help-template" class="outer"> - <h1 class="head">Help: - <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/smilies/admin/index.php" title="Back to the administration of Smilies"> - Smilies <img src="<{xoAdminIcons home.png}>" alt="Back to the administration of Smilies"/> - </a> - </h1> - <!-- ===== Help Content ======= --> - <h4 class="odd">Description</h4><br/> - Smiles are little graphic symbols that people can use to express themselves. They can be inserted anywhere in the text of an article, comment or post from both the user and admin sides of the system. XOOPS ships with a collection of 17 smilies built in. Some of these are displayed on the submission forms in various modules (including forums, news, downloads, links and others). Clicking on a smilie will insert it into the post. Smilies can also be inserted by typing in their unique ‘codes’ (keyboard shortcuts), for example typing ':' '-' 'D' in a post will insert this smilie: <img src="http://www.xoops.org/uploads/smil42e7a3d4c7b9f.gif" alt=""/> - <br/><br/> - The full list of smilies available on your system and their codes is accessible through the Smilies, which is where you're now. Here you can add, edit and delete smilies, and control which are displayed on submission forms (only nine of the 17 are displayed by default) - <br/><br/> - If you don’t want smilies on your system, you can either uncheck the “display in form?” box (in which case they won’t appear on submission forms, but will still be available via their codes), or use the delete link to remove them entirely. <br/><br/> - <!-- ===== Help Content ======= --> -</div> \ No newline at end of file +<!-- ===== Help Content ======= --> +<h4>Description</h4> +<p> +Smiles are little graphic symbols that people can use to express themselves. They can be inserted anywhere in the text of an article, comment or post from both the user and admin sides of the system. XOOPS ships with a collection of 17 smilies built in. Some of these are displayed on the submission forms in various modules (including forums, news, downloads, links and others). Clicking on a smilie will insert it into the post. Smilies can also be inserted by typing in their unique ‘codes’ (keyboard shortcuts), for example typing ':' '-' 'D' in a post will insert this smilie: <img src="http://www.xoops.org/uploads/smil42e7a3d4c7b9f.gif" alt=""/> +<br/><br/> +The full list of smilies available on your system and their codes is accessible through the Smilies, which is where you're now. Here you can add, edit and delete smilies, and control which are displayed on submission forms (only nine of the 17 are displayed by default) +<br/><br/> +If you don’t want smilies on your system, you can either uncheck the “display in form?” box (in which case they won’t appear on submission forms, but will still be available via their codes), or use the delete link to remove them entirely. <br/><br/> +</p> +<!-- ===== Help Content ======= --> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html 2012-04-29 19:52:09 UTC (rev 9408) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/smilies/templates/admin/smilies_smilies.html 2012-04-29 20:09:15 UTC (rev 9409) @@ -8,32 +8,32 @@ <{includeq file="admin:system|admin_tips.html"}> <{includeq file="admin:system|admin_buttons.html"}> <{if $smilies_count == true}> -<table id="xo-smilies-sorter" cellspacing="1" class="outer tablesorter"> +<table id="xo-smilies-sorter" class="outer tablesorter"> <thead> <tr> <th class="txtcenter"><{$smarty.const._AM_SMILIES_CODE}></th> <th class="txtcenter"><{$smarty.const._AM_SMILIES_SMILIE}></th> - <th class="txtcenter"><{$smarty.const._AM_SMILIES_DESCRIPTION}></th> + <th class="txtleft"><{$smarty.const._AM_SMILIES_DESCRIPTION}></th> <th class="txtcenter"><{$smarty.const._AM_SMILIES_DISPLAY}></th> - <th class="txtcenter width10"><{$smarty.const._AM_SMILIES_ACTION}></th> + <th class="txtcenter"><{$smarty.const._AM_SMILIES_ACTION}></th> </tr> </thead> <tbody> <{foreach item=smilies from=$smilies}> <tr class="<{cycle values='even,odd'}> alignmiddle"> <td class="txtcenter width5"><{$smilies.code}></td> - <td class="txtcenter width5"><{$smilies.image}></td> - <td class="txtcenter width50"><{$smilies.emotion}></td> + <td class="txtcenter width10"><{$smilies.image}></td> + <td class="txtleft"><{$smilies.emotion}></td> <td class="xo-actions txtcenter width10"> <img id="loading_sml<{$smilies.smilies_id}>" src="<{xoAppUrl media/xoops/images/spinner.gif}>" style="display:none;" alt="<{$smarty.const._AM_SYSTEM_LOADING}>" /> - <img class="cursorpointer tooltip" id="sml<{$smilies.smilies_id}>" onclick="Xoops.changeStatus( 'smilies.php', { op: 'smilies_update_display', smilies_id: <{$smilies.smilies_id}> }, 'sml<{$smilies.smilies_id}>', 'smilies.php' )" src="<{if $smilies.display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" title="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" /> + <img class="cursorpointer" id="sml<{$smilies.smilies_id}>" onclick="Xoops.changeStatus( 'smilies.php', { op: 'smilies_update_display', smilies_id: <{$smilies.smilies_id}> }, 'sml<{$smilies.smilies_id}>', 'smilies.php' )" src="<{if $smilies.display}><{xoAdminIcons success.png}><{else}><{xoAdminIcons cancel.png}><{/if}>" alt="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" title="<{if $smilies.display}><{$smarty.const._AM_SMILIES_OFF}><{else}><{$smarty.const._AM_SMILIES_ON}><{/if}>" /> </td> - <td class="xo-actions txtcenter width10"> - <a class="tooltip" href="smilies.php?op=edit_smilie&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_EDIT}>"> - <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_SMILIES_EDIT}>" /> + <td class="xo-actions txtcenter width5"> + <a href="smilies.php?op=edit_smilie&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_EDIT}>"> + <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._AM_SMILIES_EDIT}>"> </a> - <a class="tooltip" href="smilies.php?op=smilies_delete&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_DELETE}>"> - <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_SMILIES_DELETE}>" /> + <a href="smilies.php?op=smilies_delete&smilies_id=<{$smilies.smilies_id}>" title="<{$smarty.const._AM_SMILIES_DELETE}>"> + <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._AM_SMILIES_DELETE}>"> </a> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 19:52:17
|
Revision: 9408 http://xoops.svn.sourceforge.net/xoops/?rev=9408&view=rev Author: mageg Date: 2012-04-29 19:52:09 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Display change to the help section Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/help.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/blocksadmin.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/comments.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/groups.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/help_center.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/images.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/mailusers.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/maintenance.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/module_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/modulesadmin.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/preferences.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/tplsets.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/users.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_help.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/smilies.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/userrank.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/help.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/help.css 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/help.css 2012-04-29 19:52:09 UTC (rev 9408) @@ -30,4 +30,9 @@ font-style: 12px; font-weight: bold; +} + +.system-help { + float: left; + width: 100%; } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2012-04-29 19:52:09 UTC (rev 9408) @@ -74,10 +74,12 @@ } $xoops->tpl->assign('modname', $module->getVar('name')); + $xoops->tpl->assign('moddirname', $module->getVar('dirname', 'e')); if ($page != '') { // Call template if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html')) { + $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'); } else { if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html')) { @@ -86,15 +88,16 @@ $xoops->tpl->assign('load_error', 1); } } - + if ($module->getVar('dirname', 'e') != 'system') { + $xoops->tpl->assign('help_module', true); + } $xoops->tpl->assign('helpcontent', $helpcontent); } else { if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html')) { $helpcontent = $xoops->tpl->fetch(XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoops->getConfig('language') . '/help/module_index.html'); } else { - $helpcontent = $module->getInfo('description'); - $helpcontent = '<div id="non-modhelp">' . $helpcontent . '</div>'; + $helpcontent = '<p>' . $module->getInfo('description') . '</p>'; } $xoops->tpl->assign('helpcontent', $helpcontent); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/blocksadmin.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/blocksadmin.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/blocksadmin.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,8 +1,7 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Blocks</h1> +<h1>Help: Blocks</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4>Description</h4> +<p> Blocks are discreet sections of content that can be created and configured in the admin interface. Custom blocks can be created and are typically made up of text, graphics and pictures. The content in these blocks may be formatted individually or inherit the site formatting. Blocks may also be part of a modules display output. The blocks administration page is where all blocks are configured and administered. <br /><br /> Blocks are like a newspapers' front page: they are teasers that incite readers to read more complete stories in the inside pages. Blocks offer small bits of dynamic content with links to the actual content stored in the module.<br /><br /> @@ -12,6 +11,4 @@ Every module that is installed in a XOOPS site registers its blocks in the system, and the webmaster can decide where it will be shown, in what part of the page it'll appear and what kind of relevance, weight or position will it have. The site administrator can also edit the block's label and, if knowledgeable enough, can even edit the template that underlies the block's presentation. -</p> - -</div> +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/comments.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/comments.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/comments.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,8 +1,7 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Comments</h1> +<h1>Help: Comments</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4>Description</h4> +<p> Site administrators have the option of providing a comments section for users. Comments can be added to many modules and displayed in a variety of ways. Comments can be screened, filtered, and made available to selected groups. This provides quick easy interaction from site users, while maintaining good moderation and security.<br /><br /> The Comment Manager allows the Site administrator to edit and delete any comment that has been posted to the site, originating in any module that supports the comments feature. @@ -10,6 +9,4 @@ You can also select several comments and delete them at once. -</p> - -</div> +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/groups.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/groups.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/groups.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,8 +1,7 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Groups</h1> +<h1>Help: Groups</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4">Description</h4> +<p> XOOPS incorporates a member registration system - you can optionally require people to sign up to your site in order to have access to certain areas or functions. For example, most sites require people to join before they are allowed to contribute news or post messages in the forums Access and administration rights to a XOOPS website are set through a flexible permission system based on 'user groups'. The default groups include anonymous users, registered members and webmasters, but of course you can define as many groups as you need to manage your site. Each group can be given a unique set of access rights governing:<br /><br /> @@ -15,6 +14,4 @@ Custom groups can also be created through the groups administration page. -</p> - -</div> +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/help_center.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/help_center.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/help_center.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,17 +1,13 @@ -<div id="help-template" class="outer"> +<h2>Welcome to: XOOPS Help center</h2> -<h2 class="head">Welcome to: XOOPS Help center</h2> +<h4>How do I use XOOPS?</h4> +<p>XOOPS is a web application platform written in PHP for the MySQL database. Its object orientation makes it an ideal tool for developing small or large community websites, intra company and corporate portals, weblogs and much more. In order to use XOOPS effectively, you need to install modules that provide the functionality that you're looking for. There are many different modules in <a href="http://www.xoops.org/modules/repository/" rel="external" title="Module Repository">Module Repository</a>, from calendars, photo galleries, through news, bulletin boards, to weather updates.</p> -<h4 class="odd">How do I use XOOPS?</h4> -<p class="even">XOOPS is a web application platform written in PHP for the MySQL database. Its object orientation makes it an ideal tool for developing small or large community websites, intra company and corporate portals, weblogs and much more. In order to use XOOPS effectively, you need to install modules that provide the functionality that you're looking for. There are many different modules in <a href="http://www.xoops.org/modules/repository/" rel="external" title="Module Repository">Module Repository</a>, from calendars, photo galleries, through news, bulletin boards, to weather updates.</p> +<h4>How do I use the Help Center?</h4> +<p>The Help Center is to provide you with basic information related to individual features of the Administration. Whenever you would like to know more about particular page you are on, just click the help icon in the right hand corner</p> -<h4 class="odd">How do I use the Help Center?</h4> -<p class="even">The Help Center is to provide you with basic information related to individual features of the Administration. Whenever you would like to know more about particular page you are on, just click the help icon in the right hand corner</p> +<h4>How I can create content in XOOPS?</h4> +<p>You'll need a module for it. This could be a News module, or a Content module. </p> -<h4 class="odd">How I can create content in XOOPS?</h4> -<p class="even">You'll need a module for it. This could be a News module, or a Content module. </p> - -<h4 class="odd">How I can get more help?</h4> -<p class="even">Please visit our Support Forums at: <a href="http://www.xoops.org/modules/newbb" rel="external" title="Forum">http://www.xoops.org/modules/newbb</a> </p> - -</div> \ No newline at end of file +<h4>How I can get more help?</h4> +<p>Please visit our Support Forums at: <a href="http://www.xoops.org/modules/newbb" rel="external" title="Forum">http://www.xoops.org/modules/newbb</a> </p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/images.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/images.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/images.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,13 +1,9 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Image Manager</h1> +<h1>Help: Image Manager</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4>Description</h4> +<p> The Image Manager is a tool that enables people to upload, organize and retrieve images for use throughout the site. You must configure the image manager before you can use it - this involves creating some categories to store your images and setting preferences on issues such as maximum image dimensions, file size and user group access rights. Each category is configured separately.<br /><br /> Images can be categorized and uploaded directly into the images manager through a browser in this window with one click of a button, enabling easy insertion of images into news articles and other content. There is an extensive permission system controlling image dimensions, file size and access of user groups to different categories. -</p> - -</div> - +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/mailusers.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/mailusers.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/mailusers.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,12 +1,8 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Mail Users</h1> -<h4 class="odd">Description</h4> +<h1>Help: Mail Users</h1> +<h4>Description</h4> -<p class="even"> +<p> XOOPS has a built in messaging system that enables you to send a message to your entire registered user base or subgroups thereof, or using date filters. This can be in the form of a private message (i.e. through the XOOPS built-in messaging system) or through an email. A range of options is available for filtering out subgroups of users from your membership.<br /><br /> You can also use predefined tags that will enable you to personalize your message. -</p> - -</div> - +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/maintenance.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/maintenance.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/maintenance.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,9 +1,7 @@ -<div id="help-template" class="outer"> +<h1>Help: Maintenance</h1> +<h4>Description</h4> -<h1 class="head">Help: Maintenance</h1> -<h4 class="odd">Description</h4> - -<p class="even"> +<p> Maintenance provides several basic functions to help you in mantaining your XOOPS installation and keep it healthy:<br /><br /> - clean cache folder<br /> @@ -11,5 +9,4 @@ - perform maintenance of the database tables (analyze, check, optimize, and repair) <br /><br /> You can also perform a "Dump" of the whole database or individual tables for backup purposes. - -</div> \ No newline at end of file +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/module_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/module_index.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/module_index.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,7 +1,3 @@ -<div id="help-template" class="outer"> - -<h2 class="head">Welcom to: System module</h2> -<h4 class="odd">Description</h4> -<p class="even">For administration of core settings of the site.</p> - -</div> \ No newline at end of file +<h2>Welcom to: System module</h2> +<h4>Description</h4> +<p>For administration of core settings of the site.</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/modulesadmin.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/modulesadmin.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/modulesadmin.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,8 +1,7 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Modules</h1> +<h1>Help: Modules</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4 >Description</h4> +<p> Modules are the software constructs that, taking advantage of the infrastructure that XOOPS provides, let the webmaster offer the site’s users dynamic or static content generated using a Web interface that more often that not is very easy to use.<br /><br /> Part of the power of XOOPS resides in the way modules are managed. The webmaster can easily install, uninstall, activate or deactivate any specific module (except the System module, for obvious reasons). It’s also possible to rename modules, and to determine the order in which they will appear to the end user in the site’s menu –if you want them to appear at all–, because you can also provide hidden functionality, defining active modules that have no visible presence to the casual user. For instance, you could define a module as not visible in the menu by disabling the check icon in the Menu column. So for the News module, you could then send a private messages to selected group of your users and tell them to access that directory typing the address in the URL field, something like <em>http://www.yoursite.com/modules/news</em>. <br /><br /> @@ -12,6 +11,4 @@ Module installation needs some planning, both for the modules to be displayed and also the layout on the pages. It is a good idea to review other XOOPS sites and see which modules are used to display various types of content. This is easily done by opening any XOOPS site and hovering over the menu links on the left and right hand side panels. At the same time look at the URLs displayed in the status bar on your browser. You should see addresses like this: http://the_site.com/modules/news/.... All modules are stored in the /modules/ directory, thus the following sector of the address (in this example 'news') shows the module that will display contents of that menu link. <br /><br /> If you open the page for the link it will show an example of how the module is used and the type of content it displays. Reviewing other sites like this will also give you some good insight into layout and design capabilities. -</p> - -</div> +</p> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/plugins.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -0,0 +1,8 @@ +<h1 class="head">Help: Plugins</h1> + +<h4>Description</h4> +<p> + +Empty... + +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/preferences.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/preferences.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/preferences.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,18 +1,16 @@ -<div id="help-template" class="outer"> +<h1>Help: Preferences</h1> +<h4>Description</h4> -<h1 class="head">Help: Preferences</h1> -<h4 class="odd">Description</h4> - -<p class="even"> +<p> The preference panels are where you configure your site-wide preferences. It is worth taking the time to work through them as some settings can have a significant impact on the performance, security and ease of use of your site. </p> -<h4 class="odd">General Settings</h4> -<p class="even"> +<h4>General Settings</h4> +<p> These are the most important and most frequently accessed preferences. You will set the Site name and the Slogan for your Website. You'll also select the default Theme and Admin GUI. And if you need to work on your Website, you can close it for all users. You can also set Module-wide Cache times. </p> -<h4 class="odd">Meta Tags and Footer</h4> -<p class="even"> +<h4>Meta Tags and Footer</h4> +<p> Meta tags provide information about your information – they describe the nature of your website. Their main use is to help search engines and their robots to index your website correctly, i.e. to help the right people find it. The information you supply is included in the header of each webpage. It should represent the content of the site as a whole - the meta information is the same on every page, it currently cannot be customised for different modules or pages.<br /><br /> Be aware that the major search engines use different strategies for indexing websites. They may place different weightings on meta tags or even ignore them completely. Careful use of meta information may help your website to gain better search engine rankings and it is useful to seek information on the indexing strategies of your dominant referrers (see your website logfile). This may help you to optimise your meta information or other aspects of your site design and content to improve your rankings. <br /><br /> @@ -21,16 +19,16 @@ </p> -<h4 class="odd">Word Censoring Options</h4> -<p class="even"> +<h4>Word Censoring Options</h4> +<p> XOOPS can automatically censor undesirable words that may be posted by visitors to your site and replace them with a generic, alternative term of your choice. The censorship function does consume some system resources and may slow your site somewhat. It is disabled by default.<br /><br /> To implement censorship on your site select the ‘<em>enable</em>’ radio button. You need to enter a list of unwanted words in the ‘<em>words to censor</em>’ box, separating them with the pipe character. This function is case insensitive. Enter a suitable replacement term in the ‘<em>replace bad words with</em>’ box. The default is #OOPS#. </p> -<h4 class="odd">Search Options</h4> -<p class="even"> +<h4>Search Options</h4> +<p> The search facility is one of the most important tools for locating information in a portal website. The XOOPS search categorises results by module – records are identified as news items, downloads, links or other types as per the modules you have installed. <br /><br /> Global searches of all resources on your site are enabled by default. If you disable global searches this facility will no longer be available and the search block will become non-functional. @@ -40,21 +38,19 @@ </p> -<h4 class="odd">Mail Setup</h4> -<p class="even"> +<h4>Mail Setup</h4> +<p> This section of the control panel is used to configure your email for the system. It is recommended that you leave the Mail Delivery Method on the default setting “PHP (mail)”. You do not need to fill in the Sendmail or SMTP fields unless you use an alternative mail delivery option. </p> -<h4 class="odd">Authentication Options</h4> -<p class="even"> +<h4>Authentication Options</h4> +<p> Just leave it at Xoops Database and you can ignore all the other options in there.<br /><br /> LDAP or Microsoft Active directory servers have been added for authentification as an alternate to the normal Xoops users. The reason is that in many company you already have a user database in ADS or LDAP and they can use that to logon to Xoops and don´t have to register yet another account. </p> -<h4 class="odd">System Module Settings</h4> -<p class="even"> +<h4>System Module Settings</h4> +<p> Here you can activate/deactivate each of the System sections, as well as specify system-wide defaults, e.g. for number of displayed avatars or images per page. You can also select a default editor for blocks, comments, and for all modules. -</p> - -</div> \ No newline at end of file +</p> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/smilies.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/smilies.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/smilies.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,14 +0,0 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Smilies</h1> - -<h4 class="odd">Description</h4> -<p class="even"> -Smiles are little graphic symbols that people can use to express themselves. They can be inserted anywhere in the text of an article, comment or post from both the user and admin sides of the system. XOOPS ships with a collection of 17 smilies built in. Some of these are displayed on the submission forms in various modules (including forums, news, downloads, links and others). Clicking on a smilie will insert it into the post. Smilies can also be inserted by typing in their unique ‘codes’ (keyboard shortcuts), for example typing ':' '-' 'D' in a post will insert this smilie: <img src="http://www.xoops.org/uploads/smil42e7a3d4c7b9f.gif" alt=""/> <br /><br /> - -The full list of smilies available on your system and their codes is accessible through the Smilies, which is where you're now. Here you can add, edit and delete smilies, and control which are displayed on submission forms (only nine of the 17 are displayed by default)<br /><br /> - -If you don’t want smilies on your system, you can either uncheck the “display in form?” box (in which case they won’t appear on submission forms, but will still be available via their codes), or use the delete link to remove them entirely. -</p> - -</div> - Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/tplsets.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/tplsets.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/tplsets.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,8 +1,7 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Templates</h1> +<h1>Help: Templates</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4>Description</h4> +<p> XOOPS allows for some separation between the actual presentation of the site (the “<em>skin</em>” or user interface) and the code that runs in the back. The first one is handled by a sophisticated mechanism based on graphical themes. A theme may include, in its basic form, the essential HTML templates that define the visual interface of the site, as well as the style sheets and images needed to complement that visual interface. Themes are switchable in the administrative interface, so changing the whole appearance of a XOOPS site it’s just a matter of changing the value of a selector and clicking on “Accept”. XOOPS also provides site administrators with the ability to let users choose among some available themes.<br /><br /> Generally speaking, a <strong><em>theme</em></strong> is the high level visual framework of a site: the theme defines, for instance, the general layout of the site; on the other hand, it does not usually define the specific distribution of content within a block. This is handled by a different entity called a <em><strong>template set</strong></em>. A template set<em> </em>is an ensemble of HTML templates that define the presentation of content within all the blocks that form a XOOPS Web site. If we want a more clear metaphor for this, we could say that the theme is like the architect of a house, while the template set is like the interiors decorator. The first one sets the walls and defines the general distribution, but it’s the second one who’s in charge of “<em>dressing</em>” those walls.<br /><br /> @@ -13,18 +12,16 @@ <strong><a rel="external" href="http://www.smarty.net/">Smarty</a></strong> that makes the function of what used to be called <em><strong>variable interpolation</strong></em>. Expressed in a simple way, we could say that the XOOPS system uses PHP files to hold the logic of the modules (access to the database, allocation of variables, management of rights...), HTML files with Smarty variables inserted to manage the actual visual interface, and the Smarty engine to insert values and strings in specific places within the HTML that builds the pages seen by the end user. All in all, what this means to you can be easily summarized: thanks to its theming system, XOOPS lets site designers build more interesting and visually stunning sites without much concern about what happens under the hood. -<h4 class="odd">Cloning and downloading template sets</h4> -<p class="even"> +<h4>Cloning and downloading template sets</h4> +<p> If you would like to create a custom template set you can make a copy of the default set (or any other) by selecting the ‘<em>clone</em>’ link (you will be prompted to give the new set a name). Unlike the default, other template sets can be freely edited. You can also save a copy of a template set to disk by selecting the ‘<em>download</em>’ link, or remove it with the ‘<em>delete</em>’ link. You may also sometimes see an additional ‘<em>Generate</em>’ link next to new modules for which templates have not yet been created. </p> -<h4 class="odd">Editing templates</h4> -<p class="even"> +<h4>Editing templates</h4> +<p> You can see a full list of available templates by browsing the directory treeview. When you select a template, XOOPS will open it in an editor where you can edit it. <br /><br /> While editing templates you must enable a preference that automatically updates module template .html files if there are newer files under the themes/your theme/templates directory for the current theme (System Module -> Preferences -> General Settings -> Update module template .html files from themes/your theme/templates directory? -> ‘<em>Yes</em>’). This should be turned off once the site goes public.<br /><br /> If you accidentally mess up a template don’t forget that you can retrieve a ‘<em>good</em>’ copy from the default template set. If you are working with non-standard templates it may be a good idea to save a copy to disk before you start modifying them. -</p> - -</div> +</p> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/userrank.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/userrank.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/userrank.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,17 +0,0 @@ -<div id="help-template" class="outer"> - -<h1 class="head">Help: User Ranks</h1> -<h4 class="odd">Description</h4> - -<p class="even"> -User Ranks allow you to give people some ‘<em>status</em>’ based on either their role or level of participation in the community. It is important to note that user ranks are functionally irrelevant - they *do not* confer any extra privileges or administrative rights at all – they are just titles. User access rights are actually controlled elsewhere (through the Groups section of the control panel). If you assign someone the Webmaster user rank but forget to also assign them to the Webmaster user group (a common mistake) they may look cool but they won’t be able to administer the site !<br /><br /> - -‘<em>Normal</em>’ ranks are assigned on the basis of the number of forum posts and comments a user has made. A user’s rank will change as they make enough posts to qualify for the next level. XOOPS ships with the following default ranks: Just popping in; Not too shy to talk; Quite a regular; Just can’t stay away; and Home away from home. -XOOPS also ships with two ‘<em>special ranks</em>’: Moderator and Webmaster. Special ranks differ in that they can be assigned to users irrespective of the number of posts they have made. A typical use of special ranks is to give recognition to people performing various administrative functions.<br /><br /> - -The ‘<em>edit</em>’ link allows you to change the name of a rank, to alter the minimum / maximum number of posts needed to qualify, to designate it as a ‘<em>special</em>’ rank (or not), and to upload a new rank image. You can remove unnecessary ranks (‘delete’ link). <br /><br /> - -You can create additional ranks through the form at the bottom of the user rank page. Simply assign a name, minimum and maximum number of posts (if desired), upload a rank image and assign it as either normal or special. -</p> - -</div> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/users.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/users.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/language/english/help/users.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,20 +1,19 @@ -<div id="help-template" class="outer"> -<h1 class="head">Help: Users</h1> +<h1>Help: Users</h1> -<h4 class="odd">Description</h4> -<p class="even"> +<h4>Description</h4> +<p> XOOPS provides built in tools for easy user management. These include the ability to search for users by various criteria, send email and private messages to users through a template-based messaging system. In your site, users have the rights that pertain to the group they're assigned to.<br /><br /> As to users, they have access to their profile, have some control over most of the information that will be visible to other users, and have also an inbox to receive private messages from the site administrator or from other users. They have besides control over what changes in the site will trigger personal notifications. And depending on the permissions set by the site manager, they can see content and participate in the site's life by uploading content, writing stories or comments, rating content and in general giving their feedback to what they see on the site.<br /><br /> </p> -<h4 class="odd">Advanced Search</h4> -<p class="even"> +<h4>Advanced Search</h4> +<p> "Advanced Search" provides a wide range of options that you can use to search for specific users or to filter your membership. You can also obtain a complete list of members by pressing the ‘submit’ button without using any of the filters. </p> -<h4 class="odd">Edit Users</h4> -<p class="even"> +<h4>Edit Users</h4> +<p> You can add, edit and delete users through this section of the System Module.<br /><br /> To edit a user, search for one based on the name or other criteria. You may then choose to either <br /><br /> @@ -22,7 +21,4 @@ ii) delete them using the second drop down box.<br /><br /> Selecting ‘modify’ will open the user’s profile which you may then change as you see fit (note that you can also reach the edit profile page from the user side via the member directory, or by clicking on a username anywhere in the site). -</p> - - -</div> +</p> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_help.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_help.html 2012-04-29 17:05:07 UTC (rev 9407) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_help.html 2012-04-29 19:52:09 UTC (rev 9408) @@ -1,30 +1,55 @@ <{includeq file="admin:system|system_header.html"}> <table> - <tr> - <td class="width20" valign="top"> - <{if $help}> - <div class="xo-help-menu"> - <h2 class="head"><{$modname}></h2> - <{foreach item=help from=$help}> - <div class="<{cycle values='odd, even'}>"><a href="<{$help.link}>"><{$help.name}></a></div> - <{/foreach}> - </div> - <{/if}> - <{if $list_mods}> - <div class="xo-help-menu"> - <{foreach item=row from=$list_mods}> - <h2 class="head"><{$row.name}></h2> - <{foreach item=list from=$row.help_page}> - <div class="<{cycle values='odd, even'}>" title="<{$list.name}>"><a href="<{$list.link}>"><{$list.name}></a></div> - <{/foreach}> - <{/foreach}> - </div> - <{/if}> - </td> - <td valign="top"> - <div id="help-content"> - <{$helpcontent}> - </div> - </td> - </tr> + <tr> + <td class="width20" valign="top"> + <{if $help}> + <div id="help-content"> + <div class="system-help outer"> + <div class="xo-window"> + <div class="xo-window-title"><span class="ico ico-application"></span> <{$smarty.const._AM_SYSTEM_HELP}></div> + <div class="xo-window-data"> + <{foreach item=help from=$help}> + <div><a href="<{$help.link}>"><{$help.name}></a></div> + <{/foreach}> + </div> + </div> + </div> + </div> + <{/if}> + <{if $list_mods}> + <div id="help-content"> + <div class="system-help outer"> + <div class="xo-window"> + <div class="xo-window-title"><span class="ico ico-application"></span> <{$smarty.const._AM_SYSTEM_HELP}></div> + <div class="xo-window-data"> + <{foreach item=row from=$list_mods}> + <h2 class="head"><{$row.name}></h2> + <{foreach item=list from=$row.help_page}> + <div title="<{$list.name}>"><a href="<{$list.link}>"><{$list.name}></a></div> + <{/foreach}> + <{/foreach}> + </div> + </div> + </div> + </div> + <{/if}> + </td> + <td valign="top"> + <div id="help-content"> + <div class="system-help outer"> + <div class="xo-window"> + <div class="xo-window-title"><span class="ico ico-help"></span> <{$smarty.const._AM_SYSTEM_HELP}>: <{$modname}></div> + <div class="xo-window-data"> + <{$helpcontent}> + <{if $help_module}> + <div class="txtcenter"> + <a class="btn btn-primary btn-mini" href="<{$xoops_url}>/modules/<{$moddirname}>/admin/index.php"><i class="icon-home icon-white"></i> <{$modname}></a> + </div> + <{/if}> + </div> + </div> + </div> + </div> + </td> + </tr> </table> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 17:05:13
|
Revision: 9407 http://xoops.svn.sourceforge.net/xoops/?rev=9407&view=rev Author: mageg Date: 2012-04-29 17:05:07 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Error on the links of icons Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-04-29 17:01:39 UTC (rev 9406) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2012-04-29 17:05:07 UTC (rev 9407) @@ -259,13 +259,14 @@ $this->_obj->loadAdminMenu(); foreach (array_keys($this->_obj->adminmenu) as $i) { if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php') { - $this->_obj->adminmenu[$i]['icon'] = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->adminmenu[$i]['icon']; + //$this->_obj->adminmenu[$i]['icon'] = XOOPS_URL . "/modules/" . $this->_obj->getVar('dirname') . "/" . $this->_obj->adminmenu[$i]['icon']; + $this->_obj->adminmenu[$i]['icon'] = XOOPS_URL . "/media/xoops/images/icons/32/" . $this->_obj->adminmenu[$i]['icon']; $xoops->tpl->append('xo_admin_index_menu', $this->_obj->adminmenu[$i]); } } if ($this->_obj->getInfo('help')) { $help = array(); - $help['link'] = 'modules/system/help.php?mid=' . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help'); + $help['link'] = '../system/help.php?mid=' . $this->_obj->getVar('mid', 's') . "&" . $this->_obj->getInfo('help'); $help['icon'] = XOOPS_URL . "/media/xoops/images/icons/32/help.png"; $help['title'] = _AM_SYSTEM_HELP; $xoops->tpl->append('xo_admin_index_menu', $help); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 17:01:45
|
Revision: 9406 http://xoops.svn.sourceforge.net/xoops/?rev=9406&view=rev Author: mageg Date: 2012-04-29 17:01:39 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Fixed errors with bootstrap 2.0 Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/maintenance.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/maintenance.php 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/maintenance.php 2012-04-29 17:01:39 UTC (rev 9406) @@ -38,7 +38,7 @@ public function getMaintenance() { $maintenance = new SystemMaintenance(); - parent::__construct(_AM_SYSTEM_MAINTENANCE, "maintenance_save", "admin.php", 'post', true); + parent::__construct(_AM_SYSTEM_MAINTENANCE, "form_maintenance", "admin.php", 'post', true); $cache = new XoopsFormSelect(_AM_SYSTEM_MAINTENANCE_CACHE, "cache", '', 3, true); $cache->setDescription(XOOPS_VAR_PATH . "/cache/smarty_cache/<br />" . XOOPS_VAR_PATH . "/cache/smarty_compile/<br />" . XOOPS_VAR_PATH . "/cache/xoops_cache/"); @@ -50,13 +50,12 @@ $this->addElement(new XoopsFormRadioYN(_AM_SYSTEM_MAINTENANCE_SESSION, 'session', '', _YES, _NO)); - $tables_tray = new XoopsFormElementTray(_AM_SYSTEM_MAINTENANCE_TABLES, ''); + $tables_tray = new XoopsFormElementTray(_AM_SYSTEM_MAINTENANCE_TABLES, ' '); $tables_tray->setDescription(_AM_SYSTEM_MAINTENANCE_TABLES_DESC); $select_tables = new XoopsFormSelect('', "tables", '', 7, true); $select_tables->addOptionArray($maintenance->displayTables(true)); $tables_tray->addElement($select_tables, false); - $tables_tray->addElement(new xoopsFormLabel(' ' . _AM_SYSTEM_MAINTENANCE_DUMP_AND . ' ')); - $choice = new XoopsFormSelect(' ', "maintenance", '', 4, true); + $choice = new XoopsFormSelect(' ' . _AM_SYSTEM_MAINTENANCE_DUMP_AND . ' ', "maintenance", '', 4, true); $options = array( '1' => _AM_SYSTEM_MAINTENANCE_CHOICE1, '2' => _AM_SYSTEM_MAINTENANCE_CHOICE2, '3' => _AM_SYSTEM_MAINTENANCE_CHOICE3, '4' => _AM_SYSTEM_MAINTENANCE_CHOICE4 @@ -77,15 +76,13 @@ { $xoops = Xoops::getInstance(); $maintenance = new SystemMaintenance(); - parent::__construct(_AM_SYSTEM_MAINTENANCE_DUMP, "dump_save", "admin.php?fct=maintenance", 'post', true); + parent::__construct(_AM_SYSTEM_MAINTENANCE_DUMP, "form_dump", "admin.php?fct=maintenance", 'post', true); $dump_tray = new XoopsFormElementTray(_AM_SYSTEM_MAINTENANCE_DUMP_TABLES_OR_MODULES, ''); $select_tables1 = new XoopsFormSelect('', "dump_tables", '', 7, true); $select_tables1->addOptionArray($maintenance->displayTables(true)); $dump_tray->addElement($select_tables1, false); - - $dump_tray->addElement(new xoopsFormLabel(' ' . _AM_SYSTEM_MAINTENANCE_DUMP_OR . ' ')); - $ele = new XoopsFormSelect(' ', 'dump_modules', '', 7, true); + $ele = new XoopsFormSelect(' ' . _AM_SYSTEM_MAINTENANCE_DUMP_OR . ' ', 'dump_modules', '', 7, true); /* @var $module_handler XoopsModuleHandler */ $module_handler = $xoops->getHandlerModule(); $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/css/admin.css 2012-04-29 17:01:39 UTC (rev 9406) @@ -228,7 +228,7 @@ .ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; } /*==================== tooltip =========================*/ -#tooltip { +#tooltip{ position: absolute; border: 1px solid #A4C3EF; border-radius: 3px; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/admin_index.html 2012-04-29 17:01:39 UTC (rev 9406) @@ -1,6 +1,6 @@ <div class="xo-moduleadmin-icon outer"> <div class="xo-window"> - <div class="xo-window-title"><span class="icon icon-lightning"></span> <{$smarty.const._AM_SYSTEM_LINKS}></div> + <div class="xo-window-title"><span class="ico ico-lightning"></span> <{$smarty.const._AM_SYSTEM_LINKS}></div> <div class="xo-window-data"> <div class="moduleadmin-icon"> <{foreach item=menu from=$xo_admin_index_menu}> @@ -18,7 +18,7 @@ <div class="xo-moduleadmin-config outer"> <div class="xo-window"> <div class="xo-window-title"> - <span class="icon icon-computer"></span> <{$smarty.const._AM_MODULEADMIN_CONFIG}> + <span class="ico ico-computer"></span> <{$smarty.const._AM_MODULEADMIN_CONFIG}> <a class="down" href="javascript:;"> </a> </div> <div class="xo-window-data"> @@ -26,11 +26,11 @@ <{foreach item=config from=$xo_admin_index_config}> <{if $config.type == 'error'}> <li class="red"> - <span class="icon icon-cross"></span> <{$config.text}> + <span class="ico ico-cross"></span> <{$config.text}> </li> <{else}> <li class="green"> - <span class="icon icon-tick"></span> <{$config.text}> + <span class="ico ico-tick"></span> <{$config.text}> </li> <{/if}> <{/foreach}> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/css/style.css 2012-04-29 17:01:39 UTC (rev 9406) @@ -154,7 +154,7 @@ table.outer th, table.outer td { padding: 8px 8px 6px; line-height: 18px; - text-align: left; + /*text-align: left;*/ } table.outer thead { background-color: #222222; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-04-29 17:01:39 UTC (rev 9406) @@ -88,7 +88,7 @@ $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link']; $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' - : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon']; + : XOOPS_URL . "/media/xoops/images/icons/32/" . $mod_options[$item]['icon']; } } $xoops->tpl->assign('mod_options', $mod_options); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/theme.html 2012-04-29 17:01:39 UTC (rev 9406) @@ -35,7 +35,7 @@ <div class="card-icons outer"> <div class="xo-window"> - <div class="xo-window-title"><span class="icon icon-wrench-5"></span> <{$smarty.const._DEFAULT_CPHOME}></div> + <div class="xo-window-title"><span class="ico ico-wrench-5"></span> <{$smarty.const._DEFAULT_CPHOME}></div> <div class="xo-window-data"> <div class="cp-icon"> <{foreach item=op from=$mod_options}> @@ -60,7 +60,7 @@ <div class="outer"> <div class="xo-window"> <div class="xo-window-title"> - <span class="icon icon-box"></span> <{$smarty.const._DEFAULT_INSTALLEDMODULES}> + <span class="ico ico-box"></span> <{$smarty.const._DEFAULT_INSTALLEDMODULES}> <a class="down" href="javascript:;"> </a> </div> <div class="xo-window-data"> @@ -82,7 +82,7 @@ <div class="outer"> <div class="xo-window"> <div class="xo-window-title"> - <span class="icon icon-plugin"></span> <{$smarty.const._DEFAULT_INSTALLEDPLUGINS}> + <span class="ico ico-plugin"></span> <{$smarty.const._DEFAULT_INSTALLEDPLUGINS}> <a class="down" href="javascript:;"> </a> </div> <div class="xo-window-data"> @@ -110,7 +110,7 @@ <{/if}> </div> </div> - <div center> + <div class="center"> <a href="<{$xoops_url}>/modules/system/testform.php">Test new form</a> </div> <div class="footer"> @@ -120,8 +120,8 @@ </p> <!--{xo-logger-output}--> </div> + <script type="text/javascript"> + ddsmoothmenu.init({mainmenuid: "xo-menu-modules", orientation: 'h', classname: 'ddsmoothmenu', contentsource: "markup"}) + </script> </body> - <script type="text/javascript"> - ddsmoothmenu.init({mainmenuid: "xo-menu-modules", orientation: 'h', classname: 'ddsmoothmenu', contentsource: "markup"}) - </script> </html> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html 2012-04-29 16:58:43 UTC (rev 9405) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/xotpl/menu.html 2012-04-29 17:01:39 UTC (rev 9406) @@ -55,13 +55,13 @@ <li> <a href="<{$pref->getInfo(link_pref)}>" title="<{$pref->getVar(name)}>"><{$pref->getVar(name)}></a> <ul class="dropdown-menu"> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=1}>"><{$smarty.const._DEFAULT_GENERAL}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=2}>"><{$smarty.const._DEFAULT_USERSETTINGS}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=3}>"><{$smarty.const._DEFAULT_METAFOOTER}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=4}>"><{$smarty.const._DEFAULT_CENSOR}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=5}>"><{$smarty.const._DEFAULT_SEARCH}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=6}>"><{$smarty.const._DEFAULT_MAILER}></a></li> - <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=7}>"><{$smarty.const._DEFAULT_AUTHENTICATION}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=1}>"><{$smarty.const._DEFAULT_GENERAL}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=2}>"><{$smarty.const._DEFAULT_USERSETTINGS}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=3}>"><{$smarty.const._DEFAULT_METAFOOTER}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=4}>"><{$smarty.const._DEFAULT_CENSOR}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=5}>"><{$smarty.const._DEFAULT_SEARCH}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=6}>"><{$smarty.const._DEFAULT_MAILER}></a></li> + <li><a href="<{xoAppUrl modules/system/admin.php?fct=preferences&op=show&confcat_id=7}>"><{$smarty.const._DEFAULT_AUTHENTICATION}></a></li> </ul> </li> <{/if}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-04-29 16:58:49
|
Revision: 9405 http://xoops.svn.sourceforge.net/xoops/?rev=9405&view=rev Author: mageg Date: 2012-04-29 16:58:43 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Correction in the new forms Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -56,7 +56,7 @@ * @param string $delimiter * @param string $name */ - public function __construct($caption, $delimiter = " ", $name = "") + public function __construct($caption, $delimiter = " ", $name = "") { $this->setName($name); $this->setCaption($caption); @@ -158,21 +158,19 @@ { $count = 0; $ret = ""; - //$ret = "<div class='inline'>"; foreach ($this->getElements() as $ele) { /* @var XoopsFormElement $ele */ if ($count > 0) { $ret .= $this->getDelimiter(); } if ($ele->getCaption() != '') { - $ret .= $ele->getCaption() . " "; + $ret .= $ele->getCaption() . " "; } $ret .= $ele->render() . NWLINE; if (!$ele->isHidden()) { $count++; } } - //$ret .= "</div>"; return $ret; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -50,6 +50,6 @@ */ public function render() { - return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . '" value="' . $this->getValue() . '" >' . NWLINE; + return '<input type="hidden" name="' . $this->getName() . '" id="' . $this->getName() . rand(1,99) . '" value="' . $this->getValue() . '" >' . NWLINE; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -50,6 +50,6 @@ */ public function render() { - return "<label class='text_label'>" . $this->getValue() . "</label>"; + return "<span>" . $this->getValue() . "</span>"; } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -86,25 +86,23 @@ $hidden = ''; foreach ($this->getElements() as $ele) { if (!$ele->isHidden()) { - if (!$ele instanceof XoopsFormRaw) { - $input['name'] = $ele->getName(); - $input['caption'] = $ele->getCaption(); - $input['description'] = $ele->getDescription(); - $input['ele'] = $ele->render(); - $input['required'] = $ele->isRequired(); - $input['pattern_description'] = $ele->getPatternDescription(); - $input['datalist'] = $ele->getDatalist(); - } else { - $ret .= $ele->render(); - } - $xoops->tpl->append_by_ref('input', $input); + $input['name'] = $ele->getName(); + $input['caption'] = $ele->getCaption(); + $input['description'] = $ele->getDescription(); + $input['ele'] = $ele->render(); + $input['required'] = $ele->isRequired(); + $input['pattern_description'] = $ele->getPatternDescription(); + $input['datalist'] = $ele->getDatalist(); + $xoops->tpl->append_by_ref('xo_input', $input); unset($input); } else { $hidden .= $ele->render(). NWLINE; } + } $xoops->tpl->assign('hidden', $hidden); $xoops->tpl->assign('validationJS', $this->renderValidationJS(true)); $xoops->tpl->display('module:system|system_form.html'); + $xoops->tpl->clear_assign('xo_input'); } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/xoops/css/form.css 2012-04-29 16:58:43 UTC (rev 9405) @@ -19,6 +19,4 @@ color: #b94a48; } -.text_label{margin-top: 5px;} - .caption-required{color: #b94a48;} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_form.html 2012-04-29 16:58:43 UTC (rev 9405) @@ -2,12 +2,12 @@ <form class="form-horizontal" name="<{$name}>" id="<{$name}>" action="<{$action}>" method="<{$method}>" onsubmit="return xoopsFormValidate_<{$name}>();"<{$extra}>> <fieldset> <legend><{$title}></legend> - <{foreach item=input from=$input}> + <{foreach item=input from=$xo_input}> <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> <div class="control-group"> - <label class="control-label" for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label class="control-label"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <div class="controls"> <{$input.ele}> <span class="dsc_pattern_horizontal"><{$input.pattern_description}></span> @@ -29,7 +29,7 @@ <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> - <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <{$input.ele}> <{if $input.description != ''}> <span class="help-inline"><{$input.description}></span> @@ -49,7 +49,7 @@ <{if $input.datalist != ''}> <{$input.datalist}> <{/if}> - <label for="<{$input.name}>"><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> + <label><{$input.caption}><{if $input.required}><span class="caption-required">*</span><{/if}></label> <{$input.ele}> <{if $input.description != ''}> <span class="help-inline"><{$input.description}></span> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php 2012-04-29 16:36:18 UTC (rev 9404) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/testform.php 2012-04-29 16:58:43 UTC (rev 9405) @@ -117,9 +117,18 @@ $form->addElement(new XoopsFormCaptcha('Captcha', 'captcha', false), true); -$testtray = new XoopsFormElementTray('Test tray', '<br>' ); -$testtray ->addElement($password); -$testtray ->addElement($code); +$testtray = new XoopsFormElementTray('Test tray'); +$select_tray = new XoopsFormSelect('Select_tray', 'select_tray', '', 4, true); +$select_tray->addOption(1, 'Select_tray 1'); +$select_tray->addOption(2, 'Select_tray 2'); +$select_tray->addOption(3, 'Select_tray 3'); +$select_tray->addOption(4, 'Select_tray 4'); +$select_tray->addOption(5, 'Select_tray 5'); +$select_tray->addOption(6, 'Select_tray 6'); +$select_tray->setDescription('Description Select_tray'); +$select_tray->setClass('span2'); +$testtray ->addElement($select_tray); +$testtray ->addElement($select_tray); $form->addElement($testtray); $button = new XoopsFormButton('', 'submit', _SUBMIT, 'submit'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2012-04-29 16:36:25
|
Revision: 9404 http://xoops.svn.sourceforge.net/xoops/?rev=9404&view=rev Author: wishcraft Date: 2012-04-29 16:36:18 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Completed Meta Adding Script, inclusive of setable name for cognitive liberty of the sub function - All Tested and Working!! Added Paths: ----------- XoopsCore/branches/tasks/2.6.0-wishcraft/class/theme.php XoopsCore/branches/tasks/2.6.0-wishcraft/robots.txt Added: XoopsCore/branches/tasks/2.6.0-wishcraft/class/theme.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/class/theme.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/class/theme.php 2012-04-29 16:36:18 UTC (rev 9404) @@ -0,0 +1,879 @@ +<?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. +*/ + +/** + * XoopsTheme component class file + * + * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Skalpa Keo <sk...@xo...> + * @author Taiwen Jiang <ph...@us...> + * @since 2.3.0 + * @package class + * @version $Id: theme.php 8629 2012-01-02 23:04:32Z mageg $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * XoopsThemeFactory + * + * @author Skalpa Keo + * @since 2.3.0 + */ +class XoopsThemeFactory +{ + /** + * @var string + */ + public $xoBundleIdentifier = 'XoopsThemeFactory'; + + /** + * Currently enabled themes (if empty, all the themes in themes/ are allowed) + * + * @var array + */ + public $allowedThemes = array(); + + /** + * Default theme to instantiate if none specified + * + * @var string + */ + public $defaultTheme = 'default'; + + /** + * If users are allowed to choose a custom theme + * + * @var bool + */ + public $allowUserSelection = true; + + /** + * Instantiate the specified theme + * + * @param array $options + * + * @return null|XoopsTheme + */ + public function createInstance($options = array()) + { + $xoops = Xoops::getInstance(); + // Grab the theme folder from request vars if present + if (empty($options['folderName'])) { + if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) { + $options['folderName'] = $req; + if (isset($_SESSION) && $this->allowUserSelection) { + $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req; + } + } else { + if (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) { + $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme']; + } else { + if (empty($options['folderName']) || !$this->isThemeAllowed($options['folderName'])) { + $options['folderName'] = $this->defaultTheme; + } + } + } + $xoops->setConfig('theme_set', $options['folderName']); + } + $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName']; + $inst = null; + $inst = new XoopsTheme(); + foreach ($options as $k => $v) { + $inst->$k = $v; + } + $inst->xoInit(); + return $inst; + } + + /** + * Checks if the specified theme is enabled or not + * + * @param string $name + * + * @return bool + */ + public function isThemeAllowed($name) + { + return (empty($this->allowedThemes) || in_array($name, $this->allowedThemes)); + } +} + +/** + * XoopsAdminThemeFactory + * + * @author Andricq Nicolas (AKA MusS) + * @author trabis + * @since 2.4.0 + */ +class XoopsAdminThemeFactory extends XoopsThemeFactory +{ + public function createInstance($options = array()) + { + $options["plugins"] = array(); + $options['renderBanner'] = false; + $inst = parent::createInstance($options); + $inst->path = XOOPS_ADMINTHEME_PATH . '/' . $inst->folderName; + $inst->url = XOOPS_ADMINTHEME_URL . '/' . $inst->folderName; + $inst->template->assign(array( + 'theme_path' => $inst->path, + 'theme_tpl' => $inst->path . '/xotpl', + 'theme_url' => $inst->url, + 'theme_img' => $inst->url . '/img', + 'theme_icons' => $inst->url . '/icons', + 'theme_css' => $inst->url . '/css', + 'theme_js' => $inst->url . '/js', + 'theme_lang' => $inst->url . '/language', + )); + + return $inst; + } +} + +class XoopsTheme +{ + /** + * Should we render banner? Not for redirect pages or admin side + * + * @var bool + */ + public $renderBanner = true; + + /** + * The name of this theme + * + * @var string + */ + public $folderName = ''; + + /** + * Physical path of this theme folder + * + * @var string + */ + public $path = ''; + + /** + * @var string + */ + public $url = ''; + + /** + * Whether or not the theme engine should include the output generated by php + * + * @var string + */ + public $bufferOutput = true; + + /** + * Canvas-level template to use + * + * @var string + */ + public $canvasTemplate = 'theme.html'; + + /** + * Theme folder path + * + * @var string + */ + public $themesPath = 'themes'; + + /** + * Content-level template to use + * + * @var string + */ + public $contentTemplate = ''; + + /** + * @var int + */ + public $contentCacheLifetime = 0; + + /** + * @var string + */ + public $contentCacheId = null; + + /** + * Text content to display right after the contentTemplate output + * + * @var string + */ + public $content = ''; + + /** + * Page construction plug-ins to use + * + * @var array + * @access public + */ + public $plugins = array('XoopsThemeBlocksPlugin'); + + /** + * @var int + */ + public $renderCount = 0; + + /** + * Pointer to the theme template engine + * + * @var XoopsTpl + */ + public $template = false; + + /** + * Array containing the document meta-information + * + * @var array + */ + public $metas = array( + 'meta' => array(), + 'link' => array(), + 'script' => array() + ); + + /** + * Array of strings to be inserted in the head tag of HTML documents + * + * @var array + */ + public $htmlHeadStrings = array(); + + /** + * Custom variables that will always be assigned to the template + * + * @var array + */ + public $templateVars = array(); + + /** + * User extra information for cache id, like language, user groups + * + * @var boolean + */ + public $use_extra_cache_id = true; + + /** + * Engine used for caching headers information + * Default is 'file', you can choose 'model' for database storage + * or any other cache engine available in the class/cache folder + * + * @var boolean + */ + public $headersCacheEngine = 'file'; + + /** + * *#@- + */ + + /** + * *#@+ + * @tasktype 10 Initialization + */ + /** + * Initializes this theme + * Upon initialization, the theme creates its template engine and instanciates the + * plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not + * display redirection messages, the HTTP redirections system is disabled to ensure users will + * see the redirection screen. + * + * @return bool + */ + public function xoInit() + { + $xoops = Xoops::getInstance(); + $this->path = XOOPS_THEME_PATH . '/' . $this->folderName; + $this->url = XOOPS_THEME_URL . '/' . $this->folderName; + $this->template = null; + $this->template = new XoopsTpl(); + $this->template->currentTheme = $this; + $this->template->assign_by_ref('xoTheme', $this); + $this->template->assign(array( + 'xoops_theme' => $xoops->getConfig('theme_set'), + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', + 'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')), + 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), + 'xoops_dirname' => $xoops->moduleDirname, + 'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : ' ', + 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES) + )); + + if ($xoops->isUser()) { + $this->template->assign(array( + 'xoops_isuser' => true, + 'xoops_avatar' => XOOPS_UPLOAD_URL . "/" . $xoops->user->getVar('user_avatar'), + 'xoops_userid' => $xoops->user->getVar('uid'), + 'xoops_uname' => $xoops->user->getVar('uname'), + 'xoops_name' => $xoops->user->getVar('name'), + 'xoops_isadmin' => $xoops->isAdmin(), + 'xoops_usergroups' => $xoops->user->getGroups() + )); + } else { + $this->template->assign(array( + 'xoops_isuser' => false, + 'xoops_isadmin' => false, + 'xoops_usergroups' => array(XOOPS_GROUP_ANONYMOUS) + )); + } + + // Meta tags + $config_handler = $xoops->getHandlerConfig(); + $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); + $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); + $config = $config_handler->getConfigs($criteria, true); + foreach (array_keys($config) as $i) { + $name = $config[$i]->getVar('conf_name', 'n'); + $value = $config[$i]->getVar('conf_value', 'n'); + if (substr($name, 0, 5) == 'meta_') { + $this->addMeta('meta', substr($name, 5), $value); + } else { + // prefix each tag with 'xoops_' + $this->template->assign("xoops_$name", $value); + } + } + // Load global javascript + $this->addScript('include/xoops.js'); + $this->loadLocalization(); + + if ($this->bufferOutput) { + ob_start(); + } + $xoops->theme = $this; + $xoops->tpl = $this->template; + $GLOBALS['xoTheme'] =& $xoops->theme; + $GLOBALS['xoopsTpl'] =& $xoops->tpl; + + // Instanciate and initialize all the theme plugins + foreach ($this->plugins as $k => $bundleId) { + if (!is_object($bundleId)) { + /* @var $plugin XoopsThemePlugin */ + $plugin = new $bundleId(); + $plugin->theme = $this; + $plugin->xoInit(); + + $this->plugins[$bundleId] = null; + $this->plugins[$bundleId] = $plugin; + unset($this->plugins[$k]); + } + } + return true; + } + + /** + * Generate cache id based on extra information of language and user groups + * User groups other than anonymous should be detected to avoid disclosing group sensitive contents + * + * @param string $cache_id raw cache id + * @param string $extraString extra string + * + * @return string complete cache id + */ + function generateCacheId($cache_id, $extraString = '') + { + $xoops = Xoops::getInstance(); + static $extra_string; + if (!$this->use_extra_cache_id) { + return $cache_id; + } + + if (empty($extraString)) { + if (empty($extra_string)) { + // Generate language section + $extra_string = $xoops->getConfig('language'); + // Generate group section + if (!$xoops->isUser()) { + $extra_string .= '-' . XOOPS_GROUP_ANONYMOUS; + } else { + $groups = $xoops->user->getGroups(); + sort($groups); + // Generate group string for non-anonymous groups, + // XOOPS_DB_PASS and XOOPS_DB_NAME (before we find better variables) are used to protect group sensitive contents + $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(XOOPS_DB_PASS . XOOPS_DB_NAME . XOOPS_DB_USER), 0, 8); + } + } + $extraString = $extra_string; + } + $cache_id .= '-' . $extraString; + return $cache_id; + } + + /** + * XoopsTheme::checkCache() + * + * @return bool + */ + public function checkCache() + { + if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) { + $template = $this->contentTemplate ? $this->contentTemplate : 'module:system|system_dummy.html'; + $this->template->caching = 2; + $this->template->cache_lifetime = $this->contentCacheLifetime; + $uri = str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']); + // Clean uri by removing session id + if (defined('SID') && SID && strpos($uri, SID)) { + $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri); + } + $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8)); + if ($this->template->is_cached($template, $this->contentCacheId)) { + XoopsLogger::getInstance() + ->addExtra($template, sprintf('Cached (regenerates every %d seconds)', $this->contentCacheLifetime)); + $this->render(null, null, $template); + return true; + } + } + return false; + } + + /** + * Render the page + * The theme engine builds pages from 2 templates: canvas and content. + * A module can call this method directly and specify what templates the theme engine must use. + * If render() hasn't been called before, the theme defaults will be used for the canvas and + * page template (and xoopsOption['template_main'] for the content). + * + * @param string $canvasTpl The canvas template, if different from the theme default + * @param string $pageTpl The page template, if different from the theme default (unsupported, 2.3+ only) + * @param string $contentTpl The content template + * @param array $vars Template variables to send to the template engine + * + * @return bool + */ + public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array()) + { + if ($this->renderCount) { + return false; + } + $xoops = Xoops::getInstance(); + $xoops->logger->startTime('Page rendering'); + + $cache = XoopsCache::getInstance(); + + //Get meta information for cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId, $this->headersCacheEngine)) { + //we need to merge metas set by blocks with the module cached meta + $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']); + foreach ($content['metas'] as $type => $value) { + $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); + } + $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']); + $xoops->setOption('xoops_module_header', $content['header']); + } + + if ($xoops->getOption('xoops_pagetitle')) { + $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle')); + } + $header = !$xoops->getOption('xoops_module_header') ? $this->template->get_template_vars('xoops_module_header') : $xoops->getOption('xoops_module_header'); + + //save meta information of cached pages + if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) { + $content['htmlHeadStrings'] = (array)$this->htmlHeadStrings; + $content['metas'] = (array)$this->metas; + $content['xoops_pagetitle'] = $this->template->get_template_vars('xoops_pagetitle'); + $content['header'] = $header; + $cache = XoopsCache::getInstance(); + $cache->write($this->contentCacheId, $content, $this->headersCacheEngine); + } + + // @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice + $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright'); + foreach ($this->metas['meta'] as $name => $value) { + if (in_array($name, $old)) { + $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES)); + unset($this->metas['meta'][$name]); + } + } + + // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ? + $this->template->assign('xoops_module_header', $this->renderMetas(null, true) . "\n" . $header); + + if ($canvasTpl) { + $this->canvasTemplate = $canvasTpl; + } + if ($contentTpl) { + $this->contentTemplate = $contentTpl; + } + if (!empty($vars)) { + $this->template->assign($vars); + } + if ($this->contentTemplate) { + $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId); + } + if ($this->bufferOutput) { + $this->content .= ob_get_contents(); + ob_end_clean(); + } + + $this->template->assign_by_ref('xoops_contents', $this->content); + + // Do not cache the main (theme.html) template output + $this->template->caching = 0; + $this->template->display($this->path . '/' . $this->canvasTemplate); + $this->renderCount++; + $xoops->logger->stopTime('Page rendering'); + return true; + } + + /** + * Load localization information + * Folder structure for localization: + * <ul>themes/themefolder/english + * <li>main.php - language definitions</li> + * <li>style.css - localization stylesheet</li> + * <li>script.js - localization script</li> + * </ul> + * + * @param string $type + * + * @return bool + */ + public function loadLocalization($type = "main") + { + $xoops = Xoops::getInstance(); + $language = $xoops->getConfig('language'); + // Load global localization stylesheet if available + if (file_exists($xoops->path('language/' . $language . '/style.css'))) { + $this->addStylesheet($xoops->url('language/' . $language . '/style.css')); + } + $this->addLanguage($type); + // Load theme localization stylesheet and scripts if available + if (file_exists($this->path . '/language/' . $language . '/script.js')) { + $this->addScript($this->url . '/language/' . $language . '/script.js'); + } + if (file_exists($this->path . '/language/' . $language . '/style.css')) { + $this->addStylesheet($this->url . '/language/' . $language . '/style.css'); + } + return true; + } + + /** + * Load theme specific language constants + * + * @param string $type language type, like 'main', 'admin'; Needs to be declared in theme xo-info.php + * @param string $language specific language + * + * @return bool|mixed + */ + public function addLanguage($type = "main", $language = null) + { + $xoops = Xoops::getInstance(); + $language = is_null($language) ? $xoops->getConfig('language') : $language; + if (!file_exists($file = $xoops->path($this->resourcePath("/language/{$language}/{$type}.php")))) { + if (!file_exists($file = $xoops->path($this->resourcePath("/language/english/{$type}.php")))) { + return false; + } + } + $ret = include_once $file; + return $ret; + } + + /** + * *#@+ + * @tasktype 20 Manipulating page meta-information + */ + /** + * Adds script code to the document head + * This methods allows the insertion of an external script file (if $src is provided), or + * of a script snippet. The file URI is parsed to take benefit of the theme resource + * overloading system. + * The $attributes parameter allows you to specify the attributes that will be added to the + * inserted <script> tag. If unspecified, the <var>type</var> attribute value will default to + * 'text/javascript'. + * <code> + * // Add an external script using a physical path + * $theme->addScript( 'www/script.js', null, '' ); + * $theme->addScript( 'modules/newbb/script.js', null, '' ); + * // Specify attributes for the <script> tag + * $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' ); + * // Insert a code snippet + * $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' ); + * </code> + * + * @param string $src path to an external script file + * @param array $attributes hash of attributes to add to the <script> tag + * @param string $content Code snippet to output within the <script> tag + * + * @return void + */ + public function addScript($src = '', $attributes = array(), $content = '', $name = '') + { + $xoops = Xoops::getInstance(); + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $attributes['src'] = $xoops->url($this->resourcePath($src));; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/javascript'; + } + if (empty($name)) { + if (!empty($src)) { + $name = md5($xoops->url($this->resourcePath($src))); + } else { + $name = md5($content); + } + } + $this->addMeta('script', $name, $attributes); + } + + /** + * Add StyleSheet or CSS code to the document head + * + * @param string|null $src path to .css file + * @param array|null $attributes name => value paired array of attributes such as title + * @param string $content CSS code to output between the <style> tags (in case $src is empty) + * + * @return void + */ + public function addStylesheet($src = '', $attributes = array(), $content = '', $name = '') + { + $xoops = Xoops::getInstance(); + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($src)) { + $attributes['href'] = $xoops->url($this->resourcePath($src)); + } + if (!isset($attributes['type'])) { + $attributes['type'] = 'text/css'; + } + if (!empty($content)) { + $attributes['_'] = $content; + } + if (empty($name)) { + if (!empty($src)) { + $name = md5($xoops->url($this->resourcePath($src))); + } else { + $name = md5($content); + } + } + $this->addMeta('stylesheet', $name, $attributes); + } + + /** + * Add a <link> to the header + * + * @param string $rel Relationship from the current doc to the anchored one + * @param string $href URI of the anchored document + * @param array $attributes Additional attributes to add to the <link> element + */ + public function addLink($rel, $href = '', $attributes = array(), $name = '') + { + if (empty($attributes)) { + $attributes = array(); + } + if (!empty($href)) { + $attributes['href'] = $href; + } + $attributes['rel'] = $rel; + if (empty($name)) { + if (!empty($rel)) { + $name = md5($rel.$href); + } else { + $name = md5($href); + } + } + $this->addMeta('link', $name, $attributes); + } + + /** + * Set a meta http-equiv value + * + * @param string $name + * @param null $value + * + * @return bool|string + */ + public function addHttpMeta($name, $value = null) + { + if (isset($value)) { + return $this->addMeta('http', $name, $value); + } + unset($this->metas['http'][$name]); + return false; + } + + /** + * Change output page meta-information + * + * @param string $type + * @param string $name + * @param string $value + * + * @return string + */ + public function addMeta($type = 'meta', $name = '', $value = '') + { + if (!isset($this->metas[$type])) { + $this->metas[$type] = array(); + } + if (!empty($name)) { + $this->metas[$type][$name] = $value; + } else { + $this->metas[$type][md5(serialize(array($value)))] = $value; + } + return $value; + } + + /** + * XoopsTheme::headContent() + * + * @param $params + * @param $content + * @param $smarty + * @param $repeat + * + * @return void + */ + public function headContent($params, $content, &$smarty, &$repeat) + { + if (!$repeat) { + $this->htmlHeadStrings[] = $content; + } + } + + /** + * XoopsTheme::renderMetas() + * + * @param null $type + * @param bool|string $return + * + * @return bool|string + */ + public function renderMetas($type = null, $return = false) + { + $str = ''; + if (!isset($type)) { + foreach (array_keys($this->metas) as $type) { + $str .= $this->renderMetas($type, true); + } + $str .= implode("\n", $this->htmlHeadStrings); + } else { + switch ($type) { + case 'script': + foreach ($this->metas[$type] as $attrs) { + $str .= "<script" . $this->renderAttributes($attrs) . ">"; + if (@$attrs['_']) { + $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>"; + } + $str .= "</script>\n"; + } + break; + case 'link': + foreach ($this->metas[$type] as $attrs) { + $rel = $attrs['rel']; + unset($attrs['rel']); + $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n"; + } + break; + case 'stylesheet': + foreach ($this->metas[$type] as $attrs) { + if (@$attrs['_']) { + $str .= '<style' . $this->renderAttributes($attrs) . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>"; + } else { + $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n"; + } + } + break; + case 'http': + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + default: + foreach ($this->metas[$type] as $name => $content) { + $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n"; + } + break; + } + } + if ($return) { + return $str; + } + echo $str; + return true; + } + + /** + * Generates a unique element ID + * + * @param string $tagName + * + * @return string + */ + public function genElementId($tagName = 'xos') + { + static $cache = array(); + if (!isset($cache[$tagName])) { + $cache[$tagName] = 1; + } + return $tagName . '-' . $cache[$tagName]++; + } + + /** + * Transform an attributes collection to an XML string + * + * @param array $coll + * + * @return string + */ + public function renderAttributes($coll) + { + $str = ''; + foreach ($coll as $name => $val) { + if ($name != '_') { + $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"'; + } + } + return $str; + } + + /** + * Return a themable file resource path + * + * @param string $path + * + * @return string + */ + public function resourcePath($path) + { + if (substr($path, 0, 1) == '/') { + $path = substr($path, 1); + } + + if (file_exists(XOOPS_ROOT_PATH . "/{$this->themesPath}/{$this->folderName}/{$path}")) { + return "{$this->themesPath}/{$this->folderName}/{$path}"; + } + + if (file_exists(XOOPS_ROOT_PATH . "/themes/{$this->folderName}/{$path}")) { + return "themes/{$this->folderName}/{$path}"; + } + return $path; + } +} + +abstract class XoopsThemePlugin +{ + /** + * @var XoopsTheme + */ + public $theme = false; + + abstract function xoInit(); +} \ No newline at end of file Added: XoopsCore/branches/tasks/2.6.0-wishcraft/robots.txt =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/robots.txt (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/robots.txt 2012-04-29 16:36:18 UTC (rev 9404) @@ -0,0 +1,14 @@ +User-agent: * +Sitemap: /sitemap.php +Disallow: /cgi-bin/ +Disallow: /tmp/ +Disallow: /cache/ +Disallow: /class/ +Disallow: /images/ +Disallow: /include/ +Disallow: /install/ +Disallow: /kernel/ +Disallow: /language/ +Disallow: /templates_c/ +Disallow: /themes/ +Disallow: /uploads/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2012-04-29 15:43:54
|
Revision: 9403 http://xoops.svn.sourceforge.net/xoops/?rev=9403&view=rev Author: wishcraft Date: 2012-04-29 15:43:47 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Xortify 3.08 - For XOOPS 2.6.0 - Production and tested - Final release for 2.6.0 Alpha3 Added Paths: ----------- XoopsCore/branches/tasks/2.6.0-wishcraft/xoops_data/caches/adodb_cache/index.html Added: XoopsCore/branches/tasks/2.6.0-wishcraft/xoops_data/caches/adodb_cache/index.html =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/xoops_data/caches/adodb_cache/index.html (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/xoops_data/caches/adodb_cache/index.html 2012-04-29 15:43:47 UTC (rev 9403) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wis...@us...> - 2012-04-29 15:42:01
|
Revision: 9402 http://xoops.svn.sourceforge.net/xoops/?rev=9402&view=rev Author: wishcraft Date: 2012-04-29 15:41:51 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Xortify 3.08 - For XOOPS 2.6.0 - Production and tested - Final release for 2.6.0 Alpha3 Added Paths: ----------- XoopsCore/branches/tasks/2.6.0-wishcraft/banned.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/xortify.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/menu.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlserialised.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlserialised_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlxml.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlxml_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_json.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_json_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_soap.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_soap_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_wgetserialised.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_wgetserialised_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_wgetxml.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_wgetxml_provisionning.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/authfactory.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/curl.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/curlserialised.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/curlxml.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/json.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/log.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/soap.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/wgetserialised.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/wgetxml.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/cron/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/cron/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/cron/serverup.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/changelog.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/credits.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/install.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/lang_diff.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/licence.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/docs/readme.txt XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/about.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/access.list.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/current.bans.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/home.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/16/xortify.log.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/about.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/access.list.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/current.bans.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/home.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/xoopsmicrobutton.gif XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/32/xortify.log.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/icons/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/accessdenied.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/left_both.gif XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/right_both.gif XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/images/xortify_slogo.png XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/JSON.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/forms.objects.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/forms.xortify.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/functions.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/install.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/post.header.addmeta.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/post.header.endcache.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/post.loader.mainfile.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/pre.loader.mainfile.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/include/update.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/admin.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/ban.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/help/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/help/help.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/help/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/main.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/english/modinfo.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/language/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/projecthoneypot.org.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/protector.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/spiders.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/stopforumspam.com.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/plugin/xortify.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/preloads/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/preloads/core.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/preloads/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/projecthoneypot.org/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/projecthoneypot.org/post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/protector/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/protector/footer.post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/protector/header.post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/protector/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/providers.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/spiders/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/spiders/post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/stopforumspam.com/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/stopforumspam.com/post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/xortify/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/xortify/footer.post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/xortify/header.post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/xortify/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/providers/xortify/post.loader.php XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/sql/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/sql/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/sql/mysql.sql XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/admin/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/admin/xortify_cpanel_bans.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/admin/xortify_cpanel_log.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/admin/xortify_cpanel_signup_form.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/admin/xortify_cpanel_signup_nocommunication.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/index.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/templates/xortify_banning_notice.html XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/xoops_version.php Added: XoopsCore/branches/tasks/2.6.0-wishcraft/banned.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/banned.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/banned.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,52 @@ +<?php + + + include dirname(__FILE__).'/mainfile.php'; + + $GLOBALS['xoops'] = Xoops::getInstance(); + + if (isset($_SESSION['xortify']['lid'])) { + $lid = $_SESSION['xortify']['lid']; + setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3); + } elseif (isset($_COOKIE['xortify']['lid'])) { + $lid = $_COOKIE['xortify']['lid']; + $_SESSION['xortify']['lid'] = $lid; + } + + $GLOBALS['xoops']->loadLanguage('ban', 'xortify'); + + $module_handler = $GLOBALS['xoops']->getHandler('module'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + + $GLOBALS['xoops']->header('xortify|xortify_banning_notice.html'); + + include_once XOOPS_ROOT_PATH.'/modules/xortify/include/functions.php'; + addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']); + if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) { + addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']); + } + $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_PAGETITLE); + $GLOBALS['xoops']->tpl->assign('description', _XOR_DESCRIPTION); + $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100); + $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION); + + $log_handler = $GLOBALS['xoops']->getModuleHandler('log', 'xortify'); + $log = $log_handler->get($lid); + if (is_object($log)) { + setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3); + $GLOBALS['xoops']->tpl->assign('status', $log->getVar('extra')); + $GLOBALS['xoops']->tpl->assign('provider', $log->getVar('provider')); + $GLOBALS['xoops']->tpl->assign('agent', $log->getVar('agent')); + } + $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false); + $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false); + $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false); + $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false); + $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false); + $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false); + $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false); + $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false); + + $GLOBALS['xoops']->footer(); + +?> Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/xortify.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/xortify.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/xortify.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,55 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Nexoork Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @author Richardo Costa TRABIS + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SystemXortifyPreload extends XoopsPreloadItem +{ + + static function init() { + $xoops = Xoops::getInstance(); + $module_handler = $xoops->getHandler('module'); + $config_handler = $xoops->getHandler('config'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + if (is_object($GLOBALS['xortifyModule'])) { + $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); + } else { + $GLOBALS['xortifyModuleConfig']['fault_delay'] = 600; + } + XoopsLoad::load('xoopscache'); + } + + + static function eventCoreIncludeCommonEnd($args) + { + SystemXortifyPreload::init(); + $result = XoopsCache::read('xortify_core_include_common_end_cron'); + if ((isset($result['time'])?(float)$result['time']:0)<=microtime(true)) { + XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['fault_delay']), $GLOBALS['xortifyModuleConfig']['fault_delay']); + switch ($GLOBALS['xortifyModuleConfig']['crontype']) { + case 'preloader': + $read = XoopsCache::read('xortify_pause_preload'); + if ((isset($read['time'])?(float)$read['time']:0)<=microtime(true)) { + XoopsCache::write('xortify_pause_preload', array('time'=>microtime(true)+$GLOBALS['xortifyModuleConfig']['croninterval'])); + $GLOBALS['xortify_preloader']=true; + ob_start(); + include(XOOPS_ROOT_PATH.'/modules/xortify/cron/serverup.php'); + ob_end_clean(); + } + break; + } + XoopsCache::write('xortify_core_include_common_end_cron', array('time'=>microtime(true)), -1); + } + + } +} + +?> \ No newline at end of file Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.html =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.html (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.html 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,10 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<title>Untitled Document</title> +</head> + +<body> +</body> +</html> Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/index.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,445 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + + require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php'; + + $xoops = Xoops::getInstance(); + XoopsLoad::load('system', 'system'); + + error_reporting(E_ALL); + + if (!defined('_CHARSET')) + define ("_CHARSET","UTF-8"); + if (!defined('_CHARSET_ISO')) + define ("_CHARSET_ISO","ISO-8859-1"); + + $GLOBALS['myts'] = MyTextSanitizer::getInstance(); + + $module_handler = $GLOBALS['xoops']->getHandler('module'); + $config_handler = $GLOBALS['xoops']->getHandler('config'); + $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify'); + $GLOBALS['xortifyModuleConfig'] = $config_handler->getConfigList($GLOBALS['xortifyModule']->getVar('mid')); + + include_once $GLOBALS['xoops']->path('class'.DS.'cache'.DS.'xoopscache.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'pagenav.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopslists.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'xoopsmailer.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'tree.php'); + include_once $GLOBALS['xoops']->path('class'.DS.'moduleadmin.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'class'.DS.'auth'.DS.'authfactory.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'functions.php'); + include_once $GLOBALS['xoops']->path('modules'.DS.'xortify'.DS.'include'.DS.'forms.xortify.php'); + + $GLOBALS['xortifyImageIcon'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons16'); + $GLOBALS['xortifyImageAdmin'] = XOOPS_URL .'/'. $GLOBALS['xortifyModule']->getInfo('icons32'); + + $myts = MyTextSanitizer::getInstance(); + + if ($GLOBALS['xoopsUser']) { + $moduleperm_handler = $GLOBALS['xoops']->getHandler('groupperm'); + if (!$moduleperm_handler->checkRight('module_admin', $GLOBALS['xortifyModule']->getVar( 'mid' ), $GLOBALS['xoopsUser']->getGroups())) { + $GLOBALS['xoops']->redirect(XOOPS_URL, 1, _NOPERM); + exit(); + } + } else { + $GLOBALS['xoops']->redirect(XOOPS_URL . "/user.php", 1, _NOPERM); + exit(); + } + + $GLOBALS['xoops']->loadLanguage('admin', 'xortify'); + $GLOBALS['xoops']->loadLanguage('modinfo', 'xortify'); + + $GLOBALS['xoops']->header(); + $GLOBALS['xoops']->tpl->assign('pathImageIcon', $GLOBALS['xortifyImageIcon']); + $GLOBALS['xoops']->tpl->assign('pathImageAdmin', $GLOBALS['xortifyImageAdmin']); + + $op = isset($_REQUEST['op'])?$_REQUEST['op']:"dashboard"; + $fct = isset($_REQUEST['fct'])?$_REQUEST['fct']:""; + + switch($op) { + case "signup": + + switch ($fct) + { + case "save": + + $xortifyAuth = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $myts = MyTextSanitizer::getInstance(); + $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : ''; + $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : ''; + $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : ''; + $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : ''; + $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : ''; + $agree = (isset($_POST['agree']) && intval($_POST['agree'])) ? 1 : 0; + + if ($agree != 1) { + $stop .= _US_UNEEDAGREE . '<br />'; + } + + $validate = $xortifyAuth->validate($uname, $email, $pass, $vpass); + + if ($validate!=false) + $stop .= "User details didn't validate with Xortify.com<br/>$validate"; + + XoopsLoad::load("captcha"); + $xoopsCaptcha = XoopsCaptcha::getInstance(); + if (! $xoopsCaptcha->verify() ) { + $stop .= $xoopsCaptcha->getMessage(); + } + + if ($stop!='') { + + echo xortify_adminMenu(4, 'index.php?op=signup&fct=signup'); + echo "<p align='center' style='font-size: 15px; color: #FF0000;'>$stop</p>"; + $GLOBALS['xoops'] = Xoops::getInstance(); + $xortifyAuth = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol']); + $disclaimer = $xortifyAuth->network_disclaimer(); + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "url", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts = MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('yoururl',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); + exit; + } else { + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + } + } else { + @$xortifyAuth->create_user( $_POST['viewemail'], $uname, $email, $url, $actkey, + $pass, $_POST['timezone'], $_POST['mailok'], $xortifyAuth->check_siteinfo(array())); + + $moduleHandler = $GLOBALS['xoops']->getHandler('module'); + $configHandler = $GLOBALS['xoops']->getHandler('config'); + $GLOBALS['xortifyModule'] = $moduleHandler->getByDirname('xortify'); + $configs = $configHandler->getConfigs(new Criteria('conf_modid', $GLOBALS['xortifyModule']->mid()) ); + foreach($configs as $id => $config) + switch($config->getVar('conf_name')) { + case 'xortify_username': + $config->setVar('conf_value', $uname); + @$configHandler->insertConfig($config); + break; + case 'xortify_password': + $config->setVar('conf_value', $pass); + @$configHandler->insertConfig($config); + break; + } + + $GLOBALS['xoops']->redirect("index.php", 4, _XOR_USERCREATED_PLEASEACTIVATE); + exit(0); + } + break; + default: + case "signup": + + echo xortify_adminMenu(4, 'index.php?op=signup&fct=signup'); + $GLOBALS['xoops'] = Xoops::getInstance(); + + $disclaimer = XortifyAuthFactory::getAuthConnection(false, $GLOBALS['xortifyModuleConfig']['protocol'])->network_disclaimer(); + + if (strlen(trim($disclaimer))==0) + { + $disclaimer = _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER; + } + if ($disclaimer != _XOR_ADMIN_NONETWORKCOMM_DISCLAIMER) { + + $uname = new XoopsFormText('', "uname", 35, 128, (isset($_POST['uname'])?$_POST['uname']:'')); + $pass = new XoopsFormPassword('', "pass", 35, 128, (isset($_POST['pass'])?$_POST['pass']:'')); + $vpass = new XoopsFormPassword('', "vpass", 35, 128, (isset($_POST['vpass'])?$_POST['vpass']:'')); + $email = new XoopsFormText('', "email", 35, 128, (isset($_POST['email'])?$_POST['email']:'')); + $url = new XoopsFormText('', "yoururl", 35, 128, (isset($_POST['url'])?$_POST['url']:'')); + $viewemail = new XoopsFormRadioYN('', "viewemail", (isset($_POST['viewemail'])?$_POST['viewemail']:false)); + $timezone = new XoopsFormSelectTimezone('', "timezone", (isset($_POST['timezone'])?$_POST['timezone']:'')); + $myts = MyTextSanitizer::getInstance(); + $disclaim = new XoopsFormLabel('', $myts->nl2br($disclaimer)); + $agree = new XoopsFormRadioYN('', "agree", false); + $captcha = new XoopsFormCaptcha('', 'xoopscaptcha', false); + $op = new XoopsFormHidden('op', 'signup'); + $fct = new XoopsFormHidden('fct', 'save'); + $submit = new XoopsFormButton('', 'submit', _XOR_FRM_REGISTER, 'submit'); + $GLOBALS['xoops']->tpl->assign('uname',$uname->render()); + $GLOBALS['xoops']->tpl->assign('pass',$pass->render()); + $GLOBALS['xoops']->tpl->assign('vpass',$vpass->render()); + $GLOBALS['xoops']->tpl->assign('email',$email->render()); + $GLOBALS['xoops']->tpl->assign('yoururl',$url->render()); + $GLOBALS['xoops']->tpl->assign('viewemail',$viewemail->render()); + $GLOBALS['xoops']->tpl->assign('timezone',$timezone->render()); + $GLOBALS['xoops']->tpl->assign('disclaimer',$disclaim->render()); + $GLOBALS['xoops']->tpl->assign('agree',$agree->render()); + $GLOBALS['xoops']->tpl->assign('captcha',$captcha->render()); + $GLOBALS['xoops']->tpl->assign('op',$op->render()); + $GLOBALS['xoops']->tpl->assign('fct',$fct->render()); + $GLOBALS['xoops']->tpl->assign('submit',$submit->render()); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_form.html'); + + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); + exit; + } else { + + $GLOBALS['xoops']->tpl->assign('protocol', $GLOBALS['xortifyModuleConfig']['protocol']); + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); + break; + case 'curl': + case 'json': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urijson']); + break; + case 'curlxml': + case 'wgetxml': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urixml']); + break; + case 'soap': + $GLOBALS['xoops']->tpl->assign('port', $GLOBALS['xortifyModuleConfig']['xortify_urisoap']); + break; + } + $GLOBALS['xoops']->tpl->assign('error', $disclaimer); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_signup_nocommunication.html'); + + } + break; + } + break; + case "log": + echo xortify_adminMenu(3, 'index.php?op=log'); + + include_once $GLOBALS['xoops']->path( "/class/pagenav.php" ); + + $log_handler = $GLOBALS['xoops']->getModuleHandler('log', 'xortify'); + + $ttl = $log_handler->getCount(NULL); + $limit = !empty($_POST['limit'])?intval($_POST['limit']):30; + $start = !empty($_POST['start'])?intval($_POST['start']):0; + $order = !empty($_POST['order'])?$_POST['order']:'DESC'; + $sort = !empty($_POST['sort'])?''.$_POST['sort'].'':'date'; + + $pagenav = new XoopsPageNav($ttl, $limit, $start, 'start', 'limit='.$limit.'&sort='.$sort.'&order='.$order.'&op='.$op); + $GLOBALS['xoops']->tpl->assign('pagenav', $pagenav->renderNav()); + + foreach (array( 'action','provider','date','uname','email','ip4','ip6','proxy-ip4', + 'proxy-ip6','network-addy','agent') as $id => $key) { + $GLOBALS['xoops']->tpl->assign(strtolower(str_replace('-','_',$key).'_th'), '<a href="'.$_SERVER['PHP_SELF'].'?start='.$start.'&limit='.$limit.'&sort='.str_replace('_','-',$key).'&order='.((str_replace('_','-',$key)==$sort)?($order=='DESC'?'ASC':'DESC'):$order).'&op='.$op.'">'.(defined('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key)))?constant('_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))):'_XOR_AM_TH_'.strtoupper(str_replace('-','_',$key))).'</a>'); + } + + $criteria = new Criteria('1','1'); + $criteria->setStart($start); + $criteria->setLimit($limit); + $criteria->setSort('`'.$sort.'`'); + $criteria->setOrder($order); + + $logs = $log_handler->getObjects($criteria, true); + foreach($logs as $id => $log) { + $GLOBALS['xoops']->tpl->append('log', $log->toArray()); + } + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_log.html'); + + break; + case "list": + + echo xortify_adminMenu(2, 'index.php?op=list&fct=bans'); + + XoopsLoad::load("xoopscache"); + if (!class_exists('XoopsCache')) + XoopsLoad::load("cache"); + XoopsLoad::load("pagenav"); + + if (!$bans = XoopsCache::read('xortify_bans_cache')) { + + require_once( XOOPS_ROOT_PATH.'/modules/xortify/class/'.$GLOBALS['xortifyModuleConfig']['protocol'].'.php' ); + + $func = strtoupper($GLOBALS['xortifyModuleConfig']['protocol']).'XortifyExchange'; + + ob_start(); + $soapExchg = new $func; + $bans = $soapExchg->retrieveBans(); + ob_end_flush(); + + XoopsCache::delete('xortify_bans_cache'); + XoopsCache::delete('xortify_bans_cache_backup'); + XoopsCache::write('xortify_bans_cache', $bans, $GLOBALS['xortifyModuleConfig']['xortify_seconds']); + XoopsCache::write('xortify_bans_cache_backup', $bans, ($GLOBALS['xortifyModuleConfig']['xortify_seconds'] * 1.45)); + } + + if ($bans['bans']==0) { + + echo _XS_AM_NOCACHEMSG; + } else { + + $limit = !empty($_REQUEST['limit'])?intval($_REQUEST['limit']):30; + $start = !empty($_REQUEST['start'])?intval($_REQUEST['start']):0; + + $pagenav = new XoopsPageNav($bans['bans'], $limit, $start, 'start', 'limit='.$limit.'&op='.$op); + $GLOBALS['xoops']->tpl->assign('pagenav', $pagenav->renderNav()); + $i=0; + $num=0; + foreach($bans['data'] as $key => $data) { + $i++; + if ($i>=$start&&$num<=$limit) { + $num++; + if (strlen($data['ip4'])>0) { + $ipaddy = $data['ip4']; + $iptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['ip6'])>0) { + $ipaddy = $data['ip6']; + $iptype = _XS_IPTYPE_IP6; + } else { + $ipaddy = ''; + $iptype = _XS_IPTYPE_EMPTY; + } + + if (strlen($data['proxy-ip4'])>0) { + $proxyip = $data['proxy-ip4']; + $proxyiptype = _XS_IPTYPE_IP4; + } elseif (strlen($data['proxy-ip6'])>0) { + $proxyip = $data['proxy-ip6']; + $proxyiptype = _XS_IPTYPE_IP6; + } else { + $proxyip = ''; + $proxyiptype = ''; + } + + $GLOBALS['xoops']->tpl->append('bans', array('netaddy'=>$data['network-addy']?$data['network-addy']:' ', + 'macaddy'=>$data['mac-addy']?$data['mac-addy']:' ', + 'iptype'=>$iptype, 'ipaddy'=>$ipaddy, + 'proxyiptype'=>$proxyiptype,'ip'=>$proxyip, + 'long' => $data['long']?$data['long']:' ', + 'category' =>$data['category'],'comments'=>$data['comments'])); + + } + } + $hostname = 'xortify.com'; + switch($GLOBALS['xortifyModuleConfig']['protocol']) { + case 'curlserialised': + case 'wgetserialised': + $hostname = parse_url($GLOBALS['xortifyModuleConfig']['xortify_uriserial'], PHP_URL_HOST); + break; + case 'curl': + case 'json': + $hostname = parse_url($GLOBALS['xortifyModuleConfig']['xortify_urijson'], PHP_URL_HOST); + break; + case 'curlxml': + case 'wgetxml': + $hostname = parse_url($GLOBALS['xortifyModuleConfig']['xortify_urixml'], PHP_URL_HOST); + break; + case 'soap': + $hostname = parse_url($GLOBALS['xortifyModuleConfig']['xortify_urisoap'], PHP_URL_HOST); + break; + } + $GLOBALS['xoops']->tpl->assign('cloudurl', 'http://'.$hostname); + $GLOBALS['xoops']->tpl->display('admin:xortify|xortify_cpanel_bans.html'); + } + + + break; + case "dashboard": + default: + + echo xortify_adminMenu(1, 'index.php?op=dashboard'); + + $log_handler = $GLOBALS['xoops']->getModuleHandler('log', 'xortify'); + + $indexAdmin = new XoopsModuleAdmin(); + + $indexAdmin->addInfoBox(_XOR_ADMIN_COUNTS); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_BANNED, $log_handler->getCountByField('action','banned')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_BLOCKED, $log_handler->getCountByField('action','blocked')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_MONITORED, $log_handler->getCountByField('action','monitored')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_PROJECTHONEYPOTORG, $log_handler->getCountByField('provider','projecthoneypot.org')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_PROTECTOR, $log_handler->getCountByField('provider','protector')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_SPIDERS, $log_handler->getCountByField('provider','spiders')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_STOPFORUMSPAMCOM, $log_handler->getCountByField('provider','stopforumspam.com')), 'default', 'Green'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_XORTIFY, $log_handler->getCountByField('provider','xortify')), 'default', 'Green'); + + XoopsLoad::load('xoopscache'); + if (!class_exists('XoopsCache')) { + // XOOPS 2.4 Compliance + XoopsLoad::load('cache'); + if (!class_exists('XoopsCache')) { + include_once XOOPS_ROOT_PATH.DS.'class'.DS.'cache'.DS.'xoopscache.php'; + } + } + + if ($bans = XoopsCache::read('xortify_bans_cache')) { + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_CLOUDEDBANS, count($bans['data'])), 'default', 'Green'); + } + + if ($result = XoopsCache::read('xortify_cleanup_last')) { + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_WHENCLEANED, date(_DATESTRING, $result['when'])), 'default' , 'Purple'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_CLEANINGTOOK, $result['took']), 'default', 'Purple'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_FILESDELETED, $result['files']), 'default' , 'Purple'); + $indexAdmin->addInfoBoxLine(sprintf(_XOR_ADMIN_THEREARE_BYTESSAVED, $result['size']), 'default', 'Purple'); + } + echo $indexAdmin->renderIndex(); + + break; + case "about": + + echo xortify_adminMenu(5, 'index.php?op=about'); + + $paypalitemno='XBZNTNX2BZUR4'; + $aboutAdmin = new XoopsModuleAdmin(); + + $aboutAdmin->renderabout($paypalitemno, false); + + } + + xortify_footer_adminMenu(); + $GLOBALS['xoops']->footer(); +?> \ No newline at end of file Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/menu.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/menu.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/admin/menu.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,35 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ +global $adminmenu; +$adminmenu = array(); +if (is_object($GLOBALS['xortifyModule'])) { + $xortifyImageAdmin = '/icons/32'; + $adminmenu[1]['title'] = _XOR_ADMENU4; + $adminmenu[1]['icon'] = $xortifyImageAdmin.'/home.png'; + $adminmenu[1]['image'] = $xortifyImageAdmin.'/home.png'; + $adminmenu[1]['link'] = "admin/index.php?op=dashboard"; + $adminmenu[2]['title'] = _XOR_ADMENU1; + $adminmenu[2]['icon'] = $xortifyImageAdmin.'/current.bans.png'; + $adminmenu[2]['image'] = $xortifyImageAdmin.'/current.bans.png'; + $adminmenu[2]['link'] = "admin/index.php?op=list&fct=bans"; + $adminmenu[3]['title'] = _XOR_ADMENU3; + $adminmenu[3]['icon'] = $xortifyImageAdmin.'/xortify.log.png'; + $adminmenu[3]['image'] = $xortifyImageAdmin.'/xortify.log.png'; + $adminmenu[3]['link'] = "admin/index.php?op=log"; + $adminmenu[4]['title'] = _XOR_ADMENU2; + $adminmenu[4]['icon'] = $xortifyImageAdmin.'/access.list.png'; + $adminmenu[4]['image'] = $xortifyImageAdmin.'/access.list.png'; + $adminmenu[4]['link'] = "admin/index.php?op=signup&fct=signup"; + $adminmenu[5]['title'] = _XOR_ADMENU5; + $adminmenu[5]['icon'] = $xortifyImageAdmin.'/about.png'; + $adminmenu[5]['image'] = $xortifyImageAdmin.'/about.png'; + $adminmenu[5]['link'] = "admin/index.php?op=about"; +} +?> \ No newline at end of file Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,118 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuth { + + var $_dao; + + var $_errors; + /** + * Authentication Service constructor + */ + function XortifyAuth (&$dao){ + $this->_dao = $dao; + } + + /** + * @abstract need to be write in the dervied class + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + + return $authenticated; + } + + /** + * add an error + * + * @param string $value error to add + * @access protected + */ + function setErrors($err_no, $err_str) + { + $this->_errors[$err_no] = trim($err_str); + } + + /** + * return the errors for this object as an array + * + * @return array an array of errors + * @access protected + */ + function getErrors() + { + return $this->_errors; + } + + /** + * return the errors for this object as html + * + * @return string html listing the errors + * @access protected + */ + function getHtmlErrors() + { + global $xoopsConfig; + $ret = '<br>'; + if ( $xoopsConfig['debug_mode'] == 1 || $xoopsConfig['debug_mode'] == 2 ) + { + if (!empty($this->_errors)) { + foreach ($this->_errors as $errno => $errstr) { + $ret .= $errstr . '<br/>'; + } + } else { + $ret .= _NONE.'<br />'; + } + $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); + } + else { + $ret .= _US_INCORRECTLOGIN; + } + return $ret; + } + + /** + * checks for variables require in siteinfo package in the auth library + * + * @param array $siteinfo + * + * @return array $siteinfo + * @access protected + */ + function check_siteinfo($siteinfo){ + + global $xoopsConfig; + if (!isset($siteinfo)||empty($siteinfo)||!is_array($siteinfo)){ + $siteinfo = array(); + $siteinfo['sitename'] = $xoopsConfig['sitename']; + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + $siteinfo['systemkey'] = XOOPS_LICENSE_KEY; + $siteinfo['xoops_url'] = XOOPS_URL; + } + + if (!isset($siteinfo['sitename'])||empty($siteinfo['sitename'])) + $siteinfo['sitename'] = $xoopsConfig['sitename']; + + if (!isset($siteinfo['adminmail'])||empty($siteinfo['adminmail'])) + $siteinfo['adminmail'] = $xoopsConfig['adminmail']; + + if (!isset($siteinfo['xoops_url'])||empty($siteinfo['xoops_url'])) + $siteinfo['xoops_url'] = XOOPS_URL; + + if (!isset($siteinfo['systemkey'])||empty($siteinfo['systemkey'])) + $siteinfo['systemkey'] = $xoopsConfig['systemkey']; + + return $siteinfo; + } +} + + +?> Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,186 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + +if (!function_exists('json_encode')){ + function json_encode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->encode($data); + } +} + +if (!function_exists('json_decode')){ + function json_decode($data) { + static $json = NULL; + if (!class_exists('Services_JSON') ) { include_once $GLOBALS['xoops']->path('/modules/xortify/include/JSON.php'); } + $json = new Services_JSON(); + return $json->decode($data); + } +} + + +define('XORTIFY_CURL_API', $GLOBALS['xortifyModuleConfig']['xortify_uricurl']); +define('XORTIFY_USER_AGENT', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) XOOPS/20100101 XoopsAuth/1.xx (php)'); +include_once XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_curl_provisionning.php'; + +class XortifyAuthCurl extends XortifyAuth { + + var $curl_client; + var $curl_xoops_username = ''; + var $curl_xoops_password = ''; + var $_dao; + var $_json = ''; + /** + * Authentication Service constructor + */ + function XortifyAuthCurl (&$dao) { + if (!$ch = curl_init(XORTIFY_CURL_API)) { + trigger_error('Could not intialise CURL file: '.XORTIFY_CURL_API); + return false; + } + $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURL_API).'.cookie'; + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_connecttimeout']*2); + curl_setopt($ch, CURLOPT_TIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_timeout']*2); + curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT); + $this->curl_client = $ch; + } + + + /** + * Authenticate user again curl directory (Bind) + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + + if (!$this->curl_client) { + $this->setErrors(0, _AUTH_CURL_EXTENSION_NOT_LOAD); + return $authenticated; + } + + + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_authentication' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + return $result["RESULT"]; + } + + + /** + * validate a user via curl + * + * @param string $uname + * @param string $email + * @param string $pass + * @param string $vpass + * + * @return string + */ + function validate($uname, $email, $pass, $vpass){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_user_validate' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + + /** + * get the xoops site disclaimer via curl + * + * @return string + */ + function network_disclaimer(){ + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_network_disclaimer' => json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password)))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + /** + * create a user + * + * @param bool $user_viewemail + * @param string $uname + * @param string $email + * @param string $url + * @param string $actkey + * @param string $pass + * @param integer $timezone_offset + * @param bool $user_mailok + * @param array $siteinfo + * + * @return array + */ + function create_user($user_viewemail, $uname, $email, $url, $actkey, + $pass, $timezone_offset, $user_mailok, $siteinfo){ + + $siteinfo = $this->check_siteinfo($siteinfo); + + $rnd = rand(-100000, 100000000); + $this->XortifyAuthCurl($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, 'xoops_create_user='.json_encode(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "user" => array('user_viewemail' =>$user_viewemail, 'uname' => $uname, 'email' => $email, 'url' => $url, 'actkey' => $actkey, 'pass' => $pass, 'timezone_offset' => $timezone_offset, 'user_mailok' => $user_mailok, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd), "siteinfo" => $siteinfo))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = $this->obj2array(json_decode($data)); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + } + + function obj2array($objects) { + $ret = array(); + foreach($objects as $key => $value) { + if (is_a($value, 'stdClass')) { + $ret[$key] = (array)$value; + } elseif (is_array($value)) { + $ret[$key] = $this->obj2array($value); + } else { + $ret[$key] = $value; + } + } + return $ret; + } + +} +// end class + + +?> Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl_provisionning.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl_provisionning.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curl_provisionning.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,190 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +class XortifyAuthCurlProvisionning { + + var $_auth_instance; + + function &getInstance(&$auth_instance) + { + static $provis_instance; + if (!isset($provis_instance)) { + $provis_instance = new XortifyAuthCurlProvisionning($auth_instance); + } + return $provis_instance; + } + + /** + * Authentication Service constructor + */ + function XortifyAuthCurlProvisionning (&$auth_instance) { + $this->_auth_instance = &$auth_instance; + $config_handler = $GLOBALS['xoops']->getHandler('config'); + $config = $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + foreach ($config as $key => $val) { + $this->$key = $val; + } + $config_gen = $config_handler->getConfigsByCat(XOOPS_CONF); + $this->default_TZ = $config_gen['default_TZ']; + $this->theme_set = $config_gen['theme_set']; + $this->com_mode = $config_gen['com_mode']; + $this->com_order = $config_gen['com_order']; + } + + /** + * Return a Xortify User Object + * + * @return XortifyUser or false + */ + function getXortifyUser($uname) { + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $criteria = new Criteria('uname', $uname); + $getuser = $member_handler->getUsers($criteria); + if (count($getuser) == 1) + return $getuser[0]; + else return false; + } + + /** + * Launch the synchronisation process + * + * @return bool + */ + function sync($datas, $uname, $pwd = null) { + $xoopsUser = $this->getXortifyUser($uname); + if (!$xoopsUser) { // Xortify User Database not exists + if ($this->curl_provisionning) { + $xoopsUser = $this->add($datas, $uname, $pwd); + } else $this->_auth_instance->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); + } else { // Xortify User Database exists + + } + return $xoopsUser; + } + + /** + * Add a new user to the system + * + * @return bool + */ + function add($datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + // Create XOOPS Database User + $newuser = $member_handler->createUser(); + $newuser->setVar('uname', $uname); + $newuser->setVar('pass', md5(stripslashes($pwd))); + $newuser->setVar('email', $datas['email']); + $newuser->setVar('rank', 0); + $newuser->setVar('level', 1); + $newuser->setVar('timezone_offset', $this->default_TZ); + $newuser->setVar('theme', $this->theme_set); + $newuser->setVar('umode', $this->com_mode); + $newuser->setVar('uorder', $this->com_order); + if ($this->curl_provisionning) + $tab_mapping = explode('|', $this->curl_field_mapping); + else + $tab_mapping = explode('|', $this->ldap_field_mapping); + + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $newuser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])])); + } + if ($member_handler->insertUser($newuser)) { + } + if ($member_handler->insertUser($newuser)) { + foreach ($this->curl_provisionning_group as $groupid) + $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); + $newuser->unsetNew(); + return $newuser; + } else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + + $newuser->unsetNew(); + return $newuser; + //else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + return $ret; + } + + /** + * Modify user information + * + * @return bool + */ + function change(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $xoopsUser->setVar('pass', md5(stripslashes($pwd))); + $tab_mapping = explode('|', $this->ldap_field_mapping); + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0])); + } + if ($member_handler->insertUser($xoopsUser)) { + return $xoopsUser; + } else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors()); + return $ret; + } + + function change_curl(&$xoopsUser, $datas, $uname, $pwd = null) { + $ret = false; + $member_handler = $GLOBALS['xoops']->getHandler('member'); + $xoopsUser->setVar('pass', md5(stripslashes($pwd))); + $tab_mapping = explode('|', $this->curl_field_mapping); + foreach ($tab_mapping as $mapping) { + $fields = explode('=', trim($mapping)); + if ($fields[0] && $fields[1]) + $xoopsUser->setVar(trim($fields[0]), utf8_decode($datas[trim($fields[1])][0])); + } + if ($member_handler->insertUser($xoopsUser)) { + return $xoopsUser; + } else $GLOBALS['xoops']->redirect(XOOPS_URL.'/user.php', 5, $xoopsUser->getHtmlErrors()); + return $ret; + } + + /** + * Modify a user + * + * @return bool + */ + function delete() { + } + + /** + * Suspend a user + * + * @return bool + */ + function suspend() { + } + + /** + * Restore a user + * + * @return bool + */ + function restore() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function resetpwd() { + } + + +} +// end class + +?> Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlserialised.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlserialised.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/xortify/class/auth/auth_curlserialised.php 2012-04-29 15:41:51 UTC (rev 9402) @@ -0,0 +1,167 @@ +<?php +/** + * @package xortify + * @subpackage module + * @description Sector Network Security Drone + * @author Simon Roberts WISHCRAFT <si...@ch...> + * @copyright copyright (c) 2010-2013 XOOPS.org + * @licence GPL 2.0 - see docs/LICENCE.txt + */ + + +define('XORTIFY_CURLSERIAL_API', $GLOBALS['xortifyModuleConfig']['xortify_uriserial']); +define('XORTIFY_USER_AGENT', 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) XOOPS/20100101 XoopsAuth/1.xx (php)'); +include_once XOOPS_ROOT_PATH . '/modules/xortify/class/auth/auth_curlserialised_provisionning.php'; + +class XortifyAuthCurlserialised extends XortifyAuth { + + var $curl_client; + var $curl_xoops_username = ''; + var $curl_xoops_password = ''; + var $_dao; + /** + * Authentication Service constructor + */ + function XortifyAuthCurlserialised (&$dao) { + + if (!$ch = curl_init(XORTIFY_CURLSERIAL_API)) { + trigger_error('Could not intialise CURL file: '.$url); + return false; + } + $cookies = XOOPS_VAR_PATH.'/cache/xoops_cache/authcurl_'.md5(XORTIFY_CURLSERIAL_API).'.cookie'; + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_connecttimeout']*2); + curl_setopt($ch, CURLOPT_TIMEOUT, $GLOBALS['xortifyModuleConfig']['curl_timeout']*2); + curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT, XORTIFY_USER_AGENT); + $this->curl_client = $ch; + } + + + /** + * Authenticate user again curl directory (Bind) + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + + if (!$this->curl_client) { + $this->setErrors(0, _AUTH_CURL_EXTENSION_NOT_LOAD); + return $authenticated; + } + + + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_authentication' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "auth" => array('username' => $uname, "password" => $pwd, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pwd), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + return $result["RESULT"]; + } + + + /** + * validate a user via curl + * + * @param string $uname + * @param string $email + * @param string $pass + * @param string $vpass + * + * @return string + */ + function validate($uname, $email, $pass, $vpass){ + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + $rnd = rand(-100000, 100000000); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_user_validate' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password, "validate" => array('uname' => $uname, "pass" => $pass, "vpass" => $vpass, "email" => $email, "time" => time(), "passhash" => sha1((time()-$rnd).$uname.$pass), "rand"=>$rnd))))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + + /** + * get the xoops site disclaimer via curl + * + * @return string + */ + function network_disclaimer(){ + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS, array('xoops_network_disclaimer' => serialize(array("username"=> $this->curl_xoops_username, "password"=> $this->curl_xoops_password)))); + $data = curl_exec($this->curl_client); + curl_close($this->curl_client); + $result = unserialize($data); + if ($result['ERRNUM']==1){ + return $result["RESULT"]; + } else { + return false; + } + + } + + /** + * create a user + * + * @param bool $user_viewemail + * @param string $uname + * @param string $email + * @param string $url + * @param string $actkey + * @param string $pass + * @param integer $timezone_offset + * @param bool $user_mailok + * @param array $siteinfo + * + * @return array + */ + function create_user($user_viewemail, $uname, $email, $url, $actkey, + $pass, $timezone_offset, $user_mailok, $siteinfo){ + + $siteinfo = $this->check_siteinfo($siteinfo); + + $rnd = rand(-100000, 100000000); + $this->XortifyAuthCurlserialised($GLOBALS['xoopsDB']); + curl_setopt($this->curl_client, CURLOPT_POSTFIELDS... [truncated message content] |
From: <wis...@us...> - 2012-04-29 15:35:17
|
Revision: 9401 http://xoops.svn.sourceforge.net/xoops/?rev=9401&view=rev Author: wishcraft Date: 2012-04-29 15:35:11 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Anti keyword Stuffing for XOOPS 2.6.0 A2 - Find Preloader Attached. Added Paths: ----------- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/antistuffing.php Added: XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/antistuffing.php =================================================================== --- XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/antistuffing.php (rev 0) +++ XoopsCore/branches/tasks/2.6.0-wishcraft/modules/system/preloads/antistuffing.php 2012-04-29 15:35:11 UTC (rev 9401) @@ -0,0 +1,72 @@ +<?php + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SystemAntistuffingPreload extends XoopsPreloadItem +{ + function eventCoreHeaderCheckcache($args) + { + global $xoopsTpl, $xoTheme; + + $search = array(' and ', ' the ', ' there ', ' their ', ' they\'re ', ' are ', ' to ', ' when ', ' on ', ' by ', ' is ', ' too ', ' you ',' ','.','<','>','"',';',':','}','{','[',']','|','\\','/','=','+','-','_',')','(','*','&','^','%','$','\#','@','!','~','`'); + $minimumwordlen = 4; + + // Gets Meta Data + $path = str_replace($search, ',', str_replace(basename($_SERVER['REQUEST_URI']), '', $_SERVER['REQUEST_URI'])); + $sitename = $xoTheme->template->_tpl_vars['xoops_sitename']; + $slogon = $xoTheme->template->_tpl_vars['xoops_slogan']; + $pagetitle = $xoTheme->template->_tpl_vars['xoops_pagetitle']; + $keywords = $xoTheme->metas['meta']['keywords']; + //$description = $xoTheme->metas['meta']['description']; + $sitename .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_sitename']; + $slogon .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_slogan']; + $pagetitle .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_pagetitle']; + $keywords .= ','.$xoopsTpl->currentTheme->metas['meta']['keywords']; + //$description .= ','.$xoopsTpl->currentTheme->metas['meta']['description']; + + // Makes Unique Keyword Sentence with NO KEYPHRASES - A KEY PHRASE IS AN INCORRECT USE OF THE META TAG 'KEYWORDS' + $nophrase = str_replace($search, ',', $path.str_replace($search, ',', $sitename).','.str_replace($search, ',', $slogon).','.str_replace($search, ',', $pagetitle).','.str_replace($search, ',', $keywords)/*.','.str_replace($search, ',', $description)*/); + $keywords = array_unique(explode(',', $nophrase)); + foreach($keywords as $id => $word) { + if (strlen($word)<$minimumwordlen) { + unset($keywords[$id]); + } + } + $xoopsTpl->currentTheme->metas['meta']['keywords'] = implode(',', $keywords); + $xoTheme->metas['meta']['keywords'] = implode(',', $keywords); + } + + function eventCoreFooterStart($args) + { + global $xoopsTpl, $xoTheme; + + $search = array(' and ', ' the ', ' there ', ' their ', ' they\'re ', ' are ', ' to ', ' when ', ' on ', ' by ', ' is ', ' too ', ' you ',' ','.','<','>','"',';',':','}','{','[',']','|','\\','/','=','+','-','_',')','(','*','&','^','%','$','\#','@','!','~','`'); + $minimumwordlen = 4; + + // Gets Meta Data + $path = str_replace($search, ',', str_replace(basename($_SERVER['REQUEST_URI']), '', $_SERVER['REQUEST_URI'])); + $sitename = $xoTheme->template->_tpl_vars['xoops_sitename']; + $slogon = $xoTheme->template->_tpl_vars['xoops_slogan']; + $pagetitle = $xoTheme->template->_tpl_vars['xoops_pagetitle']; + $keywords = $xoTheme->metas['meta']['keywords']; + //$description = $xoTheme->metas['meta']['description']; + $sitename .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_sitename']; + $slogon .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_slogan']; + $pagetitle .= ','.$xoopsTpl->currentTheme->template->_tpl_vars['xoops_pagetitle']; + $keywords .= ','.$xoopsTpl->currentTheme->metas['meta']['keywords']; + //$description .= ','.$xoopsTpl->currentTheme->metas['meta']['description']; + + // Makes Unique Keyword Sentence with NO KEYPHRASES - A KEY PHRASE IS AN INCORRECT USE OF THE META TAG 'KEYWORDS' + $nophrase = str_replace($search, ',', $path.str_replace($search, ',', $sitename).','.str_replace($search, ',', $slogon).','.str_replace($search, ',', $pagetitle).','.str_replace($search, ',', $keywords)/*.','.str_replace($search, ',', $description)*/); + $keywords = array_unique(explode(',', $nophrase)); + foreach($keywords as $id => $word) { + if (strlen($word)<$minimumwordlen) { + unset($keywords[$id]); + } + } + $xoopsTpl->currentTheme->metas['meta']['keywords'] = implode(',', $keywords); + $xoTheme->metas['meta']['keywords'] = implode(',', $keywords); + } +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |