diff options
| author | wjames5 <will@tekimaki.com> | 2008-04-17 13:26:29 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2008-04-17 13:26:29 +0000 |
| commit | d1eb2f68dbcdab8183ff70ec1e2ef4c04ce92b3e (patch) | |
| tree | 91c4f5e0a9b202e79c599cf33072eed88f5ef0f5 /templates | |
| parent | f0be929e28e6b6575dce0b7534495086a2941476 (diff) | |
| download | liberty-d1eb2f68dbcdab8183ff70ec1e2ef4c04ce92b3e.tar.gz liberty-d1eb2f68dbcdab8183ff70ec1e2ef4c04ce92b3e.tar.bz2 liberty-d1eb2f68dbcdab8183ff70ec1e2ef4c04ce92b3e.zip | |
introduce options for moderating comments, e.g. screening them before they are made public. features require moderation package and are hidden unless installed. outstanding issues remain, use of status id is effective but not fully respected in boards, all custom permissions are not fully and properly checked - a reference to root obj is needed in LibertyComments. there may be others. current sites should be completely uneffected unless they opt in and enable.
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_comments.tpl | 32 | ||||
| -rw-r--r-- | templates/edit_content_comments_inc.tpl | 14 | ||||
| -rw-r--r-- | templates/service_content_body_inc.tpl | 10 | ||||
| -rw-r--r-- | templates/service_content_edit_mini_inc.tpl | 1 |
4 files changed, 51 insertions, 6 deletions
diff --git a/templates/admin_comments.tpl b/templates/admin_comments.tpl index b3ec49b..d6bcb02 100644 --- a/templates/admin_comments.tpl +++ b/templates/admin_comments.tpl @@ -7,7 +7,10 @@ </div> <div class="body"> - {form legend="Comment Settings"} + {form} + {jstabs} + {jstab title="Comment Display"} + {legend legend="Display Settings"} {foreach from=$commentSettings key=item item=output} <div class="row"> {formlabel label=`$output.label` for=$item} @@ -67,11 +70,30 @@ {formhelp note="Default number of lines in the comment post textarea."} {/forminput} </div> + {/legend} + {/jstab} + {if $gBitSystem->isPackageActive( 'moderation' ) } + {jstab title="Comment Moderation"} + <p>This feature is new and still in development, you may find it buggy.</p> + {legend legend="Moderation Settings"} + {foreach from=$commentModerationSettings key=item item=output} + <div class="row"> + {formlabel label=`$output.label` for=$item} + {forminput} + {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} + {formhelp note=`$output.note` page=`$output.page`} + {/forminput} + </div> + {/foreach} + {/legend} + {/jstab} + {/if} + {/jstabs} - <div class="row submit"> - <input type="submit" name="change_prefs" value="{tr}Change preferences{/tr}" /> - </div> - {/form} + <div class="row submit"> + <input type="submit" name="change_prefs" value="{tr}Change preferences{/tr}" /> + </div> + {/form} {capture name=commentUrls} <ul> diff --git a/templates/edit_content_comments_inc.tpl b/templates/edit_content_comments_inc.tpl new file mode 100644 index 0000000..c30935d --- /dev/null +++ b/templates/edit_content_comments_inc.tpl @@ -0,0 +1,14 @@ +{if $gBitSystem->isPackageActive('moderation') && + ( + ( $gBitSystem->isFeatureActive( 'comments_allow_owner_moderation' ) && $gContent->hasEditPermission() ) || + ( $gBitSystem->isFeatureActive( 'comments_allow_moderation' ) && ( $gBitUser->isAdmin() || $gContent->hasUserPermission('p_liberty_edit_comments') ) ) + )} + {* comments_moderate_all we handle in comments_inc, no input value is required and its not an option *} + <div class="row"> + {formlabel label="Moderate Comments" for="moderate_comments"} + {forminput} + <input type="checkbox" name="preferences_store[moderate_comments]" id="moderate_comments" value="y" {if $gContent->getPreference( 'moderate_comments' )}checked="checked"{/if} /> + {formhelp note="Comments will be hidden until you approve them."} + {/forminput} + </div> +{/if} diff --git a/templates/service_content_body_inc.tpl b/templates/service_content_body_inc.tpl index 88ea22e..ca169f7 100644 --- a/templates/service_content_body_inc.tpl +++ b/templates/service_content_body_inc.tpl @@ -1,3 +1,11 @@ {if $gBitSystem->isFeatureActive( 'liberty_display_status' ) && ($gBitUser->hasPermission('p_liberty_edit_content_status') || $gBitUser->hasPermission('p_liberty_edit_all_status')) && !is_null($serviceHash.content_status_id) && $serviceHash.content_status_id != 50} - <p class="liberty_status">{biticon iname=dialog-warning iexplain="Warning"} {tr}The status of this content is <strong>{$gContent->getContentStatusName($serviceHash.content_status_id)}</strong>{/tr}.</p> + <p class="liberty_status">{biticon iname=dialog-warning iexplain="Warning"} {tr}The status of this content is <strong>{$gContent->getContentStatusName($serviceHash.content_status_id)}</strong>{/tr}. + {if $serviceHash.content_status_id == -1 && $gBitSystem->isPackageActive('moderation') && + ( + ( $gBitSystem->isFeatureActive( 'comments_allow_owner_moderation' ) && $gContent->hasEditPermission() ) || + ( $gBitSystem->isFeatureActive( 'comments_allow_moderation' ) && ( $gBitUser->isAdmin() || $gContent->hasUserPermission('p_liberty_edit_comments') ) ) + )} + <a href="{$smarty.const.MODERATION_PKG_URL}index.php?moderation_id={$serviceHash.moderation_id}">Approve/Reject</a> + {/if} + </p> {/if}{$gContent->mInfo.content_status_name} diff --git a/templates/service_content_edit_mini_inc.tpl b/templates/service_content_edit_mini_inc.tpl index f1a70ed..27040fe 100644 --- a/templates/service_content_edit_mini_inc.tpl +++ b/templates/service_content_edit_mini_inc.tpl @@ -1,2 +1,3 @@ {include file="bitpackage:liberty/edit_content_status_inc.tpl"} {include file="bitpackage:liberty/edit_content_owner_inc.tpl"} +{include file="bitpackage:liberty/edit_content_comments_inc.tpl"} |
