HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

How do I make gallery images appear side by side?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#2422 (In Topic #530)
Avatar

How do I make gallery images appear side by side?

How do I make gallery images appear side by side??

I'm looking at the images.php module now but I can't seem to find it :(


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#2424
Avatar

ocStaff (admin)

Line 388 to 398 would need to be changed.

You'd have to do something like this…

Code

   // Display images
   $images=blank_tempcode();
   $per_row=2;
   $current_row=-1;
   $image_rows=array();
   foreach ($rows as $i=>$row_images)
   {
      $view_url=build_url(array('page'=>'images','type'=>'view','wide'=>1,'id'=>$row_images['id'],'sr'=>$start,'rs'=>$max,'s'=>1));
      $thumb_url=$row_images['thumb_url'];
      $thumb=do_image_thumb($thumb_url,text_lookup_comcode($row_images['comments']));

      if ($i%$per_row==0)
      {
         $current_row++;
         $image_rows[$current_row]=blank_tempcode();
      }

      $image_rows[$current_row]->attach(do_template('GALLERY_IMAGE',array('THUMB'=>$thumb,'VIEW_URL'=>$view_url)));

   }
   foreach ($image_rows as $row)
   {
      $images->attach(do_template('GALLERY_IMAGE_ROW',array('ROW'=>$row)));
   }
   if ($images->is_blank()) $images=do_lang('NO_ENTRIES');

GALLERY_IMAGE.tpl would need changing to…

Code

<td>

{$START_TABLE,internal,THIN}

   <a href="{VIEW_URL*}">{THUMB}</a>

{$END_TABLE}

</td>

and GALLERY_IMAGE_ROW would need to be created…

Code

<tr>
{ROW}
</tr>

and GALLERY_PAGE.tpl would need changing so that line 5 has stuff put around it…

Code

<table width="100%">
{IMAGES}
</table>


Remember that if you edit templates outside the ocPortal template editor, then the template cache needs rebuilding. I have the cache turned off during development myself.


There we go, I've pretty much just coded what you want :). I haven't given precise instructions, I want you to understand you're way through it ;).



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#2425
Avatar

Yay!! Many thanks :)

Now I gotta find where to turn off the fading feature for thumbnails :lol:

Many thanks again :)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#2426
Avatar

ocStaff (admin)

IMG_THUMB.tpl



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
Posted
Rating:
#2429
Avatar

:lol: No wonder I couldn't find it. Was looking for a checkbox :D

Many thanks again :)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
Posted
Rating:
#10092
Avatar

Hallowed customer

I'm also trying to place the gallery images side by side, but when I open /sources/images.php there are only 308 lines. Do I have the wrong file???


Greetingzzz DJ Buzz Fuzz

Tune! Radio
www.pcc-lab.nl
tuneradio@pcc-lab.nl
Back to the top
 
Posted
Rating:
#10093
Avatar

Hallowed customer

Srry,

I have found the solution already @ index.php?page=topicview&id=1542


Greetingzzz DJ Buzz Fuzz

Tune! Radio
www.pcc-lab.nl
tuneradio@pcc-lab.nl
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: