4images Forum & Community

4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: Vienix on June 12, 2002, 12:19:33 PM

Title: [Tutorial] How to change the alignment of thumbs
Post by: Vienix on June 12, 2002, 12:19:33 PM
The alignment of the table that contains the thumbnails cannot be changed with html files from the template but has to be changed in the php files.

pages that are affected are:

lightbox.php
search.php
categories.php
index.php

look for a line that contains:

$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"bottom\"

change "bottom" to "top"

I have done this for

http://www.bali-pictures.com (http://indexnl.com/th.jpg)

p.s.

if you want your images and text centered you can try adding

align=\"center\" to this line...
Title: [Tutorial] How to change the alignment of thumbs
Post by: Ruth on June 15, 2002, 01:34:03 AM
Thank you so much for this answer! I love what you have done to incorporate 4images on your site. It looks fantastic. I have another question ... how did you change the number of new images displayed? Is it in the index.php file as well.
Title: New Images
Post by: Vienix on June 15, 2002, 04:39:49 AM
Hi,

Its in in the admin settings panel...


Image settings >> Image Table Cells >> 5
Title: Re: How to change the alignment of thumbs
Post by: Chris on June 15, 2002, 05:19:10 AM
Quote from: Vienix
The alignment of the table that contains the thumbnails cannot be changed with html files from the template but has to be changed in the php files.


True for vertical alignment but not required for horizontal alignment.  You can achieve horizontal centering by editing thumbnail_bit.html   This is a better approach, in my opinion, because you won't have to restore your edit with a new release of 4images.

Simply make the following line the 1st line in the template:
<div align="center">

And close the html tag by making this the last line in the template:
</div>
Title: [Tutorial] How to change the alignment of thumbs
Post by: bag53 on August 10, 2002, 09:51:02 AM
excellent! I was wondering where to change that.
Title: [Tutorial] How to change the alignment of thumbs
Post by: Jan on August 27, 2002, 09:58:20 AM
Ok, ok, you persuaded me. I've changed the default alignment from "bottom" to "top" for the new version 1.7. ;)

Greets Jan
Title: Re: [Tutorial] How to change the alignment of thumbs
Post by: IcoHolic on March 28, 2005, 05:51:06 AM
To align the thumbnails that appear when you have them activated for you categories. I found you have to go to the file:

includes/function.php

Search for the following code:

Code: [Select]
      $categories .= "</table></td>\n";
      $categories .= "<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
      $categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";

add a align=\"center\" to the bottom line. So it would look like

Code: [Select]
     
      $categories .= "</table></td>\n";
      $categories .= "<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
      $categories .= "<table border=\"0\" align=\"center\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_cellspacing']."\">\n";

This took me about 4 hours to find. Hope this helps someone.


Thanks
Craig
Title: Re: [Tutorial] How to change the alignment of thumbs
Post by: sajwal on July 25, 2006, 02:11:34 AM
pls. help
I want to display all the thumbnails vertically and not horizontally....tried searching each possible thread ...  :(