SimplePortal

Support => English Support => Topic started by: simplelynoob on December 01, 2008, 01:50:16 AM

Title: Image in Gallery box too small
Post by: simplelynoob on December 01, 2008, 01:50:16 AM
Hi, am having SMF117 / SP211 / Default core theme.
Happly spend my weekend re-install everything, welcoming SP211.
Everything works super fine. Many thanks for all the new features,
now looks very professional. (link removed, guess not necessary).

SP left Width was set to 265, youtube fill-in very nicely after
adjustment to it code provided. I have three boxes on my left
very nicely aligned.

Only thing now is the thumbnail images in both
SMF Gallery Pro and Media Gallery, oddly out off proportion.
They are a littel tiny compared to the rest.

Any way to adjust the thumbnail size to fill up
the entire space in the box?

Thanks
Title: Re: Image in Gallery box too small
Post by: [SiNaN] on December 02, 2008, 07:35:36 AM
I believe original thumbnail images are used there. So not something related to SP probably. I guess you can shrink them by editing the block code, but images' quality will dramatically decrease.
Title: Re: Image in Gallery box too small
Post by: ionia on December 02, 2008, 08:30:08 PM
Thanks for your reply, I wanted it expand, not shrink.
Anyway, so matter, getting used to it now.
Title: Re: Image in Gallery box too small
Post by: [SiNaN] on December 03, 2008, 02:52:22 AM
Well, same is for expand; unless you create new thumbnails, which would require a lot of work.
Title: Re: Image in Gallery box too small
Post by: ibm450 on December 03, 2008, 03:16:35 AM
i must say the new gallery pic is abit too small, this is what i use, create php block and insert the below code. hope this helps

yarriesafety.mine.nu (http://yarriesafety.mine.nu)





Code: [Select]
global $modSettings, $context, $user_info, $scripturl, $sc, $ID_MEMBER, $db_prefix, $txt, $func;

$GD_Installed = function_exists('imagecreate');

$dbresult = db_query("
SELECT p.ID_PICTURE
FROM {$db_prefix}gallery_pic as p
ORDER BY ID_PICTURE DESC
LIMIT 1", __FILE__, __LINE__);

$max = mysql_fetch_assoc($dbresult);
$check = 0;

while($check == 0) {

$idpic = rand(1, $max['ID_PICTURE']);

$dbresult = db_query("
SELECT p.ID_PICTURE, p.commenttotal, p.filesize, p.views, p.thumbfilename, p.filename, p.height, p.width, p.title, p.ID_MEMBER,
m.memberName, m.realName, p.date, p.description
FROM {$db_prefix}gallery_pic as p
LEFT JOIN {$db_prefix}members AS m on ( p.ID_MEMBER = m.ID_MEMBER)
WHERE p.approved = 1 AND p.ID_PICTURE = $idpic
ORDER BY ID_PICTURE DESC", __FILE__, __LINE__);
$gallery_picture = array();
while($row = mysql_fetch_assoc($dbresult))
{

$row['description'] = strip_tags(strtr(parse_bbc($row['description'], 1), array('<br />' => '')));
if ($func['strlen']($row['description']) > 128)
$row['description'] = $func['substr']($row['description'], 0, 60) . '<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">...</a>';

$gallery_picture = array (
'id' => $row['ID_PICTURE'],
'title' => $row['title'],
'desc' => $row['description'],
'views' => $row['views'],
'senderid' => $row['ID_MEMBER'],
'sendername' => $row['realName'],
'thumbfilename' => $row['thumbfilename'],
'filename' => $row['filename']
);
}

mysql_free_result($dbresult);

if(!empty($gallery_picture) || empty($max))
$check = 1;
}

if (!empty($gallery_picture)) {
echo '<div align="center">';
echo '
<a href="' . $scripturl . '?action=gallery;sa=view;id=' . $gallery_picture['id'] . '"><img ' . ($GD_Installed == true ?  'src="gallery/' . $modSettings['gallery_url'] . $gallery_picture['filename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $gallery_picture['filename'] . '" height="90" width="90" ')  . ' border="3" /></a>
<br />' . $gallery_picture['title'] . '<span class="smalltext"><br />
' . $gallery_picture['desc'] . '<br />
<b>' . $txt['sp-grpictureviews'] . '</b> ' . $gallery_picture['views'] . '<br />';

echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';

if ($gallery_picture['sendername'] != '')
echo '<b>' . $txt['sp-grpicturesender'] . '</b> <a href="' . $scripturl . '?action=profile;u=' . $gallery_picture['senderid'] . '">'  . $gallery_picture['sendername'] . '</a><br />';
else
echo '<b>' . $txt['sp-grpicturesender'] . '</b> ' . $txt['sp-grpictureguest'] . '<br />';
echo '</span>';



echo '</div>';




}
else
echo 'There is no picture in the gallery.';

//thumbfilename'


 8)
Title: Re: Image in Gallery box too small
Post by: ibm450 on December 03, 2008, 03:17:45 AM
Hi, am having SMF117 / SP211 / Default core theme.
Happly spend my weekend re-install everything, welcoming SP211.
Everything works super fine. Many thanks for all the new features,
now looks very professional. (link removed, guess not necessary).

SP left Width was set to 265, youtube fill-in very nicely after
adjustment to it code provided. I have three boxes on my left
very nicely aligned.

Only thing now is the thumbnail images in both
SMF Gallery Pro and Media Gallery, oddly out off proportion.
They are a littel tiny compared to the rest.

Any way to adjust the thumbnail size to fill up
the entire space in the box?

Thanks


whats your website link?
Title: Re: Image in Gallery box too small
Post by: simplelynoob on December 03, 2008, 05:47:26 AM



whats your website link?
[/quote]

Mine, a very plain site, www.viewonscreen.com compared to yours.
Like the weather report and the custom theme, lovely.
Thanks ibm450. for your kind contribution, will use your code, probably this weekend.
Title: Re: Image in Gallery box too small
Post by: ibm450 on December 05, 2008, 10:06:29 PM
no worries, thanks for your input,

Title: Re: Image in Gallery box too small
Post by: [SiNaN] on December 20, 2008, 07:12:33 AM
Any updates?
Title: Re: Image in Gallery box too small
Post by: simplelynoob on December 24, 2008, 08:05:50 AM
After many try & error, finally discovered the thumbnail setting in Gallery actually can determine the
size of the display image. Changing the thumbnail setting in the Setting menu did not able to re-size
immediately and even not after, unless new photos were uploaded to effect the changes. Now it is resolved.

Merry Christmas and Happy New Year 2009 to each and everyone reading this thread.  :thumbsup:
Title: Re: Image in Gallery box too small
Post by: [SiNaN] on January 01, 2009, 08:32:57 AM
For you too.
SimplePortal 2.3.8 © 2008-2024, SimplePortal