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

Changing Showcase into a Review-based Addon

ArnyVee

New Member
Bob (or anyone else), I'm starting to create a showcase on a test site and I wanted to do some customization. Since this instance of the "Showcase" will be more of an informational 'reviews' system, I'd like to remove the references of the user who created the items.
  • How do I remove the "member" line from the Quick Stats?
  • How do I change the "created by Member" line and just have the 'category' listed when viewing an item? (Just a phrase change?)
  • How do I change the sidebar "More Items from Member" to "More Items in Category"?
I'm sure I'll have a million questions when I really start customizing this, but figured I'd start asking them and add to this thread as I went along :)
 
It's all pretty easy if you start dabbling in the individual templates. With Template Modification System, it's even easier. For example, to remove the member line from quick stats, you'd just create this template modification:

Search for this:

Code:
                <dl>
                    <dt>{xen:phrase nflj_showcase_member}:</dt>
                    <dd><xen:username user="$item" /></dd>
                </dl>

and replace it with nothing (delete it)

If you dig around in the code a bit, you can find all of the pieces you're looking for pretty easily. Happy to help with more specific pieces if you need it.
 
  • Like
Reactions: Bob
And for the 'created by member' line, to make that just the category, replace this:

Code:
           <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>

with this:

Code:
            <div class="showcaseItemCategory muted">
                <a href="{xen:link showcase-category, $item}">{$item.category_name}</a>           
            </div>
 
  • Like
Reactions: Bob
and last... to get rid of the more items by user in the sidebar, delete this code:

Code:
  <xen:if is="{$userItems}">     
        <div class="section">
            <div class="secondaryContent">
                <h3><a href="{xen:link showcase-member, $item}">{xen:phrase nflj_showcase_more_items_from} {$item.username}</a></h3>
                <dl>
                    <xen:foreach loop="$userItems" value="$ui">
                        <dt style="margin-top:5px;">
                            <a href="{xen:link showcase, $ui}"  alt="" title="" >{$ui.item_name}</a>
                        </dt>
                        <dd class="muted">
                            {xen:helper snippet, $ui.message, 100}
                        </dd>
                    </xen:foreach>             
                </dl>     
            </div>
        </div>
    </xen:if>
 
How do I change the sidebar "More Items from Member" to "More Items in Category"?

There is no "more items in Category" functionality. That would require a new method in the item model as well as calling that method in the item controller and exposing it to the response view. You'd also need new template code written for it.
 
I missed that you wanted to replace it with more in category. As Bob said, not easily doable, but you could always just hardcode a link in that basically just says "View more items in category _______" by adding something like this:

Code:
View more items in <a href="{xen:link showcase-category, $item}">{$item.category_name}</a>

That would create a link with the name of the current category to a list of all items in that category. So if your category was aquariums, it would end up like this:

View more items in Aquariums
 
There is no "more items in Category" functionality. That would require a new method in the item model as well as calling that method in the item controller and exposing it to the response view. You'd also need new template code written for it.

Ah, I see. Now I realize that it wouldn't work even if I change that.

But, maybe I'll just change it to 'View More Items' and take out the username.
 
I missed that you wanted to replace it with more in category. As Bob said, not easily doable, but you could always just hardcode a link in that basically just says "View more items in category _______" by adding something like this:

Code:
View more items in <a href="{xen:link showcase-category, $item}">{$item.category_name}</a>

That would create a link with the name of the current category to a list of all items in that category. So if your category was aquariums, it would end up like this:

View more items in Aquariums

Yup, did this as it seemed the easiest method to use. Thanks :D

By the way, is there an easy way to change the category page items in each tab so that I can remove the username and timestamp under each item name? Or, do I have to edit each line on each tabbed portion?
 
nflj_showcase_category

Find this block of code (its in the upper 1/4 of the template)

HTML:
                    <div class="showcaseMainInfo">
                        <div class="showcaseMainTitle">
                            <a href="{xen:link showcase, $item}" class="PreviewTooltip" data-previewurl="{xen:link showcase/preview, $item}" title="">{xen:helper snippet, $item.item_name, 45}</a>
                        </div>
                        <div class="showcaseMainSnippet"><span>{xen:helper snippet, $item.message, 65}</span></div>
                        <div class="showcaseMainMeta"><span><xen:username user="$item" />,</span> <a href="{xen:link showcase, $item}" class="faint"><xen:datetime time="$item.date_added" /></a>, <span><a href="{xen:link showcase-category, $item}">{$item.category_name}</a></span></div>
                    </div>


The last <div> in the block is what controls that line of data
HTML:
                        <div class="showcaseMainMeta"><span><xen:username user="$item" />,</span> <a href="{xen:link showcase, $item}" class="faint"><xen:datetime time="$item.date_added" /></a>, <span><a href="{xen:link showcase-category, $item}">{$item.category_name}</a></span></div>


broken down into chunks...

This controls the username on that line
HTML:
<span><xen:username user="$item" />,</span>


This controls the date (which is also a link to the item) on that line
HTML:
<a href="{xen:link showcase, $item}" class="faint"><xen:datetime time="$item.date_added" /></a>, <span>


This controls the category name (which is also a link to the category page) on that line
HTML:
<a href="{xen:link showcase-category, $item}">{$item.category_name}</a></span>

you can strip or modify any of it. Best way to learn is to just do things. Make copies before making changes so that you can revert back if it messes anything up.
 
Bunch of code and stuff :)

Perfect, thanks Bob!

I think that I have most (if not all) of the code and phrase tweaks done now :)

Now, to work on the 'content' layout.

Has it been suggested to take the 'star ratings' and placing them above the tabbed area of the items instead of in the sidebar? Or maybe give it its own 'block' in the sidebar (above image gallery block?) with the title "Rate this Item". Would it be difficult to do something like that?
 
Both are doable, however, I just made that process a little more complex because of the addition of MicroData to have the Ratings showup in Google search results. Modifying now isn't simply moving the ratings stuff around, but ya gotta also move the micro data code around to make sure its properly implemented and seeded as well (which can be tricky). It would be easier to do a custom sidebar block than it would to move it all to the main content area (as that would require modification to the microdata as well.
 
Okay, I'll keep that one on the backburner for now ;)

I just noticed that the forum home "ratings" block is something that I have to fix (removing the username/timestamp). Where would I adjust that?

Another thing I noticed on the forumhome was that the block above the nodes has an issue with the title of each item. Looks like the title will display up to 25 spaces or so only and cuts off after that. Can that be adjusted so that the title goes to a second line?
 
I name the templates logically to match major things.. ie, nflj_showcase_category is obviously related to categories. Same thing applies with smaller areas.. ie, you are asking about the NODES blocks, so look for showcase templates dealing with nodes and you will find 3 of them (nflj_showcase_node_list, nflj_showcase_node_list_items and nflj_showcase_node_list_items.css). _node_list is for the simulated node. _node_list_item is for the block that displays items.

The title is trimmed at 35.. {xen:helper snippet, $item.item_name, 35}
 
I name the templates logically to match major things.. ie, nflj_showcase_category is obviously related to categories. Same thing applies with smaller areas.. ie, you are asking about the NODES blocks, so look for showcase templates dealing with nodes and you will find 3 of them (nflj_showcase_node_list, nflj_showcase_node_list_items and nflj_showcase_node_list_items.css). _node_list is for the simulated node. _node_list_item is for the block that displays items.

Makes sense, but I can't seem to find the "Ratings" block for the forumhome to remove the username/timestamp from the tabbed portions of the block.

The title is trimmed at 35.. {xen:helper snippet, $item.item_name, 35}

Thanks for that :)
 
What "Ratings" block?

These are the 3 options for Forum Home.

Tabbed Items Sidebar Block
Node List Items Module
Node List Module
 
What "Ratings" block?

These are the 3 options for Forum Home.

Tabbed Items Sidebar Block
Node List Items Module
Node List Module

LOL...I renamed it "Ratings" and that's what I've been referring to it as! Sheesh, been a long day.

It's the "Tabbed Items Sidebar Block" that I needed to remove the information, but I found it as I continued to search.
 
Log into the Admin CP
Click on the Appearance Tab
on the left hand nav, click on Phrases
cut and paste nflj_showcase_menu_main_tab into the filter items
click on the Phrase which will take you into edit mode
Change the Phrase Text from Showcase to Reviews
Hit save Phrase :)
 
Back
Top