Jump to content


Photo

Additional Fields for EtoGal


  • Please log in to reply
5 replies to this topic

#1 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 26 March 2007 - 10:51 AM

This thread was started here Adding additional table fields in etogal but it is probably better to continue here. If anyone has a solution for a new snippet that CREATEs a new (separate from etogal) table that includes additional info to display- alonside the existing "title", "description" , "date" fields.

I am thinking that the snippet will make use of the checkpermissions() that allows access to managers and displays at the same time as the title and description fields so all can be entered in the same screen after "uploadingpictures". I guess that this will also need to have UPDATE capabilities if data is changed. And also the forms written to enter the data.

Ralph has suggested using MetaData tags at the front so that users can adapt what the fields are used for.

I will try myself, but if anyone has one already or bits that work that we could use, I would be grateful.

Edited by Cris D., 28 March 2007 - 10:43 PM.


#2 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 26 March 2007 - 01:22 PM

My personal development site has several tutorials that haven't been migrated onto this site yet which you might find enlightening... Although not a cohesive amalgamation of tutorials, they do give a good overview of what can be done with external data... Don't let PHP and MySQL intimidate you as they can be learned on a piecemeal basis...

#3 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 27 March 2007 - 12:14 PM

My personal development site has several tutorials that haven't been migrated onto this site yet which you might find enlightening...


Thanks, that was exactly what I needed at this stage. However, I'm still confused with forms... What happens when a form is created and text entered into it? Does it go directly to the database if the form is written correctly? Go to the database via php script? Get retreived from the browser by the php and sent to database? I guess I'm asking, what is the sequence of events that take place between when a form is filled out (I know how to make them) to when it is stored in a database (I can make them too)?

I have started this snippet here http://www.etomite.c...u...g&blogid=11

12/4/07
I have since found out that forms that have input entered into them in a browser will have that info avaliable to the entire sippet. This can take place in the form of $_POST,$_GET or $_REQUEST functions. All of which have their benefits and drawbacks. Most commonly used methods in eto snippets that I have seen is REQUEST and POST. The info is stored in the magical place where all snippet processing occurs and can then be retreived using the commands above then integrated into a $variable (function) to use. This can include $updating_tables, $displaying on the screen etc. The hardest bit I have found is naming the form [components] consistently and retreiving them using the same [references] oops, I mean [components]. :)

Edited by Cris D., 12 April 2007 - 04:57 AM.


#4 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 27 March 2007 - 01:37 PM

I have actually written a snippet named, surprisingly, FormHandler, which can even manipulate data entered into a form created in a Document... You simply add a snippet call to [!FormHandler!] with a few added parameters and it does a table insert of the data... It's basic, but works for those impromptu forms that you want to bang out in a hurry to populate a new database table... But I usually just write an entire data management interface using a myriad of API functions...

#5 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 31 March 2007 - 02:28 PM

This thread was started here Adding additional table fields in etogal but it is probably better to continue here. If anyone has a solution for a new snippet that CREATEs a new (separate from etogal) table that includes additional info to display- alonside the existing "title", "description" , "date" fields.

Its not just a matter of adding new fields to a table (whether a new one or the existing etogal table, though I agree that for the best chance of future comaptibility it shuld be in a new table). All management code (etogal) and display code (etogal etogalgallery etogalthumb) and potentially search code (etogalsearch) needs to be extended to contain code to use the new fields where appropriate. There is no standard snippet extension mechanism in etomite, so this is difficult to achieve.
We have been warned several times that the underlying architecture for etomite will change; with this in mind I will not be looking at adding a mechanism for this until at least coccoon is released ... I don't know if this even on the horizon yet.

#6 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 11 April 2007 - 03:08 PM

I'm not so much concerned about developing things that will become obsolete. My main objective is to learn the language and I am having fun with etomite and etogal. I will continue working on these extentions and probably start over when cocoon comes out (but I will be in a much better place when it does, to re-develop things I want to keep). Cheers, Cris D.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users