Changeset 69
- Timestamp:
- 06/15/07 16:52:28 (1 year ago)
- Files:
-
- branch/controllers/tags_controller.php (modified) (1 diff)
- branch/db.sql (modified) (30 diffs)
- branch/models/event.php (modified) (1 diff)
- branch/models/gallery.php (modified) (1 diff)
- branch/models/page.php (modified) (1 diff)
- branch/models/playlist.php (modified) (1 diff)
- branch/models/post.php (modified) (1 diff)
- branch/models/tag.php (modified) (1 diff)
- branch/models/track.php (modified) (1 diff)
- branch/models/user.php (modified) (1 diff)
- branch/models/video.php (modified) (1 diff)
- branch/views/elements/tagcloud.ctp (added)
- branch/views/galleries/view.ctp (modified) (1 diff)
- branch/views/layouts/default.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/controllers/tags_controller.php
r68 r69 153 153 { 154 154 $this->layout = 'ajax'; 155 $this->set('results', $this->Tag->query('SELECT `tag` FROM `tags` AS `Tag` WHERE `tag` LIKE "' . $_GET['q'] . '%" LIMIT ' . $_GET['limit'])); 155 $this->set('results', $this->Tag->findTag($_GET['q'],$_GET['limit'])); 156 } 157 158 function tagcloud() 159 { 160 $tagcloud = $this->Tag->tagcloud(); 161 if(isset($this->params['requested'])) { 162 return $tagcloud; 163 } 164 $this->set('tagcloud',$tagcloud); 156 165 } 157 166 branch/db.sql
r63 r69 4 4 -- 5 5 -- Host: localhost 6 -- Generation Time: Jun 1 3, 2007 at 05:52PM6 -- Generation Time: Jun 15, 2007 at 05:01 PM 7 7 -- Server version: 5.0.38 8 8 -- PHP Version: 5.2.1 … … 23 23 PRIMARY KEY (`id`) 24 24 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 25 26 --27 -- Dumping data for table `cake_sessions`28 --29 30 INSERT INTO `cake_sessions` (`id`, `data`, `expires`) VALUES31 ('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);32 25 33 26 -- -------------------------------------------------------- … … 47 40 `modified` datetime NOT NULL, 48 41 PRIMARY KEY (`id`) 49 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; 50 51 -- 52 -- Dumping data for table `comments` 53 -- 54 55 INSERT INTO `comments` (`id`, `post_id`, `user_id`, `title`, `body`, `published`, `created`, `modified`) VALUES 56 (1, 1, 1, 'Test', 'Test', 1, '2007-05-02 17:48:17', '2007-05-02 17:48:17'), 57 (2, 1, 1, 'TestT', 'Test', 1, '2007-05-02 17:51:10', '2007-05-02 17:51:10'); 58 42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 59 43 -- -------------------------------------------------------- 60 44 … … 78 62 (1, 'general', 'Site Options', 'These are the main options that control the site'), 79 63 (2, 'video', 'Video Options', 'These are options that control video on the site'), 80 (3, 'post', ' ', '');64 (3, 'post', 'Post Options', 'These are options that control how posts appear on the site'); 81 65 82 66 -- -------------------------------------------------------- … … 445 429 `modified` datetime NOT NULL, 446 430 PRIMARY KEY (`id`) 447 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4;431 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 448 432 449 433 -- … … 451 435 -- 452 436 453 INSERT 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`) VALUES454 (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');455 437 456 438 -- -------------------------------------------------------- … … 486 468 `modified` datetime NOT NULL, 487 469 PRIMARY KEY (`id`) 488 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;470 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 489 471 490 472 -- … … 510 492 `modified` datetime NOT NULL, 511 493 PRIMARY KEY (`id`) 512 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5;494 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 513 495 514 496 -- … … 516 498 -- 517 499 518 INSERT INTO `galleries` (`id`, `title`, `stub`, `primary_image`, `subject_id`, `published`, `tags`, `created`, `modified`) VALUES519 (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');520 500 521 501 -- -------------------------------------------------------- … … 534 514 -- 535 515 536 INSERT INTO `galleries_images` (`gallery_id`, `image_id`) VALUES 537 (4, 71), 538 (4, 73); 516 517 -- -------------------------------------------------------- 518 519 -- 520 -- Table structure for table `galleries_tags` 521 -- 522 523 CREATE TABLE `galleries_tags` ( 524 `gallery_id` int(8) unsigned NOT NULL, 525 `tag_id` int(8) unsigned NOT NULL 526 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 527 528 -- 529 -- Dumping data for table `galleries_tags` 530 -- 531 539 532 540 533 -- -------------------------------------------------------- … … 614 607 `modified` datetime default NULL, 615 608 PRIMARY KEY (`id`) 616 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=77;609 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 617 610 618 611 -- … … 620 613 -- 621 614 622 INSERT 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`) VALUES623 (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 & 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');626 615 627 616 -- -------------------------------------------------------- … … 640 629 -- Dumping data for table `images_tags` 641 630 -- 642 643 INSERT INTO `images_tags` (`image_id`, `tag_id`) VALUES644 (37, 29),645 (37, 30),646 (38, 29),647 (38, 30),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);698 631 699 632 -- -------------------------------------------------------- … … 803 736 `modified` datetime NOT NULL, 804 737 PRIMARY KEY (`id`) 805 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5;738 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 806 739 807 740 -- 808 741 -- Dumping data for table `pages` 809 742 -- 810 811 INSERT INTO `pages` (`id`, `stub`, `title`, `body`, `published`, `user_id`, `subject_id`, `tags`, `access_level`, `comments_count`, `created`, `modified`) VALUES812 (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');814 743 815 744 -- -------------------------------------------------------- … … 872 801 `comments` varchar(255) collate utf8_unicode_ci NOT NULL, 873 802 PRIMARY KEY (`id`) 874 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=15;803 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 875 804 876 805 -- … … 919 848 `modified` datetime default NULL, 920 849 PRIMARY KEY (`id`) 921 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=27;850 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 922 851 923 852 -- … … 925 854 -- 926 855 927 INSERT INTO `posts` (`id`, `title`, `byline`, `body`, `post_date`, `comments_count`, `user_id`, `subject_id`, `access_level`, `stub`, `tags`, `frontpage`, `published`, `created`, `modified`) VALUES928 (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');929 856 930 857 -- -------------------------------------------------------- … … 943 870 -- Dumping data for table `posts_tags` 944 871 -- 945 946 INSERT INTO `posts_tags` (`post_id`, `tag_id`) VALUES947 (2, 3),948 (3, 4),949 (3, 5),950 (3, 6),951 (3, 7),952 (3, 8),953 (3, 16),954 (7, 3);955 872 956 873 -- -------------------------------------------------------- … … 970 887 `modified` datetime NOT NULL, 971 888 PRIMARY KEY (`id`) 972 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;889 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 973 890 974 891 -- … … 987 904 `name` varchar(50) NOT NULL, 988 905 PRIMARY KEY (`id`) 989 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 4;906 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 990 907 991 908 -- … … 994 911 995 912 INSERT INTO `sections` (`id`, `name`) VALUES 996 (1, 'Top Navigation'), 997 (2, 'User Menu'), 998 (3, 'admin_home'); 913 (1, 'Main Navigation'); 999 914 1000 915 -- -------------------------------------------------------- … … 1103 1018 `modified` datetime default NULL, 1104 1019 PRIMARY KEY (`id`) 1105 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 3;1020 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 1106 1021 1107 1022 -- … … 1110 1025 1111 1026 INSERT INTO `subjects` (`id`, `title`, `posts_count`, `pages_count`, `events_count`, `feeds_count`, `images_count`, `galleries_count`, `videos_count`, `created`, `modified`) VALUES 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'); 1027 (1, 'Uncatagorised', 9, 0, 2, 0, 3, 0, 0, '2007-05-01 17:05:55', '2007-05-01 17:05:55'); 1114 1028 1115 1029 -- -------------------------------------------------------- … … 1123 1037 `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 1124 1038 PRIMARY KEY (`id`) 1125 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=44;1039 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 1126 1040 1127 1041 -- 1128 1042 -- Dumping data for table `tags` 1129 1043 -- 1130 1131 INSERT INTO `tags` (`id`, `tag`) VALUES1132 (1, 'Test 1'),1133 (2, 'Test 2'),1134 (3, 'Test'),1135 (4, 'The Hedrons'),1136 (5, 'Download'),1137 (6, 'Festival'),1138 (7, 'Summer'),1139 (8, 'Gig'),1140 (9, 'Wet Wet Wet'),1141 (10, 'Newmarket Races'),1142 (11, 'Hue Cry'),1143 (12, 'Retrofest'),1144 (13, 'Tour'),1145 (14, 'Video'),1146 (15, 'Single'),1147 (16, 'Isle Of Wight'),1148 (17, 'No Half Measures'),1149 (18, 'Epk'),1150 (19, 'Biography'),1151 (20, 'Be My Friend'),1152 (21, 'I Need You'),1153 (22, 'Couldnt Leave Her Alone'),1154 (23, 'Heatseeker'),1155 (24, 'Fake Latin'),1156 (25, 'Test Post'),1157 (26, 'Holiday'),1158 (27, 'Tane'),1159 (28, 'Mailing List'),1160 (29, 'Test Upload'),1161 (30, 'Behaviour'),1162 (31, 'Ubuntu'),1163 (32, 'Geek'),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');1175 1044 1176 1045 -- -------------------------------------------------------- … … 1188 1057 -- Dumping data for table `tags_tracks` 1189 1058 -- 1190 1191 INSERT INTO `tags_tracks` (`tag_id`, `track_id`) VALUES1192 (4, 4),1193 (4, 3),1194 (4, 5),1195 (4, 6);1196 1059 1197 1060 -- -------------------------------------------------------- … … 1227 1090 -- Dumping data for table `tags_videos` 1228 1091 -- 1229 1230 INSERT INTO `tags_videos` (`tag_id`, `video_id`) VALUES1231 (23, 20),1232 (22, 20),1233 (21, 20),1234 (20, 20),1235 (4, 15),1236 (4, 14),1237 (4, 13),1238 (4, 12),1239 (19, 20),1240 (18, 20),1241 (14, 20),1242 (4, 20);1243 1092 1244 1093 -- -------------------------------------------------------- … … 1262 1111 `modified` datetime default NULL, 1263 1112 PRIMARY KEY (`id`) 1264 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=7;1113 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; 1265 1114 1266 1115 -- 1267 1116 -- Dumping data for table `tracks` 1268 1117 -- 1269 1270 INSERT INTO `tracks` (`id`, `filename`, `dir`, `mimetype`, `filesize`, `trackname`, `artist`, `infourl`, `tags`, `image_id`, `created`, `modified`) VALUES1271 (3, '01__Heatseeker.mp3', 'files/Media', 'audio/mpeg', 1399270, 'Heatseeker', 'The Hedrons', 'http://www.7digital.com/stores/productDetail.aspx?shop=34&product=55080&sid=639775', 'The Hedrons', 45, '2007-06-05 15:49:11', '2007-06-05 15:49:11'),1272 (4, '02__Couldnt_Leave_Her_Alone.mp3', 'files/Media', 'audio/mpeg', 1078158, 'Couldn''t Leave Her Alone', 'The Hedrons', 'http://www.7digital.com/stores/productDetail.aspx?shop=34&product=55080&sid=639775', 'The Hedrons', 45, '2007-06-05 15:51:51', '2007-06-05 15:51:51'),1273 (5, '03__I_Need_You.mp3', 'files/Media', 'audio/mpeg', 1185184, 'I Need You', 'The Hedrons', 'http://www.7digital.com/stores/productDetail.aspx?shop=34&product=55080&sid=639775', 'The Hedrons', 45, '2007-06-05 15:53:54', '2007-06-05 15:53:54'),1274 (6, '04__Be_My_Friend.mp3', 'files/Media', 'audio/mpeg', 1054441, 'Be My Friend', 'The Hedrons', 'http://www.7digital.com/stores/productDetail.aspx?shop=34&product=55080&sid=639775', 'The Hedrons', 45, '2007-06-05 15:59:45', '2007-06-05 15:59:45');1275 1118 1276 1119 -- -------------------------------------------------------- … … 1287 1130 `visitdate` datetime NOT NULL, 1288 1131 PRIMARY KEY (`id`) 1289 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;1132 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1290 1133 1291 1134 -- … … 1321 1164 UNIQUE KEY `email` (`email`,`username`), 1322 1165 KEY `group_id` (`group_id`) 1323 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 5;1166 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; 1324 1167 1325 1168 -- … … 1354 1197 `modified` datetime NOT NULL, 1355 1198 PRIMARY KEY (`id`) 1356 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=21;1199 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1357 1200 1358 1201 -- 1359 1202 -- Dumping data for table `videos` 1360 1203 -- 1361 1362 INSERT INTO `videos` (`id`, `title`, `url`, `video_location`, `video_date`, `body`, `copyright_owner`, `copyright_id`, `published`, `user_id`, `subject_id`, `tags`, `created`, `modified`) VALUES1363 (20, 'The Hedrons EPK', 'http://www.youtube.com/v/28u-swVWo9Q', 'N/A', '2007-05-17', 'The Hedrons EPK', 'The Hedrons', 1, 0, 0, 1, 'The Hedrons, Video, Epk, Biography, Be My Friend, I Need You, Couldnt Leave Her Alone, Heatseeker', '2007-05-17 16:18:11', '2007-05-17 16:24:36');branch/models/event.php
r60 r69 3 3 4 4 var $name = 'Event'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'venue' => VALID_NOT_EMPTY, branch/models/gallery.php
r63 r69 3 3 4 4 var $name = 'Gallery'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'title' => VALID_NOT_EMPTY, branch/models/page.php
r60 r69 3 3 4 4 var $name = 'Page'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'title' => VALID_NOT_EMPTY, branch/models/playlist.php
r55 r69 3 3 4 4 var $name = 'Playlist'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'title' => VALID_NOT_EMPTY, branch/models/post.php
r66 r69 3 3 4 4 var $name = 'Post'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'title' => VALID_NOT_EMPTY, branch/models/tag.php
r55 r69 102 102 ); 103 103 104 /** 105 * Function tagcloud() 106 * This function generates the tagcloud data to be displayed. 107 */ 108 function tagcloud() 109 { 110 return $this->query("SELECT `Tag`.`id`, `Tag`.`tag`, 111 (SELECT COUNT(`pages_tags`.`page_id`) FROM `pages_tags` WHERE `pages_tags`.`tag_id` = `Tag`.`id`) + 112 (SELECT COUNT(`posts_tags`.`post_id`) FROM `posts_tags` WHERE `posts_tags`.`tag_id` = `Tag`.`id`) + 113 (SELECT COUNT(`events_tags`.`event_id`) FROM `events_tags` WHERE `events_tags`.`tag_id` = `Tag`.`id`) + 114 (SELECT COUNT(`tags_videos`.`video_id`) FROM `tags_videos` WHERE `tags_videos`.`tag_id` = `Tag`.`id`) + 115 (SELECT COUNT(`images_tags`.`image_id`) FROM `images_tags` WHERE `images_tags`.`tag_id` = `Tag`.`id`) AS `count` 116 FROM `tags` AS `Tag` ORDER BY RAND() LIMIT 30;"); 117 } 118 119 function findTag($tag, $limit=10) 120 { 121 return $this->query('SELECT `Tag`.`tag` FROM `tags` AS `Tag` WHERE `Tag`.`tag` LIKE "' . $tag . '%" LIMIT ' . $limit); 122 } 123 104 124 } 105 125 ?> branch/models/track.php
r55 r69 3 3 4 4 var $name = 'Track'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'filename' => VALID_NOT_EMPTY, branch/models/user.php
r55 r69 3 3 4 4 var $name = 'User'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'username' => VALID_NOT_EMPTY, branch/models/video.php
r55 r69 3 3 4 4 var $name = 'Video'; 5 6 var $actsAs = array('CounterCache','Tag'); 7 5 8 var $validate = array( 6 9 'title' => VALID_NOT_EMPTY, branch/views/galleries/view.ctp
r63 r69 8 8 <?php endforeach; ?> 9 9 </ul> 10 <br style="clear:both;" /> 10 11 11 <?php endif; ?> branch/views/layouts/default.ctp
r68 r69 32 32 <div class="yui-gb first"> 33 33 <div class="yui-u first"> 34 <!-- YOUR DATA GOES HERE -->34 <?php e($this->element('tagcloud'));?> 35 35 </div> 36 36 <div class="yui-u">