Adding more attributes like title, description, etc but without using customfields.
nonamer
Joined: 2007-03-28
Posts: 63 |
Posted: Tue, 2012-08-28 18:30 |
I want to add several new attributes, but I don't want them on the customfield module because it involves extra page, along with extra clicks. It would be much cleaner if those extra fields were included when creating or editing an album. I want them in the itemaddalbum.tpl and itemedititem.tpl I followed all the steps and I'm pretty confident I didn't miss anything on this thread http://gallery.menalto.com/node/77479 but I don't understand the last two posts about schema updates. How can I do a schema update exactly? I sent a message to the poster, but I haven't heard anything back for 3 days. Can someone tell me how to get this to work, because I know the author of that post did say it worked once he knew about the schema. thanks!!! |
|
Posts: 1642
Possible but you are getting into advanced customisation and messing with the schema is probably as advanced as you can get.
In your shoes, I'll create a new module and handle the attributes as plugin parameters ("setPluginParameter" and "getPluginParameter") of that module.
You can do this from the ".inc" file and then pass on to the ".tpl" files for display.
The details will depend on your specific needs.
You can of course also study the schema and figure out how it all hangs together but even then, it is best to manipulate it through a bespoke module.
So either way, you will need to write a module to do what you want.
--
dakanji.com
Posts: 63
making a module is really above my abilities.
so how could I copy the customfielditemedit.tpl into the itemedititem.tpl and be able to hit submit for it to make all those changes on the same page. I just wish someone could better explain that second to last post in that thread.
Posts: 8339
it would be far easier to use custom fields module and fetch them for display in your theme.inc
-s
All New jQuery Minislideshow for G2/G3
Posts: 1642
The second to last post in that thread deals with the detailed inner workings of G2.
BTW, making a module is not that of a big deal but while what you want is definitely doable, I'll suggest you stick with using the existing custom fields module functionality as it is and accept the extra clicks.
--
dakanji.com
Posts: 8339
just yesterday while making the new shadowbox theme I needed to add new variables to each item in album view.
so in gallery2/themes/my theme/theme.inc function showAlbumPage
you let gallery load all the common template data, then add yours by iterating through the items and adding my variables:
so now each child photo item has a resizeId which is now available in album.tpl
same concept to add your custom fields:
now each child item would have my_cool_field_value and my_other_cool_field_value
-s
All New jQuery Minislideshow for G2/G3
Posts: 63
sorry suprsider. you lost me on what you posted.