Page 1 of 1

Great component - 3 questions

Posted: Mon Jan 21, 2013 10:55 pm
by cspgsl
I will acknowledge in the JED but I wish to remove the backlink to your website from the gallery pages. How is this done? Is there a paid version of your component?

How does one substitute an image description for the file name that appears at the bottom left of the popup window?

How does one get the Page Heading to appear on the page of a gallery from a menu item?

Thanks

Re: Great component - 3 questions

Posted: Thu Jan 24, 2013 2:15 am
by Vasiljevski
No, there is no paid version of Admiror Gallery.
To just hide the the signature you can use the option in the parameters.
You can completely remove the code that adds the signature by removing this part from admirorgallery.php :

Code: Select all

            /* ========================= SIGNATURE ====================== */
            if ($AG->params['showSignature']) {
                $row->text .= '<div style="display:block; font-size:10px;">';
            } else {
                $row->text .= '<div style="display:block; font-size:10px; overflow:hidden; height:1px; padding-top:1px;">';
            }
            $row->text .= '<br /><a href="http://www.admiror-design-studio.com/en/joomla-extensions" target="_blank">AdmirorGallery ' . AG_VERSION . '</a>, ' . JText::_("author/s") . ' <a href="http://www.vasiljevski.com/" target="_blank">Vasiljevski</a> & <a href="http://www.admiror-design-studio.com" target="_blank">Kekeljevic</a>.<br /></div>';
You can use Admiror Gallery Image Manager to add captions for images. Click on the image from Image Manager and you will get a single view of the image with a textbox for every language installed on your site and a default so in case there is no translation for current language default will be used. You can also use HTML, but you should set "Plain Text Captions" to No, because when set to Yes it stripes all HTML tags from the caption text. As for the popup engines, only fancybox has problems with long or braked text, area for captions is not resized correctly, but I guess that it could be fixed by some CSS work.

Currently it look's like we are totally disregarding the Show Page Heading parameter, so without coding this is not possible at the moment. Thanks for drawing my attention to this issue. It would certainly make Admiror Gallery better if we add a option to display Page Heading or even some intro text for Gallery Layout menu items.

But if you don't want to wait, you can add something like:

Code: Select all

$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
To [joomlaRoot]\components\com_admirorgallery\views\layout\tmpl\default.php

Re: Great component - 3 questions

Posted: Thu Jan 24, 2013 10:49 am
by cspgsl
Thank you for the tips.

Yes, a page heading and pre-text field would be ideal for the component.

I will leave a comment on the JED

Thanks again
Vasiljevski wrote:No, there is no paid version of Admiror Gallery.
To just hide the the signature you can use the option in the parameters.
You can completely remove the code that adds the signature by removing this part from admirorgallery.php :

Code: Select all

            /* ========================= SIGNATURE ====================== */
            if ($AG->params['showSignature']) {
                $row->text .= '<div style="display:block; font-size:10px;">';
            } else {
                $row->text .= '<div style="display:block; font-size:10px; overflow:hidden; height:1px; padding-top:1px;">';
            }
            $row->text .= '<br /><a href="http://www.admiror-design-studio.com/en/joomla-extensions" target="_blank">AdmirorGallery ' . AG_VERSION . '</a>, ' . JText::_("author/s") . ' <a href="http://www.vasiljevski.com/" target="_blank">Vasiljevski</a> & <a href="http://www.admiror-design-studio.com" target="_blank">Kekeljevic</a>.<br /></div>';
You can use Admiror Gallery Image Manager to add captions for images. Click on the image from Image Manager and you will get a single view of the image with a textbox for every language installed on your site and a default so in case there is no translation for current language default will be used. You can also use HTML, but you should set "Plain Text Captions" to No, because when set to Yes it stripes all HTML tags from the caption text. As for the popup engines, only fancybox has problems with long or braked text, area for captions is not resized correctly, but I guess that it could be fixed by some CSS work.

Currently it look's like we are totally disregarding the Show Page Heading parameter, so without coding this is not possible at the moment. Thanks for drawing my attention to this issue. It would certainly make Admiror Gallery better if we add a option to display Page Heading or even some intro text for Gallery Layout menu items.

But if you don't want to wait, you can add something like:

Code: Select all

$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
To [joomlaRoot]\components\com_admirorgallery\views\layout\tmpl\default.php

Re: Great component - 3 questions

Posted: Thu Jan 24, 2013 9:21 pm
by cspgsl
I attempted to insert the code that you suggested for the page heading without success. I may have placed it in the wrong place within the file you indicated. Not being a code person, I don't know. I have added the file content below so you can see what I did.

Thanks
Vasiljevski wrote: Currently it look's like we are totally disregarding the Show Page Heading parameter, so without coding this is not possible at the moment. Thanks for drawing my attention to this issue. It would certainly make Admiror Gallery better if we add a option to display Page Heading or even some intro text for Gallery Layout menu items.

But if you don't want to wait, you can add something like:

Code: Select all

$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
To [joomlaRoot]\components\com_admirorgallery\views\layout\tmpl\default.php

Code: Select all

<?php
 /*------------------------------------------------------------------------
# com_admirorgallery - Admiror Gallery Component
# ------------------------------------------------------------------------
# author   Igor Kekeljevic & Nikola Vasiljevski
# copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.admiror-design-studio.com/joomla-extensions
# Technical Support:  Forum - http://www.vasiljevski.com/forum/index.php
# Version: 4.5.0
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');

$ag_inlineParams='';
$ag_inlineParams.=' template="'.$this->template.'"';
$ag_inlineParams.=' thumbWidth="'.$this->thumbWidth.'"';
$ag_inlineParams.=' thumbHeight="'.$this->thumbHeight.'"';
$ag_inlineParams.=' thumbAutoSize="'.$this->thumbAutoSize.'"';
$ag_inlineParams.=' arrange="'.$this->arrange.'"';
$ag_inlineParams.=' newImageTag="'.$this->newImageTag.'"';
$ag_inlineParams.=' newImageDays="'.$this->newImageDays.'"';
$ag_inlineParams.=' frameWidth="'.$this->frameWidth.'"';
$ag_inlineParams.=' frameHeight="'.$this->frameHeight.'"';
$ag_inlineParams.=' showSignature="'.$this->showSignature.'"';
$ag_inlineParams.=' plainTextCaptions="'.$this->plainTextCaptions.'"';
$ag_inlineParams.=' popupEngine="'.$this->popupEngine.'"';
$ag_inlineParams.=' backgroundColor="'.$this->backgroundColor.'"';
$ag_inlineParams.=' foregroundColor="'.$this->foregroundColor.'"';
$ag_inlineParams.=' highliteColor="'.$this->highliteColor.'"';

// Albums Support
$ag_inlineParams.=' albumUse="'.$this->albumUse.'"';
// Paginations Support
$ag_inlineParams.=' paginUse="'.$this->paginUse.'"';
$ag_inlineParams.=' paginImagesPerGallery="'.$this->paginImagesPerGallery.'"';

JPluginHelper::importPlugin( 'content' );

// add heading to gallery page
$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
$article = new JObject();
$article->text = '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
$article->id = 0;
$limitstart = 0;
$dispatcher = JDispatcher::getInstance();
$results = $dispatcher->trigger('onContentPrepare', array ( &$context, &$article, & $params, $limitstart));
echo $article->text;

?>

Re: Great component - 3 questions

Posted: Wed Jan 30, 2013 12:50 pm
by Vasiljevski
This is the problematic part of your code :

Code: Select all

$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
$article = new JObject();
$article->text = '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
First, you tried to use $article before creating it, this would produce a warning in PHP.
Second, $article->text= {string} adds {string} to text. If you want to add something to the existing {string} you should use $article->text.={string to add}. In your code, title would be replaced by $article->text = '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';

After fixing issues from above, the code should look like :

Code: Select all

<?php
 /*------------------------------------------------------------------------
# com_admirorgallery - Admiror Gallery Component
# ------------------------------------------------------------------------
# author   Igor Kekeljevic & Nikola Vasiljevski
# copyright Copyright (C) 2011 admiror-design-studio.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.admiror-design-studio.com/joomla-extensions
# Technical Support:  Forum - http://www.vasiljevski.com/forum/index.php
# Version: 4.5.0
-------------------------------------------------------------------------*/
// No direct access
defined('_JEXEC') or die('Restricted access');

$ag_inlineParams='';
$ag_inlineParams.=' template="'.$this->template.'"';
$ag_inlineParams.=' thumbWidth="'.$this->thumbWidth.'"';
$ag_inlineParams.=' thumbHeight="'.$this->thumbHeight.'"';
$ag_inlineParams.=' thumbAutoSize="'.$this->thumbAutoSize.'"';
$ag_inlineParams.=' arrange="'.$this->arrange.'"';
$ag_inlineParams.=' newImageTag="'.$this->newImageTag.'"';
$ag_inlineParams.=' newImageDays="'.$this->newImageDays.'"';
$ag_inlineParams.=' frameWidth="'.$this->frameWidth.'"';
$ag_inlineParams.=' frameHeight="'.$this->frameHeight.'"';
$ag_inlineParams.=' showSignature="'.$this->showSignature.'"';
$ag_inlineParams.=' plainTextCaptions="'.$this->plainTextCaptions.'"';
$ag_inlineParams.=' popupEngine="'.$this->popupEngine.'"';
$ag_inlineParams.=' backgroundColor="'.$this->backgroundColor.'"';
$ag_inlineParams.=' foregroundColor="'.$this->foregroundColor.'"';
$ag_inlineParams.=' highliteColor="'.$this->highliteColor.'"';

// Albums Support
$ag_inlineParams.=' albumUse="'.$this->albumUse.'"';
// Paginations Support
$ag_inlineParams.=' paginUse="'.$this->paginUse.'"';
$ag_inlineParams.=' paginImagesPerGallery="'.$this->paginImagesPerGallery.'"';

JPluginHelper::importPlugin( 'content' );

$article = new JObject();
// add heading to gallery page
$article->text = '<h1>'.JSite::getMenu()->getActive()->title.'</h1>';
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
//adding gallery
$article->text .= '{AG '.$ag_inlineParams.' }'.$this->galleryName.'{/AG}';
$article->id = 0;
$limitstart = 0;
$dispatcher = JDispatcher::getInstance();
$results = $dispatcher->trigger('onContentPrepare', array ( &$context, &$article, & $params, $limitstart));
echo $article->text;

?>