Shared Resources for New PHP-Based Websites: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
Line 30: Line 30:
*TinyMCE libraries
*TinyMCE libraries


===AJAX scripts===
=== AJAX scripts ===


Located in <code>[COMMON_LIB]/_ajax/</code>
Located in <code>[COMMON_LIB]/_ajax/</code>
*Image and album utilities (edit, delete, upload, etc.)
* Image and album utilities (edit, delete, upload, etc.)
*General utilities
* General utilities
**Inline edits of names, dates, access, etc
** [[JQuery_Initialization_on_Listings_Pages#Inline_edits|Inline edits of names, dates, access, etc]]
**Resorting listings
** Resorting listings
**Editing keywords inline
** Editing keywords inline
**Update cache
** Update cache


===PHP template files===
===PHP template files===

Revision as of 16:24, 24 June 2013

Setup

  • Remote Desktop to server
  • IIS Manager > website > right click > Add Virtual Directory
    • Alias: Same name as shared resource directory
    • Physical Path: Location shared resource directory (d:/inetpub/develop/littledamien/common_lib)
    • Connect As: Specific user > Windows account

Resources

In order to be able to integrate these files using virtual directories on dev, it’s necessary that they reside in directories with unique names.

So PHP base classes for site content are in the shared directory [COMMON_LIB]/_classes/content/ and derived classes representing site content are placed in [APP_BASE_DIR]/_classes/site_content/.

PHP classes

Located in [COMMON_LIB]/_classes/

  • content
  • database
  • filters
  • images
  • keywords
  • login
  • navigation menu (?)
  • utilities

JavaScript

Located in [COMMON_LIB]/scripts/

  • Littled libraries
  • JQuery form data plugin (handles binary data)
  • JQuery scrolling plugin
  • JQuery Poshy Tip plugin (rollover popups)
  • JQuery tooltip plugin (?)
  • TinyMCE libraries

AJAX scripts

Located in [COMMON_LIB]/_ajax/

PHP template files

Located in [COMMON_LIB]/_templates/

  • Album and gallery listings, details, and pagination
  • Image popup
  • Keywords cell content
  • Form elements for inline edits of discrete information (names, access, dates, keywords, etc.)
  • Progress wheel
  • Form elements for editing and deleting albums, galleries, and images
  • Navigation elements
    • Gallery page links
    • Generalized listings page links
    • CMS navigation
    • Neighboring record links
    • Page buttons (single_listings_page_link.php)

CMS pages

Located in [COMMON_LIB]/hostmgr/

  • Site content properties CMS
  • Requirements
    • site_sections and section_operations tables
    • “CMS Content Sections” record in site_content table with id 27.

image directories

  • Image destination specified through content properties.
site_section.image_dir
  • Size variation locations:
    • [IMAGE_ROOT_DIR]/med/
    • [IMAGE_ROOT_DIR]/mini/

images

  • /images/process-wheel.png
  • /images/buttons/edit-image.png
  • /images/buttons/delete.png

PHP Config Settings

  • APP_COMMON_DIR – Base directory for shared resources
    (This will be a different location on dev and production.)
  • COMMON_CLASS_DIR – Location of shared PHP classes: APP_COMMON_DIR + "_classes/"
  • COMMON_TEMPLATE_DIR – Location of shred PHP template files: APP_COMMON_DIR + "_templates"
  • JavaScript can be accessed through virtual directories as if shared resources existed within the local web directory.

Uploading to Production

For each of the resources listed above, upload files from //littledamienii/develop/littledamien/common_lib, integrating them into the website directories of on the production server.