RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : December 03, 2008, 04:31:12 pm
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  Superclean questions
Advanced search
  « previous next »
Pages 1
Author
Topic: Superclean questions  (Read 3784 times)
« on: February 24, 2008, 12:19:46 am »
Roger Barnes Offline
Newbie
*
Posts: 8



Does the superclean template not show any categories at all?  All I get is thumbnails of one category (no category info at all).  I don't even get to choose which category it displays either.  Something isn't right with the template, that's for sure.

What I am looking for is the category information like "Semantic" but once you get to the thumbnails, I would like to go right to the lightbox popup.  I don't want the intermediate picture.

Can someone please help me figure it out?
Logged
 
Reply #1
« on: February 27, 2008, 04:11:27 am »
JC Offline
Newbie
*
Posts: 10



Does the superclean template not show any categories at all?  All I get is thumbnails of one category (no category info at all).  I don't even get to choose which category it displays either.  Something isn't right with the template, that's for sure.


I would also like to know if it's possible to display categories in Gallery home when using superclean. Anyone anyone  Huh

jc
Logged
 
Reply #2
« on: July 22, 2008, 01:05:16 pm »
jungica Offline
Newbie
*
Posts: 5



ok, here we go.

first, change the line 20 in /components/com_rsgallery2/templates/semantic/html/semantic/html/thumbs_table.php to this:

Code:
<a href="<?php echo imgUtils::getImgOriginal$item->name ); ?>" rel="lightbox" title="<?php echo $item->title;?>">

second, put this lines into /components/com_rsgallery2/templates/semantic/index.html after

Code:
$template_dir = JURI_SITE . "/components/com_rsgallery2/templates/" . $rsgConfig->get('template');

insert:

Code:
$lightbox_dir = JURI_SITE . "/components/com_rsgallery2/lib/lightbox_plus";

and

after
Code:
$doc->addStyleSheet($template_dir."/css/template.css","text/css");

insert

Code:
$doc->addStyleSheet($lightbox_dir."/lightbox.css","text/css");
$doc->addScript( $lightbox_dir."/spica.js" );
$doc->addScript( $lightbox_dir."/lightbox_plus.js" );

done.




Logged
 
Reply #3
« on: July 27, 2008, 06:54:28 pm »
altoidboy Offline
Newbie
*
Posts: 10



thanks jungica! so it sounds like you're showing us how to mod semantic to incorporate lightbox, rather than modding superclean to display galleries. is that right?

i tried your steps, but the very first one doesn't work. for a start, line 20 is:

Code:
<div class="img-shadow">

and i'm sure you didn't intend for us to replace that.

the next line (line 21) is:

Code:
<a href="<?php echo JRoute::_"index.php?option=com_rsgallery2&page=inline&id=".$item->id ."&Itemid=$Itemid" ); ?>">

but if i replace this with your replacement code:

Code:
<a href="<?php echo imgUtils::getImgOriginal$item->name ); ?>" rel="lightbox" title="<?php echo $item->title;?>">

it breaks the whole thing and i get an error:

Code:
Parse error: syntax error, unexpected T_VARIABLE in /home/myusername/public_html/components/com_rsgallery2/templates/semantic/html/thumbs_table.php on line 21

help!
« Last Edit: July 27, 2008, 10:21:20 pm by altoidboy » Logged
 
Reply #4
« on: November 12, 2008, 09:37:16 am »
jungica Offline
Newbie
*
Posts: 5



here is my /components/com_rsgallery2/templates/semantic/html/semantic/html/thumbs_table.php:

Code:
   1.
      <?php defined('_JEXEC') or die('Restricted access'); ?>
   2.
       
   3.
      <?php
   4.
      $cols 
$rsgConfig->get'display_thumbs_colsPerPage' );
   
5.
      $i 
0;
   
6.
      ?>

   7.
       
   8.
      <table id="rsg2-thumbsList" border="0">
   9.
      <?php foreach( $this->gallery->currentItems() as $item ):
  
10.
      
if( $item->type != 'image' )
  
11.
      
continue; // we only handle images
  
12.
       
  13.
      $thumb 
$item->thumb();
  
14.
       
  15.
      
if( $i $cols== 0) echo "<tr>\n";
  
16.
      ?>

  17.
      <td>
  18.
      <div class="shadow-box">
  19.
      <div class="img-shadow">
  20.
      <a href="<?php echo imgUtils::getImgOriginal$item->name ); ?>" rel="lightbox" title="<?php echo $item->title;?>">
  21.
      <img src="<?php echo $thumb->url();?>" alt="<?php echo htmlspecialchars(stripslashes($item->descr), ENT_QUOTES); ?>"/>
  22.
      </a>
  23.
      </div>
  24.
      </div>
  25.
      <div class="rsg2-clr"></div>
  26.
      <?php if($rsgConfig->get("display_thumbs_showImgName")): ?>
  27.
      <br />
  28.
      <span class="rsg2_thumb_name">
  29.
      <?php echo htmlspecialchars(stripslashes($item->title), ENT_QUOTES); ?>
  30.
      </span>
  31.
      <?php endif; ?>
  32.
      <?php if( $this->allowEdit ): ?>
  33.
      <div id="rsg2-adminButtons">
  34.
      <a href="<?php echo JRoute::_("index.php?option=com_rsgallery2&page=edit_image&id=".$item->id); ?>"><img src="<?php echo JURI::base(); ?>/administrator/images/edit_f2.png" alt="" height="15" /></a>
  35.
      <a href="#" onClick="if(window.confirm('<?php echo JText::_('Are you sure you want to delete this image?');?>')) location='<?php echo JRoute::_("index.php?option=com_rsgallery2&page=delete_image&id=".$item->id); ?>'"><img src="<?php echo JURI::base(); ?>/administrator/images/delete_f2.png" alt="" height="15" /></a>
  36.
      </div>
  37.
      <?php endif; ?>
  38.
      </td>
  39.
      <?php if( ++$i $cols == 0) echo "</tr>\n"?>
  40.
      <?php endforeach; ?>
  41.
      <?php if( $i $cols != 0) echo "</tr>\n"?>
  42.
      </table>

and my /components/com_rsgallery2/templates/semantic/index.htm:

Code:
   1.
      <?php
   2.
      
/**
   3.
      * This file contains the main template file for RSGallery2.
   4.
      * @package RSGallery2
   5.
      * @copyright (C) 2003 - 2006 RSGallery2
   6.
      * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
   7.
      * RSGallery is Free Software
   8.
      */
   
9.
       
  10.
      
/**
  11.
       
  12.
      ATTENTION!
  13.
       
  14.
      This is built to imitate the Joomla 1.5.* style of templating. Hopefully that is enlightening.
  15.
       
  16.
      **/
  
17.
       
  18.
      defined
'_JEXEC' ) or die( 'Restricted Access' );
  
19.
       
  20.
      
// bring in display code
  
21.
      $templatePath 
JPATH_RSGALLERY2_SITE DS 'templates' DS 'semantic';
  
22.
      
require_once( $templatePath DS 'display.class.php');
  
23.
       
  24.
      $rsgDisplay 
= new rsgDisplay_semantic();
  
25.
       
  26.
      
global $mainframe;
  
27.
      $template_dir 
JURI_SITE "/components/com_rsgallery2/templates/" $rsgConfig->get('template');
  
28.
      $lightbox_dir 
JURI_SITE "components/com_rsgallery2/lib/lightbox_plus";
  
29.
       
  30.
      $rsgDisplay
->metadata();
  
31.
      
// append to Joomla's pathway
  
32.
      $rsgDisplay
->showRSPathWay();
  
33.
       
  34.
      
//Load Tooltips
  
35.
      JHTML
::_('behavior.tooltip');
  
36.
       
  37.
      
//include page navigation
  
38.
      
require_once(JPATH_ROOT.'/includes/pageNavigation.php');
  
39.
       
  40.
      $doc 
=& JFactory::getDocument();
  
41.
      $doc
->addStyleSheet($template_dir."/css/template.css","text/css");
  
42.
      $doc
->addStyleSheet($lightbox_dir."/lightbox.css","text/css");
  
43.
      $doc
->addScript$lightbox_dir."/lightbox_plus.js" );
  
44.
      $doc
->addScript$lightbox_dir."/spica.js" );
  
45.
      ?>

  46.
       
  47.
      <div class="rsg2">
  48.
      <?php $rsgDisplay->mainPage(); ?>
  49.
      </div>

and my demo gallery with these modifications: http://gate.netbunnies.hu/ma/index.php?option=com_rsgallery2&Itemid=41
Logged
 
Print  Pages 1
« previous next »
Jump to: