Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Making an Album of Galleries

  • Thanks MrTrump
  • Thanks MrTrump's Avatar Topic Author
  • Offline
  • New Member
More
5 years 6 months ago #169744 by Thanks MrTrump
Making an Album of Galleries was created by Thanks MrTrump
I was surprised how difficult it was to do this fairly common task in sigPro.

I finally answered the question as follows

Make a K2 tools duplicate.
Select module functionality to "Custom Code"

Insert the following code
<link rel="stylesheet" type="text/css" href="administrator/components/com_sigpro/css/style.css">
<style>
ul.sigProGalleriaWhite {
display:none;
}
div.sigProGalleriaWhiteContainer{
margin: 8px;
}
.sigProGrid {
    background: #fff;
}
p.sigProGalleriaWhiteTargetTitle{
display:none;
}
.sigProGalleryLinkbig{
 position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    text-decoration: none;
    /* Makes sure the link doesn't get underlined */
    z-index: 10;
}
</style>


<div class="sigProGrid sigProClearFix sigTransition sigBoxSizing sigSlidingItem">

<?php
$id = JFactory::getApplication()->input->getInt('id');
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'title','alias', 'gallery')));
$query->from($db->quoteName('#__k2_items'));
$query->where($db->quoteName('gallery').' IS NOT NULL');
$db->setQuery($query);
$result = $db->loadObjectList();
foreach($result as $row) {
$title = $row->title;
$id = $row->id;
$alias = $row->alias;
    echo '<div class="sigProGallery sigProGridColumn">
               <div class="sigProGalleryInner">
<a  class="sigProGalleryLinkbig" href="index.php/en/component/k2/item/'.$id.'-'.$alias.'">&nbsp;</a>
	        <div class="sigProImageContainer">'.$row->gallery.'</div>';
 
    echo '    <div class="sigProGalleryTextWrapper">

                  <div class="sigProGalleryTitle sigProCollapse">
                   <a class="sigProGalleryLink" href="index.php/en/component/k2/item/'.$id.'-'.$alias.'">'.$title.'</a>
                  </div>
                 </div>
                </div>
              </div>';
}
?>

</div>

(I was using the GalleriaWhite lightbox option)

Set "Parse PHP code" to Yes.

Create a new position for your K2 tools duplicate "gallposition" say.

Save your K2 tools duplicate

In the menu set K2 tools duplicate to display on all pages.

Create a new Article containing the text {loadposition gallposition}

That article should then look like the attachment.



That's one answer to the question of how to make up an album of galleries in sigPro.
As to why making albums can't be done more easily in sigPro in the first place I have no answers
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #169773 by JoomlaWorks
Replied by JoomlaWorks on topic Making an Album of Galleries
That would make an interesting extension :)

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #169774 by JoomlaWorks
Replied by JoomlaWorks on topic Making an Album of Galleries
Noted.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Thanks MrTrump
  • Thanks MrTrump's Avatar Topic Author
  • Offline
  • New Member
More
5 years 6 months ago #169789 by Thanks MrTrump
Replied by Thanks MrTrump on topic Making an Album of Galleries
Cleaned up the code a bit
<link rel="stylesheet" type="text/css" href="administrator/components/com_sigpro/css/style.css">

<style>
ul.sigProGalleriaWhite {
display:none;
}
div.sigProGalleriaWhiteContainer{
margin: 8px;
}
.sigProGrid {
background: #fff;
}
p.sigProGalleriaWhiteTargetTitle{
display:none;
}
.sigProGalleryLinkbig{
 position: absolute;
 width: 100%;
 height: 100%;
 top: 0;
 left: 0;
 text-decoration: none;
 z-index: 10;
}
</style>


<div class="sigProGrid sigProClearFix sigTransition sigBoxSizing sigSlidingItem">

<?php
JFactory::getApplication();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'title','alias', 'gallery')));
$query->from($db->quoteName('#__k2_items'));
$query->where($db->quoteName('gallery').' IS NOT NULL');
$db->setQuery($query);
$result = $db->loadObjectList();
foreach($result as $row) {
$title = $row->title;
$id = $row->id;
$alias = $row->alias;


echo '    <div class="sigProGallery sigProGridColumn">
               <div class="sigProGalleryInner">
<a  class="sigProGalleryLinkbig" href="index.php/en/component/k2/item/'.$id.'-'.$alias.'">&nbsp;</a>
	        <div class="sigProImageContainer">'.$row->gallery.'</div>   

                  <div class="sigProGalleryTextWrapper">

                  <div class="sigProGalleryTitle sigProCollapse">
                   <a class="sigProGalleryLink" href=" ">'.$title.'</a>
                  </div>

                 </div>
                </div>
              </div>';
}
?>

</div>

Please Log in or Create an account to join the conversation.

More
5 years 6 months ago #169795 by JoomlaWorks
Replied by JoomlaWorks on topic Making an Album of Galleries
Thanks for updating the post :)

I might seriously consider making a module for it with additional options to filter K2 categories and apply different styling (perhaps more minimal) to the galleries so they fit in a more confined (module) space.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum