file name extensions - how to remove in pop up screens

Everything to do with Popus for Admiror Gallery.
Post Reply
Message
Author
mugpieguy
Posts: 4
Joined: Thu May 26, 2011 11:07 pm

file name extensions - how to remove in pop up screens

#1 Post by mugpieguy »

A great extension - so first of all a big thanks!

My question is how can I remove the ".jpg" file name extension from the pop up image window. I can hide the entire file name by amending the style.css file an adding "visibility: hidden" to .pirobox but this isn't quite the solution I want.

Ideally I would like the pop up to still display the main part of the image's file name as this would act as a neat way to label images - I just don't want the .jpg (or whatever extension it happens to be) showing as this stops the file name looking like a text label.

For the particular web site I'm using pirobox but it would be useful if this could be applied to all of the main pop up types.

I can't see a setting for this or a solution in the forum so any help or advice would be appreciated.

Thanks
Mugpie Guy

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: file name extensions - how to remove in pop up screens

#2 Post by Vasiljevski »

Well there are two solutions that comes to my mind.

First is to use Image Manager in Admiror Componenet and add captions to every image, and you won't be limited to use file names.

The second solution involves a little change of code in the agGallery.php file. This file is located in
[JOOMLA ROOT]\plugins\content\AdmirorGallery\classes
Line 386:

Code: Select all

$this->descArray[$f] = $f;
This adds a file name as a default description.
It should be changed to something like:

Code: Select all

$this->descArray[$f] = ag_removExtension($f);
This should do the trick :)

Let me know did any of these two suites your needs.

Regards,
Nikola
Help Admiror Gallery become even better,
give us a review on JED

mugpieguy
Posts: 4
Joined: Thu May 26, 2011 11:07 pm

Re: file name extensions - how to remove in pop up screens

#3 Post by mugpieguy »

Thanks... this is how I had expected the labelling feature in Image Manager would work, but it doesn't seem to work that way for me for some reason.

When I use Image Manager to add a name to an image, although it does rename the image file in line with my changes, the image is displayed in the pop up in the form of the file name and not with the label I actually entered.

For example if I enter "This is a nice picture of Fred" in the space immediately below an image, when I go onto the site and view the image in the pop up it is labelled "this-is-a-nice-picture-of-fred.jpg". Obviously this not quite what I want to see as a label.

I've encountered the exact same problem on two totally separate sites now. Am I missing a setting somewhere?

Thanks
Mugpie Guy

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: file name extensions - how to remove in pop up screens

#4 Post by Vasiljevski »

When you open image manager, and you browse a folder with some images like on this picture:
untitled.JPG
untitled.JPG (39.96 KiB) Viewed 48238 times
Text under the image is in fact a file name of the image :) That is why you get extension on the end :)

But if you click on a particular image, you will see this:
untitled2.JPG
untitled2.JPG (26.55 KiB) Viewed 48238 times
In default section you define a default language for the image, and under it you will get a input box for every language you have installed in your Joomla website so that you can have localized description, I have only English.

Previous/Next button will navigate you throw the images inside the folder you were browsing :)

Let me know did this worked.

This video tutorial displays the procedure, it is old and the component is changed but the basics still apply :)
http://www.youtube.com/watch?v=Tr1SpOk- ... age#t=217s

Best Regards,
Help Admiror Gallery become even better,
give us a review on JED

mugpieguy
Posts: 4
Joined: Thu May 26, 2011 11:07 pm

Re: file name extensions - how to remove in pop up screens

#5 Post by mugpieguy »

Ah... that was one thing I hadn't tried - I feel slightly embarresing as it is obvious once it has been explained. :oops:

Thanks for your help - being able to label images this way makes it a tremendious component!

Thanks again
Mugpie Guy

Admiror Gallery 5 - Fundraising Campaign

fresco3000
Posts: 1
Joined: Mon Jun 06, 2011 10:45 am

Re: file name extensions - how to remove in pop up screens

#6 Post by fresco3000 »

Hi Guys, I have a similar question, only i would like to completely remove the image filename that shows up on the pop up. How can i achieve this?


Thanks!

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: file name extensions - how to remove in pop up screens

#7 Post by Vasiljevski »

Second post from above describes how to strip the file extension from the file name.

If you don't need any caption you instead of :

Code: Select all

$this->descArray[$f] = ag_removExtension($f);
you can change that line to:

Code: Select all

$this->descArray[$f] = ""
And you won't have any captions :)
Help Admiror Gallery become even better,
give us a review on JED

yohio
Posts: 1
Joined: Mon Dec 10, 2012 5:19 pm

Re: file name extensions - how to remove in pop up screens

#8 Post by yohio »

I tried using the methods noted above, one worked but with a little change:

in the folder [root]plugins/content/admirorgallery/admirorgallery/classes/
there is a file called agGallery.php

within that file there is at line #407 code that is:

Code: Select all

$this->descArray[$f] = $f;


one solution noted above was to replace it with:

Code: Select all

$this->descArray[$f] = ag_removExtension($f);
This doesn't work and provides an error saying that you are calling to a function that doesn't exist.

Instead the code should be replaced with:

Code: Select all

$this->descArray[$f] = agHelper::ag_removExtension($f);
That works perfectly.

Hope I helped someone in removing the file type suffix from the popup information.

Yohai Ararat
Joomla Developer - Website developer
http://www.buildweb.co.il
"When life presents you with questions, Google has answers..."

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: file name extensions - how to remove in pop up screens

#9 Post by Vasiljevski »

Yes, the function was moved to agHelper in one point of time :)

Thanks for reporting this.
Help Admiror Gallery become even better,
give us a review on JED

Admiror Gallery 5 - Fundraising Campaign

Post Reply