diff --git a/class/tag.php b/class/tag.php index af86062..b23766a 100755 --- a/class/tag.php +++ b/class/tag.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @since 1.0 * @author marcan aka Marc-André Lanciault - * + * */ if (!defined("ICMS_ROOT_PATH")) die("ICMS root path not defined"); @@ -27,9 +27,7 @@ public function __construct(&$handler) { $this->quickInitVar('tag_description', XOBJ_DTYPE_TXTAREA); $this->quickInitVar('tag_created_date', XOBJ_DTYPE_LTIME); $this->quickInitVar('tag_uid', XOBJ_DTYPE_INT); - $this->quickInitVar('tag_cancomment', XOBJ_DTYPE_INT, false, false, false, true); - $this->setControl('tag_cancomment', 'yesno'); $this->setControl('tag_uid', 'user'); $this->initiateSEO(); diff --git a/comment_delete.php b/comment_delete.php deleted file mode 100755 index 8294fed..0000000 --- a/comment_delete.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - */ -include_once 'header.php'; -include_once ICMS_ROOT_PATH . '/include/comment_delete.php'; diff --git a/comment_edit.php b/comment_edit.php deleted file mode 100755 index bcd6060..0000000 --- a/comment_edit.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - */ -include_once 'header.php'; -include_once ICMS_ROOT_PATH . '/include/comment_edit.php'; diff --git a/comment_new.php b/comment_new.php deleted file mode 100755 index 240a82c..0000000 --- a/comment_new.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - */ -include_once 'header.php'; -$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0; -if ($com_itemid > 0) { - $imtagging_tag_handler = icms_getModulehandler('tag'); - $tagObj = $imtagging_tag_handler->get($com_itemid); - if ($tagObj && !$tagObj->isNew()) { - // $com_replytext = _TAGEDBY.' '.smartsection_getLinkedUnameFromId($itemObj->uid()) . ' '._DATE.' '.$itemObj->dateSub().'

'.$itemObj->summary(); - $com_replytext = 'test...'; - $bodytext = $tagObj->getTagLead(); - if ($bodytext != '') { - $com_replytext .= '

' . $bodytext . ''; - } - $com_replytitle = $tagObj->getVar('tag_title'); - include_once ICMS_ROOT_PATH . '/include/comment_new.php'; - } -} diff --git a/comment_post.php b/comment_post.php deleted file mode 100755 index 9e36280..0000000 --- a/comment_post.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - */ -include_once 'header.php'; -include_once ICMS_ROOT_PATH . '/include/comment_tag.php'; diff --git a/comment_reply.php b/comment_reply.php deleted file mode 100755 index 15d681f..0000000 --- a/comment_reply.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - */ -include_once 'header.php'; -include_once ICMS_ROOT_PATH . '/include/comment_reply.php'; diff --git a/icms_version.php b/icms_version.php index 097fcca..bdb4f65 100644 --- a/icms_version.php +++ b/icms_version.php @@ -42,7 +42,7 @@ 'developer_website_name' => "Github", 'developer_email' => "david.j@impresscms.org"); $modversion['people']['developers'][] = "[url=https://www.impresscms.org/userinfo.php?uid=1102]fiammybe[/url] (David Janssens)"; -$modversion['warning'] = _CO_SOBJECT_WARNING_RC; +$modversion['warning'] = _CO_ICMS_WARNING_RC; /** Administrative information */ $modversion['hasAdmin'] = 1; @@ -136,8 +136,8 @@ $modversion['config'][1] = array( 'name' => 'tager_groups', - 'title' => '_MI_IMTAGGING_TAGERGR', - 'description' => '_MI_IMTAGGING_TAGERGRDSC', + 'title' => _MI_IMTAGGING_TAGERGR, + 'description' => _MI_IMTAGGING_TAGERGRDSC, 'formtype' => 'select_multi', 'valuetype' => 'array', 'options' => $select_groups_options, @@ -145,24 +145,14 @@ $modversion['config'][] = array( 'name' => 'tags_limit', - 'title' => '_MI_IMTAGGING_LIMIT', - 'description' => '_MI_IMTAGGING_LIMITDSC', + 'title' => _MI_IMTAGGING_LIMIT, + 'description' => _MI_IMTAGGING_LIMITDSC, 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => 5); /** Comments information */ -$modversion['hasComments'] = 1; - -$modversion['comments'] = array( - 'itemName' => 'tag_id', - 'pageName' => 'tag.php', - /* Comment callback functions */ - 'callbackFile' => 'include/comment.inc.php', - 'callback' => array( - 'approve' => 'imtagging_com_approve', - 'update' => 'imtagging_com_update') - ); +$modversion['hasComments'] = 0; /** Notification information */ $modversion['hasNotification'] = 1; diff --git a/include/comment.inc.php b/include/comment.inc.php deleted file mode 100755 index da49189..0000000 --- a/include/comment.inc.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - */ -function imtagging_com_update($item_id, $total_num) { - $imtagging_tag_handler = icms_getModulehandler('tag', 'imtagging'); - $imtagging_tag_handler->updateComments($item_id, $total_num); -} - -function imtagging_com_approve(&$comment) { - // notification mail here -} diff --git a/include/onupdate.inc.php b/include/onupdate.inc.php index 322f381..89bbddc 100755 --- a/include/onupdate.inc.php +++ b/include/onupdate.inc.php @@ -16,12 +16,12 @@ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @since 1.0 * @author marcan aka Marc-André Lanciault - * + * */ if (!defined("ICMS_ROOT_PATH")) die("ICMS root path not defined"); // this needs to be the latest db version -define('IMTAGGING_DB_VERSION', 1); +define('IMTAGGING_DB_VERSION', 2); /** * it is possible to define custom functions which will be call when the module is updating at the @@ -34,6 +34,15 @@ * function imtagging_db_upgrade_2() { * } */ + +function imtagging_db_upgrade_2() { + $icmsDatabaseUpdater = icms_db_legacy_Factory::getDatabaseUpdater(); + //$icmsDatabaseUpdater->; + $sql = sprintf("ALTER TABLE %s DROP column tag_cancomment", icms::$xoopsDB->prefix('imtagging_tag')); + if (! $result = icms::$xoopsDB->queryF($sql)) { + echo 'Error while removing column tag_cancomment.'; + } + } function icms_module_update_imtagging($module) { /** * Using the IcmsDatabaseUpdater to automaticallly manage the database upgrade dynamically diff --git a/language/english/common.php b/language/english/common.php index 294c32f..0b06594 100755 --- a/language/english/common.php +++ b/language/english/common.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @since 1.0 * @author marcan aka Marc-André Lanciault - * + * */ if (!defined("ICMS_ROOT_PATH")) die("ICMS root path not defined"); @@ -43,6 +43,4 @@ define("_CO_IMTAGGING_TAG_TAG_CREATED_DATE", "Created date"); define("_CO_IMTAGGING_TAG_TAG_CREATED_DATE_DSC", ""); define("_CO_IMTAGGING_TAG_TAG_UID", "Creator"); -define("_CO_IMTAGGING_TAG_TAG_UID_DSC", ""); -define("_CO_IMTAGGING_TAG_TAG_CANCOMMENT", "Can comment ?"); -define("_CO_IMTAGGING_TAG_TAG_CANCOMMENT_DSC", ""); +define("_CO_IMTAGGING_TAG_TAG_UID_DSC", ""); \ No newline at end of file diff --git a/language/german/common.php b/language/german/common.php index 2fc3c33..3895e14 100644 --- a/language/german/common.php +++ b/language/german/common.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License (GPL) * @since 1.0 * @author marcan aka Marc-André Lanciault - * + * */ if (!defined("ICMS_ROOT_PATH")) die("ICMS root path not defined"); @@ -43,6 +43,4 @@ define("_CO_IMTAGGING_TAG_TAG_CREATED_DATE", "Erstellungsdatum"); define("_CO_IMTAGGING_TAG_TAG_CREATED_DATE_DSC", ""); define("_CO_IMTAGGING_TAG_TAG_UID", "Erstellt durch"); -define("_CO_IMTAGGING_TAG_TAG_UID_DSC", ""); -define("_CO_IMTAGGING_TAG_TAG_CANCOMMENT", "Kann kommentieren?"); -define("_CO_IMTAGGING_TAG_TAG_CANCOMMENT_DSC", ""); +define("_CO_IMTAGGING_TAG_TAG_UID_DSC", ""); \ No newline at end of file diff --git a/module.css b/module.css index db2e892..24267c2 100755 --- a/module.css +++ b/module.css @@ -25,14 +25,6 @@ font-size: 80%; } .imtagging_tag_content {} -#imtagging_tag_comments_container {} -.imtagging_tag_comments { - background-image: url(images/comments.gif); - background-repeat: no-repeat; - padding-left: 15px; - vertical-align: middle; - font-size: 80%; -} .imtagging_admin_links {} #imtagging_navbar { text-align: center; diff --git a/module_rtl.css b/module_rtl.css index bab7864..e84438f 100644 --- a/module_rtl.css +++ b/module_rtl.css @@ -25,14 +25,6 @@ font-size: 80%; } .imtagging_tag_content {} -#imtagging_tag_comments_container {} -.imtagging_tag_comments { - background-image: url(images/comments.gif); - background-repeat: no-repeat; - padding-left: 15px; - vertical-align: middle; - font-size: 80%; -} .imtagging_admin_links {} #imtagging_navbar { text-align: center; diff --git a/tag.php b/tag.php index ecaf2d1..e74fc6d 100644 --- a/tag.php +++ b/tag.php @@ -8,7 +8,7 @@ * @since 1.0 * @author marcan aka Marc-André Lanciault * @package imtagging - * + * */ /** @@ -122,11 +122,6 @@ function edittag($tagObj) { } else { redirect_header(IMTAGGING_URL, 3, _NOPERM); } - - if ($icmsModuleConfig['com_rule'] && $tagObj->getVar('tag_cancomment')) { - $icmsTpl->assign('imtagging_tag_comment', true); - include_once ICMS_ROOT_PATH . '/include/comment_view.php'; - } break; } diff --git a/templates/imtagging_footer.html b/templates/imtagging_footer.html index 851d0b8..c15a750 100755 --- a/templates/imtagging_footer.html +++ b/templates/imtagging_footer.html @@ -1,28 +1,3 @@ <{if $imtagging_is_admin}> -<{/if}> - - -<{if $imtagging_tag_comment}> - - - - -
-
<{$commentsnav}> <{$lang_notice}>
-
- - <{if $comment_mode == "flat"}> - <{include file="db:system_comments_flat.html"}> - <{elseif $comment_mode == "thread"}> - <{include file="db:system_comments_thread.html"}> - <{elseif $comment_mode == "nest"}> - <{include file="db:system_comments_nest.html"}> - <{/if}> - -
-
-<{/if}> - - -<{includeq file='db:system_notification_select.html'}> \ No newline at end of file +<{/if}> \ No newline at end of file diff --git a/templates/imtagging_index.html b/templates/imtagging_index.html index bf0d45b..9cfa283 100755 --- a/templates/imtagging_index.html +++ b/templates/imtagging_index.html @@ -7,9 +7,6 @@

<{$imtagging_tag.itemLink}>

<{$imtagging_tag.tag_lead}>
-
- <{$imtagging_tag.tag_comment_info}> -
<{if $imtagging_tag.userCanEditAndDelete}> <{/if}>