Listed-plain with big images

Everything to do with Templates and Templating for Admiror Gallery.
Post Reply
Message
Author
todomenostrabajar
Posts: 3
Joined: Fri Nov 23, 2012 6:18 pm

Listed-plain with big images

#1 Post by todomenostrabajar »

Hi, Fantastic component, It's just I was looking for.
Is there any way for editing listed plain template, to show the original images instead of thumbnails with or without popups?.

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Listed-plain with big images

#2 Post by Vasiljevski »

Well the simplest answer is Yes :)

You need to edit plugins\content\admirorgallery\admirorgallery\templates\listed\index.php and change this part:

Code: Select all

    <tr><td class="ag_thumbTd">
    <span class="ag_thumb'.$AG->params['template'].'">';
    $html.= $AG->writePopupThumb($imageName);
    $html .='</span></td>
To something like:

Code: Select all

    <tr><td class="ag_thumbTd">
    <span class="ag_thumb'.$AG->params['template'].'">';
    $html.= '<img src="'.$AG->sitePath.$AG->params['rootFolder'].$AG->imagesFolderName.'/'.$imageName.'" alt="" />';
    $html .='</span></td>
I didn't try this out, so it might be that it won't work "out of the box" but basically this is the idea :)
Help Admiror Gallery become even better,
give us a review on JED

todomenostrabajar
Posts: 3
Joined: Fri Nov 23, 2012 6:18 pm

Re: Listed-plain with big images

#3 Post by todomenostrabajar »

Thank you very much, it works.
Now I'm trying to create a template that exchanges between classic view and this one when you click a button.
So far I've created this (not much):

Code: Select all

<?php



// Joomla security code

defined('_JEXEC') or die('Restricted access');



// Load CSS from current template folder

$AG->loadCSS($AG->currTemplateRoot.'template.css');

$AG->loadCSS($AG->currTemplateRoot.'albums/albums.css');

$AG->loadCSS($AG->currTemplateRoot.'pagination/pagination.css');







// Reset $html variable from previous entery and load it with scripts needed for Popups

$html=$AG->initPopup();



// Form HTML code, with unique ID and Class Name

$html.='<!-- ======================= Admiror Gallery -->

<style type="text/css">

     .AG_classic .ag_imageThumb{border-color:#'.$AG->params['foregroundColor'].'}

     .AG_classic .ag_imageThumb:hover{background-color:#'.$AG->params['highliteColor'].'}

</style>

<div class="ag_button_wrap">
	<a class="ag_button_list" href="#" onclick=""></a>
	<a class="ag_button_gallery" href="#" onclick=""></a>
</div>

<div id="AG_'.$AG->getGalleryID().'" class="AG_'.$AG->params['template'].'">

  <table cellspacing="0" cellpadding="0" border="0">

    <tbody>

      <tr>

	<td>';



	// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper

	foreach ($AG->images as $imageKey => $imageName){

		$html.= '<span class="ag_thumb'.$AG->params['template'].'">';

		$html.= $AG->writePopupThumb($imageName);

		$html.='</span>';

	}



	$html .='

	</td>

      </tr>

    </tbody>

  </table>

</div>

';

$html .= '

    <table border="0" cellspacing="0" cellpadding="0" width="100%" class="ag_item">

    <tbody>

  	<tr><td class="ag_thumbTd">
    <span class="ag_thumb'.$AG->params['template'].'">';
    $html.= '<img src="'.$AG->sitePath.$AG->params['rootFolder'].$AG->imagesFolderName.'/'.$imageName.'" alt="" width="705px" />';
    $html .='</span></td>

    </tr></tbody></table>';


// Support for Pagination

$html.= $AG->writePagination();



// Support for Albums

if(!empty($AG->folders) && $AG->params['albumUse']){

     $html.= '<h1>'.JText::_( 'Albums' ).'</h1>'."\n";

     $html.= $AG->writeFolderThumb("albums/album.png", $AG->params['thumbHeight']);

}



// Loads scripts needed for Popups, after gallery is created

$html.=$AG->endPopup();
Any Idea?

Post Reply