Album Image Uploads: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==Upload Types==
==Upload Types==
*Content type without album
===Content type without album===
*Album-based content using an image from the album as a thumbnail (the thumbnail is a pointer to one of the album image records).
===Album-based content using a gallery image as a thumbnail===
*Album-based content where the thumbnail image record is independent of the album images.
*The thumbnail is a pointer to one of the album image records.
===Album-based content with thumbnail record independent of the gallery images===
*The thumbnail <code>image_link</code> record has the same <code>type_id</code> as the parent content record.
*The gallery images have a different <code>type_id</code> value from the thumbnail image <code>image_link</code> record.
 
==PHP Classes==
==PHP Classes==
*Shared PHP classes
*Shared PHP classes
*<code>/_classes/images/image_upload_class.php</code> (extends <code>image_link_class</code>)
*<code>[COMMON_LIB]_classes/images/image_upload_class.php</code> (extends <code>image_link_class</code>)
==PHP Includes==
 
*[COMMON_TEMPLATE_DIR]forms/images/thumbnail_overlay_buttons.php
==PHP Template Includes==
Include this once somewhere on the page containing the image upload controls.
*<code>[COMMON_TEMPLATE_DIR]forms/images/thumbnail_overlay_buttons.php</code><br />Include this once somewhere on the page containing the image upload controls.
*For album-based uploads (both with linked and independent thumbnails)
*For album-based uploads (both with linked and independent thumbnails)
<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
Line 14: Line 18:
</syntaxhighlight>
</syntaxhighlight>
*For images within gallery listings:
*For images within gallery listings:
**IMG <code>class=”gallery-edit”</code>
**IMG <code>class="gallery-edit"</code>
**IMG attributes <code>data-id</code> and <code>data-tid</code>
**IMG attributes <code>data-id</code> and <code>data-tid</code>
**<code>$('.gallery-edit')</code> handler is set in <code>LITTLED.Gallery.bindImageOverlayHandlers()</code>
**<code>$('.gallery-edit')</code> handler is set in <code>LITTLED.Gallery.bindImageOverlayHandlers()</code>
**single click: display edit and delete buttons overlaid on the image
**single click: display edit and delete buttons overlaid on the image
**double click: display the full-sized version of the image in a lightbox
**double click: display the full-sized version of the image in a lightbox
==JavaScript Libraries==
*<code>[COMMON_LIB]scripts/littled/littled.js</code>
*<code>[COMMON_LIB]scripts/littled/listings.js</code>
*<code>[COMMON_LIB]scripts/littled/gallery.js</code>
==AJAX Handler Scripts==
*<code>[ADMIN_ROOT]_ajax/images/edit_image.php</code><br />Designed to handle uploading and editing images from within image and album listings.
*<code>[ADMIN_ROOT]_ajax/images/upload_image.php</code><br />Designed to handler uploading a single image within the parent article edit form.
==MySQL Tables==
*<code>image_link</code>
*<code>images</code>
*<code>site_section</code>
*<code>section_properties</code>
[[Category:CMS Documentation]]
[[Category:CMS Documentation]]
[[Category:Albums CMS]]
[[Category:Albums CMS]]
[[Category:JQuery/AJAX]]
[[Category:JQuery/AJAX]]

Revision as of 23:58, 28 February 2012

Upload Types

Content type without album

Album-based content using a gallery image as a thumbnail

  • The thumbnail is a pointer to one of the album image records.

Album-based content with thumbnail record independent of the gallery images

  • The thumbnail image_link record has the same type_id as the parent content record.
  • The gallery images have a different type_id value from the thumbnail image image_link record.

PHP Classes

  • Shared PHP classes
  • [COMMON_LIB]_classes/images/image_upload_class.php (extends image_link_class)

PHP Template Includes

  • [COMMON_TEMPLATE_DIR]forms/images/thumbnail_overlay_buttons.php
    Include this once somewhere on the page containing the image upload controls.
  • For album-based uploads (both with linked and independent thumbnails)
include (COMMON_TEMPLATE_DIR."forms/images/select_thumbnail_link_container.php");
  • For images within gallery listings:
    • IMG class="gallery-edit"
    • IMG attributes data-id and data-tid
    • $('.gallery-edit') handler is set in LITTLED.Gallery.bindImageOverlayHandlers()
    • single click: display edit and delete buttons overlaid on the image
    • double click: display the full-sized version of the image in a lightbox

JavaScript Libraries

  • [COMMON_LIB]scripts/littled/littled.js
  • [COMMON_LIB]scripts/littled/listings.js
  • [COMMON_LIB]scripts/littled/gallery.js

AJAX Handler Scripts

  • [ADMIN_ROOT]_ajax/images/edit_image.php
    Designed to handle uploading and editing images from within image and album listings.
  • [ADMIN_ROOT]_ajax/images/upload_image.php
    Designed to handler uploading a single image within the parent article edit form.

MySQL Tables

  • image_link
  • images
  • site_section
  • section_properties