It is currently Wed Dec 13, 2017 3:10 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Thu May 26, 2011 11:22 pm 
Offline

Joined: Thu May 26, 2011 11:07 pm
Posts: 4
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


Top
 Profile  
 
 Post subject: file name extensions - how to remove in pop up screens
PostPosted: Thu May 26, 2011 11:22 pm 
Top  
PostPosted: Fri May 27, 2011 9:18 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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:
$this->descArray[$f] = $f;

This adds a file name as a default description.
It should be changed to something like:
Code:
$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


Top
 Profile  
 
PostPosted: Fri May 27, 2011 9:55 am 
Offline

Joined: Thu May 26, 2011 11:07 pm
Posts: 4
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


Top
 Profile  
 
PostPosted: Fri May 27, 2011 10:42 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
When you open image manager, and you browse a folder with some images like on this picture:
Attachment:
untitled.JPG
untitled.JPG [ 39.96 KiB | Viewed 15681 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:
Attachment:
untitled2.JPG
untitled2.JPG [ 26.55 KiB | Viewed 15681 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-eA4&feature=player_detailpage#t=217s

Best Regards,

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


Top
 Profile  
 
PostPosted: Fri May 27, 2011 3:13 pm 
Offline

Joined: Thu May 26, 2011 11:07 pm
Posts: 4
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


Top
 Profile  
 
 Post subject: Re: file name extensions - how to remove in pop up screens
PostPosted: Fri May 27, 2011 3:13 pm 
Top  
PostPosted: Mon Jun 06, 2011 10:48 am 
Offline

Joined: Mon Jun 06, 2011 10:45 am
Posts: 1
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!


Top
 Profile  
 
PostPosted: Mon Jun 06, 2011 11:20 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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:
$this->descArray[$f] = ag_removExtension($f);


you can change that line to:
Code:
$this->descArray[$f] = ""


And you won't have any captions :)

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


Top
 Profile  
 
PostPosted: Mon Dec 10, 2012 5:26 pm 
Offline

Joined: Mon Dec 10, 2012 5:19 pm
Posts: 1
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:
$this->descArray[$f] = $f;


one solution noted above was to replace it with:
Code:
$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:
$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..."


Top
 Profile  
 
PostPosted: Mon Dec 17, 2012 11:42 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
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


Top
 Profile  
 
 Post subject: Re: file name extensions - how to remove in pop up screens
PostPosted: Mon Dec 17, 2012 11:42 am 
Top  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group