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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : November 22, 2008, 08:59:46 am
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  Bits and pieces
Advanced search
  « previous next »
Pages 1
Author
Topic: Bits and pieces  (Read 3254 times)
« on: August 03, 2006, 09:33:17 pm »
Sjoakie Offline
Newbie
*
Posts: 1

View Profile Email

I read you were still working on the frontend.
Hopefully that means getting rid of all the table, font, heading and strong tags Smiley

I messed around a bit the frontend myself to make it suit my needs.
Here are a few things I altered:

More use of the Joomla!-template\'s CSS (uniform look and feel; the goals of CSS)
[code:1]
<div class=\'componentheading\'><?php echo _RSGALLERY_COMPONENT_TITLE ?></div>
[/code:1]

Basicly I made use of the Joomla!-template\'s CSS so it looks uniform. There are more examples of CSS that could be done with the Joomla!-template.
Perhaps use that as default instead of a seperate one.
If you really want to go overboard with CSS and the layout, perhaps offer a *real* (html) template so you can adjust the id\'s and classes to your likings.
Now I have to edit the component itself to change the looks, causing trouble with future updates.

Remove empty objects from the output
[code:1]
if( newImages($row->id) == \"NEW\" ) {
   echo newImages($row->id) . \"<br/>\";
}

if( $row->description != \"\" ) {
   echo htmlspecialchars(stripslashes($row->description), ENT_QUOTES) . \"<br/>\";
}
[/code:1]
In the gallery list you have various objects that can appear empty. Now they are parsed and displayed.
This simple check removes them from the output.

Away with <li>, hello <div>
[code:1]
<div id=\"GalleryList\">
<div class=\"spacer\">
  &nbsp;
</div>
   <?php
     foreach($rows as $row) {          
        $c_id = $row->id;
        $database->setQuery(\"SELECT * FROM #__rsgallery2_galleries WHERE published = 1 and parent = \'$c_id\' ORDER BY ordering ASC\"«»);
        $rows2 = $database->loadObjectList();
   ?>
   <div class=\"GalleryListItem\">
           <a class=\"rsg2-galleryList-thumb\" href=\"<?php global $Itemid; echo sefRelToAbs(\"index.php?option=com_rsgallery2&amp;Itemid=$Itemid&amp;catid=\".$row->id); ?>\"><?php echo getThumb($row->id,0,0,\"\"«»); ?></a><br/>
           <a class=\"rsg2-galleryList-title\" href=\"<?php echo sefRelToAbs(\"index.php?option=com_rsgallery2&amp;Itemid=$Itemid&amp;catid=\".$row->id); ?>\"><?php echo htmlspecialchars(stripslashes($row->name), ENT_QUOTES); ?></a><br/>
               
           <?php
              echo \"<div class=\\\"galleryListNumber\\\">\" . getNumber($row->id). _RSGALLERY_IMAGES . \"</div>\";
                       
              if( newImages($row->id) == \"NEW\" ) {
                 echo \"<div class=\\\"galleryListNew\\\">\" . newImages($row->id) . \"</div>\";
              }
           
              if( $row->description != \"\" ) {
                 echo \"<div class=\\\"galleryListDescription\\\">\" . htmlspecialchars(stripslashes($row->description), ENT_QUOTES) . \"</div>\";
              }
                     
              HTML_RSGALLERY::«»subGalleryList( $row->id );
           ?>
   </div>                      
   <?php
     }    
   ?>
<div class=\"spacer\">
  &nbsp;
</div>  
</div>
[/code:1]
Again the gallery list as example.
You can now more easely place the gallery-items where you want them this way.
For example in a grid:
[code:1]
.GalleryListItem {
   width:       300px;
   margin:    5px;
   display:    inline;
   text-align:     center;
   background:    #333;
   float:       left;
}

div.spacer {
     clear: both;
}
[/code:1]

Avoid Dutch comments
[code:1]
//Hier komt dus alle HTML
[/code:1]
I dont have a problem reading them but others might Tongue

attribute=\'value\' or attribute=\"value\" not both

And last:
A way to navigate back to the gallery thumbnails if you are looking at an image of that gallery would be nice.
You can do this by means of the pathway but it might be a good idea to offer an alternative for those that don\'t use a pathway.
Perhaps place it under the \"Main gallery page\".
Logged
 
Reply #1
« on: August 09, 2006, 03:30:18 pm »
Simon
Guest


Email

Hi there, like what you\'re saying but I dont know how to implement it. Any chance you could tell me where to put your code?

Cheers..

Si
Logged
 
Print  Pages 1
« previous next »
Jump to: