From: <txm...@us...> - 2012-03-29 23:02:32
|
Revision: 9214 http://xoops.svn.sourceforge.net/xoops/?rev=9214&view=rev Author: txmodxoops Date: 2012-03-29 23:02:22 +0000 (Thu, 29 Mar 2012) Log Message: ----------- Updated Beta 2 trunk Modified Paths: -------------- XoopsModules/xThCreator/trunk/xThCreator/admin/languages.php XoopsModules/xThCreator/trunk/xThCreator/admin/layout.php XoopsModules/xThCreator/trunk/xThCreator/admin/themes.php XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_languages.php XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_layout.php XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_themes.php XoopsModules/xThCreator/trunk/xThCreator/css/admin.css XoopsModules/xThCreator/trunk/xThCreator/css/style.css XoopsModules/xThCreator/trunk/xThCreator/docs/changelog.txt XoopsModules/xThCreator/trunk/xThCreator/include/functions.php XoopsModules/xThCreator/trunk/xThCreator/language/english/admin.php XoopsModules/xThCreator/trunk/xThCreator/language/italian/admin.php XoopsModules/xThCreator/trunk/xThCreator/library/defolders.php XoopsModules/xThCreator/trunk/xThCreator/library/resource/theme.html XoopsModules/xThCreator/trunk/xThCreator/library/resource/tpl/metas.html XoopsModules/xThCreator/trunk/xThCreator/library/resource/tpl/scripts.html XoopsModules/xThCreator/trunk/xThCreator/sql/mysql.sql XoopsModules/xThCreator/trunk/xThCreator/xoops_version.php Added Paths: ----------- XoopsModules/xThCreator/trunk/xThCreator/admin/functions.js XoopsModules/xThCreator/trunk/xThCreator/admin/image.x XoopsModules/xThCreator/trunk/xThCreator/admin/load_colors.php XoopsModules/xThCreator/trunk/xThCreator/admin/load_drawing.php XoopsModules/xThCreator/trunk/xThCreator/admin/save_drawing.php XoopsModules/xThCreator/trunk/xThCreator/library/resource/js/ XoopsModules/xThCreator/trunk/xThCreator/library/resource/js/index.html Added: XoopsModules/xThCreator/trunk/xThCreator/admin/functions.js =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/functions.js (rev 0) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/functions.js 2012-03-29 23:02:22 UTC (rev 9214) @@ -0,0 +1,9 @@ +/** + * XTHCREATOR - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * Version : 1.01 Mon 2012/03/19 14:23:56 : Timgno Exp $ + * ******************************************************* + */ +eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(z).v(3(){t(i=0;i<w;++i){$("#8").R("<l>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"<1>&2;</1>"+"</l>")}$.E("P.p",3(a){$("#8 1").d(3(b){$(5).7("6-4",a[b])})});e 9="D(0, 0, 0)";$("#h 1").d(3(b){$(5).j("c",3(){9=$(5).7("6-4");$("#s").f("u h 4 r: "+"<m x=\'y: n; A: n; 6-4:"+9+";\'>"+9+"</m>")})});$("#8 1").d(3(b){$(5).j("c",3(){$(5).7("6-4",9)})});$("#B").c(3(){$("#8 1").7("6-4","C")});$("#o").c(3(){e g=F G();e i=0;$("#8 1").d(3(){g[i]=$(5).7("6-4");++i});$.H({I:"J",K:"L.p",M:"N",a:g,O:3(a){$("#q").f("Q k")},S:3(){$("#q").f("T U V W X Y o Z k")}})})});',62,62,'|td|nbsp|function|color|this|background|css|grid|active_color|data|index|click|each|var|html|colorsAsJson|palette||bind|image|tr|span|20px|save|php|debug_message|is|debug_palette_color|for|active|ready|20|style|width|document|height|clear|transparent|rgb|getJSON|new|Object|ajax|type|post|url|save_drawing|dataType|text|success|load_drawing|saved|append|failure|An|error|has|occured|trying|to|the'.split('|'),0,{})) \ No newline at end of file Added: XoopsModules/xThCreator/trunk/xThCreator/admin/image.x =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/image.x (rev 0) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/image.x 2012-03-29 23:02:22 UTC (rev 9214) @@ -0,0 +1 @@ +[] \ No newline at end of file Modified: XoopsModules/xThCreator/trunk/xThCreator/admin/languages.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/languages.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/languages.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -92,9 +92,9 @@ { echo "<table width=\"100%\" cellspacing=\"1\" class=\"outer\"> <tr> - <th align='center'>"._AM_XTHCREATOR_LANG_ID."</th> - <th align=\"center\">"._AM_XTHCREATOR_LANG_TH_NAME."</th> + <th align='center'>"._AM_XTHCREATOR_LANG_ID."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_NAME."</th> + <th align=\"center\">"._AM_XTHCREATOR_LANG_THEME."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_FILE."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_DEFINE."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_DESCRIPT."</th> @@ -126,9 +126,9 @@ } else { echo "<table width='100%' cellspacing='1' class='outer'> <tr> - <th align='center'>"._AM_XTHCREATOR_LANG_ID."</th> - <th align=\"center\">"._AM_XTHCREATOR_LANG_TH_NAME."</th> + <th align='center'>"._AM_XTHCREATOR_LANG_ID."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_NAME."</th> + <th align=\"center\">"._AM_XTHCREATOR_LANG_THEME."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_FILE."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_DEFINE."</th> <th align=\"center\">"._AM_XTHCREATOR_LANG_DESCRIPT."</th> @@ -156,9 +156,13 @@ $obj =& $languagesHandler->get($_REQUEST["lang_id"]); } else { $obj =& $languagesHandler->create(); - } + } + //Id of theme + $themes =& $themesHandler->get($_REQUEST["theme_name"]); + $theme_id = $themes->getVar('theme_id'); + //Form lang_th_name - $obj->setVar("lang_th_name", $_REQUEST["lang_th_name"]); + $obj->setVar("lang_theme", $theme_id); //Form lang_file $obj->setVar("lang_name", $_REQUEST["lang_name"]); //Form lang_file Modified: XoopsModules/xThCreator/trunk/xThCreator/admin/layout.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/layout.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/layout.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -34,27 +34,28 @@ * * Version : 1.01 Mon 2012/03/19 18:13:30 : Timgno Exp $ * **************************************************************************** - */ - + */ include "admin_header.php"; include_once "../include/functions.php"; xoops_cp_header(); global $xoopsModuleConfig, $pathImageIcon; -$op = xThCreator_CleanVars($_REQUEST, 'op', 'list_layout', 'string'); +$op = xThCreator_CleanVars($_REQUEST, 'op', 'list', 'string'); $layoutAdmin = new ModuleAdmin(); switch ($op) { - case "list_layout": + case "list": default: echo $layoutAdmin->addNavigation('layout.php'); $layoutAdmin->addItemButton(_AM_XTHCREATOR_NEWLAYOUT, 'layout.php?op=new_layout', 'add'); echo $layoutAdmin->renderButton(); + // For layout $criteria = new CriteriaCompo(); - $criteria->setSort("layout_id"); - $criteria->setOrder("ASC"); - $numrows = $layoutHandler->getCount(); + $criteria->add(new Criteria('layout_id', 0, '>')); + $criteria->setSort("layout_weight ASC, layout_name"); + $criteria->setOrder("ASC"); + $numrows = $layoutHandler->getCount($criteria); $layout_arr = $layoutHandler->getall($criteria); - + unset($criteria); //Affichage du tableau if ($numrows>0) { @@ -62,7 +63,7 @@ <tr> <th align='center'>"._AM_XTHCREATOR_LAYOUT_ID."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_NAME."</th> - <th align='center'>"._AM_XTHCREATOR_LAYOUT_TH_NAME."</th> + <th align='center'>"._AM_XTHCREATOR_LAYOUT_THEME."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_DESCRIPTION."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_WEIGHT."</th> <th align='center' width='10%'>"._AM_XTHCREATOR_FORMACTION."</th> @@ -72,16 +73,18 @@ foreach (array_keys($layout_arr) as $i) { echo "<tr class='".$class."'>"; - $class = ($class == "even") ? "odd" : "even"; - echo "<td align='center'>".$layout_arr[$i]->getVar("layout_name")."</td>"; - - $themes =& $themesHandler->get($layout_arr[$i]->getVar("layout_th_name")); - $title_themes = $themes->getVar("theme_name"); - echo "<td align='center'>".$title_themes."</td>"; + $class = ($class == "even") ? "odd" : "even"; + echo "<td align='center'>".$layout_arr[$i]->getVar("layout_id")."</td>"; + echo "<td align='center'>".$layout_arr[$i]->getVar("layout_name")."</td>"; + //Name of theme + $themes =& $themesHandler->get($_REQUEST["layout_theme"]); + $theme_name = $themes->getVar('theme_name'); + echo "<td align='center'>".$layout_arr[$i]->getVar("layout_theme")."</td>"; echo "<td align='center'>".$layout_arr[$i]->getVar("layout_description")."</td>"; echo "<td align='center'>".$layout_arr[$i]->getVar("layout_weight")."</td>"; echo "<td align='center' width='10%'> + <a href='layout.php?op=display_layout&layout_id=".$layout_arr[$i]->getVar("layout_id")."'><img src=".$pathImageIcon."/display.png alt='"._DISPLAY."' title='"._DISPLAY."'></a> <a href='layout.php?op=edit_layout&layout_id=".$layout_arr[$i]->getVar("layout_id")."'><img src=".$pathImageIcon."/edit.png alt='"._EDIT."' title='"._EDIT."'></a> <a href='layout.php?op=delete_layout&layout_id=".$layout_arr[$i]->getVar("layout_id")."'><img src=".$pathImageIcon."/delete.png alt='"._DELETE."' title='"._DELETE."'></a> </td>"; @@ -93,7 +96,7 @@ <tr> <th align='center'>"._AM_XTHCREATOR_LAYOUT_ID."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_NAME."</th> - <th align='center'>"._AM_XTHCREATOR_LAYOUT_TH_NAME."</th> + <th align='center'>"._AM_XTHCREATOR_LAYOUT_THEME."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_DESCRIPTION."</th> <th align='center'>"._AM_XTHCREATOR_LAYOUT_WEIGHT."</th> <th align='center' width='10%'>"._AM_XTHCREATOR_FORMACTION."</th> @@ -104,7 +107,7 @@ case "new_layout": echo $layoutAdmin->addNavigation("layout.php"); - $layoutAdmin->addItemButton(_AM_XTHCREATOR_LAYOUTLIST, 'layout.php?op=list_layout', 'list'); + $layoutAdmin->addItemButton(_AM_XTHCREATOR_LAYOUTLIST, 'layout.php?op=list', 'list'); echo $layoutAdmin->renderButton(); $obj =& $layoutHandler->create(); @@ -112,6 +115,36 @@ $form->display(); break; + case "display_layout": + // Define Stylesheet + $xoTheme->addStylesheet( XOOPS_URL . '/modules/xThCreator/css/admin.css' ); + // Define scripts + $xoTheme->addScript('modules/xThCreator/admin/functions.js'); + + echo "<br /> + <p><strong>"._AM_XTHCREATOR_PALETTE."</strong></p><br /> + <p><strong>"._AM_XTHCREATOR_DRAW."</strong></p> + <div id='debug_message'></div> + <div id='debug_palette_color'></div> + <table id='grid' cellspacing='0'></table> + <p><em>"._AM_XTHCREATOR_DEBUG."</em></p> + <table class='outer'><tr><td class='center'> + <table id='palette'> + <tr><td> </td></tr> + <tr>"; + echo "<td style='background-color: rgb(0, 0, 0);' title='rgb(0, 0, 0)'> </td>"; + for($i = 1; $i <= 40; $i++){ + $r = rand(0, 255); $g = rand(0, 255); $b = rand(0, 255); + echo "<td style='background-color: rgb(".$r.", ".$g.", ".$b.");' title='rgb(".$r.", ".$g.", ".$b.")'> </td>"; + } + echo "<td style='background-color: rgb(255, 255, 255);' title='rgb(255, 255, 255)'> </td>"; + echo "</tr> + <tr><td> </td></tr> + </table> + <button id='save'>"._AM_XTHCREATOR_SAVE."</button> + </td></tr></table>"; + break; + case "save_layout": if ( !$GLOBALS["xoopsSecurity"]->check() ) { redirect_header("layout.php", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); @@ -121,17 +154,17 @@ } else { $obj =& $layoutHandler->create(); } - //Form layout_name - $obj->setVar("layout_name", $_REQUEST["layout_name"]); - //Form layout_th_name - $obj->setVar("layout_th_name", $_REQUEST["layout_th_name"]); - //Form layout_description - $obj->setVar("layout_description", $_REQUEST["layout_description"]); - //Form layout_weight - $obj->setVar("layout_weight", $_REQUEST["layout_weight"]); - + + //Id of theme + $themes =& $themesHandler->get($_REQUEST["theme_name"]); + $theme_id = $themes->getVar('theme_id'); + + $layoutArray = array("layout_name" => $_REQUEST["layout_name"], "layout_theme" => $theme_id, "layout_description" => $_REQUEST["layout_description"], "layout_design" => $_REQUEST["layout_design"], "layout_weight" => $_REQUEST["layout_weight"]); + //Form layout + $obj->setVars($layoutArray); + if ($layoutHandler->insert($obj)) { - redirect_header("layout.php?op=list_layout", 2, _AM_XTHCREATOR_FORMOK); + redirect_header("layout.php?op=list", 2, _AM_XTHCREATOR_FORMOK); } echo $obj->getHtmlErrors(); @@ -142,7 +175,7 @@ case "edit_layout": echo $layoutAdmin->addNavigation("layout.php"); $layoutAdmin->addItemButton(_AM_XTHCREATOR_NEWLAYOUT, 'layout.php?op=new_layout', 'add'); - $layoutAdmin->addItemButton(_AM_XTHCREATOR_LAYOUTLIST, 'layout.php?op=list_layout', 'list'); + $layoutAdmin->addItemButton(_AM_XTHCREATOR_LAYOUTLIST, 'layout.php?op=list', 'list'); echo $layoutAdmin->renderButton(); $obj = $layoutHandler->get($_REQUEST["layout_id"]); $form = $obj->getForm(); @@ -161,7 +194,7 @@ echo $obj->getHtmlErrors(); } } else { - xoops_confirm(array("ok" => 1, "layout_id" => $_REQUEST["layout_id"], "op" => "delete_layout"), $_SERVER["REQUEST_URI"], sprintf(_AM_XTHCREATOR_FORMSUREDEL, $obj->getVar("layout"))); + xoops_confirm(array("ok" => 1, "layout_id" => $_REQUEST["layout_id"], "op" => "delete_layout"), $_SERVER["REQUEST_URI"], sprintf(_AM_XTHCREATOR_FORMSUREDEL, $obj->getVar("layout_name"))); } break; } Added: XoopsModules/xThCreator/trunk/xThCreator/admin/load_colors.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/load_colors.php (rev 0) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/load_colors.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -0,0 +1 @@ +["rgb(119, 119, 119)","rgb(255, 0, 0)","rgb(0, 255, 0)","rgb(0, 0, 255)","rgb(0, 110, 0)","rgb(119, 0, 119)","rgb(200, 255, 100)","rgb(255, 0, 110)","rgb(0, 155, 0)","rgb(70, 100, 55)","rgb(55, 55, 0)","rgb(80, 80, 80)","rgb(200, 255, 100)","rgb(19, 159, 19)","rgb(55, 55, 55)","rgb(20, 90, 200)","rgb(200, 255, 200)","rgb(0, 210, 215)","rgb(55, 255, 40)","rgb(140, 0, 140)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(200, 255, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(200, 255, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 0, 0)","rgba(0, 0, 0, 0)","rgb(200, 255, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 20, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 20, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 110, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(200, 255, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(249, 114, 27)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 110, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 0, 110)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 110, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(70, 70, 250)","rgba(0, 0, 0, 0)","rgb(249, 114, 27)","rgb(0, 110, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 55, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 110, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(255, 0, 110)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 210, 215)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(55, 255, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(55, 255, 40)","rgb(0, 210, 215)","rgb(255, 20, 100)","rgb(255, 55, 40)","rgb(249, 114, 27)","rgb(140, 0, 140)","rgb(55, 255, 40)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 210, 215)","rgb(0, 210, 215)","rgba(0, 0, 0, 0)","rgb(255, 20, 100)","rgba(0, 0, 0, 0)","rgb(140, 0, 140)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgb(0, 210, 215)","rgba(0, 0, 0, 0)","rgb(0, 210, 215)","rgb(255, 20, 100)","rgba(0, 0, 0, 0)","rgb(255, 20, 100)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)","rgba(0, 0, 0, 0)"] \ No newline at end of file Added: XoopsModules/xThCreator/trunk/xThCreator/admin/load_drawing.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/load_drawing.php (rev 0) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/load_drawing.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -0,0 +1,42 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * **************************************************************************** + * XTHCREATOR - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting + * source code which is considered copyrighted (c) material of the + * original comment or credit authors. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xThCreator + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/19 18:13:30 : Timgno Exp $ + * **************************************************************************** + */ +$filename = "image.x"; +if (file_exists($filename)) { + print file_get_contents($filename); +} +?> Added: XoopsModules/xThCreator/trunk/xThCreator/admin/save_drawing.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/save_drawing.php (rev 0) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/save_drawing.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -0,0 +1,58 @@ +<?php +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * **************************************************************************** + * XTHCREATOR - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting + * source code which is considered copyrighted (c) material of the + * original comment or credit authors. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xThCreator + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/19 18:13:30 : Timgno Exp $ + * **************************************************************************** + */ +error_reporting(E_ALL); +$filename = "load_colors.php"; +if (is_writable($filename)) { + if (!$handle = fopen($filename, 'a+')) { + echo "Non si riesce ad aprire il file ($filename)"; + exit; + } + if ( isset( $_REQUEST['somecontent'] ) ) { + $somecontent = $_REQUEST['somecontent']; + } + if (fwrite($handle, $somecontent) === false) { + echo "Non si riesce a scrivere nel file ($filename)"; + exit; + } + echo "Riuscito, scritto ($somecontent) nel file ($filename)"; + fclose($handle); +} else { + echo "Il file $filename non \xE8 accessibile"; +} +file_put_contents($filename, json_encode($_POST)); +?> Modified: XoopsModules/xThCreator/trunk/xThCreator/admin/themes.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/admin/themes.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/admin/themes.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -37,11 +37,7 @@ */ include_once("admin_header.php"); xoops_cp_header(); -if (isset($_REQUEST["op"])) { - $op = $_REQUEST["op"]; -} else { - @$op = "default"; -} +$op = xthcreator_CleanVars($_REQUEST, 'op', 'list', 'string'); $themeAdmin = new ModuleAdmin(); switch ($op) { @@ -54,44 +50,34 @@ } else { $obj =& $themesHandler->create(); } - //Form theme_title + //Form theme_title, $obj->setVar("theme_name", $_REQUEST["theme_name"]); //Form theme_version $obj->setVar("theme_version", $_REQUEST["theme_version"]); - //Form theme_img + //Form theme_img "gif|jpeg|pjpeg|png", 104857600 include_once XOOPS_ROOT_PATH."/class/uploader.php"; - $uploaddir_theme_img = XOOPS_ROOT_PATH."/uploads/xthcreator/images/"; - $uploader_theme_img = new XoopsMediaUploader($uploaddir_theme_img, $GLOBALS['xoopsModuleConfig']["theme_img_mimetypes"], $GLOBALS['xoopsModuleConfig']["theme_img_size"], null, null); - - if ($uploader_theme_img->fetchMedia($_POST['xoops_upload_file'][0])) { - $uploader_theme_img->setPrefix("theme_img_") ; - $uploader_theme_img->fetchMedia($_POST['xoops_upload_file'][0]); - if (!$uploader_theme_img->upload()) { - $errors = $uploader_theme_img->getErrors(); + $uploaddir = XOOPS_UPLOAD_URL."/xthcreator/images/"; + $uploader = new XoopsMediaUploader($uploaddir, $GLOBALS['xoopsModuleConfig']["mimetypes"], $GLOBALS['xoopsModuleConfig']["maxsize"], null, null); + if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { + $uploader->setPrefix("theme_img_") ; + $uploader->fetchMedia($_POST['xoops_upload_file'][0]); + if (!$uploader->upload()) { + $errors = $uploader->getErrors(); redirect_header("javascript:history.go(-1)",3, $errors); } else { - $obj->setVar("theme_img", $uploader_theme_img->getSavedFileName()); + $obj->setVar("theme_img", $uploader->getSavedFileName()); } } else { $obj->setVar("theme_img", $_REQUEST["theme_img"]); - } - //Form theme_description - $obj->setVar("theme_description", $_REQUEST["theme_description"]); - //Form theme_author - $obj->setVar("theme_author", $_REQUEST["theme_author"]); - //Form theme_submitter - $obj->setVar("theme_submitter", $_REQUEST["theme_submitter"]); - //Form theme_created - $obj->setVar("theme_created", strtotime($_REQUEST["theme_created"])); - //Form theme_weight - $obj->setVar("theme_weight", $_REQUEST["theme_weight"]); - //Form theme_online + } + $verif_theme_online = ($_REQUEST["theme_online"] == 1) ? "1" : "0"; - $obj->setVar("theme_online", $verif_theme_online); - - + $themeArray = array("theme_description" => $_REQUEST["theme_description"], "theme_author" => $_REQUEST["theme_author"], "theme_submitter" => $_REQUEST["theme_submitter"], "theme_created" => xthcreator_convertDate($_REQUEST["theme_created"]), "theme_weight" => $_REQUEST["theme_weight"], "theme_online" => $verif_theme_online); + //Form theme + $obj->setVars($themeArray); + if ($themesHandler->insert($obj)) { - redirect_header("themes.php?op=show_list_theme", 2, _AM_XTHCREATOR_FORMOK); + redirect_header("themes.php?op=list", 2, _AM_XTHCREATOR_FORMOK); } echo $obj->getHtmlErrors(); @@ -133,13 +119,13 @@ case "add_theme": echo $themeAdmin->addNavigation('themes.php'); - $themeAdmin->addItemButton(_AM_XTHCREATOR_THEMESLIST, 'themes.php?op=default', 'list'); + $themeAdmin->addItemButton(_AM_XTHCREATOR_THEMESLIST, 'themes.php?op=list', 'list'); echo $themeAdmin->renderButton(); $obj =& $themesHandler->create(); $form = $obj->getForm(); break; - case "default": + case "list": default: echo $themeAdmin->addNavigation('themes.php'); $themeAdmin->addItemButton(_AM_XTHCREATOR_NEWTHEMES, 'themes.php?op=add_theme', 'add'); @@ -201,17 +187,17 @@ <th class='center'>"._AM_XTHCREATOR_THEME_ONLINE."</th> <th class='center' width='10%'>"._AM_XTHCREATOR_FORMACTION."</th> </tr>"; - $class = "odd"; - $prefix = "<img src=\"".XOOPS_URL."/modules/xThCreator/images/deco/arrow.gif\">"; - foreach (array_keys($themes_arr) as $i) - { - echo "<tr class='".$class."'>"; + $class = "odd"; + $prefix = "<img src=\"".XOOPS_URL."/modules/xThCreator/images/deco/arrow.gif\">"; + foreach (array_keys($themes_arr) as $i) + { + echo "<tr class='".$class."'>"; $class = ($class == "even") ? "odd" : "even"; $theme_id = $themes_arr[$i]->getVar("theme_id"); echo "<td class='center'>".$theme_id."</td>"; echo "<td class='center'>".$themes_arr[$i]->getVar("theme_name")."</td>"; echo "<td class='center'>".$themes_arr[$i]->getVar("theme_version")."</td>"; - echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xThCreator/images/".$themes_arr[$i]->getVar("theme_img")."' height='30px' title='theme_img' alt='theme_img'></td>"; + echo "<td class='center'><img src='".XOOPS_UPLOAD_URL."/xthcreator/images/".$themes_arr[$i]->getVar("theme_img")."' height='30px' title='theme_img' alt='theme_img'></td>"; echo "<td class='center'>".$themes_arr[$i]->getVar("theme_description")."</td>"; echo "<td class='center'>".$themes_arr[$i]->getVar("theme_author")."</td>"; echo "<td class='center'>".XoopsUser::getUnameFromId($themes_arr[$i]->getVar("theme_submitter"),"S")."</td>"; Modified: XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_languages.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_languages.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_languages.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -44,8 +44,10 @@ //Constructor function __construct() { - $this->XoopsObject();$this->initVar("lang_id", XOBJ_DTYPE_INT, null, false, 8); - $this->initVar("lang_th_name", XOBJ_DTYPE_INT, null, false, 5); + $this->XoopsObject(); + $this->initVar("lang_id", XOBJ_DTYPE_INT, null, false, 8); + $this->initVar("lang_name", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("lang_theme", XOBJ_DTYPE_INT, null, false, 5); $this->initVar("lang_file", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("lang_define", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("lang_descript", XOBJ_DTYPE_TXTBOX, null, false, 255); @@ -65,16 +67,16 @@ $title = $this->isNew() ? sprintf(_AM_XTHCREATOR_LANG_ADD) : sprintf(_AM_XTHCREATOR_LANG_EDIT); include_once(XOOPS_ROOT_PATH."/class/xoopsformloader.php"); - $form = new XoopsThemeForm($title, "form", $action, "post", true); - $form->setExtra('enctype="multipart/form-data"'); + $form->setExtra('enctype="multipart/form-data"'); + $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LANG_NAME, "lang_name", 50, 255, $this->getVar("lang_name")), true); + $themesHandler =& xoops_getModuleHandler('xthcreator_themes', 'xThCreator'); - $themes_select = new XoopsFormSelect(_AM_XTHCREATOR_LAYOUT_TH_NAME, 'theme_name', $this->getVar('theme_name')); + $themes_select = new XoopsFormSelect(_AM_XTHCREATOR_LANG_THEME, 'theme_name', $this->getVar('theme_name')); $themes_select->addOptionArray($themesHandler->getList()); - $form->addElement($themes_select, true); + $form->addElement($themes_select, true); - $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LANG_NAME, "lang_name", 50, 255, $this->getVar("lang_name")), true); $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LANG_FILE, "lang_file", 50, 255, $this->getVar("lang_file")), true); $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LANG_DEFINE, "lang_define", 100, 255, $this->getVar("lang_define")), true); $form->addElement(new XoopsFormTextArea(_AM_XTHCREATOR_LANG_DESCRIPT, "lang_descript", $this->getVar("lang_descript"), 4, 60), true); Modified: XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_layout.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_layout.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_layout.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -46,9 +46,10 @@ { $this->XoopsObject(); $this->initVar("layout_id", XOBJ_DTYPE_INT, null, false, 8); - $this->initVar("layout_name", XOBJ_DTYPE_TXTBOX, null, false, 255); - $this->initVar("layout_th_name", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("layout_theme", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("layout_name", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("layout_description", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("layout_design", XOBJ_DTYPE_TXTAREA, null, false); $this->initVar("layout_weight", XOBJ_DTYPE_INT, null, false, 11); } @@ -73,19 +74,22 @@ $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LAYOUT_NAME, "layout_name", 50, 255, $this->getVar("layout_name")), true); $themesHandler =& xoops_getModuleHandler('xthcreator_themes', 'xThCreator'); - $themes_select = new XoopsFormSelect(_AM_XTHCREATOR_LAYOUT_TH_NAME, 'theme_name', $this->getVar('theme_name')); + $themes_select = new XoopsFormSelect(_AM_XTHCREATOR_LAYOUT_THEME, 'theme_name', $this->getVar('theme_name')); $themes_select->addOptionArray($themesHandler->getList()); $form->addElement($themes_select, true); + // layout_description + $form->addElement( new XoopsFormTextArea(_AM_XTHCREATOR_LAYOUT_DESCRIPTION, "theme_description", $this->getVar("theme_description", "e"),5,47), false ); + $editor_configs=array(); - $editor_configs["name"] ="layout_description"; - $editor_configs["value"] = $this->getVar("layout_description", "e"); + $editor_configs["name"] ="layout_design"; + $editor_configs["value"] = $this->getVar("layout_design", "e"); $editor_configs["rows"] = 10; $editor_configs["cols"] = 80; $editor_configs["width"] = "100%"; $editor_configs["height"] = "400px"; $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["editor"]; - $form->addElement( new XoopsFormEditor(_AM_XTHCREATOR_LAYOUT_DESCRIPTION, "layout_description", $editor_configs), true ); + $form->addElement( new XoopsFormEditor(_AM_XTHCREATOR_LAYOUT_DESIGN, "layout_design", $editor_configs), true ); $form->addElement(new XoopsFormText(_AM_XTHCREATOR_LAYOUT_WEIGHT, "layout_weight", 10, 25, $this->getVar("layout_weight")), true); $form->addElement(new XoopsFormHidden("op", "save_layout")); Modified: XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_themes.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_themes.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/class/xthcreator_themes.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -85,35 +85,27 @@ $form->addElement(new XoopsFormText(_AM_XTHCREATOR_THEME_NAME, "theme_name", 50, 255, $this->getVar("theme_name")), true); $form->addElement(new XoopsFormText(_AM_XTHCREATOR_THEME_VERSION, "theme_version", 50, 255, $this->getVar("theme_version")), true); - $theme_img = $this->getVar("theme_img") ? $this->getVar("theme_img") : 'blank.gif'; - - $uploadirectory_theme_img = '/uploads/xthcreator/images'; - $imgtray_theme_img = new XoopsFormElementTray(_AM_XTHCREATOR_THEME_IMG,'<br />'); - $imgpath_theme_img = sprintf(_AM_XTHCREATOR_FORMIMAGE_PATH, '.'.$uploadirectory_theme_img); - $imageselect_theme_img = new XoopsFormSelect($imgpath_theme_img, 'theme_img', $theme_img); - $image_array_theme_img = XoopsLists :: getImgListAsArray( XOOPS_ROOT_PATH.$uploadirectory_theme_img ); - foreach( $image_array_theme_img as $image_theme_img ) { - $imageselect_theme_img->addOption("$image_theme_img", $image_theme_img); + $theme_img = $this->getVar("theme_img") ? $this->getVar("theme_img") : 'blank.gif'; + $uploadir = '/uploads/xthcreator/images'; + $imgtray = new XoopsFormElementTray(_AM_XTHCREATOR_THEME_IMG,'<br />'); + $imgpath = sprintf(_AM_XTHCREATOR_FORMIMAGE_PATH, '.'.$uploadir); + $imageselect = new XoopsFormSelect($imgpath, 'theme_img', $theme_img); + $image_array = XoopsLists::getImgListAsArray( XOOPS_ROOT_PATH . $uploadir ); + foreach( $image_array as $image ) { + $imageselect->addOption("$image", $image); } - $imageselect_theme_img->setExtra( "onchange='showImgSelected(\"image_theme_img\", \"theme_img\", \"".$uploadirectory_theme_img."\", \"\", \"".XOOPS_URL."\")'" ); - $imgtray_theme_img->addElement($imageselect_theme_img, false); - $imgtray_theme_img->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadirectory_theme_img."/".$theme_img."' name='image_theme_img' id='image_theme_img' alt='' />" ) ); + $imageselect->setExtra( "onchange='showImgSelected(\"image3\", \"theme_img\", \"".$uploadir."\", \"\", \"".XOOPS_URL."\")'" ); + $imgtray->addElement($imageselect, false); + $imgtray->addElement( new XoopsFormLabel( '', "<br /><img src='".XOOPS_URL."/".$uploadir."/".$theme_img."' name='image3' id='image3' alt='' />" ) ); - $fileseltray_theme_img = new XoopsFormElementTray('','<br />'); - $fileseltray_theme_img->addElement(new XoopsFormFile(_AM_XTHCREATOR_FORMUPLOAD, "theme_img", $GLOBALS['xoopsModuleConfig']["theme_img_size"]),false); - $fileseltray_theme_img->addElement(new XoopsFormLabel(''), false); - $imgtray_theme_img->addElement($fileseltray_theme_img); - $form->addElement($imgtray_theme_img); - - $editor_configs=array(); - $editor_configs["name"] ="theme_description"; - $editor_configs["value"] = $this->getVar("theme_description", "e"); - $editor_configs["rows"] = 10; - $editor_configs["cols"] = 80; - $editor_configs["width"] = "100%"; - $editor_configs["height"] = "400px"; - $editor_configs["editor"] = $GLOBALS["xoopsModuleConfig"]["editor"]; - $form->addElement( new XoopsFormEditor(_AM_XTHCREATOR_THEME_DESCRIPTION, "theme_description", $editor_configs), true ); + $fileseltray = new XoopsFormElementTray('', '<br />'); + $fileseltray->addElement(new XoopsFormFile(_AM_XTHCREATOR_FORMUPLOAD, "theme_img", $GLOBALS['xoopsModuleConfig']["maxsize"]), false); + $fileseltray->addElement(new XoopsFormLabel(''), false); + $imgtray->addElement($fileseltray); + $form->addElement($imgtray); + + // theme_description + $form->addElement( new XoopsFormTextArea(_AM_XTHCREATOR_THEME_DESCRIPTION, "theme_description", $this->getVar("theme_description", "e"),5,47), false ); $form->addElement(new XoopsFormText(_AM_XTHCREATOR_THEME_AUTHOR, "theme_author", 50, 255, $this->getVar("theme_author")), true); $form->addElement(new XoopsFormSelectUser(_AM_XTHCREATOR_THEME_SUBMITTER, "theme_submitter", false, $this->getVar("theme_submitter"), 1, false), true); $form->addElement(new XoopsFormTextDateSelect(_AM_XTHCREATOR_THEME_CREATED, "theme_created", "", $this->getVar("theme_created"))); Modified: XoopsModules/xThCreator/trunk/xThCreator/css/admin.css =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/css/admin.css 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/css/admin.css 2012-03-29 23:02:22 UTC (rev 9214) @@ -1,40 +1,25 @@ -@charset "UTF-8"; +@charset "UTF-8"; /** - * **************************************************************************** - * - Original Copyright (TDM) - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) - * - Revision By TXMod Xoops (http://www.txmodxoops.org) - * **************************************************************************** - * CODELINK - MODULE FOR XOOPS + * XTHCREATOR - MODULE FOR XOOPS * Copyright (c) 2007 - 2012 * TXMod Xoops (http://www.txmodxoops.org) * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package codelink - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ - * **************************************************************************** + * Version : 1.01 Mon 2012/03/19 14:23:56 : Timgno Exp $ + * ******************************************************* */ - - .txtchangelog { height:350px; overflow:auto;} +#grid, #palette{ + padding: 0px; + margin: 0px; + border-collapse: collapse; +} + +#palette td, #grid td{ + width: 20px; + height: 20px; +} + +#grid td{ + border: 1px solid #cccccc; +} \ No newline at end of file Modified: XoopsModules/xThCreator/trunk/xThCreator/css/style.css =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/css/style.css 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/css/style.css 2012-03-29 23:02:22 UTC (rev 9214) @@ -1,37 +1,10 @@ @charset "UTF-8"; /** - * **************************************************************************** - * - Original Copyright (TDM) - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) - * - Revision By TXMod Xoops (http://www.txmodxoops.org) - * **************************************************************************** - * CODELINK - MODULE FOR XOOPS + * XTHCREATOR - MODULE FOR XOOPS * Copyright (c) 2007 - 2012 * TXMod Xoops (http://www.txmodxoops.org) * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting - * source code which is considered copyrighted (c) material of the - * original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * --------------------------------------------------------------------------- - * @copyright TXMod Xoops (http://www.txmodxoops.org) - * @license GPL see LICENSE - * @package codelink - * @author TXMod Xoops (in...@tx...) - * - * Version : 1.36 Mon 2012/01/09 14:23:56 : Timgno Exp $ - * **************************************************************************** + * Version : 1.01 Mon 2012/03/19 14:23:56 : Timgno Exp $ + * ******************************************************* */ Modified: XoopsModules/xThCreator/trunk/xThCreator/docs/changelog.txt =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/docs/changelog.txt 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/docs/changelog.txt 2012-03-29 23:02:22 UTC (rev 9214) @@ -1,5 +1,16 @@ +==================================== + 2012/03/29 23:14:50 Version 1.01 Beta 2 +==================================== + - Added ajax jquery file (TXMod Xoops) + - Added icon display for layout (TXMod Xoops) + - New display layout with colorized (TXMod Xoops) + +==================================== + 2012/03/24 14:14:50 Version 1.01 Beta 1 +==================================== + - Added structure class (TXMod Xoops) -==================================== + ==================================== 2012/03/19 18:13:30 Version 1.01 Alpha 1 ==================================== - Inizializing Structure Modified: XoopsModules/xThCreator/trunk/xThCreator/include/functions.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/include/functions.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/include/functions.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -21,7 +21,7 @@ * **************************************************************************** */ /***************Blocks***************/ -function block_addCatSelect($cats) { +function xthcreator_block_addCatSelect($cats) { if(is_array($cats)) { $cat_sql = "(".current($cats); @@ -85,6 +85,21 @@ } } +/** + * Convert StringToTime Date + * + * @param mixed $date + * @return + */ +function xthcreator_convertDate($date) +{ + if (strpos(_SHORTDATESTRING, "/")) + { + $date=str_replace("/", "-", $date); + } + return strtotime($date); +} + function xthcreator_UcFirstAndToLower($str) { return ucfirst(strtolower(trim($str))); @@ -106,15 +121,15 @@ exit; } echo '<tr> - <td>'.sprintf($language_ok, $file).'</td> - <td><img src='. $pathImageIcon .'/on.png></td> + <td>'.sprintf($language_ok, $file).'</td> + <td><img src='. $pathImageIcon .'/on.png></td> </tr>'; fclose($handle); } else { echo '<tr> - <td>'.sprintf($language_notok, $file).'</td> - <td><img src='. $pathImageIcon .'/off.png></td> + <td>'.sprintf($language_notok, $file).'</td> + <td><img src='. $pathImageIcon .'/off.png></td> </tr>'; } } Modified: XoopsModules/xThCreator/trunk/xThCreator/language/english/admin.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/language/english/admin.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/language/english/admin.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -1,24 +1,38 @@ <?php /** * **************************************************************************** - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Revision Copyright (c) (http://www.txmodxoops.org) + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * **************************************************************************** + * XTHCREATOR - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) * - * This license contains restrictions!!! + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * 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. * - * @license TDM GPL license - * @author TDM TEAM DEV MODULE - * @author TXMod Xoops (in...@tx...) + * 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. * - * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xThCreator + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/19 18:13:30 : Timgno Exp $ * **************************************************************************** */ //Menu @@ -83,8 +97,9 @@ define("_AM_XTHCREATOR_LAYOUT_ID","Id"); define("_AM_XTHCREATOR_LAYOUT_NAME","Name"); -define("_AM_XTHCREATOR_LAYOUT_TH_NAME","Theme name"); +define("_AM_XTHCREATOR_LAYOUT_THEME","Theme name"); define("_AM_XTHCREATOR_LAYOUT_DESCRIPTION","Description"); +define("_AM_XTHCREATOR_LAYOUT_DESIGN","Design"); define("_AM_XTHCREATOR_LAYOUT_WEIGHT","Weight"); define("_AM_XTHCREATOR_LANG_ADD","Add a languages"); @@ -92,8 +107,8 @@ define("_AM_XTHCREATOR_LANG_DELETE","Delete a languages"); define("_AM_XTHCREATOR_LANG_ID","ID"); -define("_AM_XTHCREATOR_LANG_TH_NAME","Theme name"); -define("_AM_XTHCREATOR_LANG_NAME","Name"); +define("_AM_XTHCREATOR_LANG_THEME","Theme name"); +define("_AM_XTHCREATOR_LANG_NAME","Type Name <i>(e.g: english)</i>"); define("_AM_XTHCREATOR_LANG_FILE","File name"); define("_AM_XTHCREATOR_LANG_DEFINE","Define"); define("_AM_XTHCREATOR_LANG_DESCRIPT","Description"); @@ -101,6 +116,10 @@ // themes.php // layout.php +define("_AM_XTHCREATOR_PALETTE","Palette"); +define("_AM_XTHCREATOR_DRAW","Draw!"); +define("_AM_XTHCREATOR_DEBUG","Debug console: "); +define("_AM_XTHCREATOR_SAVE","Save"); // languages.php @@ -110,20 +129,20 @@ // Results Building OK define("_AM_XTHCREATOR_OK_DEFAULTFF", "Default FF Compiled"); -define("_AM_XTHCREATOR_OK_CSS", "CSS Compiled"); -define("_AM_XTHCREATOR_OK_DOCS", "DOCS Compiled"); -define("_AM_XTHCREATOR_OK_LAYOUTS", "LAYOUTS Compiled"); -define("_AM_XTHCREATOR_OK_LANGUAGES", "LANGUAGES Compiled"); -define("_AM_XTHCREATOR_OK_TPLS", "TEMPLATES Compiled"); -define("_AM_XTHCREATOR_OK_THEMES", "THEMES Compiled"); +define("_AM_XTHCREATOR_OK_CSS", "Css Compiled"); +define("_AM_XTHCREATOR_OK_DOCS", "Docs Compiled"); +define("_AM_XTHCREATOR_OK_LAYOUTS", "Layouts Compiled"); +define("_AM_XTHCREATOR_OK_LANGUAGES", "Languages Compiled"); +define("_AM_XTHCREATOR_OK_TPLS", "Templates Compiled"); +define("_AM_XTHCREATOR_OK_THEMES", "Themes Compiled"); // Results Building NOTOK define("_AM_XTHCREATOR_NOTOK_DEFAULTFF", "Default FF Not compiled"); -define("_AM_XTHCREATOR_NOTOK_CSS", "CSS Not compiled"); -define("_AM_XTHCREATOR_NOTOK_DOCS", "DOCS Not compiled"); -define("_AM_XTHCREATOR_NOTOK_LAYOUT", "LAYOUTS Not compiled"); -define("_AM_XTHCREATOR_NOTOK_LANGUAGES", "LANGUAGES Not compiled"); -define("_AM_XTHCREATOR_NOTOK_TPLS", "TEMPLATES Not compiled"); -define("_AM_XTHCREATOR_NOTOK_THEMES", "THEMES Not compiled"); +define("_AM_XTHCREATOR_NOTOK_CSS", "Css Not compiled"); +define("_AM_XTHCREATOR_NOTOK_DOCS", "Docs Not compiled"); +define("_AM_XTHCREATOR_NOTOK_LAYOUT", "Layouts Not compiled"); +define("_AM_XTHCREATOR_NOTOK_LANGUAGES", "Languages Not compiled"); +define("_AM_XTHCREATOR_NOTOK_TPLS", "Templates Not compiled"); +define("_AM_XTHCREATOR_NOTOK_THEMES", "Themes Not compiled"); //Blocks.php define("_AM_XTHCREATOR_THEMES_BLOCK_DAY","themes of today"); Modified: XoopsModules/xThCreator/trunk/xThCreator/language/italian/admin.php =================================================================== --- XoopsModules/xThCreator/trunk/xThCreator/language/italian/admin.php 2012-03-29 22:52:18 UTC (rev 9213) +++ XoopsModules/xThCreator/trunk/xThCreator/language/italian/admin.php 2012-03-29 23:02:22 UTC (rev 9214) @@ -1,24 +1,38 @@ <?php /** * **************************************************************************** - * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS - * - Licence GPL Copyright (c) (http://www.tdmxoops.net) - * - Revision Copyright (c) (http://www.txmodxoops.org) + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * **************************************************************************** + * XTHCREATOR - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) * - * This license contains restrictions!!! + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * 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. * - * @license TDM GPL license - * @author TDM TEAM DEV MODULE - * @author TXMod Xoops (in...@tx...) + * 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. * - * Version : 1.39 Tue 2012/02/14 16:20:18 : Timgno Exp $ + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xThCreator + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Mon 2012/03/19 18:13:30 : Timgno Exp $ * **************************************************************************** */ //Menu @@ -83,8 +97,9 @@ define("_AM_XTHCREATOR_LAYOUT_ID","Id"); define("_AM_XTHCREATOR_LAYOUT_NAME","Name"); -define("_AM_XTHCREATOR_LAYOUT_TH_NAME","Theme name"); +define("_AM_XTHCREATOR_LAYOUT_THEME","Theme name"); define("_AM_XTHCREATOR_LAYOUT_DESCRIPTION","Description"); +define("_AM_XTHCREATOR_LAYOUT_DESIGN","Design"); define("_AM_XTHCREATOR_LAYOUT_WEIGHT","Weight"); define("_AM_XTHCREATOR_LANG_ADD","Add a languages"); @@ -92,8 +107,8 @@ define("_AM_XTHCREATOR_LANG_DELETE","Delete a languages"); define("_AM_XTHCREATOR_LANG_ID","ID"); -define("_AM_XTHCREATOR_LANG_TH_NAME","Theme name"); -define("_AM_XTHCREATOR_LANG_NAME","Name"); +define("_AM_XTHCREATOR_LANG_THEME","Theme name"); +define("_AM_XTHCREATOR_LANG_NAME","Type Name <i>(e.g: english)</i>"); define("_AM_XTHCREATOR_LANG_FILE","File name"); define("_AM_XTHCREATOR_LANG_DEFINE","Define"); define("_AM_XTHCREATOR_LANG_DESCRIPT","Description"); @@ -101,6 +116,10 @@ // themes.php // layout.php +define("_AM_XTHCREATOR_PALETTE","Palette"); +define("_AM_XTHCREATOR_DRAW","Draw!"); +define("_AM_XTHCREATOR_DEBUG","Debug console: "); +define("_AM_XTHCREATOR_SAVE","Save"); // languages.php @@ -110,20 +129,20 @@ // Results Building OK define("_AM_XTHCREATOR_OK_DEFAULTFF", "Default ... [truncated message content] |