• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Hide update item checkbox for 24 hour.

fatih

Member
SC Premium
Hi,

I tried this but not working. E.g. in nflj_showcase_item_edit find;

Code:
<xen:if is="!{$isDraft}">
        <dl class="ctrlUnit">
            <dt></dt>
            <dd><ul>
                <li><label><input type="checkbox" name="post_as_update" value="1" id="ctrl_post_as_update" checked = "checked" class="Disabler" /> {xen:phrase nflj_showcase_post_as_update}</label>
                    <p class="explain">{xen:phrase nflj_showcase_post_as_update_explain}</p>
                    <ul id="ctrl_post_as_update_Disabler">
                        <xen:if is="{$item.thread_id}">
                            <li><label><input type="checkbox" name="post_update_message" value="1" id="ctrl_post_update_message" class="Disabler" /> {xen:phrase nflj_showcase_post_update_message}</label>
                                <p class="explain">{xen:phrase nflj_showcase_post_update_message_explain}</p>
                                <ul id="ctrl_post_update_message_Disabler">
                                    <li>
                                        <textarea name="custom_update_message" id="ctrl_custom_update_message" class="textCtrl Elastic" maxlength="2500"></textarea>
                                        <p class="explain">{xen:phrase nflj_showcase_post_as_update_custom_message_explain}</p>
                                    </li>
                                </ul>                   
                            </li>
                        </xen:if>
                    </ul>
                </li>
            </ul></dd>
        </dl>
    </xen:if>

...and replace with;

Code:
<xen:if is="{xen:time $serverTime, 'G'} >= 8 AND {xen:time $serverTime, 'G'} < 20">
<xen:if is="!{$isDraft}">
        <dl class="ctrlUnit">
            <dt></dt>
            <dd><ul>
                <li><label><input type="checkbox" name="post_as_update" value="1" id="ctrl_post_as_update" checked = "checked" class="Disabler" /> {xen:phrase nflj_showcase_post_as_update}</label>
                    <p class="explain">{xen:phrase nflj_showcase_post_as_update_explain}</p>
                    <ul id="ctrl_post_as_update_Disabler">
                        <xen:if is="{$item.thread_id}">
                            <li><label><input type="checkbox" name="post_update_message" value="1" id="ctrl_post_update_message" class="Disabler" /> {xen:phrase nflj_showcase_post_update_message}</label>
                                <p class="explain">{xen:phrase nflj_showcase_post_update_message_explain}</p>
                                <ul id="ctrl_post_update_message_Disabler">
                                    <li>
                                        <textarea name="custom_update_message" id="ctrl_custom_update_message" class="textCtrl Elastic" maxlength="2500"></textarea>
                                        <p class="explain">{xen:phrase nflj_showcase_post_as_update_custom_message_explain}</p>
                                    </li>
                                </ul>                   
                            </li>
                        </xen:if>
                    </ul>
                </li>
            </ul></dd>
        </dl>
    </xen:if>
<xen:else />
It's not possible update as item yet without 24 hour.
</xen:if>

Still showing up in Showcase Item Edit page;

itemeditpage.png

I'm not sure how to hide that option for 24 hour, so is there any alternative to do this?

Regards,
 
Again, what are you basing this 24 hour period ON? There has to be SOMETHING (an event in TIME) to base this on.

EXAMPLES:
  • 24 hours from the time ANYONE (owner or moderator) last EDITED the item.
  • 24 hours from the time ANYONE (owner or moderator) last UPDATED the item.
If that is what you want, then use those things are part of the condition to measure against.

{$item.date_edited} is the last time the item was EDITED (includes silent edits).
{$item.last_update} is the last time the item was EDITED AND posted as an UPDATE.
 
Back
Top