News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Gallery

Started by SMFHacks.com Team, September 16, 2006, 07:13:02 PM

Previous topic - Next topic

DeMar

#1020
With a help from jamesk problem is solved. But....

There in the gallery where the pic is shown smaller. Under the pic is this:
Views:
Filesize:
Date:
Comments (1)
By:

How can I insted "Filesize" have the name (Title) of the picture!

[embed-flash(width,height)]

jamesk

Well, in Gallery.template.php, around line 83 you have:

echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';

That's where you'd replace with what you're looking for.

The question is, what is it you're looking to put in there?  What do you mean by the name (title) of the picture?  Not the original filename, right?  I don't even think those original filenames are stored in the database.

The thumbnail filenames are there...

If you're talking about the description, I don't think the variable $context['gallery_pic']['title'] has even been set at this stage yet...

Also, I'm not sure what variables are set

DeMar

Instead the "filesize" I want to have picture name.
When you upload (add picture) there you can put title, description, keywords of a picture.
So I want instead "filesize" to have this title that you put when you upload your picture.

[embed-flash(width,height)]

jamesk

Initially, I want to say put
echo $context['gallery_pic']['description'].'<br />';

but the $context['gallery_pic']['description'] variable hasn't been declared yet.

I gotta peep around some...

Unless, of course someone wants to chime in...

DeMar

I think gallery description would not be OK for me. Because I will have a long description, and it wouldn't be OK. The best solution is picture title that we put in during upload of pic.
If you find something, please post here.

maybe, something like this: echo $context['gallery_pic']['title'].'<br />';

[embed-flash(width,height)]

cru

hi, can someone help me with this?
http://www.simplemachines.org/community/index.php?topic=114291.msg1279554#msg1279554

maybe i can solve this by editing my files, but i dont know what file to edit. TIA

yllas

I have this mod on my forum and am loving it :) 

I'm now wondering how I can turn off the ability to click on the thumbnail image, as I want to make it so that the images are only seen as thumbnails.

thanks inadvance

jamesk

QuoteI think gallery description would not be OK for me. Because I will have a long description, and it wouldn't be OK. The best solution is picture title that we put in during upload of pic.
If you find something, please post here.


Replace (around line 83 of Gallery.template.php)

echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';

with

echo $row['title'].'<br />';

jamesk

QuoteI'm now wondering how I can turn off the ability to click on the thumbnail image, as I want to make it so that the images are only seen as thumbnails.

You can turn off the link (which turns off the ability to click the image) and will show the images only very simply.  However, someone can always enter the URL manually to get to the image -- this takes more work...

For just removing the clicks:

In forum/Themes/default/Gallery.template.php

find (around line 81):

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" /></a><br />';


and replace it with:
echo'<td align="center"><img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" /></a><br />';

DeMar

Quote from: jamesk on October 24, 2007, 09:34:31 AM
QuoteI think gallery description would not be OK for me. Because I will have a long description, and it wouldn't be OK. The best solution is picture title that we put in during upload of pic.
If you find something, please post here.


Replace (around line 83 of Gallery.template.php)

echo $txt['gallery_text_filesize'] . round($row['filesize'] / 1024, 2) . 'KB<br />';

with

echo $row['title'].'<br />';

Hello jamesk,

that's it. That is what I wanted.
Thanks a lot

Is it possible to display this title a little bigger, maybe bold?

[embed-flash(width,height)]

jamesk

QuoteIs it possible to display this title a little bigger, maybe bold?

That -- I won't help you with as it nothing to do with SMF.  That's a basic HTML question which you can find an answer by doing an internet search.

DeMar

I tried with basic HTML and nothing.
That's why asked.

Sorry for my question!

[embed-flash(width,height)]

jamesk

You don't have to be sorry.  I'm just trying to help you help yourself.  I know it's pretty difficult and that's why I'm here as well since I've only installed SMF very recently and am trying to get a better feel for it as well as learn myself.

If you do an internet search for "bold html" you should find a ton of results.  Here's one:
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_formattingch

It shows you need to wrap the text around <b> and </b>.  So, for your example, you can:

echo '<b>',$row['title'],'</b><br />';

Notice the new <b> </b> surrounding the $row['title'].  I had to add the single quotes around the <b> as that is HTML.  You can do a search on PHP echo statements which is very necessary to do any kind of modification in SMF.

Anyways, do a search on changing the font.  You can probably start off with deprecated HTML just to get the effect you want and then move onto the way it should be done through CSS (http://www.w3schools.com/css/css_intro.asp)

Hope that helps...

DeMar

Thank you very much!
I'm in learning.

Thanks

[embed-flash(width,height)]

yllas

Quote from: jamesk on October 24, 2007, 09:50:39 AM
QuoteI'm now wondering how I can turn off the ability to click on the thumbnail image, as I want to make it so that the images are only seen as thumbnails.

You can turn off the link (which turns off the ability to click the image) and will show the images only very simply.  However, someone can always enter the URL manually to get to the image -- this takes more work...

For just removing the clicks:

In forum/Themes/default/Gallery.template.php

find (around line 81):

echo '<td align="center"><a href="' . $scripturl . '?action=gallery;sa=view;id=' . $row['ID_PICTURE'] . '">
<img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" /></a><br />';


and replace it with:
echo'<td align="center"><img ' . ($GD_Installed == true ?  'src="' . $modSettings['gallery_url'] . $row['thumbfilename'] . '" ' : 'src="' . $modSettings['gallery_url'] . $row['filename'] . '" height="78" width="120" ')  . ' border="0" /></a><br />';

Many thanks :)

ArkServer

I haven't read all these pages but is there a way to let users have a personal album?

vbgamer45

Quote from: ArkServer on October 26, 2007, 06:07:30 AM
I haven't read all these pages but is there a way to let users have a personal album?
Note in the lite edition
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

cru

*bump*
hi, can someone help me with this?
http://www.simplemachines.org/community/index.php?topic=114291.msg1279554#msg1279554

maybe i can solve this by editing my files, but i dont know what file to edit. TIA

shumar

Is there any chance to link images from gallery in posts, like is in attachment ?

dry3210

Without searching through 52 pages of posts...(although I did do a general search and didn't come up with anything)...

What about...
1. Having a default size for images and an option to view full size. 
2. Having a link to the person user gallery under their avatar and/or in their profile

Great mod by the way!

Advertisement: