-
Notifications
You must be signed in to change notification settings - Fork 2
Remove comments system for tags - really not useful. #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b4d44ea
94224ea
8b5085a
62b35be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <marcan@smartfactory.ca> | ||
* | ||
* | ||
*/ | ||
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')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if the upgrade method handles this without having to explicitly do this. See icms_db_legacy_updater_Handler::upgradeObjectItem(). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does - I just removed the 2 lines in class/tag.php for tag_cancomment and updated the module. That was enough to drop the column. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great! that makes version updates considerably easier, at least when it comes to removing fields. |
||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,3 @@ | ||
<{if $imtagging_is_admin}> | ||
<div class="imtagging_adminlinks"><{$imtagging_adminpage}></div> | ||
<{/if}> | ||
|
||
|
||
<{if $imtagging_tag_comment}> | ||
<table id="comments_container" border="0" width="100%" cellspacing="1" cellpadding="0" align="center" > | ||
<tr> | ||
<td colspan="3" align ="<{$smarty.const._GLOBAL_LEFT}>"> | ||
<div style="text-align: center; padding: 3px; margin:3px;"> <{$commentsnav}> <{$lang_notice}></div> | ||
<div style="margin:3px; padding: 3px;"> | ||
<!-- start comments loop --> | ||
<{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}> | ||
<!-- end comments loop --> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
<{/if}> | ||
|
||
|
||
<{includeq file='db:system_notification_select.html'}> | ||
<{/if}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I added config items to imBlogging, the language constants did need to be enclosed in quotes to be treated as a constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is correct, error on my part.