Member
Member
David6491   2015-07-27, 06:57
#1

Not sure if this is already a feature however I would like an option to limit the sub album name length and even the image name length in the gallery views so that a consistent number of thumbnails is shown on each page and each thumbnail is the same size.

Administrator
Administrator
fretzl   2015-07-27, 07:47
#2

What theme are you using ?

Member
Member
David6491   2015-07-28, 00:20
#3

I am using the Effervescence+ theme. I am more than open to other themes suggestions. This one just looked simple but had some nice features.

TIA

Member
Member
Michel Gagnon   2015-07-28, 04:08
#4

Basically, under Themes, make a copy of the theme and modify various pages. Use function shortenContent to do what you want:
http://www.zenphoto.org/documentation/core/_functions.php.html#functionshortenContent

Administrator
Administrator
fretzl   2015-07-28, 07:29
#5

Please also read the theming tutorial.
http://www.zenphoto.org/news/theming-tutorial

Administrator
Administrator
fretzl   2015-07-28, 10:53
#6

To help you on your way a bit...

In your theme folder (themes > effervescence_plus) locate the [i]album.php[/i] file.

Change line 118 from
to

Where "20" is the length of the title and "..." is de shorten indicator.

Member
Member
David6491   2015-07-31, 07:03
#7

Thanks for this this sounds just what I am after. I am able to find and edit the code but exactly what to I am unsure of. The '...' what is this do I put exactly as you say or experiment with it to get what I am after. I will start giving it a go but any further help for a non coder would be appreciated.

Administrator
Administrator
fretzl   2015-07-31, 07:14
#8

Quote:The '...' what is this do I put exactly as you say or experiment with it to get what I am after.
That is simply an indicator that the text is shortened.

For example
[i]Lorem ipsum dolor sit amet consectetur adipiscing elit[/i]
becomes
[i]Lorem ipsum dolor si...[/i]
(20 characters + ...)

You can change the "..." to anything you like or leave it out completely.
The code would then look like this:
``

So yes, experiment with it ;-)

Member
Member
David6491   2015-08-01, 05:25
#9

Thanks for your help. However it must be the wrong place to achieve what I am after as I can not get a result.

What I am after is to just shorten 1st layer sub album title when displayed in the gallery under the thumbnail so that all the thumbnails display on the page neatly. If it is possible to display the full title in the breadcrumbs at the top once selected that would be a bonus.

My only other alternative is to shorten the folder names.

Sorry but I just dont know the make up of the program enough and firebug is not helping me identify the area to change like you suggested which I am sure is the correct way to do it.

Administrator
Administrator
fretzl   2015-08-01, 07:39
#10
Administrator
Administrator
fretzl   2015-08-01, 07:44
#11

Try the same change in [i]gallery.php[/i] line 75

I think you are not using the correct naming convention.
http://www.zenphoto.org/news/zenphoto-glossary

Member
Member
David6491   2015-08-04, 06:51
#12

I think you are right I just haven't got the full knowledge on this. I can follow the instruction with no problems and even extend them a certain bit to possibly fix it to make it work but when I get nothing or an error I'm probably stuffed.

I am now getting this error
Warning: Missing argument 3 for shortenContent(), called in /home10/sungazer/public_html/sungazer.info/themes/Davids_Effer/gallery.php on line 75 and defined in /home10/sungazer/public_html/sungazer.info/zp-core/functions.php on line 169

Administrator
Administrator
fretzl   2015-08-04, 07:20
#13

Sorry, my mistake. The code should be:
` This puts...` after each shortened title.

If you don't want any shorten indicator after each shortened title use this:
``

Member
Member
David6491   2015-08-13, 01:48
#14

Thanks it works and is a great improvement or feature in my eyes at least. Now each page looks the same will display the maximum amount of tiles but the data is still there.

Member
Member
David6491   2015-08-26, 08:27
#15

Just when I thought it was working I find one of the sub albums out of the 15 where it doesn't work. I also have a problem with two of the subalbums not showing all of the folders. I will raise another topic to deal with this I think it might be a memory issue. I am trying moving things around to see the effects. Some very strange problems.

Administrator
Administrator
acrylian   2015-08-26, 08:54
#16

If you are using the static_html_cache plugin and are not loggedin you certainly may see an older version.

If albums are not showing they may be unpublished unless you are loggedin when you would see all. In any case always review your error logs if you think something is strange.

Member
Member
David6491   2015-08-26, 08:56
#17

Ok strange but I found the culprit. For that particular Album the Theme was set to something other than the gallery theme.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.