Previous Thread
Next Thread
Print Thread
Rate Thread
Gallery formatting
#322694 03/12/2017 8:04 PM
Joined: Dec 2001
Posts: 87
Bill B Offline OP
Power User
OP Offline
Power User
Joined: Dec 2001
Posts: 87
When I build the "external" Gallery page (per the instructions on "Portal Layout / External Use)", it displays all images in a single column.

How do I get the "Included" Island to display the images in 3 or 4 columns per line?

Here's the code that it says to post in a separate PHP page:

PHP Code


<?php
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo
"<table width="100%">";
include(
"/var/www/vhosts/vcca.org/httpdocs/forum/languages/english/portal_islands.php");
include(
"/var/www/vhosts/vcca.org/httpdocs/forum/languages/english/generic.php");
include(
"/var/www/vhosts/vcca.org/httpdocs/forum/cache/gallery_island_27.php");
echo
"</table>";
?>



Bill Barker
Issaquah, Wa
Sponsored Links
Re: Gallery formatting
Bill B #322695 03/12/2017 8:22 PM
Joined: Jul 2001
Posts: 1,068
Likes: 38
coffee and code
Online Happy
coffee and code
Joined: Jul 2001
Posts: 1,068
Likes: 38
You'll need to edit your tamplates/default/gallery_island.tpl template so that it custom displays the way you want it to display.

Right now it is displaying each image in its own table ROW

PHP Code

{section name=item loop=$items}
<
tr>
<
td class="{$style_side}alt-1" align="center">
<
a href="{ubb url="ubb=showgallery&Number=`$items[item].POST_ID`"}"><img alt="{$items[item].TOPIC_SUBJECT}" title="{$items[item].TOPIC_SUBJECT}" {$items[item].WIDTH_HEIGHT} src="{$config.BASE_URL}/gallery/{$items[item].TOPIC_THUMBNAIL}" /></a>
</
td>
</
tr>
{/
section}


Maybe update it to something like:
PHP Code

<tr>
<
td class="{$style_side}alt-1" align="center">
{
section name=item loop=$items}
<
a href="{ubb url="ubb=showgallery&Number=`$items[item].POST_ID`"}"><img alt="{$items[item].TOPIC_SUBJECT}" title="{$items[item].TOPIC_SUBJECT}" {$items[item].WIDTH_HEIGHT} src="{$config.BASE_URL}/gallery/{$items[item].TOPIC_THUMBNAIL}" /></a>
{/
section}
</
td>
</
tr>


This will make the change for all Gallery Islands.

You could add some margin to your image elements. Put a custom border around each image -- or make them round by using "border-radius: 50%;" in your image style.

Customize the code so that it works the way you want it to.


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Gallery formatting
isaac #322697 03/12/2017 10:30 PM
Joined: Dec 2001
Posts: 87
Bill B Offline OP
Power User
OP Offline
Power User
Joined: Dec 2001
Posts: 87
Many thanks for the quick response.
So - the issue is that I currently use two Gallery's on my Forum Homepage. They are the normal single column style (template). Works good.

I wouldn't really want to mess those up -- don't have the room for a different shape. So I need to continue to use the generic template.

If I built a new gallery template with 5 columns (for example), can you think of any way that I could modify something else to point to the NEW template for just his one use?

I assume that this
PHP Code

if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
is what locks me into the original Gallery Template.


For Reference: I sure wish we could bridge between UBB and Coppermine.
Here's what I was playing with 3 years ago. http://vcca.org/gallery


Last edited by Bill B; 03/13/2017 12:08 AM. Reason: Added web link.

Bill Barker
Issaquah, Wa
Re: Gallery formatting
Bill B #322700 03/13/2017 12:04 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
You would have to "inject" an entry for the new cache_builder file into the PORTAL_BOXES table.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, UBB.Sitemaps
Re: Gallery formatting
Bill B #322701 03/13/2017 12:49 PM
Joined: Dec 2001
Posts: 87
Bill B Offline OP
Power User
OP Offline
Power User
Joined: Dec 2001
Posts: 87
Thanks... I will dig into that tonight.


Bill Barker
Issaquah, Wa
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,543
Posts293,773
Members13,837
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 273
Topics Created 0
Posts Made 0
Users Online 1
Birthdays 3
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 9
isaac 8
temp 2
driv 2
Morgan 1
Top Likes Received
isaac 38
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
Gizmo 2
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Snapshot build 20200602.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.041s Queries: 25 (0.015s) Memory: 3.2846 MB (Peak: 3.6277 MB) Data Comp: Zlib Server Time: 2020-06-04 14:10:11 UTC
Valid HTML 5 and Valid CSS