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

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 1 04:24:38 GMT 2008


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

 OK! Let me give you an update on what is going on with this patch file
 that I am about to upload. First of all, this is a complete "re-write" of
 the system to allow there to be no structure change in the database, which
 has been a major dissent among most of you, but I have solved that
 problem. Keep in mind! '''I have no created an upgrade script yet. Use
 this patch at your own risk.'''

 This is a sample serialized data:
 a:2:{i:0;a:2:{s:4:"name";N;s:5:"items";a:1:{i:0;i:3;}}i:1;a:2:{s:4:"name";s:13:"This
 gallery.";s:5:"items";a:1:{i:0;i:4;}}}

 The system now users the "postmeta" table to store the gallery information
 for a thread. Using the post_id as a reference back to the post/page that
 you are using, it gets a serialized array stored in
 "_wp_posts_attachments" key. Which basically hold the "name" of the
 gallery (New Feature!) and the attachment ID numbers (from the posts
 table).

 Attachments can still run-normally with going back and forth between the
 different items.

 [gallery] from the original idea has not changed. [gallery] outputs all
 items regardless of the group number. Right now I have it outputting even
 the items in non-group area, but that may change to the original way where
 it just be in the groups 1 and above. [gallery group="1"] would show the
 group one items. In both scenarios it's using a new function called
 "get_attachments( $post_id, $group_num = null, $args = '' )". What is
 currently not working, and if anyone wants to work on it, the args are a
 mystery to me. I know how get_childern do it, but that's not what we are
 doing here. Any help in this section would be great.

 What is currently not working in this version is "Save Changes". I wanted
 to wait till tomorrow before working on this critical piece of code.
 Hopefully it will be snap to complete, but with my new gallery name area,
 this could get a bit wacky, but I will get it! :)

 Images/Audio/Video is still in the posts table and is still working and
 still beinging assigned a post_parrent to the post/page that it belongs
 to.

 Questions? Comments?

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


More information about the wp-trac mailing list