• 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.

[XF1] Tips & Tricks & How To's

Status
Not open for further replies.

Bob

Developer
Staff member
How do I change the name of the Showcase Tab on the Main Menu Navigation Bar?

Answer:
edit the phrase: nflj_showcase_menu_main_tab and change the phrase text from Showcase to what ever you want it to display. This only effects the Tab.


How do I disable the Showcase Tab on the main navigation bar?


Answer: To hide it via CSS, put the below css into EXTRA.css
HTML:
.navTabs .navTab.showcase
{
    display: none!important;
}


How do I customize the Showcase sub navigation on the main navigation bar?

Answer
: Edit the template: nflj_showcase_tab_links
 
How do I set which Image displays in the Most Recent, Most Popular, Top Rated, Categories Lists and the Large Image on the Item View?

Answer: The first attached image is the image used in all the external modules. You can now set the cover image using the "Set Cover Image" function in the Showcase Tools blocked locked in the item sidebar.

Can I embed a linked image into one of the tabs and use it as the Main Thumbnail for an item?

Answer: NO. Linked images embeded into the editor display inline for that tab only. That image is "content", not something that can be queried from the attachments table.
 
HOW TO: Change the Order in which the Showcase Tab displays in the Navigation Menu.

To do this, you will need to put your site into DEBUG MODE as you need to access the Development Tab in the Admin CP. Once in the Development area, you want to click on the Code Event Listeners link to bring up the main listing of all Code Event Listeners that have been added by Addons. Since you are wanting to change TAB order, you should FILTER the list so that only the navigation_tabs listeners are displayed. As you can see here, there are several addons that are adding tabs to the navigation menu. Click on the link for the appropriate Tab to edit its execution order (see next image)

Selection_025.png


As mentioned, each Tab that is added via the navigation_tabs Code Event Listener has a Callback Execution Order. The default is set at 10, which most addon developers just leave it set at. However, you can adjust the Callback Execution Order to set the order of the tabs the way you want them (within the Position Group that they are in).

NOTE: There are 3 dynamic insert positions for Tabs. MOST (not all) hard code that position into the listener file (a php file associated with the listener). Some Addons (like XFMG, Showcase, AMS, Sportsbook) have an OPTION that lets you set which of the 3 positions you want the tab inserted into.

<!-- extra tabs: home -->
<!-- extra tabs: middle -->
<!-- extra tabs: end -->

home = inserted between the HOME Tab and FORUM Tab.
middle = inserted between the FORUM tab and MEMBERS tab
end = inserted after the MEMBERS Tab

If one tab is in the middle and the other in the end, you can't change the execution order to put the tab that is in the middle at the END. You'd have to either change the OPTION (if there is one) or edit the file and change the hard coded value.

Selection_026.png



Addons like Showcase, Sportsbook, AMS etc now have an OPTION that lets you set the POSITION of the Navigation tab to one of the 3 locations.

Selection_027.png
 
Last edited:
HOW TO: Change the order of showcase sidebar blocks on the Showcase Home, Category and Member pages

For this example, I am going to use the Sidebar on the Showcase Home page...

edit the template: nflj_showcase_index_sidebar The other pages have sidebar templates as well)

In ANY addon's template, the sidebar code is going to be towards the end of the template and it will be enclosed with the xf sidebar "xen" syntax.. <xen:sidebar>

The below side bar contains 3 Blocks of code for the 3 Sidebar Blocks which are Quick Stats, Categories and Top Contributors. I (usually) try and put a space between blocks of code so that when you look at it, you can see visually where a block starts and ends. Indenting also is a clue.

This is how it comes default.
HTML:
<xen:sidebar>
    <xen:container var="$noVisitorPanel">1</xen:container>

<div class="section">
        <div class="secondaryContent">
            <h3>{xen:phrase nflj_showcase_quick_stats}</h3>
            <div class="pairsJustified">
                <dl>
                    <dt>{xen:phrase nflj_showcase_categories}:</dt>
                    <dd>{xen:if '{$quikStats.categories}', '{$quikStats.categories}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_items}:</dt>
                    <dd>{xen:if '{$quikStats.items}', '{$quikStats.items}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_views}:</dt>
                    <dd>{xen:if '{$quikStats.views}', '{$quikStats.views}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_images}:</dt>
                    <dd>{xen:if '{$quikStats.images}', '{$quikStats.images}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_comments}:</dt>
                    <dd>{xen:if '{$quikStats.comments}', '{$quikStats.comments}', '0'}</dd>
                </dl>
            </div>      
        </div>
    </div>

    <div class="section">
        <div class="secondaryContent">
            <h3>{xen:phrase nflj_showcase_categories}</h3>
            <xen:if is="{$categories}">
                <div class="pairsJustified">
                    <xen:foreach loop="$categories" value="$cat">          
                        <dl>
                            <dt>{xen:if '{$cat.category_indent}', '{xen:raw $cat.category_indent}'} <a href="{xen:link showcase-category, $cat}" class="{xen:if '{$cat.category_description}', 'Tooltip'}" alt="{$cat.category_description}" title="{$cat.category_description}" >{$cat.category_name}</a></dt>
                            <dd>{xen:if '{$cat.item_count}', '{$cat.item_count}', '0'}</dd>
                        </dl>
                    </xen:foreach>                      
                </div>
            <xen:else />
                <div class="showcaseNoItems">{xen:phrase nflj_showcase_no_categories}</div>
            </xen:if>
        </div>
    </div>

    <xen:if is="{$topContributors}">
        <div class="section">
            <div class="secondaryContent">
                <h3>{xen:phrase nflj_showcase_top_contributors}</h3>
                <ol>
                    <xen:foreach loop="$topContributors" value="$tc">
                        <li>
                            <div class="showcaseTopContributor">
                                <xen:avatar user="$tc" size="s" img="true" />
                                <div class="showcaseTopContributorTitle">
                                    <a href="{xen:link members, $tc}" class="Tooltip" alt="{xen:phrase nflj_showcase_user_has_contributed_x_items, 'name={$tc.username}', 'items={xen:number $tc.count}'}" title="{xen:phrase nflj_showcase_user_has_contributed_x_items, 'name={$tc.username}', 'items={xen:number $tc.count}'}">{$tc.username}</a>
                                </div>
                                <div class="showcaseTopContributorMeta">
                                    <span class="showcaseTopContributorUser"><a href="{xen:link showcase-member, $tc}">{xen:phrase nflj_showcase_items}: {$tc.count}</a></span>
                                </div>
                            </div>
                        </li>
                    </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

</xen:sidebar>


This is swapping the Quick Stats and the Categories Blocks around so that Categories is first, then the Quick Stats....

HTML:
<xen:sidebar>
    <xen:container var="$noVisitorPanel">1</xen:container>

    <div class="section">
        <div class="secondaryContent">
            <h3>{xen:phrase nflj_showcase_categories}</h3>
            <xen:if is="{$categories}">
                <div class="pairsJustified">
                    <xen:foreach loop="$categories" value="$cat">          
                        <dl>
                            <dt>{xen:if '{$cat.category_indent}', '{xen:raw $cat.category_indent}'} <a href="{xen:link showcase-category, $cat}" class="{xen:if '{$cat.category_description}', 'Tooltip'}" alt="{$cat.category_description}" title="{$cat.category_description}" >{$cat.category_name}</a></dt>
                            <dd>{xen:if '{$cat.item_count}', '{$cat.item_count}', '0'}</dd>
                        </dl>
                    </xen:foreach>                      
                </div>
            <xen:else />
                <div class="showcaseNoItems">{xen:phrase nflj_showcase_no_categories}</div>
            </xen:if>
        </div>
    </div>

<div class="section">
        <div class="secondaryContent">
            <h3>{xen:phrase nflj_showcase_quick_stats}</h3>
            <div class="pairsJustified">
                <dl>
                    <dt>{xen:phrase nflj_showcase_categories}:</dt>
                    <dd>{xen:if '{$quikStats.categories}', '{$quikStats.categories}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_items}:</dt>
                    <dd>{xen:if '{$quikStats.items}', '{$quikStats.items}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_views}:</dt>
                    <dd>{xen:if '{$quikStats.views}', '{$quikStats.views}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_images}:</dt>
                    <dd>{xen:if '{$quikStats.images}', '{$quikStats.images}', '0'}</dd>
                </dl>
                <dl>
                    <dt>{xen:phrase nflj_showcase_comments}:</dt>
                    <dd>{xen:if '{$quikStats.comments}', '{$quikStats.comments}', '0'}</dd>
                </dl>
            </div>      
        </div>
    </div>

    <xen:if is="{$topContributors}">
        <div class="section">
            <div class="secondaryContent">
                <h3>{xen:phrase nflj_showcase_top_contributors}</h3>
                <ol>
                    <xen:foreach loop="$topContributors" value="$tc">
                        <li>
                            <div class="showcaseTopContributor">
                                <xen:avatar user="$tc" size="s" img="true" />
                                <div class="showcaseTopContributorTitle">
                                    <a href="{xen:link members, $tc}" class="Tooltip" alt="{xen:phrase nflj_showcase_user_has_contributed_x_items, 'name={$tc.username}', 'items={xen:number $tc.count}'}" title="{xen:phrase nflj_showcase_user_has_contributed_x_items, 'name={$tc.username}', 'items={xen:number $tc.count}'}">{$tc.username}</a>
                                </div>
                                <div class="showcaseTopContributorMeta">
                                    <span class="showcaseTopContributorUser"><a href="{xen:link showcase-member, $tc}">{xen:phrase nflj_showcase_items}: {$tc.count}</a></span>
                                </div>
                            </div>
                        </li>
                    </xen:foreach>
                </ol>
            </div>
        </div>
    </xen:if>

</xen:sidebar>
 
Last edited:
How do I change the width or height of the item sidebar cover image?

STARTING WITH SC 2.3.0, this no longer applies. It is for versions before 2.3.0!

Answer: Edit template nflj_showcase_item_sidebar

find:

HTML:
        <script type="text/javascript">
            $(document).ready(function(){
                $('.showcaseSidebarThumb .showcaseSidebarThumbnail').resizecrop({
                    width:230,
                    height:150,
                    vertical:"middle"
                });
            });
        </script>

Change width:230,height:150 to the size you need
 
Last edited:
HOW TO: reset the entire rate/reviews for showcase (in the case you want to start fresh)

Someone asked about this for the upgrade to SC 1.2.0 and wanting to start fresh with the new reviews system..

Basically you need to do this:

Truncate table: xf_nflj_showcase_rate_review
Note: TRUNCATE, not DROP!

Next you will need to run these queries (make sure you run them for the correct version of showcase that you have installed)

Version 1.x series
UPDATE xf_nflj_showcase_item SET rating = 0
UPDATE xf_nflj_showcase_item SET vote_count = 0
UPDATE xf_nflj_showcase_item SET review_count = 0

Version 2.x series
UPDATE xf_nflj_showcase_item SET rating_count = 0
UPDATE xf_nflj_showcase_item SET rating_sum = 0
UPDATE xf_nflj_showcase_item SET rating_avg = 0
UPDATE xf_nflj_showcase_item SET rating_weighted = 0
UPDATE xf_nflj_showcase_item SET review_count = 0


That will clear out all the old ratings so that you can start fresh with the Rate and Review system (in case you want to force Reviews)
 
Last edited:
HOW TO: Mass set Rate Review System Type

With the new Rate and Review system in place, the DEFAULT setting for each category is RATE. You can easily MASS change that to Rate and Review as well as also mass set to force ratings.

To mass set Rate and Review: UPDATE xf_nflj_showcase_category SET review_system = 1

If you Mass set Rate and Review and want to Force Reviews: UPDATE xf_nflj_showcase_category SET review_required = 1
 
Last edited:
How To: Trim Titles in Blocks/Modules/Widgets?

A common issue with custom styles is that they change the standard width of a block or change the font size which makes the trimmed title to long (or too short). This is an easy template edit.

Lets use the Recent Items Widget for the [bd] widget framework as am example. The template for that widget is nflj_showcase_wf_recent_items (note: all bd widget templates in my addons use _wf_ in the template name).

What you need to look for in the template is the TITLE code. It looks like this.

HTML:
<a class="title" href="{xen:link showcase, $item}">{xen:helper snippet, $item.item_name, 40}</a>

You will see that I am using a HELPER called "snippet". What this does is trim the title to X characters and then adds ... This is a core XF helper. So if you want less than 40, change it to 35.

I use this throughout ALL my addons, not just showcase.
 
How do I change the width or height of the thumbnail image in modules/containers?

Answer: Its pretty easy, but does require some customization (editing of templates and CSS). Follow the two step process below...

PART 1....

This is a list of the templates that you can edit and change the width and height settings for the Javascript that resizes the thumbnails for the containers (Grid View and Modular View).

nflj_showcase_category_grid
nflj_showcase_find_new_items
nflj_showcase_index_grid
nflj_showcase_index_modular
nflj_showcase_member_grid
nflj_showcase_node_list_items

This is the javascript to look for in those templates (its towards the top in all of them). Some of the JS is slightly different, but the settings you need to change are the same (width and height).

Core Showcase...
HTML:
<script type="text/javascript">
    $(document).ready(function(){
        $('.showcaseItemThumb .showcaseItemThumbnail').resizecrop({
            width:200,
            height:150,
            vertical:"middle"
        });
    });
</script>

Customized to use 350x100 sized thumbs...
HTML:
<script type="text/javascript">
    $(document).ready(function(){
        $('.showcaseItemThumb .showcaseItemThumbnail').resizecrop({
            width:350,
            height:100,
            vertical:"middle"
        });
    });
</script>

DO NOT cut and paste the entire script, just edit the width and height.


PART 2...

Add the below CSS classes to EXTRA.css and change the Height and Width attributes to match the change made to the above templates.

HTML:
    .showcaseItemContainer .showcaseItemThumb {
        height: 100px !important;
        width: 350px !important;
    }

        .showcaseItemThumb .showcaseItemThumbnail {
            height: 100px !important;
            width: 350px !important;
        }

    .showcaseItemContainer .showcaseItemInfo {
        max-width: 350px !important;
    }
 
How do I completely remove the gallery tab content container and moves it into Tab 1's content container.?

NOTE: This is now an option setting in the Showcase Options (starting with SC 2.1.1)

Answer: Its pretty easy, but does require some customization (editing of templates). There are THREE steps to this... you will have to replace a full template and edit 2 others

NOTE: This is for the latest version of showcase (1.3.0)

Step 1:

Replace template: nflj_showcase_item with the below template.

HTML:
<xen:title>{$item.item_name}{xen:helper pagenumber, $page}</xen:title>
<xen:h1></xen:h1>

<xen:require css="nflj_showcase_item.css" />

<xen:container var="$head.openGraph">
    <xen:include template="open_graph_meta">
        <xen:set var="$url">{xen:link canonical:showcase, $item}</xen:set>
        <xen:set var="$title">{$item.item_name}</xen:set>
    </xen:include></xen:container>

<xen:navigation>
    <xen:breadcrumb source="$breadCrumbs" />
</xen:navigation>

<xen:set var="$itemStatusHtml">
    <xen:if hascontent="true">
        <dl class="itemAlerts secondaryContent">
            <dt>{xen:phrase nflj_showcase_item_status}:</dt>
            <xen:contentcheck>
                <xen:if is="{$item.item_state} == 'deleted'">
                    <dd class="deletedAlert">
                        <span class="icon Tooltip" title="{xen:phrase nflj_showcase_deleted}" data-tipclass="iconTip"></span>
                        {xen:phrase nflj_showcase_removed_from_public_view}
                    </dd>
                <xen:elseif is="{$item.item_state} == 'moderated'" />
                    <dd class="moderatedAlert">
                        <span class="icon Tooltip" title="{xen:phrase nflj_showcase_awaiting_moderation}" data-tipclass="iconTip"></span>
                        {xen:phrase nflj_showcase_awaiting_moderation_before_being_displayed_publicly}
                    </dd>
                <xen:elseif is="{$item.item_state} == 'draft'" />
                    <dd class="draftAlert">
                        <span class="icon Tooltip" title="{xen:phrase nflj_showcase_draft}" data-tipclass="iconTip"></span>
                        {xen:phrase nflj_showcase_draft_in_progress}
                    </dd>                        
                </xen:if>
            </xen:contentcheck>
        </dl>
    </xen:if>
</xen:set>
{xen:raw $itemStatusHtml}

<div id="item-{$item.item_id}" class="showcaseItem" data-author="{$item.username}">

    <div class="showcaseItemAvatar">
        <xen:if is="{$item.cover_image}">
            <a class="avatar NoOverlay" href="{xen:link showcase, $item}">
                <img width="48" height="48" border="0" src="{$item.cover_image.thumbnailUrl}" />
            </a>                    
        <xen:elseif is="{$item.category_image}" />
            <a class="avatar NoOverlay" href="{xen:link showcase, $item}">
                <img width="48" height="48" border="0" alt="{$item.category_name}" src="styles/default/nflj/showcase/category_images/{$item.category_image}">
            </a>
        <xen:else />
            <xen:avatar user="$item" size="s" img="true" />
        </xen:if>
    </div>

    <div class="showcaseItemInfo">
        <div class="showcaseItemContent">
            <div class="showcaseItemTitle">
                {xen:if '{$item.item_state} == "draft" ', '<span class="draft">[{xen:phrase nflj_showcase_draft}]</span>', ''} {$item.item_name}
            </div>
            <div class="showcaseItemCategory muted">
                <a href="{xen:link showcase/category, $item}">{$item.category_name}</a> {xen:phrase nflj_showcase_item_created_by} <span><xen:username user="$item" />,</span> <a href="{xen:link showcase, $item}"><xen:datetime time="$item.date_added" /></a>            
            </div>
            <div class="showcaseItemDescription">
                {$item.abstract}
            </div>
        </div>
    </div>

    <div style="clear:both"></div>

    <xen:if is="{$item.thread_id} || {$item.review_count}">
        <script type="text/javascript">
            $(document).ready(function () {
                $("li.last a").unbind('click');
            });
        </script>
    </xen:if>

    <div class="showcaseItemTabs">
        <xen:if is="{$item.canWatch}">
            <li><a href="{xen:link showcase/watch, $item}" class="OverlayTrigger watchLink" data-cacheoverlay="false"><xen:if is="{$item.is_watched}">{xen:phrase nflj_showcase_unwatch_this_item}<xen:else />{xen:phrase nflj_showcase_watch_this_item}</xen:if></a></li>
        </xen:if>    
        <ul id="showcasetabs" class="Tabs tabs showcaseTabs" data-panes="#showcasetabcontainer > li">
            <li>
                <a href="#tab1">{$item.tab1_name}</a>
            </li>
        
            <xen:if is="{$item.tab2_name} && ({$t2.hasContent} || {$t2.hasCustomFieldContent})">    
                <li>
                    <a href="#tab2">{$item.tab2_name}</a>
                </li>
            </xen:if>
        
            <xen:if is="{$item.tab3_name}  && ({$t3.hasContent} || {$t3.hasCustomFieldContent})">    
                <li>
                    <a href="#tab3">{$item.tab3_name}</a>
                </li>
            </xen:if>
        
            <xen:if is="{$item.tab4_name}  && ({$t4.hasContent} || {$t4.hasCustomFieldContent})">
                <li>
                    <a href="#tab4">{$item.tab4_name}</a>
                </li>
            </xen:if>
        
            <xen:if is="{$item.tab5_name}  && ({$t5.hasContent} || {$t5.hasCustomFieldContent})">
                <li>
                    <a href="#tab5">{$item.tab5_name}</a>
                </li>
            </xen:if>
        
            <xen:if is="{$item.review_count}">
                <li class="last">
                    <a href="{xen:link showcase/reviews, $item}">{xen:phrase nflj_showcase_reviews} ({$item.review_count})</a>
                </li>
            </xen:if>
        
            <xen:if is="{$item.thread_id}">
                <li class="last">
                    <a href="{xen:link threads, $item}">{xen:phrase nflj_showcase_discussion}</a>
                </li>
            </xen:if>        
        </ul>
    
        <ul id="showcasetabcontainer">
            <li id="tab1">
                <xen:if is="{$customFieldsGrouped.tab1}">
                    <div class="primaryContent">
                        <div class="pairsColumns tabPairs">
                            <xen:foreach loop="$customFieldsGrouped.tab1" value="$field">
                                <xen:include template="nflj_showcase_item_custom_field_view" />
                            </xen:foreach>
                        </div>
                    </div>                
                </xen:if>
                <xen:if is="{$item.tab1_editor}">
                    <div class="primaryContent">
                        <article><blockquote class="messageText ugc baseHtml">{xen:raw $item.message}</blockquote></article>
                    </div>
                </xen:if>

                <xen:if is="{$item.attachments}">
                    <div class="primaryContent">
                        <xen:include template="nflj_showcase_item_image_gallery" />
                    </div>
                </xen:if>
            </li>
            <xen:if is="{$item.tab2_name} && ({$t2.hasContent} || {$t2.hasCustomFieldContent})">
                <li id="tab2">
                    <xen:if is="{$customFieldsGrouped.tab2}">
                        <div class="primaryContent">
                            <div class="pairsColumns tabPairs">
                                <xen:foreach loop="$customFieldsGrouped.tab2" value="$field">
                                    <xen:include template="nflj_showcase_item_custom_field_view" />
                                </xen:foreach>
                            </div>
                        </div>                
                    </xen:if>
                    <xen:if is="{$item.tab2_editor}">
                        <div class="primaryContent">
                            <article><blockquote class="messageText ugc baseHtml">{xen:raw $t2.message}</blockquote></article>
                        </div>
                    </xen:if>
                </li>
            </xen:if>
            <xen:if is="{$item.tab3_name} && ({$t3.hasContent} || {$t3.hasCustomFieldContent})">
                <li id="tab3">
                    <xen:if is="{$customFieldsGrouped.tab3}">
                        <div class="primaryContent">
                            <div class="pairsColumns tabPairs">
                                <xen:foreach loop="$customFieldsGrouped.tab3" value="$field">
                                    <xen:include template="nflj_showcase_item_custom_field_view" />
                                </xen:foreach>
                            </div>
                        </div>                
                    </xen:if>
                    <xen:if is="{$item.tab3_editor}">                
                        <div class="primaryContent">        
                            <article><blockquote class="messageText ugc baseHtml">{xen:raw $t3.message}</blockquote></article>
                        </div>
                    </xen:if>                    
                </li>
            </xen:if>
            <xen:if is="{$item.tab4_name} && ({$t4.hasContent} || {$t4.hasCustomFieldContent})">
                <li id="tab4">
                    <xen:if is="{$customFieldsGrouped.tab4}">
                        <div class="primaryContent">
                            <div class="pairsColumns tabPairs">
                                <xen:foreach loop="$customFieldsGrouped.tab4" value="$field">
                                    <xen:include template="nflj_showcase_item_custom_field_view" />
                                </xen:foreach>
                            </div>
                        </div>                
                    </xen:if>
                    <xen:if is="{$item.tab4_editor}">                
                        <div class="primaryContent">        
                            <article><blockquote class="messageText ugc baseHtml">{xen:raw $t4.message}</blockquote></article>
                        </div>
                    </xen:if>                    
                </li>    
            </xen:if>
            <xen:if is="{$item.tab5_name} && ({$t5.hasContent} || {$t5.hasCustomFieldContent})">
                <li id="tab5">
                    <xen:if is="{$customFieldsGrouped.tab5}">
                        <div class="primaryContent">
                            <div class="pairsColumns tabPairs">
                                <xen:foreach loop="$customFieldsGrouped.tab5" value="$field">
                                    <xen:include template="nflj_showcase_item_custom_field_view" />
                                </xen:foreach>
                            </div>
                        </div>                
                    </xen:if>
                    <xen:if is="{$item.tab5_editor}">                
                        <div class="primaryContent">        
                            <article><blockquote class="messageText ugc baseHtml">{xen:raw $t5.message}</blockquote></article>
                        </div>
                    </xen:if>                    
                </li>    
            </xen:if>        
        </ul>
    </div>

    <div class="showcaseItemMeta">
        <div class="showcaseItemPrivateControls">
            <span class="showcaseItemTime"><xen:username user="$item" class="author" />,</span>
            <span class="showcaseItemLink"><a href="{xen:link showcase, $item}"><xen:datetime time="$item.date_added" /></a></span>
            <xen:hook name="showcase_item_private_controls" params="{xen:array 'item={$item}'}">
                <xen:if is="{$item.canEditItem}">
                    <a href="{xen:link showcase/edit, $item}" class="showcaseControlLinks">{xen:phrase edit}</a>
                </xen:if>
                <xen:if is="{$item.canDeleteItem}">
                    <a href="{xen:link showcase/delete, $item}" class="showcaseControlLinks OverlayTrigger" data-cacheOverlay="false">{xen:phrase delete}</a>
                </xen:if>        
                <xen:if is="{$visitor.user_id}">
                    <a href="{xen:link 'showcase/report', $item}" class="showcaseControlLinks report OverlayTrigger" data-cacheOverlay="false">{xen:phrase report}</a>
                </xen:if>
            </xen:hook>
        </div>

        <div class="showcaseItemPublicControls">
            <xen:hook name="showcase_item_public_controls" params="{xen:array 'item={$item}'}">
                <xen:if is="{$item.canLikeItem}">
                    <a href="{xen:link showcase/like, $item}" class="LikeLink {xen:if $item.like_date, unlike, like}" data-container="#likes-item-{$item.item_id}"><span></span><span class="LikeLabel">{xen:if $item.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
                </xen:if>
            </xen:hook>
        </div>
    </div>

    <div id="likes-item-{$item.item_id}">
        <xen:if is="{$item.likes}">
            <xen:include template="likes_summary">
                <xen:map from="$item" to="$message" />
                <xen:set var="$likesUrl">{xen:link showcase/likes, $item}</xen:set>
            </xen:include>
        </xen:if>
    </div>

</div>

<xen:if is="{$item.canViewComments} && {$item.allow_comments}">
    <div class="showcaseComments">
        <xen:if is="{$item.canPostComments} && !in_array({$item.item_state}, array('draft', 'moderated', 'deleted')) ">
            <form action="{xen:link 'showcase/add-comment', $item}" method="post"
                class="commentSimple AutoValidator primaryContent CommentForm" id="CommentForm">
                <xen:avatar user="$visitor" size="s" />
                <div class="commentInfo">
                    <textarea name="message" class="textCtrl Elastic" placeholder="{xen:phrase nflj_showcase_write_a_comment}..." rows="3" cols="50"></textarea>
                    <div class="submitUnit">
                        <input type="submit" class="button primary" value="{xen:phrase post_comment}" accesskey="s" />
                        <input type="hidden" name="commentDate" value="{$commentDate}" />                    
                        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
                    </div>
                </div>
            </form>
        </xen:if>        

        <div class="showcaseCommentList">
            <div id="NewComments"></div>
            <xen:include template="nflj_showcase_comment" />
        </div>

        <div class="pageNavLinkGroup">
            <xen:pagenav link="showcase" linkdata="{$item}"  page="{$page}" perpage="{$commentsPerPage}" total="{$totalComments}" />
        </div>
    </div>
</xen:if>

<xen:include template="nflj_showcase_item_sidebar" />

{xen:raw $itemStatusHtml}

<xen:include template="nflj_showcase_footer" />


Step 2:

Edit Template: nflj_showcase_item_tab_reviews

FIND and Remove this block of code:
HTML:
            <xen:if is="{$item.attach_count}">
                <li>
                    <a href="{xen:link showcase, $item}#timages">{xen:phrase nflj_showcase_image_gallery}</a>
                </li>
            </xen:if>

Step 3:

Edit Template: nflj_showcase_thread_view_tabs

FIND and Remove this block of code:
HTML:
        <xen:if is="{$item.attach_count}">
            <li>
                <a href="{xen:link showcase, $item}#timages">{xen:phrase nflj_showcase_image_gallery}</a>
            </li>
        </xen:if>
 
Last edited:
Im having trouble using the showcase item custom fields {$value} variable to for URLs and Buttons.

Answer: instead of {$value} try either {$valueSC} or {$valueRaw} Showcase has 3 different "value" options.

{$valueSC} within Showcase is the same as {$value} is in User fields, but NOT the same as {$value} is in the Resource Manager.
{$valueRaw} in showcase is the same as {$valueRaw} is in the Resource Manager (and {$valueRaw} is not available in user fields).
{$value} in showcase as same as {$value} in the Resource Manager (which is different than {$value} is in User Fields).

SC: {$valueRaw} is the same as the RM
SC: {$value} is the same as the RM
SC: {$valueSC} is the same as {$value} is for User Fields.
PHP:
$valueRaw = htmlspecialchars(XenForo_Helper_String::censorString($value));
$valueSC = nl2br(htmlspecialchars(XenForo_Helper_String::censorString($value)));
$value = XenForo_Template_Helper_Core::callHelper('bodytext', array($value));


User Fields: {$value}
User Fields: ($valueRaw) <--- no such thing
PHP:
$value = nl2br(htmlspecialchars(XenForo_Helper_String::censorString($value)));


RM: {$valueRaw} is similar, but not 100% the same as {$value} is within User Fields
RM: {$value} is NOT the same as {$value} is within User Fields
PHP:
$valueRaw = htmlspecialchars(XenForo_Helper_String::censorString($value));
$value = XenForo_Template_Helper_Core::callHelper('bodytext', array($value));
 
Last edited:
Status
Not open for further replies.
Back
Top