|
From: <luc...@us...> - 2014-03-28 20:15:46
|
Revision: 12415
http://sourceforge.net/p/xoops/svn/12415
Author: luciorota
Date: 2014-03-28 20:15:39 +0000 (Fri, 28 Mar 2014)
Log Message:
-----------
multi pages help (only on Xoops 2.5.7+)
Modified Paths:
--------------
XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
XoopsModules/mymenus/trunk/mymenus/xoops_version.php
Added Paths:
-----------
XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html
XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html
XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt
Modified: XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-28 20:12:18 UTC (rev 12414)
+++ XoopsModules/mymenus/trunk/mymenus/blocks/mymenus_block.php 2014-03-28 20:15:39 UTC (rev 12415)
@@ -101,11 +101,11 @@
if ($config['assign_method'] == 'xoopstpl') {
$tpl_vars = '';
foreach ($css as $file) {
- $tpl_vars .= "\n" . '<link rel="stylesheet" type="text/css" media="all" href="'. $file . '" />';
+ $tpl_vars .= "\n" . '<link rel="stylesheet" type="text/css" media="all" href="' . $file . '" />';
}
foreach ($js as $file) {
- $tpl_vars .= "\n" . '<script type="text/javascript" src="'. $file . '"></script>';
+ $tpl_vars .= "\n" . '<script type="text/javascript" src="' . $file . '"></script>';
}
if (isset($skin_info['header'])) {
@@ -194,14 +194,14 @@
xoops_load('XoopsFormLoader');
- //Menu 0
+ // Menu 0
$form = "<b>" . _MB_MYMENUS_SELECT_MENU . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($menus);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_MENU_DSC . "</i><br /><br />";
- //Skin 1
+ // Skin 1
++$i;
xoops_load('XoopsLists');
$temp_skins = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . "/modules/mymenus/skins/", "");
@@ -212,20 +212,24 @@
}
}
$form .= "<b>" . _MB_MYMENUS_SELECT_SKIN . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($skins_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_SKIN_DSC . "</i><br /><br />";
- //Use skin from,theme 2
+ // Use skin from theme 2
++$i;
$form .= "<b>" . _MB_MYMENUS_USE_THEME_SKIN . "</b> ";
- $element = new XoopsFormRadioYN('', 'options['.$i.'0]', $options[$i]);
+ $element = new XoopsFormRadioYN('', 'options[' . $i . '0]', $options[$i]);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_USE_THEME_SKIN_DSC . "</i><br /><br />";
+<<<<<<< .mine
+ // Skin from theme 3 - @luciorota
+=======
//Skin from theme 3 - @luciorota
+>>>>>>> .r12414
if (file_exists(XOOPS_ROOT_PATH . '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/modules/mymenus/skins/')) {
++$i;
xoops_load('XoopsLists');
@@ -237,24 +241,23 @@
$theme_skins_options[$theme_skin] = '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/modules/mymenus/skins/' . $theme_skin . '';
}
}
-
$form .= "<b>" . _MB_MYMENUS_SELECT_SKIN_FROM_THEME . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOption('', '/themes/' . $GLOBALS['xoopsConfig']['theme_set'] . '/menu');
$element->addOptionArray($theme_skins_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_SELECT_SKIN_FROM_THEME_DSC . "</i><br /><br />";
-}
-}
+ }
+ }
- //Display method 4
+ // Display method 4
++$i;
$display_options = array(
'block' => _MB_MYMENUS_DISPLAY_METHOD_BLOCK,
'template' => _MB_MYMENUS_DISPLAY_METHOD_TEMPLATE
);
$form .= "<b>" . _MB_MYMENUS_DISPLAY_METHOD . "</b> ";
- $element = new XoopsFormSelect('', 'options['.$i.'0]', $options[$i], 1);
+ $element = new XoopsFormSelect('', 'options[' . $i . '0]', $options[$i], 1);
$element->addOptionArray($display_options);
$form .= $element->render();
$form .= "</select>\n <i>" . _MB_MYMENUS_DISPLAY_METHOD_DSC . "</i><br /><br />";
@@ -262,7 +265,7 @@
//Unique ID 5
++$i;
$form .= "<b>" . _MB_MYMENUS_UNIQUEID . "</b> ";
- $element = new XoopsFormText('', 'options['.$i.'0]', 10, 50, $options[$i]);
+ $element = new XoopsFormText('', 'options[' . $i . '0]', 10, 50, $options[$i]);
$form .= $element->render();
$form .= "\n <i>" . _MB_MYMENUS_UNIQUEID_DSC . "</i><br /><br />";
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/skins.html 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,121 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Skins:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mymenus/admin/index.php" title="Back to the administration of MyMenus"> MyMenus
+ <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of MyMenus"/>
+ </a>
+ </h1>
+
+ <h4 class="odd">Theory of operation</h4>
+ <p class="even">
+ Mymenus separates logic from presentation almost 100%!<br>
+ It is mymenus task to generate an array with menus information and let each skin decide what to do with that information.
+ <br>
+ <br>
+ How can skin know when to open a new <li> or <ul> and when to close it?<br>
+ Mymenus append that information to each menu item, that way you can know if that item should be prefixed with a <li> or not.
+ <br>
+ <br>
+ This is the composition of an item array:
+ <br>
+ <code>
+[id] => 3 (id of the menu item)
+ [pid] => 0 (id of the parent menu item)
+ [mid] => 2 (id of the menu package)
+ [title] => Home (title of the menu item)
+ [alt_title] => Home (alt/title of the menu item)
+ [visible] => 1 (visibility of the menu item, it will be 1 for all menus,you can disregard it)
+ [link] => http://localhost/xoops-2.4.5/htdocs/ (alt/title of the menu item)
+ [weight] => 1 (this is for internal usage of the builder class, you can disregard it)
+ [target] => _self (to be used in link target element, it can be _self, _blank, etc..)
+ [groups] => Array (holds the groups who can view this link, you can disregard it)
+ (
+ [0] => 2
+ [1] => 3
+ )
+ [hooks] => Array (holds the hooks available to render the menu, you can disregard it)
+ (
+ )
+ [image] => (image to be used in the link, you can choose not to support it in your skin)
+ [css] => (this is inline css for this item, it goes inside <a style="$item.css">)
+ [oul] => 1 (IMPORTANT! Open UL -> this menu item requires skin to prepend <ul> open element tag)
+ [oli] => 1 (IMPORTANT! Open LI -> this menu item requires skin to prepend <li> open element tag)
+ [close] => (IMPORTANT! this holds closing tags, it will automatically generate </li></ul> tags for you)
+ [cul] => (IMPORTANT! Close UL -> this menu item requires skin to append </ul> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
+ [cli] => (IMPORTANT! Close LI -> this menu item requires skin to append </li> close element tag, you should use [close] instead, unless you are not supporting multilevel menus)
+ [hassub] => 1 (informs if this menu item has submenus, 1 for true, 0 for false)
+ [level] => 0 (informs the level of nesting of the menu item, 0 is for root, 1 for second level, etc..)
+ [down_weight] => 3 (for usage in menu sorting in admin side, you can ignore it)
+ [selected] => 1 (IMPORTANT, this tells the skin to highlight this item)
+ [topselected] => 1 (Important, this informs the skin that the menu is of level 0(root) and it is selected, you should highlight it)
+ )
+ </code>
+ </p>
+ <h4 class="odd">Skin structure</h4>
+ <p class="even">
+ Skins go into<br>
+ "mymenus/skins" folder or<br>
+ "public_html/themes/yourtheme/menu" folder<br>
+ and they should have a skin_version.php file in it<br>
+ <br>
+ skin_version.php structure:<br>
+ <code>
+//informs where to find the template for this skin(relative to skin folder)
+$skinversion['template'] = 'templates/template.html';
+
+//informs where to find css file/files
+$skinversion['css'] = 'css/superfish.css';
+ </code>
+ or
+ <code>
+$skinversion['css'] = array('css/superfish.css', css/anotherone.css);
+
+//informs where to find js file/files
+$skinversion['js'] = '../../js/jquery-1.3.2.min.js';
+ </code>
+ or
+ <code>
+$skinversion['js'] = array(
+ '../../js/jquery-1.3.2.min.js'
+ '../../js/hoverIntent.js',
+ '../../js/superfish.js'
+ );
+
+//code to be appended in the <head> theme tag
+$header = "\n" . '<script type="text/javascript">';
+$header .= "\n" . ' var $sf = jQuery.noConflict()';
+$header .= "\n" . ' $sf(function(){';
+$header .= "\n" . ' $sf(\'ul.sf-menu\').superfish({';
+$header .= "\n" . ' delay: 1000,';
+$header .= "\n" . ' animation: {opacity:\'show\',height:\'show\'},';
+$header .= "\n" . ' speed: \'fast\'';
+$header .= "\n" . ' });';
+$header .= "\n" . ' });';
+$header .= "\n" . '</script>';
+$skinversion['header'] = $header;
+
+//you can pass any configuration from this file to the template using ['config']
+ </code>
+ example:
+ <code>
+$skinversion['config']['home'] = true;
+$skinversion['config']['iconset'] = 'default';
+This can be fetched in template with <{$config.home}> and <{$config.iconset}>
+ </code>
+ </p>
+ <h4 class="odd">Smarty variables available in the template</h4>
+ <p class="even">
+ $block - holds an array of menu items<br>
+ $config - holds configuration set in skin_version.php<br>
+ $skinurl - holds the url of the skin<br>
+ $skinpath - holds the path of the skin<br>
+ </p>
+ <h4 class="odd">For Theme designers</h4>
+ <p class="even">
+ Since users can choose the smarty variable for each menu,<br>
+ I would advise you to use <{$xoops_links_navbar}> as a place holder.<br>
+ If you provide a skin for your theme, ask users to:<br>
+ -- --enter "xoops_links_navbar" as unique_id in block settings.<br>
+ -- --set "render to smarty variable" in block settings.<br>
+ -- --set "use skin from theme" in block settings.<br>
+ </p>
+</div>
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.html 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,79 @@
+<div id="help-template" class="outer">
+ <h1 class="head">Usage:
+ <a class="ui-corner-all tooltip" href="<{$xoops_url}>/modules/mymenus/admin/index.php" title="Back to the administration of MyMenus"> MyMenus
+ <img src="<{xoAdminIcons home.png}>" alt="Back to the Administration of MyMenus"/>
+ </a>
+ </h1>
+ Important to know:<br>
+ <br>
+ Links and images are relative to the root of your site:<br>
+ modules/profile<br>
+ search.php<br>
+ uploads/blank.gif<br>
+ <br>
+ For linking to external sites you need to use complete url:<br>
+ http://www.xuups.com<br>
+ <br>
+ <br>
+ You can use DECORATORS for links, images, title, and alt_title.<br>
+ The decorators follow this syntax:<br>
+ {decorator|value}<br>
+ <br>
+ There are 6 decorators available:<br>
+ USER -> gets info for the user that is seeing the page<br>
+ OWNER -> gets info for the user that match uid on the url(if given)<br>
+ URI -> gets info about the url arguments<br>
+ MODULE -> gets dynamic menu from a module (Used in title field only)<br>
+ SMARTY -> gets smarty variables<br>
+ CONSTANT -> gets defined constants<br>
+ <br>
+ Some syntax examples<br>
+ {USER|UNAME} gets the username of this user, returns anonymous if not a
+ user<br>
+ {USER|UID} gets the uid of this user, returns 0 if not a user<br>
+ {USER|REGDATE} gets the regdate of this user, returns empty if not a
+ user<br>
+ {USER|any other field of the user table} yes! You can get what you need!<br>
+ <br>
+ Some special fields you may use<br>
+ {USER|PM_NEW} Show number of private messages not read<br>
+ {USER|PM_READED}<br>
+ {USER|PM_TOTAL}<br>
+ <br>
+ The same is valid for OWNER:<br>
+ {OWNER|UNAME}<br>
+ {OWNER|UID}<br>
+ etc..<br>
+ <br>
+ And you can get any parameter on the uri with:<br>
+ {URI|UID}<br>
+ {URI|ID}<br>
+ {URI|SEARCH}<br>
+ {URI|ITEMID}<br>
+ {URI|CATID}<br>
+ etc...<br>
+ <br>
+ Example of links using decorators:<br>
+ modules/profile/userinfo.php?uid={USER|UID}<br>
+ modules/yogurt/pictures.php?uid={OWNER|UID}<br>
+ <br>
+ Example on titles using decorators:<br>
+ {USER|UNAME}<br>
+ {OWNER|UNAME} profile<br>
+ You have searched for {URI|SEARCH}<br>
+ <br>
+ Populating menus with modules information:<br>
+ {MODULE|NEWS}<br>
+ {MODULE|XHELP}<br>
+ {MODULE|MYLINKS}<br>
+ {MODULE|TDMDOWNLOADS}<br>
+ <br>
+ Using smarty information:<br>
+ {SMARTY|xoops_uname}<br>
+ {SMARTY|xoops_avatar}<br>
+ <br>
+ Using constants information:<br>
+ {CONSTANT|XOOPS_URL}/myimages/image.gif<br>
+ {CONSTANT|XOOPS_ROOT_PATH}<br>
+ <br>
+</div>
\ No newline at end of file
Added: XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt (rev 0)
+++ XoopsModules/mymenus/trunk/mymenus/language/english/help/usage.txt 2014-03-28 20:15:39 UTC (rev 12415)
@@ -0,0 +1,69 @@
+Important to know:
+
+Links and images are relative to the root of your site:
+modules/profile
+search.php
+uploads/blank.gif
+
+For linking to external sites you need to use complete url:
+http://www.xuups.com
+
+
+You can use DECORATORS for links, images, title, and alt_title.
+The decorators follow this syntax:
+{decorator|value}
+
+There are 6 decorators available:
+USER -> gets info for the user that is seeing the page
+OWNER -> gets info for the user that match uid on the url(if given)
+URI -> gets info about the url arguments
+MODULE -> gets dynamic menu from a module (Used in title field only)
+SMARTY -> gets smarty variables
+CONSTANT -> gets defined constants
+
+Some syntax examples
+{USER|UNAME} gets the username of this user, returns anonymous if not a user
+{USER|UID} gets the uid of this user, returns 0 if not a user
+{USER|REGDATE} gets the regdate of this user, returns empty if not a user
+{USER|any other field of the user table} yes! You can get what you need!
+
+Some special fields you may use
+{USER|PM_NEW} Show number of private messages not read
+{USER|PM_READED}
+{USER|PM_TOTAL}
+
+The same is valid for OWNER:
+{OWNER|UNAME}
+{OWNER|UID}
+etc..
+
+And you can get any parameter on the uri with:
+{URI|UID}
+{URI|ID}
+{URI|SEARCH}
+{URI|ITEMID}
+{URI|CATID}
+etc...
+
+Example of links using decorators:
+modules/profile/userinfo.php?uid={USER|UID}
+modules/yogurt/pictures.php?uid={OWNER|UID}
+
+Example on titles using decorators:
+{USER|UNAME}
+{OWNER|UNAME} profile
+You have searched for {URI|SEARCH}
+
+Populating menus with modules information:
+{MODULE|NEWS}
+{MODULE|XHELP}
+{MODULE|MYLINKS}
+{MODULE|TDMDOWNLOADS}
+
+Using smarty information:
+{SMARTY|xoops_uname}
+{SMARTY|xoops_avatar}
+
+Using constants information:
+{CONSTANT|XOOPS_URL}/myimages/image.gif
+{CONSTANT|XOOPS_ROOT_PATH}
Modified: XoopsModules/mymenus/trunk/mymenus/xoops_version.php
===================================================================
--- XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-28 20:12:18 UTC (rev 12414)
+++ XoopsModules/mymenus/trunk/mymenus/xoops_version.php 2014-03-28 20:15:39 UTC (rev 12415)
@@ -35,6 +35,19 @@
$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16';
$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32';
+
+//help files
+$i = 0;
+$modversion['helpsection'][$i]['name'] = "Overview";
+$modversion['helpsection'][$i]['link'] = "page=help";
+$i++;
+$modversion['helpsection'][$i]['name'] = "Skins";
+$modversion['helpsection'][$i]['link'] = "page=skins";
+$i++;
+$modversion['helpsection'][$i]['name'] = "Usage";
+$modversion['helpsection'][$i]['link'] = "page=usage";
+
+
//about
$modversion['release_date'] = '2014/03/21';
$modversion["module_website_url"] = "www.xoops.org";
|