|
From: <be...@us...> - 2014-03-08 18:46:34
|
Revision: 12366
http://sourceforge.net/p/xoops/svn/12366
Author: beckmi
Date: 2014-03-08 18:46:30 +0000 (Sat, 08 Mar 2014)
Log Message:
-----------
Temporary Fix for situation when there is no Tag module available.
Modified Paths:
--------------
XoopsModules/lexikon/trunk/lexikon/blocks/lexikon_block_tag.php
Modified: XoopsModules/lexikon/trunk/lexikon/blocks/lexikon_block_tag.php
===================================================================
--- XoopsModules/lexikon/trunk/lexikon/blocks/lexikon_block_tag.php 2014-03-08 12:38:48 UTC (rev 12365)
+++ XoopsModules/lexikon/trunk/lexikon/blocks/lexikon_block_tag.php 2014-03-08 18:46:30 UTC (rev 12366)
@@ -26,10 +26,10 @@
* <li>Call the tag_block_cloud_show in your defined block function:<br />
* <code>
* function newbb_block_tag_cloud_show($options) {
- * $catid = $options[4]; // Not used by newbb, Only for demonstration
+ * $catid = $options[4]; // Not used by newbb, Only for demonstration
* if(!@include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php"){
- * return null;
- * }
+ * return null;
+ * }
* $block_content = tag_block_cloud_show($options, "newbb", $catid);
* return $block_content;
* }
@@ -40,10 +40,10 @@
* <code>
* function newbb_block_tag_cloud_edit($options) {
* if(!@include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php"){
- * return null;
- * }
+ * return null;
+ * }
* $form = tag_block_cloud_edit($options);
- * $form .= $CODE_FOR_GET_CATID; // Not used by newbb, Only for demonstration
+ * $form .= $CODE_FOR_GET_CATID; // Not used by newbb, Only for demonstration
* return $form;
* }
* </code>
@@ -56,41 +56,52 @@
* </li>
* </ul>
*
- * {@link TagTag}
+ * {@link TagTag}
*
- * @param array $options:
+ * @param array $options:
* $options[0] - number of tags to display
* $options[1] - time duration, in days, 0 for all the time
* $options[2] - max font size (px or %)
* $options[3] - min font size (px or %)
*/
-function lexikon_tag_block_cloud_show($options) {
- $module_handler = &xoops_gethandler('module');
- $module = &$module_handler->getByDirname('lexikon');
- include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php";
- //$module_dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
- //return tag_block_cloud_show($options, $module_dirname);
- return tag_block_cloud_show($options, $module->getVar('dirname'));
+function lexikon_tag_block_cloud_show($options)
+{
+ $module_handler = & xoops_gethandler('module');
+ $module = & $module_handler->getByDirname('lexikon');
+ if (xoops_isActiveModule('tag')) {
+ include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php";
+ //$module_dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+ //return tag_block_cloud_show($options, $module_dirname);
+ return tag_block_cloud_show($options, $module->getVar('dirname'));
+ }
}
-function lexikon_tag_block_cloud_edit($options) {
- include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php";
- return tag_block_cloud_edit($options);
+function lexikon_tag_block_cloud_edit($options)
+{
+ if (xoops_isActiveModule('tag')) {
+ include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php";
+ return tag_block_cloud_edit($options);
+ }
}
-function lexikon_tag_block_top_show($options) {
- include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php";
- $module_handler = &xoops_gethandler('module');
- $module = &$module_handler->getByDirname('lexikon');
- //$module_dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
- //return tag_block_top_show($options, $module_dirname);
- return tag_block_top_show($options, $module->getVar('dirname'));
+function lexikon_tag_block_top_show($options)
+{
+ if (xoops_isActiveModule('tag')) {
+ include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php";
+ $module_handler = & xoops_gethandler('module');
+ $module = & $module_handler->getByDirname('lexikon');
+ //$module_dirname = basename( dirname( dirname( __FILE__ ) ) ) ;
+ //return tag_block_top_show($options, $module_dirname);
+ return tag_block_top_show($options, $module->getVar('dirname'));
+ }
}
-function lexikon_tag_block_top_edit($options) {
- include_once XOOPS_ROOT_PATH."/modules/tag/blocks/block.php";
- return tag_block_top_edit($options);
+function lexikon_tag_block_top_edit($options)
+{
+ if (xoops_isActiveModule('tag')) {
+ include_once XOOPS_ROOT_PATH . "/modules/tag/blocks/block.php";
+ return tag_block_top_edit($options);
+ }
}
-?>
\ No newline at end of file
|