Author Topic: [Tutorial] How to change the alignment of thumbs  (Read 15847 times)

0 Members and 1 Guest are viewing this topic.

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
[Tutorial] How to change the alignment of thumbs
« 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

p.s.

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

align=\"center\" to this line...
Thats It !

Offline Ruth

  • Newbie
  • *
  • Posts: 41
    • View Profile
[Tutorial] How to change the alignment of thumbs
« Reply #1 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.

Offline Vienix

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • com.municate.nl
New Images
« Reply #2 on: June 15, 2002, 04:39:49 AM »
Hi,

Its in in the admin settings panel...


Image settings >> Image Table Cells >> 5
Thats It !

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Re: How to change the alignment of thumbs
« Reply #3 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>

Offline bag53

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
[Tutorial] How to change the alignment of thumbs
« Reply #4 on: August 10, 2002, 09:51:02 AM »
excellent! I was wondering where to change that.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
[Tutorial] How to change the alignment of thumbs
« Reply #5 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
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline IcoHolic

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Tutorial] How to change the alignment of thumbs
« Reply #6 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

Offline sajwal

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: [Tutorial] How to change the alignment of thumbs
« Reply #7 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 ...  :(