logo
Tento obchod už skončil.
Na aktuální inzeráty se podívejte do sekce: Poptávky vývoje a programování

Joomla galerie: Jak nechat vypsat menu galerie.

hourglass
Skončil
01.03.2018 v 19:36
biders
0% odezva
Žádný zájemce
Prodejce
A
Dobrý den všem,

Na stránkách s galerií mám dropdown tlačítko prohlédnout další. A potřebuji, aby vypisoval menu galerie, které je tady: http://kadernictvi1.tode.cz/galerie Ty nadpisy v cyklu. Tlačítko je tady třeba http://kadernictvi1.tode.cz/galerie/...i-makeup-rty-2

Tady je úsek kodu k tomu tlačítku:

Kód:
<div class="btn-group">
  <button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Prohlédnout další <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
  
 <?php
if(count($this->items)) {
  ?> 
 
   <?php foreach ($this->items as $key => $this->item) { ?>
    <?php $Itemid = ($input->get(\'Itemid\', 0, \'INT\'))? \'&Itemid=\' . $input->get(\'Itemid\', 0, \'INT\') : \'\';
    $link = \'index.php?option=com_speasyimagegallery&view=album&id=\' . $this->item->id . \':\' . $this->item->alias . $Itemid;  ?>  
   
   <li><a href="<?php echo JRoute::_($link); ?>"><?php echo $this->item->title; ?></a></li>


<?php } ?>
<?php }else {
  echo \'<div class="alert">\' . JText::_(\'COM_SPEASYIMAGEGALLERY_NO_ALBUMS\') . \'</div>\';
}
 ?>
  </ul>
  
 
  

</div> 

</div>
A tady je celý kod k tlačítku ke složce album:

Kód:
<?php
/**
* @package com_speasyimagegallery
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2017 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

// No direct access to this file
defined(\'_JEXEC\') or die(\'Restricted access\');

JHtml::_(\'jquery.framework\');
$doc = JFactory::getDocument();
$doc->addStylesheet( JURI::base(true) . \'/components/com_speasyimagegallery/assets/css/style-min.css\' );
$doc->addScript( JURI::base(true) . \'/components/com_speasyimagegallery/assets/js/script-min.js\' );
$layout = $this->params->get(\'layout\', \'default\');
$show_title = $this->params->get(\'show_title\', 1);
$show_desc = $this->params->get(\'show_desc\', 1);
$show_count = $this->params->get(\'show_count\', 1);
$gutter = $this->params->get(\'gutter\', 20)/2;
$gutter_sm = $this->params->get(\'gutter_sm\', 15)/2;
$gutter_xs = $this->params->get(\'gutter_xs\', 10)/2;
$input = JFactory::getApplication()->input;

// Javascript
$js = <<<JS
(function ($) {
	$(document).on(\'click\', \'.speasyimagegallery-gallery-item\', function(event) {
		event.preventDefault();
    $(this).speasyimagegallery({
      showTitle: {$show_title},
      showDescription: {$show_desc},
      showCounter: {$show_count}
    });
	});
})(jQuery)
JS;
$doc->addScriptDeclaration($js);

// Stylesheet
if($gutter || $gutter_sm || $gutter_xs) {
  $css = \'\';
  if($gutter) {
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter . \'px;}\';
    $css .= \'.speasyimagegallery-row > div > .speasyimagegallery-gallery-item {padding: \' . $gutter . \'px;}\';
  }

  if($gutter_sm) {
    $css .= \'@media only screen and (max-width : 992px) {\';
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter_sm . \'px;}\';
    $css .= \'.speasyimagegallery-row > div > .speasyimagegallery-gallery-item {padding: \' . $gutter_sm . \'px;}\';
    $css .= \'}\';
  }

  if($gutter_xs) {
    $css .= \'@media only screen and (max-width : 768px) {\';
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter_xs . \'px;}\';
    $css .= \'.speasyimagegallery-row > div > .speasyimagegallery-gallery-item {padding: \' . $gutter_xs . \'px;}\';
    $css .= \'}\';
  }

  $doc->addStyleDeclaration($css);
}
?>

<?php if ($this->params->get(\'show_page_heading\', 1)) : ?>
  <div class="page-header">
    <h1><?php echo $this->escape($this->params->get(\'page_heading\')); ?></h1>
  
 <div class="menu1">
<ul class="navlist">
  <li>           
 <?php
  echo \'<a href="/galerie/permanentni-makeup-oboci-3"\';
  if (strpos($_SERVER[\'REQUEST_URI\'], \'/galerie/permanentni-makeup-oboci-3\') !== FALSE) echo \' id="current"\';
   echo \'>PMU obočí</a>\';
   ?>
   </li>

  
  <li>           
 <?php
  echo \'<a href="/galerie/permanentni-makeup-rty-2"\';
  if (strpos($_SERVER[\'REQUEST_URI\'], \'/galerie/permanentni-makeup-rty-2\') !== FALSE) echo \' id="current"\';
   echo \'>PMU rty</a>\';
   ?>
   </li>
   
  <li>           
 <?php
  echo \'<a href="/galerie/permanentni-makeup-linky"\';
  if (strpos($_SERVER[\'REQUEST_URI\'], \'/galerie/permanentni-makeup-linky\') !== FALSE) echo \' id="current"\';
   echo \'>PMU linky</a>\';
   ?>
   </li>  


  
  <li>           
 <?php
  echo \'<a href="/galerie/prodluzovani-ras"\';
  if (strpos($_SERVER[\'REQUEST_URI\'], \'/galerie/prodluzovani-ras\') !== FALSE) echo \' id="current"\';
   echo \'>Prodlužování řas</a>\';
   ?>
   </li>                        

    
  <li>           
 <?php
  echo \'<a href="/galerie/objemove-rasy"\';
  if (strpos($_SERVER[\'REQUEST_URI\'], \'/galerie/objemove-rasy\') !== FALSE) echo \' id="current"\';
   echo \'>Objemové řasy</a>\';
   ?>
   </li>
 

</ul>



</div>

<div class="btn-group">
  <button class="btn btn-default btn-lg dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Prohlédnout další <span class="caret"></span>
  </button>
  <ul class="dropdown-menu">
  
 <?php
if(count($this->items)) {
  ?> 
 
   <?php foreach ($this->items as $key => $this->item) { ?>
    <?php $Itemid = ($input->get(\'Itemid\', 0, \'INT\'))? \'&Itemid=\' . $input->get(\'Itemid\', 0, \'INT\') : \'\';
    $link = \'index.php?option=com_speasyimagegallery&view=album&id=\' . $this->item->id . \':\' . $this->item->alias . $Itemid;  ?>  
   
   <li><a href="<?php echo JRoute::_($link); ?>"><?php echo $this->item->title; ?></a></li>


<?php } ?>
<?php }else {
  echo \'<div class="alert">\' . JText::_(\'COM_SPEASYIMAGEGALLERY_NO_ALBUMS\') . \'</div>\';
}
 ?>
  </ul>
  
 
  

</div> 

</div>
 
 
  
<?php endif; ?>
<?php if($this->item->description): ?>
  <div class="speasyimagegallery-album-description"><?php echo $this->item->description; ?></div>
<?php endif; ?>

<?php
if(count($this->item->images)) {
  ?>
  <div class="speasyimagegallery-gallery clearfix">
    <?php echo JLayoutHelper::render(\'gallery.\'. $layout .\'.row\', array(\'images\'=>$this->item->images, \'params\'=>$this->params)); ?>
  </div>
  <?php
} else {
  echo \'<div class="alert">\' . JText::_(\'COM_SPEASYIMAGEGALLERY_NO_IMAGES\') . \'</div>\';
}



A tady je kod k album galerie z toho jsem vycházel, složka albums, vypisuje toto: http://kadernictvi1.tode.cz/galerie:

Kód:
<?php
/**
* @package com_speasyimagegallery
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2017 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/

// No direct access to this file
defined(\'_JEXEC\') or die(\'Restricted access\');

$doc = JFactory::getDocument();
$doc->addStylesheet( JURI::base(true) . \'/components/com_speasyimagegallery/assets/css/style-min.css\' );
$input = JFactory::getApplication()->input;

$col = \'speasyimagegallery-col-md-\' . $this->params->get(\'albums_column\', 4);
$col .= \' speasyimagegallery-col-sm-\' . $this->params->get(\'albums_column_sm\', 3);
$col .= \' speasyimagegallery-col-xs-\' . $this->params->get(\'albums_column_xs\', 2);
$gutter = $this->params->get(\'albums_gutter\', 20)/2;
$gutter_sm = $this->params->get(\'albums_gutter_sm\', 15)/2;
$gutter_xs = $this->params->get(\'albums_gutter_xs\', 10)/2;

// Stylesheet
if($gutter || $gutter_sm || $gutter_xs) {
  $css = \'\';
  if($gutter) {
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter . \'px;}\';
    $css .= \'.speasyimagegallery-row .speasyimagegallery-album {padding: \' . $gutter . \'px;}\';
  }

  if($gutter_sm) {
    $css .= \'@media only screen and (max-width : 992px) {\';
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter_sm . \'px;}\';
    $css .= \'.speasyimagegallery-row .speasyimagegallery-album {padding: \' . $gutter_sm . \'px;}\';
    $css .= \'}\';
  }

  if($gutter_xs) {
    $css .= \'@media only screen and (max-width : 768px) {\';
    $css .= \'.speasyimagegallery-row {margin: -\' . $gutter_xs . \'px;}\';
    $css .= \'.speasyimagegallery-row .speasyimagegallery-album {padding: \' . $gutter_xs . \'px;}\';
    $css .= \'}\';
  }

  $doc->addStyleDeclaration($css);
}
?>

<?php if ($this->params->get(\'show_page_heading\', 1)) : ?>
  <div class="page-header">
    <h1><?php echo $this->escape($this->params->get(\'page_heading\')); ?></h1>
  </div>
<?php endif; ?>

<?php
if(count($this->items)) {
  ?>
  <div class="speasyimagegallery-albums">
    <div class="speasyimagegallery-row clearfix">
      <?php foreach ($this->items as $key => $this->item) { ?>
        <?php
        $cover = \'thumb.\' . JFile::getExt(basename($this->item->image));
        $Itemid = ($input->get(\'Itemid\', 0, \'INT\'))? \'&Itemid=\' . $input->get(\'Itemid\', 0, \'INT\') : \'\';
        $link = \'index.php?option=com_speasyimagegallery&view=album&id=\' . $this->item->id . \':\' . $this->item->alias . $Itemid;
        ?>
        <div class="<?php echo $col; ?>">
          <div class="speasyimagegallery-album">
            <div>
              <a href="<?php echo JRoute::_($link); ?>">
                <img src="images/speasyimagegallery/albums/<?php echo $this->item->id; ?>/<?php echo $cover; ?>" alt="<?php echo $this->item->title; ?>">
                <div class="speasyimagegallery-album-info">
                  <span class="speasyimagegallery-album-title"><?php echo $this->item->title; ?></span>
                  <div class="speasyimagegallery-album-meta clearfix">
                    <span class="speasyimagegallery-album-meta-count"><?php echo $this->item->count; ?> <?php echo ($this->item->count > 1) ? JText::_(\'COM_SPEASYIMAGEGALLERY_PHOTOS\') : JText::_(\'COM_SPEASYIMAGEGALLERY_PHOTO\'); ?></span>
                  </div>
                </div>
              </a>
            </div>
          </div>
        </div>
      <?php } ?>
    </div>
  </div>
  <?php
} else {
  echo \'<div class="alert">\' . JText::_(\'COM_SPEASYIMAGEGALLERY_NO_ALBUMS\') . \'</div>\';
}
Přikládám componentu: com_speasyimagegallery.zip

S pozdravem
PG