Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 193
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 196
Total: 196

Author Topic: changing the number of medium preview images  (Read 3799 times)

0 Members and 1 Guest are viewing this topic.

Offline fondlyPiranha

  • Member
  • *
  • Posts: 27
    • View Profile
changing the number of medium preview images
« on: May 28, 2014, 03:19:48 am »
viewing a single item in a album  (action=gallery;sa=view;id=xxxx)  is a kind of preview stripe at the top containing medium preview. Can you explain me how can i change for that "stripe" the number of shown previews because 2 or 3 is for me a to small number of previews in that situation.

in setting i can change the dimension for medium previews but not their count in the row.
possible you can me explain where in the code i can make a change to become the effect for that I'm searching

thanks a lot
« Last Edit: May 28, 2014, 03:22:47 am by fondlyPiranha »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: changing the number of medium preview images
« Reply #1 on: May 28, 2014, 08:54:56 am »
That is not easy to change, The top thumbnails consist of the next images, previous image and current image I believe.

The code is in Gallery2.template.php in the view picture function
Code: [Select]
// Show Mini thumbnails on view picture
if ($gallerySettings['gallery_set_mini_prevnext_thumbs'])
{
echo '<tr class="windowbg2">
<td align="center">';
$result = $smcFunc['db_query']('', "
    SELECT
    id_picture, thumbfilename, title
    FROM {db_prefix}gallery_pic 
    WHERE id_picture IN ($nextImage,$previousImage," . $context['gallery_pic']['id_picture'] . ")");
$miniPictures = array();
while($row = $smcFunc['db_fetch_assoc']($result))
{
$miniPictures[] = $row;
}

echo '<table align="center" border="0">
<tr class="windowbg2">';

if($previousImage != $context['gallery_pic']['id_picture'])
foreach($miniPictures as $pic)
{
if ($pic['id_picture'] == $previousImage)
echo '<td  align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $pic['id_picture'] . '"><img src="' . $modSettings['gallery_url'] . $pic['thumbfilename'] . '" alt="' . htmlspecialchars($pic['title'],ENT_QUOTES) . '" /></a></td>';

}
foreach($miniPictures as $pic)
{
if ($pic['id_picture'] == $context['gallery_pic']['id_picture'])
{
echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $pic['id_picture'] . '"><img src="' . $modSettings['gallery_url'] . $pic['thumbfilename'] . '" alt="' . htmlspecialchars($pic['title'],ENT_QUOTES) . '" /></a></td>';
break;
}
}

if($nextImage != $context['gallery_pic']['id_picture'])
foreach($miniPictures as $pic)
{
if ($pic['id_picture'] == $nextImage)
echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $pic['id_picture'] . '"><img src="' . $modSettings['gallery_url'] . $pic['thumbfilename'] . '" alt="' . htmlspecialchars($pic['title'],ENT_QUOTES) . '" /></a></td>';

}
echo '</tr>
</table>
</td>
</tr>';
}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
4093 Views
Last post November 20, 2008, 12:53:33 pm
by nmfnu
No medium images

Started by clothahump « 1 2 3 » Support

34 Replies
15459 Views
Last post February 02, 2011, 06:10:33 pm
by GenoDemoN
14 Replies
4765 Views
Last post February 21, 2017, 03:13:26 pm
by shuban
2 Replies
2452 Views
Last post September 02, 2017, 02:08:41 pm
by shuban
2 Replies
1774 Views
Last post July 12, 2022, 09:23:24 am
by mickjav

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal