1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then 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.

Some questions about AMS. This is my support thread :)

Discussion in 'AMS Support' started by palhanow, Jul 3, 2019.

  1. palhanow

    palhanow New Member AMS

    Hello Bob,

    I'm finally installed your add-on and I'm trying to find myself around everything.

    Very functional, no errors. I'm very impressed by this.

    I'm in trouble just to configure the "main page" of the AMS (index, right?). I'm a fast learner, but i need some help.

    I have two index options, standard and modular.

    Both can work in the same way, right? Just add the widgets...

    If i choose modular, the "add article" button goes missing and i cannot use modular without this button.

    If i choose standard, i have a persistent categories menu that i cannot change. I did translated the phrase "categories", but still the same term. I did tried to comment the line on xa_ams_index:

    Code:
    <xf:page option="sideNavTitle">{{ phrase('categories') }}</xf:page>
    <!--<xf:sidenav>
        <xf:macro template="xa_ams_category_list_macros" name="simple_list_block"
            arg-categoryTree="{$categoryTree}"
            arg-categoryExtras="{$categoryExtras}" />
    </xf:sidenav>
    -->
    
    To remove this Categories Widget but don't seems to have any effect.

    So, for now that's it.

    Thank you very much for everything. I'm very happy with this product and I'm going to recommend to everyone.
     
  2. palhanow

    palhanow New Member AMS

    Some images just to show:

    upload_2019-7-3_20-4-26.png

    upload_2019-7-3_20-4-53.png
     
  3. palhanow

    palhanow New Member AMS

    Another question:

    Any way to edit the sidebar inside the article page?

    upload_2019-7-4_0-7-11.png

    I don't need to show copy the BB Codes and maybe, add some widgets.
     
  4. Bob

    Bob Developer Staff Member

    No, they are completely different types of pages. One (Modular) is designed to be a HOME PAGE for your site. The option is the standard index page, which is simply a paginated and filterable listing of all content within the system (same as XFRM index page as an example).

    The Modular Index is a blank template with a couple widget locations. ALL content that is displayed on that page is handled via the XF Widget System. Its not limited to AMS content as the XF Widget System controls all content added to that page.

    The standard index page is 99% controlled by AMS. The other 1% is controlled by the XF Widget System (as there are a couple widget locations that allow you to add Widgets to AMS Standard Index page.

    This is because Modular is designed to be a HOME page that is not connected to AMS (all content on Modular Index is driven by the XF Widget System).

    With that said, its a super easy template edit to add the pageaction template syntax that will display the "Add article" button. If you are ok with making a simple template edit, let me know and I can walk you through that.

    The Categories Navigation in the SideNav CAN be removed, however, it also controls the SideNav, so if you do that, you'd probably want to further edit the template to change all the widget locations to 'sidebar' vs 'sidenav' (so they display on in the right hand sidebar vs the left hand sidenav).

    Anyway... sounds more to me like what you really want is simply to display the "Add article" button on the Modular Index and like I mentioned, that is super easy.
     
    palhanow likes this.
  5. Bob

    Bob Developer Staff Member

    Editing templates in AMS is the same as it is for XF (since its the XF template system). AMS uses core template syntax, so anything SideNav or SideBar use the XF Sidenav and Sidebar standard template syntax.

    To edit the sidebar for the main article page, you need to edit the template: xa_ams_article_view

    Normally (again, this is XF standard), you will find sidenav and sidebar template code toward the END of a given template. That is the case with the xa_ams_article_view template.

    What you want to look for are blocks of template code that include the <xf:sidebar or <xf:sidenav (which tells the system that the block of code is for displaying in the sideBAR (right hand side) or sideNAV (left hand side).

    The SHARE just happens to be the LAST block on the template, so its pretty easy to find as you can just scroll to the end. This is what it looks like..

    HTML:
    <xf:sidebar key="shareSidebar">
        <xf:if contentcheck="true">
            <div class="block">
                <div class="block-container">
                    <xf:contentcheck>
                        <h3 class="block-minorHeader">{{ $article.Category.content_term ?  phrase('xa_ams_share_this_x', {'term': $article.Category.content_term|to_lower}) : phrase('xa_ams_share_this_article') }}</h3>
                        <xf:if contentcheck="true">
                            <div class="block-body block-row block-row--separated">
                                <xf:contentcheck>
                                    <xf:macro template="share_page_macros" name="buttons" arg-iconic="{{ true }}" />
                                </xf:contentcheck>
                            </div>
                        </xf:if>
                        <xf:if contentcheck="true">
                            <div class="block-body block-row block-row--separated">
                                <xf:contentcheck>
                                    <xf:macro template="share_page_macros" name="share_clipboard_input"
                                        arg-label="{{ phrase('xa_ams_copy_url_bb_code') }}"
                                        arg-text="[URL=&quot;{{ link('canonical:ams', $article) }}&quot;]{$article.title}[/URL]" />
    
                                    <xf:macro template="share_page_macros" name="share_clipboard_input"
                                        arg-label="{{ phrase('xa_ams_copy_ams_bb_code') }}"
                                        arg-text="[AMS=article, {$article.article_id}][/AMS]" />
                                </xf:contentcheck>
                            </div>
                        </xf:if>
                    </xf:contentcheck>
                </div>
            </div>
        </xf:if>
    </xf:sidebar>
    You can remove the entire block or remove (or comment out) the parts you don't want to be displayed). You do this like you would with ANY template (there is nothing special about editing an AMS template).

    If you simply do not want the clipboard helpers, remove them (or comment them out).

    This is one of the clip board helpers...
    Code:
                                    <xf:macro template="share_page_macros" name="share_clipboard_input"
                                        arg-label="{{ phrase('xa_ams_copy_url_bb_code') }}"
                                        arg-text="[URL=&quot;{{ link('canonical:ams', $article) }}&quot;]{$article.title}[/URL]" />
    This is another one of the clipboard helpers...
    Code:
                                    <xf:macro template="share_page_macros" name="share_clipboard_input"
                                        arg-label="{{ phrase('xa_ams_copy_ams_bb_code') }}"
                                        arg-text="[AMS=article, {$article.article_id}][/AMS]" />
     
    palhanow likes this.
  6. Bob

    Bob Developer Staff Member

    As for adding the page action button to Modular Index...

    Template: xa_ams_modular_index

    Find (appx line 10-12):
    Code:
    <xf:page option="searchConstraints" value="{{ {
        phrase('xa_ams_articles'): {'search_type': 'ams_article'}
    } }}" />
    Add below:
    Code:
    <xf:pageaction if="$xf.visitor.canAddAmsArticle()">
        <xf:button href="{{ link('ams/add') }}" class="button--cta" icon="write" overlay="true">{{ phrase('xa_ams_add_article...') }}</xf:button>
    </xf:pageaction>
    so that it looks like this...

    Selection_303.png

    And if you did the edit as shown above.... the "Add article" button will be displayed in the pageaction location just like it is on AMS standard index.

    Selection_304.png
     
    palhanow likes this.
  7. palhanow

    palhanow New Member AMS

    Oh Bob, thanks for everything. I'm using the modular page right now.

    I didn't see your vacation warning and now everything is configured. Sorry for the trouble.

    You can see my progress in this link:

    Publicações no POLITZ

    One question:

    My article featured widget is showing like a "carousel" style, not showing the grid style. Inside the widgets configuration, the option for grid is checked.

    I was hoping to show the big and nice featured image in the main page.
     
  8. Bob

    Bob Developer Staff Member

    Featured Grid requires at least 2 featured articles. If there is only 1 featured article to display, its going to default to displaying that article in the Featured Slider. Just make sure you have at least 2 featured articles (its best to have 3+ featured articles when using the Featured Grid.
     
    palhanow likes this.
  9. palhanow

    palhanow New Member AMS

    Thanks again.

    This support from you is awesome.

    So, i can use how many featured articles that i want? And best to be more than 2 or 3. Check.

    Man, your add-on is great. My user base is loving this.

    Now I'm going to set some "community categories" to permit that my own users publish articles.

    YEAH!
     
    Bob likes this.
  10. Bob

    Bob Developer Staff Member

    Glad you are enjoying it :)
     
  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.