Jump to content
DevFuse Forums
  • Only category submit


    Michael
    • Fixed IP.Board Version: IP.Board 4.3.x

    Would be easier if only 1 category would allow direction submission. Also look into hiding the category sidebar block.

    Open acp > theme editor > collections > front > browse > index.

    Find:

    <a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&_new=1" seoTemplate="collections_add"}" data-ipsDialog data-ipsDialog-title='{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}' data-ipsDialog-size='narrow'>{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a>

    Replace With:

                    {{if $theOnlyNode = \IPS\collections\Category::theOnlyNode()}}
                        <a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&do=submit&category={$theOnlyNode->_id}" seoTemplate="collections_add"}">{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a>
                    {{else}}
                        <a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{url="app=collections&module=collections&controller=submit&_new=1" seoTemplate="collections_add"}" data-ipsDialog data-ipsDialog-title='{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}' data-ipsDialog-size='narrow'>{lang="add_item" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'collections__item' )"}</a>
                    {{endif}}

    Save.


    User Feedback

    Recommended Comments



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

    Pending = We are still working on this report.

    Fixed = The issue has been fixed and the resolution will be available in the next version.

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

×
×
  • Create New...