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

Discussion in 'Showcase Support' started by ArnyVee, Feb 2, 2013.

  1. ArnyVee

    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 :)
  2. ibenick

    ibenick Member Showcase

    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:

                        <dt>{xen:phrase nflj_showcase_member}:</dt>
                        <dd><xen:username user="$item" /></dd>
    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.
    Bob likes this.
  3. ibenick

    ibenick Member Showcase

    And for the 'created by member' line, to make that just the category, replace this:

               <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>         
    with this:

                <div class="showcaseItemCategory muted">
                    <a href="{xen:link showcase-category, $item}">{$item.category_name}</a>           
    Bob likes this.
  4. ibenick

    ibenick Member Showcase

    and last... to get rid of the more items by user in the sidebar, delete this 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>
                        <xen:foreach loop="$userItems" value="$ui">
                            <dt style="margin-top:5px;">
                                <a href="{xen:link showcase, $ui}"  alt="" title="" >{$ui.item_name}</a>
                            <dd class="muted">
                                {xen:helper snippet, $ui.message, 100}
    ArnyVee and Bob like this.
  5. Bob

    Bob Developer Staff Member

    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.
  6. ibenick

    ibenick Member Showcase

    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:

    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
    ArnyVee and Bob like this.
  7. ArnyVee

    ArnyVee New Member

    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.
  8. ArnyVee

    ArnyVee New Member

    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?
  9. Bob

    Bob Developer Staff Member


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

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

    The last <div> in the block is what controls that line of data
                            <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
    <span><xen:username user="$item" />,</span>

    This controls the date (which is also a link to the item) on that line
    <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
    <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.
    ArnyVee likes this.
  10. ArnyVee

    ArnyVee New Member

    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?
  11. Bob

    Bob Developer Staff Member

    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.
    ArnyVee likes this.
  12. ArnyVee

    ArnyVee New Member

    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?
  13. Bob

    Bob Developer Staff Member

    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}
    ArnyVee likes this.
  14. ArnyVee

    ArnyVee New Member

    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.

    Thanks for that :)
  15. Bob

    Bob Developer Staff Member

    What "Ratings" block?

    These are the 3 options for Forum Home.

    Tabbed Items Sidebar Block
    Node List Items Module
    Node List Module
  16. ArnyVee

    ArnyVee New Member

    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.
  17. Neal

    Neal Member Showcase

    How can I change the navbar from Showcase to Reviews?
  18. Bob

    Bob Developer Staff Member

    edit the phrase: nflj_showcase_menu_main_tab
    Neal likes this.
  19. SelfSufficientMe

    SelfSufficientMe New Member AMS Premium SC Premium

    Where exactly is this phrase, which template? Sorry, noob :D
  20. Bob

    Bob Developer Staff Member

    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 :)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.