How to Get Clean Image Name

Everything to do with Templates and Templating for Admiror Gallery.
Message
Author
buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#11 Post by buddyq »

Trying and I get this: atal error: Cannot access private property agGallery::$match

EDITED:
========
Found the solution: It works if I use $agHelper->match instead of $AG->match

Admiror Gallery 5 - Fundraising Campaign

buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#12 Post by buddyq »

Still having a little trouble. I am using this: $sliderSpeed = $AG->ag_getParams("speed",$agHelper->match,50);

Which does not throw an error but ONLY prints out the default value. So in this case it only prints 50 instead of 1200 as set in the plugin code:

{AG thumbWidth="600" thumbHeight="310" thumbAutoSize="none" arrange="priority" timeout="6000" tabWidth="100" startingSlide="0" slideClass="slide" slideOpenClass="slide-open" slideClosedClass="slide-closed" slidePreviousClass="slide-previous" speed="1200" backgroundColor="ffffff" foregroundColor="808080" highliteColor="fea804" frame_width="500" frame_height="300" newImageTag="0" newImageTag_days="7" paginUse="0" paginImagesPerGallery="10" albumUse="0" showSignature="0" plainTextCaptions="0" template="accordion" popupEngine="slimbox" easing="easeInQuart" trigger="click"}Homepage-Pics{/AG}

buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#13 Post by buddyq »

Found a couple of things:

1) $AG->match is private. I had to just set match in the AG class to var and then it started working properly.

2) Filling a width for the frame size is reflected in the plugin code. However, the $AG->params array does not read the value from this at all. It seems to ONLY come from the setting set in the control panel. It is not overridden by the plugin code.

buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#14 Post by buddyq »

Done!

Got the template completed with all the settings it can take and every easing option available.

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

Re: How to Get Clean Image Name

#15 Post by Vasiljevski »

buddyq wrote: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?
Yes, I totally agree with you. This might be achieved by option to disable some settings in the template, so that when you create a new template, you just say what option your template doesn't need. I will have to give some thought to this :) Its late (02:00 am) and I'm kinda unfocused :)
Help Admiror Gallery become even better,
give us a review on JED

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: How to Get Clean Image Name

#16 Post by Vasiljevski »

I must say again, that I would never believed that this is AdmirorGallery on your site :) I'm truly amazed :)

Actually this was our idea at first, create some small platform for people with great ideas to focus more on their imagination and less on boring programing stuff :) I'm a programmer, so it's OK when I say that :D
Help Admiror Gallery become even better,
give us a review on JED

buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#17 Post by buddyq »

Help me figure out how this template can work with others without having to:

1) set $AG->match to NOT be Private.
2) Not upload a new file with the parameters for the button parameters

Basically, have everything contained within the template itself.

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

Re: How to Get Clean Image Name

#18 Post by Vasiljevski »

1) use

Code: Select all

$AG->getParameter([parameterName],[defaultValue])
(sorry, I totally forgot that I added this function :)
The whole agGallery class is constructed as an API for templates and any other extensions :)

2) I don't see any solution to this problem. Only to add some information about the custom parameters so that user can manually add it to the

Code: Select all

{AG [params]}[folder] {/AG}
Help Admiror Gallery become even better,
give us a review on JED

User avatar
kekeljevic
Developer
Developer
Posts: 445
Joined: Tue Aug 17, 2010 2:38 pm
Location: Novi Sad, Serbia
Contact:

Re: How to Get Clean Image Name

#19 Post by kekeljevic »

Interesting idea. I like it a lot.

Admiror Gallery 5 - Fundraising Campaign

buddyq
Maegashira
Maegashira
Posts: 21
Joined: Wed May 18, 2011 9:48 pm

Re: How to Get Clean Image Name

#20 Post by buddyq »

Here is the zAccordion template. Version 1. Test it and let me know if it needs anything. I could probably write MORE instruction but I'm hoping this will do for now.

Buddy
Attachments
zaccordion.zip
Test this out and see if it works for you!
(139.13 KiB) Downloaded 2607 times

Post Reply