Edit listing webdirectory in the panel control.

Discussion in 'Subrion CMS Packages Discussions' started by olairmarcos, Apr 11, 2014.

  1. olairmarcos

    olairmarcos Member

    The guest user fills the listing webdirectory the front page.
    When you edit the listing in the control panel webdirectory two empty fields appear Owner. When filling out the owner and save, the error message appears.

    Thanks for help.

    2014-04-11_190610.jpg
  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hello!

    Thank you for the report. We will include the fix into the next version of the package.

    Here is a quick fix:

    In [subrion_folder]/packages/directory/admin/listings.php
    find this code:
    PHP:
    $listing = array(
        'category_id' => $rootCategory['id'],
        'crossed' => false,
        'featured' => false,
        'sponsored' => false,
        'status' => iaCore::STATUS_ACTIVE
    );
    Replace it with:

    PHP:
    $listing = array(
        'category_id' => $rootCategory['id'],
        'member_id' => 0,
        'crossed' => false,
        'featured' => false,
        'sponsored' => false,
        'status' => iaCore::STATUS_ACTIVE
    );
    Save the changes.

    In [subrion_folder]/packages/directory/templates/admin/listings.tpl
    remove this code:

    HTML:
    <div id="owner" class="row">
        <label for="" class="col col-lg-2 control-label">{lang key='owner'}:</label>
        <div class="col col-lg-4">
            <input type="text" name="member" autocomplete="off" id="js-member-autocomplete" value="{if isset($item.member)}{$item.member}{/if}" size="45">
        </div>
    </div>
    Save the changes.
    olairmarcos likes this.

Share This Page