php table names where in SQL tables?

30 views
Skip to first unread message

Antonina Panayiotou

unread,
Jun 19, 2016, 5:56:54 AM6/19/16
to Omeka Dev
Hello, 
I'm trying to see the tables that ItemTypes.php file is using from controllers to change some lines and I can't compare - correlate them. I'm showing this in the screenshot below... 
Please can anyone help me?
Thanks


Patrick Murray-John

unread,
Jun 19, 2016, 2:32:31 PM6/19/16
to omek...@googlegroups.com
From the screenshot, it seems like you've found the relevant table for what you highlighted -- omeka_elements.

Generally, the getTable('TableName') function will look for a table name that has underscores and lower case letter replaced, e.g. 'table_names'.

What code changes are you thinking of, and more importantly, for what final result. If you are looking at the Element data, chances are good that there is a filter that you can use without changing the core code.

Patrick
--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at https://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

Antonina Panayiotou

unread,
Jun 20, 2016, 3:52:21 AM6/20/16
to Omeka Dev
How can I be sure which table in .php files are using; as the name is not the same? I mean if I want to change the name of the table and put another which one I know for sure is this? Is there any catalog of this relation?

Patrick I'm trying to do a new item type which it has it owns elements, some elements I want them be boolean and then to link to a same form this fields.
For example lets say I want to create the item type posters, and there is an element "is it paper?" yes/no, if I press no then I want it to open another form asking what is it and analyze this category.

Patrick Murray-John

unread,
Jun 20, 2016, 2:22:35 PM6/20/16
to omek...@googlegroups.com
The pattern for table names I described holds in almost every case, so there shouldn't be too much difficulty lining them up. It's also pretty dangerous to try to rename tables from Omeka core. That will lead to breaking many other things.

What you describe sounds much more like a user interface task than a database task. You'd probably want a plugin that handles that kind of branching, probably using the ElementInputFilter.

The easiest way to store it is just to assign element text values like 'true' or 'false', then adjust how the theme handles that for the display.

Patrick
Message has been deleted

Antonina Panayiotou

unread,
Jun 21, 2016, 4:35:34 AM6/21/16
to Omeka Dev
So, Patrick you suggest to do a new plugin right? IS it the only way to not destroy the whole system?
In case of plugin in the link you've sent me where do I have to add code? I have to add code for usage like the 1st paragraph, i have to make a new directory in plugin or where ? A code for values, is it mysql? and there is an example with class of plugin where is this class? I went to the file directory Plugin and there is only the php codes...
Can you please help me a little bit more?


There isn't any way to add the animal in item type and make it from there, as I described above?

Deep Regards

Patrick Murray-John

unread,
Jun 21, 2016, 12:55:39 PM6/21/16
to omek...@googlegroups.com
A plugin is probably best. See the basic guide, and look at how SimplePages works as an example.

Antonina Panayiotou

unread,
Jun 30, 2016, 5:17:07 AM6/30/16
to Omeka Dev
Thanks!
Reply all
Reply to author
Forward
0 new messages