It is currently Tue Dec 12, 2017 11:58 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Sat Aug 13, 2011 6:33 pm 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
How do I print out a clean image name? For example, in the image manager, I put "Green Car" as the title of the image. But it displays as "Green-Car.jpg". How can I just get it to display "Green Car"?


Top
 Profile  
 
 Post subject: How to Get Clean Image Name
PostPosted: Sat Aug 13, 2011 6:33 pm 
Top  
PostPosted: Sat Aug 13, 2011 10:17 pm 
Offline
Contributor
Contributor
User avatar

Joined: Thu Oct 21, 2010 12:31 am
Posts: 217
Location: Essex, UK
I believe that you are in the wrong window and as such you are therefore changing the file name (which must contain no spaces therefore AG inputs _ into the name.

If you click on the image it will bring up a new page where you can type in (to the relevant language box) your file caption.

Sam / Bifford


Top
 Profile  
 
PostPosted: Sat Aug 13, 2011 11:38 pm 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
Hmmm.... didn't know that was the actual filename. I would like a title with the caption, but a regular title and not a filename.


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 7:59 am 
Offline
Developer
Developer
User avatar

Joined: Tue Aug 17, 2010 2:38 pm
Posts: 445
Location: Novi Sad, Serbia
At current AG, it's only possible to have image captions.

_________________
Admiror Design Studio


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 9:19 am 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
I did a little trickery parsing the image title to get the title I want. You can see the implementation here:
http://aveone.tangerinefiles.com

I have converted zAccordion script into a template. However, it has many options I can add and I would like to do so. What would be best is to have those options show when they click the editor button and choose my template. Then show the options below to customize it. Is that possible? How do I add options for templates?


Top
 Profile  
 
 Post subject: Re: How to Get Clean Image Name
PostPosted: Mon Aug 15, 2011 9:19 am 
Top  
PostPosted: Mon Aug 15, 2011 10:45 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Cool template! :) Is there any chance of sharing it with community? :)

Well when you say editor button, you mean button for adding AdmirorGallery when editing an article?
You should look in "administrator\components\com_admirorgallery\views\button\tmpl\default.php"
here you can add manualu parametars you need.
For now we do not have automatic way of reading extra params for diferent templates, but I guess you could add some JS code to check what the user selected from dropdown list and add extra settings. But you will need to hardcode the settings available.

This is a good thing to have we would have to think about adding some way of automatic loading specific settings for diferent templates :)
If it is no trouble you could add this idea to Brainstorming sub-forum :)

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


Top
 Profile  
 
PostPosted: Mon Aug 15, 2011 8:16 pm 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
Yes, I can share it when I get some stuff cleaned up like I want it.

I have inserted the params into the popup from the button and the backend. However, they do not become part of the $AG->params array. What do I have to do, in order to get them to be useable in my template?

$AG->params['customParam'] does nothing.


Top
 Profile  
 
PostPosted: Thu Aug 18, 2011 12:01 am 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
Bump! Let's keep this ball rolling!


Top
 Profile  
 
PostPosted: Thu Aug 18, 2011 8:44 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
:)
Ok, as I can see you do not read values you added. Custom parameters should be loaded in the template file using:
Code:
$AG->ag_getParams("[name of the custom param]",$AG->match,[default value]);


$AG->match is the code inserted in the article from which param value will be extracted.

So to set an example, if you added two new parameters: sliderSpeed=30; startSlideShowAutomatic= true
You will add:
Code:
$sliderSpeed = $AG->ag_getParams("sliderSpeed",$AG->match,50);
$startSlideShowAutomatic= $AG->ag_getParams("startSlideShowAutomatic",$AG->match,false);


There is no need to add it to the params array, but if you want you can do something like:
Code:
$AG->params['sliderSpeed'] = $AG->ag_getParams("sliderSpeed",$AG->match,50);
$AG->params['startSlideShowAutomatic']= $AG->ag_getParams("startSlideShowAutomatic",$AG->match,false);


Even if you don't add it to the param array they will still be available in popup script, because firs template file is included and then popup file, so any variable defined in here will be available.

Hope this helps :)

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


Top
 Profile  
 
 Post subject: Re: How to Get Clean Image Name
PostPosted: Thu Aug 18, 2011 8:44 am 
Top  
PostPosted: Thu Aug 18, 2011 4:32 pm 
Offline
Maegashira
Maegashira

Joined: Wed May 18, 2011 9:48 pm
Posts: 21
Thanks! I'm going to get working on this right now and see if I can get this thing working. What I think would be a great priority is having a way (using AJAX), is to select the template you want, then see those options. This way, the plugin code won't have extraneous settings that dont make sense for that template to use and get too bulky. Of course we can ignore those but it might confuse people down the road and as templates grow, could get too crazy.

Thoughts?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2, 3  Next

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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