Assembla home | Assembla project page
 

Changeset 63

Show
Ignore:
Timestamp:
06/13/07 16:55:29 (1 year ago)
Author:
digitalspaghetti
Message:

Implemented Image Upload + Gallery views, with Thickbox

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/app_controller.php

    r57 r63  
    3939class AppController extends Controller { 
    4040         
    41         var $helpers = array('othAuth','Cache','Form','Html','Javascript','Text','Time','TreeMenu'); 
     41        var $helpers = array('othAuth','Cache','Form','Html','Javascript','Text','Number','Time','TreeMenu'); 
    4242        var $components = array('othAuth','Conf','RequestHandler','Session'); 
    4343        var $othAuthRestrictions = array('add','edit','delete',CAKE_ADMIN); 
  • branch/config/core.php

    r61 r63  
    5555 * In development mode, you need to click the flash message to continue. 
    5656 */ 
    57         define('DEBUG', 0); 
     57        define('DEBUG', 2); 
    5858/** 
    5959 * Turn off or enable cache checking application-wide. 
  • branch/controllers/galleries_controller.php

    r55 r63  
    1515                        $this->redirect(array('action'=>'index'), null, true); 
    1616                } 
    17                 $this->set('gallery', $this->Gallery->read(null, $id)); 
     17                $this->set('gallery', $this->Gallery->findByStub($id, null, null)); 
    1818        } 
    1919 
     
    9292                        } 
    9393                } 
    94                 $images = $this->Gallery->Image->generateList(); 
     94                $images = $this->Gallery->Image->generateList(null,null,null, '{n}.Image.id', '{n}.Image.alt'); 
    9595                $subjects = $this->Gallery->Subject->generateList(); 
    9696                $this->set(compact('images', 'subjects')); 
  • branch/db.sql

    r56 r63  
    44--  
    55-- Host: localhost 
    6 -- Generation Time: Jun 08, 2007 at 06:00 PM 
     6-- Generation Time: Jun 13, 2007 at 05:52 PM 
    77-- Server version: 5.0.38 
    88-- PHP Version: 5.2.1 
     
    1010-- Database: `webrocket` 
    1111--  
    12  
    13 -- -------------------------------------------------------- 
    14  
    15 --  
    16 -- Table structure for table `acos` 
    17 --  
    18  
    19 CREATE TABLE `acos` ( 
    20   `id` int(11) NOT NULL auto_increment, 
    21   `parent_id` int(11) default NULL, 
    22   `model` varchar(255) collate utf8_unicode_ci NOT NULL default '', 
    23   `foreign_key` int(11) default NULL, 
    24   `alias` varchar(255) collate utf8_unicode_ci NOT NULL default '', 
    25   `lft` int(11) default NULL, 
    26   `rght` int(11) default NULL, 
    27   PRIMARY KEY  (`id`) 
    28 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; 
    29  
    30 --  
    31 -- Dumping data for table `acos` 
    32 --  
    33  
    34  
    35 -- -------------------------------------------------------- 
    36  
    37 --  
    38 -- Table structure for table `aros` 
    39 --  
    40  
    41 CREATE TABLE `aros` ( 
    42   `id` int(11) NOT NULL auto_increment, 
    43   `parent_id` int(11) default NULL, 
    44   `model` varchar(255) collate utf8_unicode_ci NOT NULL default '', 
    45   `foreign_key` int(11) default NULL, 
    46   `alias` varchar(255) collate utf8_unicode_ci NOT NULL default '', 
    47   `lft` int(11) default NULL, 
    48   `rght` int(11) default NULL, 
    49   PRIMARY KEY  (`id`) 
    50 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; 
    51  
    52 --  
    53 -- Dumping data for table `aros` 
    54 --  
    55  
    56  
    57 -- -------------------------------------------------------- 
    58  
    59 --  
    60 -- Table structure for table `aros_acos` 
    61 --  
    62  
    63 CREATE TABLE `aros_acos` ( 
    64   `id` int(11) NOT NULL auto_increment, 
    65   `aro_id` int(11) default NULL, 
    66   `aco_id` int(11) default NULL, 
    67   `_create` int(11) NOT NULL default '0', 
    68   `_read` int(11) NOT NULL default '0', 
    69   `_update` int(11) NOT NULL default '0', 
    70   `_delete` int(11) NOT NULL default '0', 
    71   PRIMARY KEY  (`id`) 
    72 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; 
    73  
    74 --  
    75 -- Dumping data for table `aros_acos` 
    76 --  
    77  
    7812 
    7913-- -------------------------------------------------------- 
     
    9529 
    9630INSERT INTO `cake_sessions` (`id`, `data`, `expires`) VALUES  
    97 ('c2251ed05b93b568ce08bdec93831549', 'Config|a:3:{s:9:"userAgent";s:32:"268042ced84746041c45b952d0ba6110";s:4:"time";i:1181316473;s:4:"rand";i:233214876;}othAuth|a:1:{s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";a:2:{s:4:"User";a:18:{s:2:"id";s:1:"1";s:8:"username";s:14:"WebrocketAdmin";s:6:"passwd";s:32:"fdfedc01c66e9ea2817508ca1097df2f";s:4:"name";s:15:"Webrocket Admin";s:5:"email";s:19:"admin@webrocket.com";s:10:"last_visit";s:19:"2007-06-08 15:12:44";s:8:"group_id";s:1:"1";s:10:"profile_id";s:1:"1";s:11:"posts_count";s:1:"5";s:11:"pages_count";s:1:"2";s:14:"comments_count";s:1:"2";s:12:"videos_count";s:1:"0";s:4:"tags";s:0:"";s:6:"active";s:1:"1";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"login_hash";s:32:"9959667d54c2bb525ab6b832bdd90c14";s:7:"hashkey";s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";}s:5:"Group";a:9:{s:2:"id";s:1:"1";s:4:"name";s:11:"Site Admins";s:5:"level";s:3:"999";s:8:"redirect";s:0:"";s:9:"perm_type";s:5:"allow";s:11:"users_count";s:1:"0";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"Permission";a:1:{i:0;a:4:{s:2:"id";s:1:"1";s:4:"name";s:1:"*";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";}}}}}Message|a:1:{s:5:"flash";a:3:{s:7:"message";s:15:"Post 3 Deleted.";s:6:"layout";s:7:"default";s:6:"params";a:0:{}}}', 1181316474), 
    98 ('5b2e3941b099c27a42d7fa641a79b82a', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181313541;s:4:"rand";i:1641908545;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181313541), 
    99 ('176468910a7742cba31f2fe9eb0d08cb', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181315206;s:4:"rand";i:2042014765;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181315206), 
    100 ('58f0b5b311821f5a3405deab85fbefdf', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181315576;s:4:"rand";i:693979323;}othAuth|a:1:{s:8:"frompage";s:31:"/admin/images/add/?jqUploader=1";}', 1181315576), 
    101 ('ed956fdc60d8c04f34d221cefe6a3931', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181313132;s:4:"rand";i:1732220896;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181313132), 
    102 ('31420bff0d2b548f26e3dd39a5e0184e', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181312365;s:4:"rand";i:376463623;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181312366), 
    103 ('8bc93124f17b1f46bb5339e5ee4746e8', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181312953;s:4:"rand";i:1158739720;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181312954), 
    104 ('8fac503a6b26919723f8b58327b5efd2', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181312987;s:4:"rand";i:447090029;}othAuth|a:1:{s:8:"frompage";s:18:"/admin/images/add/";}', 1181312987), 
    105 ('ad23e0bf86be900ba912075f620926a0', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181311343;s:4:"rand";i:971105046;}othAuth|a:1:{s:8:"frompage";s:31:"/admin/images/add/?jqUploader=1";}', 1181311343), 
    106 ('93207b0548f3575a29872c5d3b4fcbae', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181311402;s:4:"rand";i:529455164;}othAuth|a:1:{s:8:"frompage";s:31:"/admin/images/add/?jqUploader=1";}', 1181311403), 
    107 ('a206f6d2a6c758c0d1d5105923b30589', 'Config|a:3:{s:9:"userAgent";s:32:"c9dc1c8509f0c970bd7e4e9764cf09c0";s:4:"time";i:1181311583;s:4:"rand";i:2104900988;}othAuth|a:1:{s:8:"frompage";s:31:"/admin/images/add/?jqUploader=1";}', 1181311584), 
    108 ('09592ae6cf6cccfe535e82db614fa818', 'Config|a:3:{s:9:"userAgent";s:32:"268042ced84746041c45b952d0ba6110";s:4:"time";i:1181313107;s:4:"rand";i:1954948186;}othAuth|a:1:{s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";a:2:{s:4:"User";a:18:{s:2:"id";s:1:"1";s:8:"username";s:14:"WebrocketAdmin";s:6:"passwd";s:32:"fdfedc01c66e9ea2817508ca1097df2f";s:4:"name";s:15:"Webrocket Admin";s:5:"email";s:19:"admin@webrocket.com";s:10:"last_visit";s:19:"2007-06-08 13:25:36";s:8:"group_id";s:1:"1";s:10:"profile_id";s:1:"1";s:11:"posts_count";s:1:"4";s:11:"pages_count";s:1:"2";s:14:"comments_count";s:1:"2";s:12:"videos_count";s:1:"0";s:4:"tags";s:0:"";s:6:"active";s:1:"1";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"login_hash";s:32:"9959667d54c2bb525ab6b832bdd90c14";s:7:"hashkey";s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";}s:5:"Group";a:9:{s:2:"id";s:1:"1";s:4:"name";s:11:"Site Admins";s:5:"level";s:3:"999";s:8:"redirect";s:0:"";s:9:"perm_type";s:5:"allow";s:11:"users_count";s:1:"0";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"Permission";a:1:{i:0;a:4:{s:2:"id";s:1:"1";s:4:"name";s:1:"*";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";}}}}}Message|a:0:{}', 1181313108), 
    109 ('d46a21e1b5ba71abbcaec8674f07812c', 'Config|a:3:{s:9:"userAgent";s:32:"268042ced84746041c45b952d0ba6110";s:4:"time";i:1181311564;s:4:"rand";i:1584628132;}othAuth|a:1:{s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";a:2:{s:4:"User";a:18:{s:2:"id";s:1:"1";s:8:"username";s:14:"WebrocketAdmin";s:6:"passwd";s:32:"fdfedc01c66e9ea2817508ca1097df2f";s:4:"name";s:15:"Webrocket Admin";s:5:"email";s:19:"admin@webrocket.com";s:10:"last_visit";s:19:"2007-06-08 10:59:46";s:8:"group_id";s:1:"1";s:10:"profile_id";s:1:"1";s:11:"posts_count";s:1:"4";s:11:"pages_count";s:1:"2";s:14:"comments_count";s:1:"2";s:12:"videos_count";s:1:"0";s:4:"tags";s:0:"";s:6:"active";s:1:"1";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"login_hash";s:32:"9959667d54c2bb525ab6b832bdd90c14";s:7:"hashkey";s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";}s:5:"Group";a:9:{s:2:"id";s:1:"1";s:4:"name";s:11:"Site Admins";s:5:"level";s:3:"999";s:8:"redirect";s:0:"";s:9:"perm_type";s:5:"allow";s:11:"users_count";s:1:"0";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"Permission";a:1:{i:0;a:4:{s:2:"id";s:1:"1";s:4:"name";s:1:"*";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";}}}}}', 1181311567); 
     31('82ce680e0006d4e798e3df504cf5485d', 'Config|a:3:{s:9:"userAgent";s:32:"268042ced84746041c45b952d0ba6110";s:4:"time";i:1181580767;s:4:"rand";i:577418356;}othAuth|a:1:{s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";a:2:{s:4:"User";a:18:{s:2:"id";s:1:"1";s:8:"username";s:14:"WebrocketAdmin";s:6:"passwd";s:32:"fdfedc01c66e9ea2817508ca1097df2f";s:4:"name";s:15:"Webrocket Admin";s:5:"email";s:19:"admin@webrocket.com";s:10:"last_visit";s:19:"2007-06-08 15:46:17";s:8:"group_id";s:1:"1";s:10:"profile_id";s:1:"1";s:11:"posts_count";s:1:"4";s:11:"pages_count";s:1:"2";s:14:"comments_count";s:1:"2";s:12:"videos_count";s:1:"0";s:4:"tags";s:0:"";s:6:"active";s:1:"1";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"login_hash";s:32:"9959667d54c2bb525ab6b832bdd90c14";s:7:"hashkey";s:41:"ADYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi";}s:5:"Group";a:9:{s:2:"id";s:1:"1";s:4:"name";s:11:"Site Admins";s:5:"level";s:3:"999";s:8:"redirect";s:0:"";s:9:"perm_type";s:5:"allow";s:11:"users_count";s:1:"0";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";s:10:"Permission";a:1:{i:0;a:4:{s:2:"id";s:1:"1";s:4:"name";s:1:"*";s:7:"created";s:19:"2007-03-26 00:00:00";s:8:"modified";s:19:"0000-00-00 00:00:00";}}}}}Message|a:0:{}', 1181580767); 
    11032 
    11133-- -------------------------------------------------------- 
     
    515437  `event_time` time default NULL, 
    516438  `event_url` varchar(255) default NULL, 
    517   `notes` text, 
     439  `body` text, 
    518440  `tags` varchar(255) NOT NULL, 
    519441  `user_id` int(8) unsigned NOT NULL, 
     
    523445  `modified` datetime NOT NULL, 
    524446  PRIMARY KEY  (`id`) 
    525 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3
     447) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
    526448 
    527449--  
     
    529451--  
    530452 
    531 INSERT INTO `events` (`id`, `venue`, `address`, `city`, `country_id`, `postcode`, `event_type_id`, `event_date`, `event_time`, `event_url`, `notes`, `tags`, `user_id`, `subject_id`, `published`, `created`, `modified`) VALUES  
    532 (1, 'No Half Measures', '93-97 St Georges Studios', 'Glasgow', 1, 'G3 6LA', 1, '2007-05-31', '14:00:21', '', 'sfsadfdsfsd', 'Gig, No Half Measures', 0, 1, 1, '2007-05-09 14:38:21', '2007-05-17 13:12:22'), 
    533 (2, 'Tane''s Holiday Start', '20/4 Dalgety Ave', 'Edinburgh', 1, 'EH7 5UG', 0, '2007-06-25', '19:45:52', NULL, 'Ex euismod autem quis nulla in autem vel esse ad vero commodo nulla facilisis eros wisi praesent consequat iriure tation eros exerci dolor ut, nibh. Dolor et autem dolor volutpat et veniam augue eu consectetuer praesent ad, suscipit veniam aliquam laoreet dignissim, dignissim dolor iriure ad qui tation aliquip. Minim diam augue quis aliquip, exerci nulla dolore praesent tation consectetuer in et vulputate blandit consequat. Accumsan duis iriure, nisl enim nulla nostrud minim nulla facilisis zzril te ut feugait volutpat in blandit nulla amet ea quis. Dolor suscipit exerci eros consequat dolore feugiat ea dolor, ad vulputate. In enim sed autem odio enim zzril blandit vel eum facilisi vero, feugait, iriure et, consequat ut et euismod, ipsum praesent accumsan duis zzril in hendrerit. Ut accumsan dolor hendrerit, dignissim tincidunt commodo, odio consequat consectetuer delenit dignissim nulla dolore velit elit, accumsan veniam consectetuer nostrud vulputate magna nulla praesent.', 'Holiday, Tane', 0, 1, 1, '2007-05-21 16:42:52', '2007-05-21 16:42:52'); 
     453INSERT INTO `events` (`id`, `venue`, `address`, `city`, `country_id`, `postcode`, `event_type_id`, `event_date`, `event_time`, `event_url`, `body`, `tags`, `user_id`, `subject_id`, `published`, `created`, `modified`) VALUES  
     454(3, 'T In The Park', 'N/A', 'Balado', 1, 'KY', 3, '2007-07-08', '12:00:18', 'http://www.tinthepark.com', '<p>The Hedrons @ T In The Park<br /></p>', 'The Hedrons, T In The Park', 1, 1, 1, '2007-06-12 14:50:18', '2007-06-12 14:50:18'); 
    534455 
    535456-- -------------------------------------------------------- 
     
    549470--  
    550471 
    551 INSERT INTO `events_tags` (`event_id`, `tag_id`) VALUES  
    552 (1, 8), 
    553 (1, 17), 
    554 (2, 26), 
    555 (2, 27); 
    556472 
    557473-- -------------------------------------------------------- 
     
    586502  `id` int(8) unsigned NOT NULL auto_increment, 
    587503  `title` varchar(255) NOT NULL, 
    588   `url` varchar(255) NOT NULL, 
     504  `stub` varchar(255) NOT NULL, 
    589505  `primary_image` int(8) unsigned NOT NULL, 
    590506  `subject_id` int(8) unsigned NOT NULL, 
    591507  `published` tinyint(1) NOT NULL, 
     508  `tags` varchar(255) NOT NULL, 
    592509  `created` datetime NOT NULL, 
    593510  `modified` datetime NOT NULL, 
    594511  PRIMARY KEY  (`id`) 
    595 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
     512) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
    596513 
    597514--  
     
    599516--  
    600517 
    601 INSERT INTO `galleries` (`id`, `title`, `url`, `primary_image`, `subject_id`, `published`, `created`, `modified`) VALUES  
    602 (1, 'The Hedrons', 'the_hedrons', 1, 0, 0, '2007-05-03 15:40:24', '2007-05-03 15:40:24'); 
     518INSERT INTO `galleries` (`id`, `title`, `stub`, `primary_image`, `subject_id`, `published`, `tags`, `created`, `modified`) VALUES  
     519(4, 'The Hedrons @ Download', 'the_hedrons_download', 73, 1, 1, 'The Hedrons, Download, Festival, Slash', '2007-06-13 14:25:42', '2007-06-13 14:25:42'); 
    603520 
    604521-- -------------------------------------------------------- 
     
    618535 
    619536INSERT INTO `galleries_images` (`gallery_id`, `image_id`) VALUES  
    620 (1, 1), 
    621 (1, 2), 
    622 (1, 3); 
     537(4, 71), 
     538(4, 73); 
    623539 
    624540-- -------------------------------------------------------- 
     
    684600  `filename` varchar(255) default NULL, 
    685601  `dir` varchar(255) default NULL, 
    686   `thumb` varchar(255) default NULL, 
    687602  `mimetype` varchar(255) NOT NULL, 
    688603  `alt` varchar(255) default NULL, 
     
    699614  `modified` datetime default NULL, 
    700615  PRIMARY KEY  (`id`) 
    701 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=48
     616) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=77
    702617 
    703618--  
     
    705620--  
    706621 
    707 INSERT INTO `images` (`id`, `filename`, `dir`, `thumb`, `mimetype`, `alt`, `subject_id`, `copyright_owner`, `copyright_id`, `image_location`, `image_date`, `image_notes`, `filesize`, `tags`, `user_id`, `created`, `modified`) VALUES  
    708 (46, 'Firefox_wallpaper.png', 'files/Image', 'thumb.Firefox_wallpaper.png', 'image/png', 'Firefox', 1, 'sdfsdfdsfsdfds', 1, 'None', '2007-06-08', NULL, 231357, 'Test', 1, '2007-06-08 14:55:04', '2007-06-08 14:55:04'), 
    709 (45, 'TheHedrons_Group1.jpg', 'files/Image', 'thumb.TheHedrons_Group1.jpg', 'image/jpeg', 'The Hedrons Group', 1, 'The Hedrons', 1, 'None', '2007-06-05', 'The Hedrons', 146539, 'The Hedrons', 1, '2007-06-05 15:47:17', '2007-06-05 15:47:17'), 
    710 (47, 'Firefox_wallpaper.png', 'files/Image', 'thumb.Firefox_wallpaper.png', 'image/png', 'Firefox', 1, 'sdfsdfdsfsdfds', 1, 'None', '2007-06-08', NULL, 231357, 'Test', 1, '2007-06-08 14:55:42', '2007-06-08 14:55:42'); 
     622INSERT INTO `images` (`id`, `filename`, `dir`, `mimetype`, `alt`, `subject_id`, `copyright_owner`, `copyright_id`, `image_location`, `image_date`, `image_notes`, `filesize`, `tags`, `user_id`, `created`, `modified`) VALUES  
     623(76, 'IMG_0312.jpg', 'files/images', 'image/jpeg', 'The Hedrons @ Download', 2, 'The Hedrons', 1, 'Download Festival', '2007-06-08', '<p>Tippi being carried by the crowd<br /></p>', 3137664, 'The Hedrons, Download, Festival, Live, Gig', 1, '2007-06-13 15:21:26', '2007-06-13 17:15:52'), 
     624(73, 'IMG_0331.jpg', 'files/images', 'image/jpeg', 'The Hedrons @ Download 3', 1, 'The Hedrons', 1, 'Download Festival', '2007-06-08', '<p>Rosie &amp; Soup meet Slash!<br /></p>', 3469173, 'The Hedrons, Download, Festival, Live, Gig, Slash', NULL, '2007-06-13 14:25:13', '2007-06-13 14:25:13'), 
     625(71, 'IMG_0256.jpg', 'files/images', 'image/jpeg', 'The Hedrons @ Download 1', 1, 'The Hedrons', 1, 'Download Festival', '2007-06-08', '<p>The Hedrons preparing to go on stage at Download.<br /></p>', 3881221, 'The Hedrons, Download, Festival, Live, Gig', NULL, '2007-06-13 14:22:28', '2007-06-13 14:22:28'); 
    711626 
    712627-- -------------------------------------------------------- 
     
    731646(38, 29), 
    732647(38, 30), 
    733 (45, 4), 
    734 (46, 3), 
    735 (47, 3); 
     648(54, 37), 
     649(54, 39), 
     650(54, 40), 
     651(65, 4), 
     652(65, 5), 
     653(65, 6), 
     654(65, 8), 
     655(65, 41), 
     656(66, 4), 
     657(66, 5), 
     658(66, 6), 
     659(66, 8), 
     660(66, 41), 
     661(67, 4), 
     662(67, 5), 
     663(67, 6), 
     664(67, 8), 
     665(67, 41), 
     666(68, 4), 
     667(68, 5), 
     668(68, 6), 
     669(68, 8), 
     670(68, 41), 
     671(69, 4), 
     672(69, 5), 
     673(69, 6), 
     674(69, 8), 
     675(69, 41), 
     676(70, 4), 
     677(70, 5), 
     678(70, 6), 
     679(70, 8), 
     680(70, 41), 
     681(70, 42), 
     682(71, 4), 
     683(71, 5), 
     684(71, 6), 
     685(71, 8), 
     686(71, 41), 
     687(73, 4), 
     688(73, 5), 
     689(73, 6), 
     690(73, 8), 
     691(73, 41), 
     692(73, 42), 
     693(76, 4), 
     694(76, 5), 
     695(76, 6), 
     696(76, 8), 
     697(76, 41); 
    736698 
    737699-- -------------------------------------------------------- 
     
    829791CREATE TABLE `pages` ( 
    830792  `id` int(8) unsigned NOT NULL auto_increment, 
    831   `url` varchar(150) NOT NULL, 
    832   `title` varchar(50) NOT NULL, 
     793  `stub` varchar(255) NOT NULL, 
     794  `title` varchar(255) NOT NULL, 
    833795  `body` text NOT NULL, 
    834796  `published` tinyint(1) NOT NULL default '0', 
     
    836798  `subject_id` int(8) unsigned NOT NULL, 
    837799  `tags` varchar(255) NOT NULL, 
     800  `access_level` int(8) unsigned NOT NULL, 
     801  `comments_count` int(8) unsigned NOT NULL, 
    838802  `created` datetime NOT NULL, 
    839803  `modified` datetime NOT NULL, 
    840804  PRIMARY KEY  (`id`) 
    841 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3
     805) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
    842806 
    843807--  
     
    845809--  
    846810 
    847 INSERT INTO `pages` (`id`, `url`, `title`, `body`, `published`, `user_id`, `subject_id`, `tags`, `created`, `modified`) VALUES  
    848 (1, 'test', 'Test', 'Test', 1, 1, 1, '', '2007-05-02 17:48:53', '2007-05-02 17:48:53'), 
    849 (2, 'test_1', 'Test', 'Test', 1, 1, 1, '', '2007-05-02 17:51:21', '2007-05-02 17:51:21'); 
     811INSERT INTO `pages` (`id`, `stub`, `title`, `body`, `published`, `user_id`, `subject_id`, `tags`, `access_level`, `comments_count`, `created`, `modified`) VALUES  
     812(3, '', 'Test Page', '<p>Test Page<img alt="Test Image" title="Test Image" src="http://www.measuredrecords.com/news/images/hedrons-tpark.jpg"/><br /></p>', 1, 1, 1, 'Test Page', 0, 0, '2007-06-12 13:43:26', '2007-06-12 13:43:26'), 
     813(4, 'test_page', 'Test Page', '<p>Test Page<img alt="Test Image" title="Test Image" src="http://www.measuredrecords.com/news/images/hedrons-tpark.jpg"/><br /></p>', 1, 1, 1, 'Test Page', 0, 0, '2007-06-12 13:44:26', '2007-06-12 13:44:26'); 
    850814 
    851815-- -------------------------------------------------------- 
     
    914878--  
    915879 
    916 INSERT INTO `playlists` (`id`, `title`, `comments`) VALUES  
    917 (13, 'New Test Playlist', ''), 
    918 (14, 'New Test Playlist', ''); 
    919880 
    920881-- -------------------------------------------------------- 
     
    934895--  
    935896 
    936 INSERT INTO `playlists_tracks` (`playlist_id`, `track_id`, `position`) VALUES  
    937 (14, 3, 0), 
    938 (14, 4, 0), 
    939 (14, 6, 0), 
    940 (14, 5, 0), 
    941 (13, 3, 0), 
    942 (13, 5, 0), 
    943 (13, 6, 0), 
    944 (13, 4, 0); 
    945897 
    946898-- -------------------------------------------------------- 
     
    955907  `byline` varchar(255) NOT NULL, 
    956908  `body` text NOT NULL, 
    957   `post_date` date NOT NULL, 
    958   `comments_count` int(4) NOT NULL, 
     909  `post_date` datetime NOT NULL, 
     910  `comments_count` int(4) default NULL, 
    959911  `user_id` int(8) unsigned NOT NULL, 
    960912  `subject_id` int(8) unsigned NOT NULL, 
     
    967919  `modified` datetime default NULL, 
    968920  PRIMARY KEY  (`id`) 
    969 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9
     921) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=27
    970922 
    971923--  
     
    974926 
    975927INSERT INTO `posts` (`id`, `title`, `byline`, `body`, `post_date`, `comments_count`, `user_id`, `subject_id`, `access_level`, `stub`, `tags`, `frontpage`, `published`, `created`, `modified`) VALUES  
    976 (4, 'Wet Wet Wet At Newmarket Races', 'Wet Wet Wet go to the races', '<img src="../../files/Image/Wet_Wet_Wet_Group_Photo_3.medium.jpg" border="0" alt="Wet Wet Wet" align="left" />We are very pleased to be announcing that Wet Wet Wet will be playing live as part of Newmarket Racecourses series of summer events, when they will take to the July Course stage on Friday 17th August for the final &quot;<a href="http://www.newmarketracecourses.co.uk/newmarketnights.html">Newmarket Nights</a> &quot; of the season.<br /><br />For a gig with a difference, this event kicks off with an early evening programme of horse racing, and all the excitement of the racecourse before the band take to the stage for a fantastic open air performance.<br /><br />Tickets are priced &pound;28 for a Premier Enclosure, &pound;18 for Grandstand &amp; Paddock Enclosure and &pound;12 for the Garden Enclosure only. There are a limited number of child admissions priced at &pound;5 each, however once the limited number of child admissions have been sold, children will be charged at the full adult rate.<br /><br />Tickets are now on sale and can be booked online for a 5% discount on adult prices at <a href="http://www.newmarketracecourses.co.uk/tickets/index.html">www.newmarketracecourses.co.uk</a> . Tickets can also be booked by calling 08707 200 201 ', '2007-03-28', 0, 1, 1, 500, 'wet_wet_wet_at_newmarket_races', '', 1, 1, '2007-05-03 15:24:23', '2007-05-29 13:58:07'), 
    977 (5, 'Hue & Cry Confirmed For Retro Fest', 'Hue & Cry playing 80''s festival', '<img src="../../files/Image/Hue_and_Cry_Group_1.jpg" border="0" alt="Hue &amp; Cry" align="left" />We are delighted to announce that Hue &amp; Cry will be playing live at Culzean Castle, Ayrshire on Sunday 2nd September as part of the UK&rsquo;s first <a href="http://www.retrofest.co.uk/">Retrofest</a>  music festival. The festival, which spans over two days, will host 16 bands playing to 20,000 music fans. Hue and Cry are the first act to be announced for the Sunday lineup of this two day festival, with the lineup for Saturday including The Blockheads, Bananarama, Human League, Jimmy Somerville, Howard Jones, Go West, Tony Hadley and ABC.<br /><br />Hue &amp; Cry will showcase songs from their forthcoming album &quot;Open Soul&quot; as well as all the old classics.<br /><br />Tickets are priced at &pound;45 each for a day and &pound;75 each for a weekend. Family of four tickets are also available and are priced at &pound;150 for a day and &pound;200 for a weekend.<br />Tickets are on sale now, and are available online via <a href="http://www.ticketmaster.co.uk/search?tm_link=tm_header_search&amp;keyword=retrofest">Ticketmaster</a>  or <a href="http://scotland.realradiofm.com/Article.asp?id=373308&amp;s=events">Real Radio</a> . They are also available to buy over the phone through Ticketmaster on 0870 169 0100.', '2007-03-26', 0, 1, 1, 0, 'hue_cry_confirmed_for_retro_fest', 'Hue  Cry, Retrofest, Festival, Gig', 1, 1, '2007-05-03 15:29:31', '2007-05-29 13:58:23'), 
    978 (6, 'Test Post', 'Testing Counter Cache for Subjects', '<p>At illum accumsan qui wisi nibh amet, te delenit hendrerit minim vero, vel enim minim in ut dolore dignissim zzril. Nulla molestie sed feugiat illum nostrud, nostrud et in et exerci velit ea volutpat vulputate ut iusto dolore vulputate vero. Facilisi, suscipit suscipit in elit odio, lobortis vel feugait enim molestie ea blandit facilisis consequat, wisi, erat ut zzril vulputate, nonummy nostrud zzril nisl. Sed accumsan tincidunt autem suscipit, consequat eu veniam enim. Et, duis nonummy ut suscipit dolore ea eum dignissim magna wisi ut eum ex, tation veniam feugait ea tincidunt, dolore aliquip, facilisi duis hendrerit praesent volutpat. Consequat commodo sit duis blandit odio duis, autem magna nulla duis at ipsum velit molestie vero exerci feugait, elit. </p><p>Delenit augue ad minim et erat luptatum feugiat eros vel at exerci autem enim in ad commodo quis ex eu. Vero esse ad, diam ut illum euismod autem illum aliquip nulla ex nisl facilisis dignissim qui ullamcorper et. Et, autem blandit adipiscing, iriure ex, adipiscing ullamcorper suscipit qui in luptatum facilisi ut eros laoreet qui, vel wisi commodo, eu vulputate commodo. </p><p>Dolor facilisis consequat, wisi, erat ut zzril vulputate, nonummy nostrud zzril nisl dolor accumsan tincidunt autem suscipit, consequat eu veniam enim duis, duis nonummy ut. At dolore ea eum dignissim magna wisi ut eum ex, tation veniam feugait. Ut tincidunt, dolore aliquip, facilisi duis hendrerit praesent volutpat minim commodo sit duis. Eros odio duis, autem magna nulla duis at ipsum velit molestie vero exerci feugait, elit lorem delenit. </p><p>Iriure minim et erat luptatum feugiat eros vel at exerci autem enim in ad commodo quis ex eu te. Vel ad, diam ut illum euismod autem illum aliquip nulla ex nisl facilisis dignissim qui ullamcorper et dolore, autem blandit adipiscing, iriure ex. Ut ullamcorper suscipit qui in luptatum facilisi ut eros. Elit qui, vel wisi commodo, eu vulputate commodo eum dolor. Consequat, te, ad lobortis consequat augue hendrerit, ut consectetuer vel esse sed lorem esse, augue consequat nisl, tation, feugait. </p>', '2007-05-21', 0, 1, 1, 0, 'test_post', 'Fake Latin, Test Post, The Hedrons', 1, 1, '2007-05-21 16:22:42', '2007-05-29 13:58:38'), 
    979 (8, 'Test', 'Monkey', '<p>This is normal text</p><p class="hidden-note date important">This is important</p><p class="date">Date<br /></p>', '2007-06-08', 0, 1, 1, 0, 'test_2', 'Test', 1, 1, '2007-06-08 15:22:37', '2007-06-08 15:22:37'); 
     928(26, 'About our Sun', 'Some information', '<p><img alt="Our Sun" title="Our Sun" src="/files/images/thumb.medium.sun_full_disk_soho_09_14_1997.jpg" style="margin: 10px; float: left;"/>\r\nThe Sun (Latin: Sol) is the star at the center of the Solar System. The Earth and other matter (including other planets, asteroids, meteoroids, comets and dust) orbit the Sun, which by itself accounts for about 99.8% of the solar system''s mass. Energy from the Sun—in the form of sunlight—supports almost all life on Earth via photosynthesis, and drives the Earth''s climate and weather.</p>\r\n\r\n<p>The Sun is composed of hydrogen (about 74% of its mass, or 92% of its volume), helium (about 25% of mass, 7% of volume), and trace quantities of other elements. The Sun has a spectral class of G2V. G2 implies that it has a surface temperature of approximately 5,500 K (or approximately 9,600 degrees Fahrenheit / 5,315 Celsius), giving it a white color which, because of atmospheric scattering, appears yellow as seen from the surface of the Earth. This is a subtractive effect, as the preferential scattering of blue photons (causing the sky color) removes enough blue light to leave a residual reddishness that is perceived as yellow. (If low enough in the sky, the Sun appears orange or red, due to this scattering.)</p>\r\n\r\n<p>Its spectrum contains lines of ionized and neutral metals as well as very weak hydrogen lines. The V (Roman five) suffix indicates that the Sun, like most stars, is a main sequence star. This means that it generates its energy by nuclear fusion of hydrogen nuclei into helium and is in a state of hydrostatic balance, neither contracting nor expanding over time. There are more than 100 million G2 class stars in our galaxy. Because of logarithmic size distribution, the Sun is actually brighter than 85% of the stars in the galaxy, most of which are red dwarfs.[1]</p>\r\n\r\n<p>The Sun orbits the center of the Milky Way galaxy at a distance of approximately 26,000 light-years from the galactic center, completing one revolution in about 225–250 million years. The orbital speed is 217 km/s (135 mi/s), equivalent to one light-year every 1,400 years, and one AU every 8 days.[2]</p>', '2007-06-13 12:07:43', NULL, 1, 1, 0, 'about_our_sun', 'Sun, Sol, Space, Hot, Star', 1, 1, '2007-06-13 12:10:43', '2007-06-13 12:10:43'); 
    980929 
    981930-- -------------------------------------------------------- 
     
    1003952(3, 8), 
    1004953(3, 16), 
    1005 (5, 6), 
    1006 (5, 8), 
    1007 (5, 11), 
    1008 (5, 12), 
    1009 (6, 4), 
    1010 (6, 24), 
    1011 (6, 25), 
    1012 (7, 3), 
    1013 (8, 3); 
     954(7, 3); 
    1014955 
    1015956-- -------------------------------------------------------- 
     
    11521093  `id` int(8) unsigned NOT NULL auto_increment, 
    11531094  `title` varchar(255) NOT NULL, 
    1154   `posts_count` int(8) unsigned NOT NULL, 
    1155   `pages_count` int(8) unsigned NOT NULL, 
    1156   `events_count` int(8) unsigned NOT NULL, 
    1157   `feeds_count` int(8) unsigned NOT NULL, 
    1158   `images_count` int(8) unsigned NOT NULL, 
    1159   `galleries_count` int(8) unsigned NOT NULL, 
    1160   `videos_count` int(8) unsigned NOT NULL, 
    1161   `created` datetime NOT NULL, 
    1162   `modified` datetime NOT NULL, 
    1163   PRIMARY KEY  (`id`) 
    1164 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
     1095  `posts_count` int(8) unsigned default NULL, 
     1096  `pages_count` int(8) unsigned default NULL, 
     1097  `events_count` int(8) unsigned default NULL, 
     1098  `feeds_count` int(8) unsigned default NULL, 
     1099  `images_count` int(8) unsigned default NULL, 
     1100  `galleries_count` int(8) unsigned default NULL, 
     1101  `videos_count` int(8) unsigned default NULL, 
     1102  `created` datetime default NULL, 
     1103  `modified` datetime default NULL, 
     1104  PRIMARY KEY  (`id`) 
     1105) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3
    11651106 
    11661107--  
     
    11691110 
    11701111INSERT INTO `subjects` (`id`, `title`, `posts_count`, `pages_count`, `events_count`, `feeds_count`, `images_count`, `galleries_count`, `videos_count`, `created`, `modified`) VALUES  
    1171 (1, 'Webrocket', 4, 0, 2, 0, 3, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'); 
     1112(1, 'Webrocket', 9, 0, 2, 0, 3, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'), 
     1113(2, 'The Hedrons', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2007-06-13 16:36:18', '2007-06-13 16:36:18'); 
    11721114 
    11731115-- -------------------------------------------------------- 
     
    11811123  `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 
    11821124  PRIMARY KEY  (`id`) 
    1183 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=34 ; 
     1125) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=44 ; 
    11841126 
    11851127--  
     
    12201162(31, 'Ubuntu'), 
    12211163(32, 'Geek'), 
    1222 (33, 'Die Windows'); 
     1164(33, 'Die Windows'), 
     1165(34, 'T In The Park'), 
     1166(35, 'Logo'), 
     1167(36, 'Sun'), 
     1168(37, 'Space'), 
     1169(38, 'Hot'), 
     1170(39, 'The Sun'), 
     1171(40, 'Star'), 
     1172(41, 'Live'), 
     1173(42, 'Slash'), 
     1174(43, '1'); 
    12231175 
    12241176-- -------------------------------------------------------- 
     
    13761328 
    13771329INSERT INTO `users` (`id`, `username`, `passwd`, `name`, `email`, `last_visit`, `group_id`, `profile_id`, `posts_count`, `pages_count`, `comments_count`, `videos_count`, `tags`, `active`, `created`, `modified`) VALUES  
    1378 (1, 'WebrocketAdmin', 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-06-08 15:46:17', 1, 1, 4, 2, 2, 0, '', 1, '2007-03-26 00:00:00', '0000-00-00 00:00:00'), 
     1330(1, 'WebrocketAdmin', 'fdfedc01c66e9ea2817508ca1097df2f', 'Webrocket Admin', 'admin@webrocket.com', '2007-06-11 17:29:46', 1, 1, 9, 2, 2, 0, '', 1, '2007-03-26 00:00:00', '0000-00-00 00:00:00'), 
    13791331(2, 'Editor', '5aee9dbd2a188839105073571bee1b1f', 'Site', 'Editor', '2007-04-27 10:02:45', 2, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'), 
    13801332(3, 'Member', 'aa08769cdcb26674c6706093503ff0a3', 'Member', 'member@member.com', '2007-04-26 13:43:34', 3, 0, 0, 0, 0, 0, '', 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00'); 
  • branch/models/gallery.php

    r55 r63  
    55        var $validate = array( 
    66                'title' => VALID_NOT_EMPTY, 
    7                 'url' => VALID_NOT_EMPTY, 
    87                'primary_image' => VALID_NOT_EMPTY, 
    98                'subject_id' => VALID_NOT_EMPTY, 
     
    3534                                                'deleteQuery' => '', 
    3635                                                'insertQuery' => ''), 
     36                        'Tag' => array('className' => 'Tag', 
     37                                                'joinTable' => 'images_tags', 
     38                                                'foreignKey' => 'image_id', 
     39                                                'associationForeignKey' => 'tag_id', 
     40                                                'conditions' => '', 
     41                                                'fields' => '', 
     42                                                'order' => 'Tag.tag ASC', 
     43                                                'limit' => '', 
     44                                                'offset' => '', 
     45                                                'unique' => true, 
     46                                                'finderQuery' => '', 
     47                                                'deleteQuery' => '', 
     48                                                'insertQuery' => '') 
    3749        ); 
     50         
     51        function beforeSave() 
     52    { 
     53        if (empty($this->id)) 
     54        { 
     55            $this->data[$this->name]['stub'] = $this->getUniqueUrl($this->data[$this->name]['title'], 'stub'); 
     56        } 
     57         
     58        return true; 
     59    } 
    3860 
    3961} 
  • branch/models/image.php

    r55 r63  
    33 
    44        var $name = 'Image'; 
    5         var $validate = array( 
    6                 'mimetype' => VALID_NOT_EMPTY, 
     5         
     6        var $actsAs = array('CounterCache','Tag', 'Upload' => array( 
     7                                'filename' => array( 
     8                                                'dir' => 'files/images', 
     9                                                'overwrite_existing' => true, 
     10                                                'create_directory' => true, 
     11                                                'allowed_mime' => array('image/jpeg', 'image/pjpeg', 'image/gif', 'image/png'), 
     12                                                'allowed_ext' => array('.jpg', '.jpeg', '.png', '.gif'), 
     13                                                'thumbsizes' => array( 
     14                                                                                'small' =>      array('width'=>100, 'height'=>100), 
     15                                                                                'medium'=>      array('width'=>220, 'height'=>220), 
     16                                                                                'large' =>      array('width'=>800, 'height'=>600) 
     17                                                ) 
     18                                ) 
     19                        ) 
    720        ); 
    821 
     
    6376                                                'conditions' => '', 
    6477                                                'fields' => '', 
    65                                                 'order' => '', 
     78                                                'order' => 'Tag.tag ASC', 
    6679                                                'limit' => '', 
    6780                                                'offset' => '', 
    68                                                 'unique' => ''
     81                                                'unique' => true
    6982                                                'finderQuery' => '', 
    7083                                                'deleteQuery' => '', 
  • branch/views/elements/js_include.ctp

    r61 r63  
    11<?php e($javascript->link('jquery'));?> 
    2 <?php //e($javascript->link('jamal'));?> 
     2<?php e($javascript->link('jamal'));?> 
    33<?php e($javascript->link('wymeditor/jquery.wymeditor'));?> 
    44<?php e($javascript->link('wymeditor/plugins/tidy/jquery.wymeditor.tidy'));?> 
    55<?php e($javascript->link('wymeditor/plugins/hovertools/jquery.wymeditor.hovertools'));?> 
     6<?php e($javascript->link('thickbox'));?> 
    67<?php e($javascript->link('webrocket'));?> 
  • branch/views/galleries/admin_add.ctp

    r55 r63  
    33        <?php echo $form->create('Gallery');?> 
    44                <?php echo $form->input('title', array('class' => 'required'));?> 
    5                 <?php echo $form->input('url', array('class' => 'required'));?> 
    6                 <?php echo $form->input('primary_image', array('class' => 'required'));?> 
     5                <?php echo $form->input('primary_image', array('options' => $images, 'class' => 'required'));?> 
    76                <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 
    87                <?php echo $form->input('published', array('class' => 'required'));?> 
     8                <?php echo $form->input('tags', array('type'=>'text', 'class' => 'required'));?> 
    99                <?php echo $form->input('Image/Image', array('options' => $images, 'multiple' => 'multiple'));?> 
    1010                <?php echo $form->submit('Add');?> 
  • branch/views/galleries/admin_index.ctp

    r55 r63  
    66                <th><?php echo $paginator->sort('id');?></th> 
    77                <th><?php echo $paginator->sort('title');?></th> 
    8                 <th><?php echo $paginator->sort('url');?></th> 
    98                <th><?php echo $paginator->sort('primary_image');?></th> 
    109                <th><?php echo $paginator->sort('subject_id');?></th> 
     
    1615                <td><?php echo $gallery['Gallery']['id']; ?></td> 
    1716                <td><?php echo $gallery['Gallery']['title']; ?></td> 
    18                 <td><?php echo $gallery['Gallery']['url']; ?></td> 
    1917                <td><?php echo $gallery['Gallery']['primary_image']; ?></td> 
    2018                <td><?php echo $html->link($gallery['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $gallery['Subject']['id'])); ?></td> 
  • branch/views/galleries/admin_view.ctp

    r55 r63  
    11<div class="gallery"> 
    2 <h2>View Gallery</h2> 
     2<h2>View Gallery <?php echo $gallery['Gallery']['title']?></h2> 
    33 
    4         <dl> 
    5                 <dt>Id</dt> 
    6                 <dd>&nbsp;<?php echo $gallery['Gallery']['id']?></dd> 
    7                 <dt>Title</dt> 
    8                 <dd>&nbsp;<?php echo $gallery['Gallery']['title']?></dd> 
    9                 <dt>Url</dt> 
    10                 <dd>&nbsp;<?php echo $gallery['Gallery']['url']?></dd> 
    11                 <dt>Primary Image</dt> 
    12                 <dd>&nbsp;<?php echo $gallery['Gallery']['primary_image']?></dd> 
    13                 <dt>Subject</dt> 
    14                 <dd>&nbsp;<?php echo $html->link($gallery['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $gallery['Subject']['id'])); ?></dd> 
    15                 <dt>Published</dt> 
    16                 <dd>&nbsp;<?php echo $gallery['Gallery']['published']?></dd> 
    17         </dl> 
    18 </div> 
    19 <div class="actions"> 
    20         <ul> 
    21                 <li><?php echo $html->link('Edit Gallery',   array('action'=>'edit', $gallery['Gallery']['id'])); ?> </li> 
    22                 <li><?php echo $html->link('Delete Gallery', array('action'=>'delete', $gallery['Gallery']['id']), null, 'Are you sure you want to delete #' . $gallery['Gallery']['id'] . '?'); ?> </li> 
    23                 <li><?php echo $html->link('List Galleries', array('action'=>'index')); ?> </li> 
    24                 <li><?php echo $html->link('New Gallery', array('action'=>'add')); ?> </li> 
    25                 <li><?php echo $html->link('List Subject', array('controller'=> 'subjects', 'action'=>'index')); ?> </li> 
    26                 <li><?php echo $html->link('New Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?> </li> 
    27         </ul> 
    28  
    29 </div> 
    30 <div class="related"> 
    31 <h3>Related Images</h3> 
    324<?php if(!empty($gallery['Image'])):?> 
    33 <table cellpadding="0" cellspacing="0"> 
    34         <tr> 
    35                 <th>Id</th> 
    36                 <th>Filename</th> 
    37                 <th>Dir</th> 
    38                 <th>Thumb</th> 
    39                 <th>Mimetype</th> 
    40                 <th>Alt</th> 
    41                 <th>Subject Id</th> 
    42                 <th>Copyright Owner</th> 
    43                 <th>Copyright Id</th> 
    44                 <th>Image Location</th> 
    45                 <th>Image Date</th> 
    46                 <th>Image Notes</th> 
    47                 <th>Filesize</th> 
    48                 <th>Tags</th> 
    49                 <th>User Id</th> 
    50                 <th>Created</th> 
    51                 <th>Modified</th> 
    52                 <th>Actions</th> 
    53         </tr> 
     5<ul class="gallery"> 
    546<?php foreach($gallery['Image'] as $image):?> 
    55         <tr> 
    56                 <td><?php echo $image['id'];?></td> 
    57                 <td><?php echo $image['filename'];?></td> 
    58                 <td><?php echo $image['dir'];?></td> 
    59                 <td><?php echo $image['thumb'];?></td> 
    60                 <td><?php echo $image['mimetype'];?></td> 
    61                 <td><?php echo $image['alt'];?></td> 
    62                 <td><?php echo $image['subject_id'];?></td> 
    63                 <td><?php echo $image['copyright_owner'];?></td> 
    64                 <td><?php echo $image['copyright_id'];?></td> 
    65                 <td><?php echo $image['image_location'];?></td> 
    66                 <td><?php echo $image['image_date'];?></td> 
    67                 <td><?php echo $image['image_notes'];?></td> 
    68                 <td><?php echo $image['filesize'];?></td> 
    69                 <td><?php echo $image['tags'];?></td> 
    70                 <td><?php echo $image['user_id'];?></td> 
    71                 <td><?php echo $image['created'];?></td> 
    72                 <td><?php echo $image['modified'];?></td> 
    73                 <td class="actions"> 
    74                         <?php echo $html->link('View', array('controller'=> 'images', 'action'=>'view', $image['id'])); ?> 
    75                         <?php echo $html->link('Edit', array('controller'=> 'images', 'action'=>'edit', $image['id'])); ?> 
    76                         <?php echo $html->link('Delete', array('controller'=> 'images', 'action'=>'delete', $image['id']), null, 'Are you sure you want to delete #' . $image['id'] . '?'); ?> 
    77                 </td> 
    78         </tr> 
     7        <li><a class="thickbox" rel="gallery-<?php e($gallery['Gallery']['id']);?>" title="<?php e($image['image_date']);?> - <?php e($image['alt']);?>" href="<?php e(DS . $image['dir'] . DS . 'thumb.large.' . $image['filename']);?>"><img src="<?php e(DS . $image['dir'] . DS . 'thumb.small.' . $image['filename']);?>" alt="<?php e($image['alt']);?>" title="<?php e($image['alt']);?>" /></a></li> 
    798<?php endforeach; ?> 
    80 </table> 
     9</ul> 
     10<br style="clear:both;" /> 
    8111<?php endif; ?> 
    82  
    83         <div class="actions"> 
    84                 <ul> 
    85                         <li><?php echo $html->link('New Image', array('controller'=> 'images', 'action'=>'add'));?> </li> 
    86                 </ul> 
    87         </div> 
    88 </div> 
  • branch/views/galleries/view.ctp

    r55 r63  
    11<div class="gallery"> 
    2 <h2>View Gallery</h2> 
     2<h2>View Gallery <?php echo $gallery['Gallery']['title']?></h2> 
    33 
    4         <dl> 
    5                 <dt>Id</dt> 
    6                 <dd>&nbsp;<?php echo $gallery['Gallery']['id']?></dd> 
    7                 <dt>Title</dt> 
    8                 <dd>&nbsp;<?php echo $gallery['Gallery']['title']?></dd> 
    9                 <dt>Url</dt> 
    10                 <dd>&nbsp;<?php echo $gallery['Gallery']['url']?></dd> 
    11                 <dt>Primary Image</dt> 
    12                 <dd>&nbsp;<?php echo $gallery['Gallery']['primary_image']?></dd> 
    13                 <dt>Subject</dt> 
    14                 <dd>&nbsp;<?php echo $html->link($gallery['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $gallery['Subject']['id'])); ?></dd> 
    15                 <dt>Published</dt> 
    16                 <dd>&nbsp;<?php echo $gallery['Gallery']['published']?></dd> 
    17         </dl> 
    18 </div> 
    19 <div class="actions"> 
    20         <ul> 
    21                 <li><?php echo $html->link('Edit Gallery',   array('action'=>'edit', $gallery['Gallery']['id'])); ?> </li> 
    22                 <li><?php echo $html->link('Delete Gallery', array('action'=>'delete', $gallery['Gallery']['id']), null, 'Are you sure you want to delete #' . $gallery['Gallery']['id'] . '?'); ?> </li> 
    23                 <li><?php echo $html->link('List Galleries', array('action'=>'index')); ?> </li> 
    24                 <li><?php echo $html->link('New Gallery', array('action'=>'add')); ?> </li> 
    25                 <li><?php echo $html->link('List Subject', array('controller'=> 'subjects', 'action'=>'index')); ?> </li> 
    26                 <li><?php echo $html->link('New Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?> </li> 
    27         </ul> 
    28  
    29 </div> 
    30 <div class="related"> 
    31 <h3>Related Images</h3> 
    324<?php if(!empty($gallery['Image'])):?> 
    33 <table cellpadding="0" cellspacing="0"> 
    34         <tr> 
    35                 <th>Id</th> 
    36                 <th>Filename</th> 
    37                 <th>Dir</th> 
    38