[wp-trac] Re: [WordPress Trac] #7607: Image gallery to have multiple galleries inside one post

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 17 13:54:33 GMT 2008


#7607: Image gallery to have multiple galleries inside one post
--------------------------------------------+-------------------------------
 Reporter:  ShaneF                          |        Owner:  anonymous
     Type:  enhancement                     |       Status:  new      
 Priority:  normal                          |    Milestone:  2.7      
Component:  Administration                  |      Version:  2.6.1    
 Severity:  normal                          |   Resolution:           
 Keywords:  gallery has-patch dev-feedback  |  
--------------------------------------------+-------------------------------
Changes (by ShaneF):

  * keywords:  gallery has-patch => gallery has-patch dev-feedback

Comment:

 Ok all. Need your feedback.

 Myself and DD32 have been talking on how this should be done.

 Right now as this patch stands, the gallery works by adding two extra
 columns to the 'posts' table. 'groups' and 'group_number'. 'groups' is
 assigned to the row of the post itself indicating the groups that are
 around. Currently it's stored '0,1,2' as in there is 2 groups + default
 one. This is right now being changed to just being '2' to indicate the
 same thing. 'group number' is assigned 0 or 1 or 2 on the attachment row
 in the posts table indicating what group it is part of. Using the
 'post_parent' part as the reference back to the post's ID number during
 query.

 DD32 suggested that the gallery information be moved to the postmeta
 section as a new key "_wp_gallery". The postmeta.post_id would refer to
 the post number itself. Inside the 'data' area would be a serialized data
 field storing the number of gallery groups and what images would be in
 each group referring back to either the posts table or to the
 postmeta.meta_id of the image description itself.

 I have generally opposed to the idea since doing so would fundamentally
 change how the original gallery system works. Granted this is a new
 feature, this wouldn't be much of a problem since no one else has to worry
 about a new "structure" except my production blog.

 So the two options are (A) Work off the post table where no extra queries
 need to take place since it already gets information off the entire row
 during post retrieval or (B) store the gallery information in postmeta.

 Feedback welcomed! :)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7607#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list