Results 1 to 2 of 2

Thread: Main Java TWO Columns - javaimgcols add-on

  1. #1
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,360

    Default Main Java TWO Columns - javaimgcols add-on

    THIS ADD-ON WERE TESTED WITH OPEN-REALTY v.2.4.1


    This add-on displays the thumbs in TWO vertical columns with the main image in the middle.

    Decompress the file javaimgcols.zip inside your "addons" folder and it will
    create a folder named "javaimgcols" with the necessary files inside.

    Attached you have as example, a new listing detail template file:
    listing_detail_javaimgcols.html
    Install this file at your template folder and set it as your listing detail
    template at Site Config.
    Of course, you can edit it for your need.

    The tag used with this add-on is: {addon_javaimgcols_link}

    This add-on is using its own stylesheet: javaimgcols.css - so edit it according
    your needs.

    Look the source code of addon.inc.php file and find this function:
    Code:
    function javaimgcols_run_template_user_fields($tag = '') {
        switch ($tag) {
            case 'addon_javaimgcols_link':
                $max_thumbs = 3; // MAX THUMBS IN EACH COLUMN
                $show_captions = 'yes'; // yes OR no -- SHOW OR NOT THE THUMBS CAPTION
                $data = javaimgcols_display_addon_link($max_thumbs,$show_captions);
                break;
            default:
                $data = '';
                break;
            }
        return $data;
        }
    Where you read:
    $max_thumbs = 3; // MAX THUMBS IN EACH COLUMN
    $show_captions = 'yes'; // yes OR no -- SHOW OR NOT THE THUMBS CAPTION
    You can modify those values to your needs.

    If you are going to use the attached listing detail template attached, besides
    setting this template at Site Config, there is nothing more at admin area to
    configure.

    Finally, this add-on does not modify your DB so if you want to remove it, just
    delete the respective folder created at your "addons" folder.

    Have fun!
    Eduardo
    Attached Files
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

  2. #2
    Join Date
    Jul 2005
    Location
    Sao Paulo, BRAZIL
    Posts
    3,360

    Default Re: Main Java TWO Columns - javaimgcols add-on

    A user asked me how to set the add-on so each listing will have the "same" number of thumbnails in each column.
    This means different settings for each listing.

    So there is the need to edit the addon.inc.php file. Find these lines:

    PHP Code:
    if ($num_images 0) {
    $display .= '<div id="addon_javaimgcols_thumbs_left">'
    Between those lines insert one or another (it is up to you):

    PHP Code:
    $max_thumbs CEIL($num_images/2); // ROUND UP 
    or

    PHP Code:
    $max_thumbs FLOOR($num_images/2); // ROUND DOWN 
    This way, no matter what value you set for the variable "$max_thumbs" as initially indicated - now this value will be always the HALF (up or down) of the total of thumbs of each listing.


    For the people that preffer this way, download the version 3 of the add-on with those lines modified.
    You will just need to modify the way it will ROUND, commenting the proper line (I am setting by default to ROUND UP).

    Thanks,
    Eduardo.
    Attached Files
    Open-Realty® v.3.x DOCs

    Man aspires to be immortal and to this end he defends ephemeral principles.
    One day he will inexorably find that to be immortal he must defend Absolute Principles.
    On that day he will die to the flesh, ephemeral, and will live to the Spirit, Eternal. He will be Immortal.
    Author: Celso Charuri


    http://www.eduardomarques.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts