Assembla home | Assembla project page
 

Changeset 69

Show
Ignore:
Timestamp:
06/15/07 16:52:28 (1 year ago)
Author:
digitalspaghetti
Message:

Added tagcloud, added tagging behaviour to models. Some other minor tag fixes, and cleaned SQL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/controllers/tags_controller.php

    r68 r69  
    153153        { 
    154154                $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); 
    156165        } 
    157166 
  • branch/db.sql

    r63 r69  
    44--  
    55-- Host: localhost 
    6 -- Generation Time: Jun 13, 2007 at 05:52 PM 
     6-- Generation Time: Jun 15, 2007 at 05:01 PM 
    77-- Server version: 5.0.38 
    88-- PHP Version: 5.2.1 
     
    2323  PRIMARY KEY  (`id`) 
    2424) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
    25  
    26 --  
    27 -- Dumping data for table `cake_sessions` 
    28 --  
    29  
    30 INSERT INTO `cake_sessions` (`id`, `data`, `expires`) VALUES  
    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); 
    3225 
    3326-- -------------------------------------------------------- 
     
    4740  `modified` datetime NOT NULL, 
    4841  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; 
    5943-- -------------------------------------------------------- 
    6044 
     
    7862(1, 'general', 'Site Options', 'These are the main options that control the site'), 
    7963(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'); 
    8165 
    8266-- -------------------------------------------------------- 
     
    445429  `modified` datetime NOT NULL, 
    446430  PRIMARY KEY  (`id`) 
    447 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
     431) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    448432 
    449433--  
     
    451435--  
    452436 
    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`) 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'); 
    455437 
    456438-- -------------------------------------------------------- 
     
    486468  `modified` datetime NOT NULL, 
    487469  PRIMARY KEY  (`id`) 
    488 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     470) ENGINE=MyISAM DEFAULT CHARSET=utf8
    489471 
    490472--  
     
    510492  `modified` datetime NOT NULL, 
    511493  PRIMARY KEY  (`id`) 
    512 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
     494) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    513495 
    514496--  
     
    516498--  
    517499 
    518 INSERT 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'); 
    520500 
    521501-- -------------------------------------------------------- 
     
    534514--  
    535515 
    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 
     523CREATE 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 
    539532 
    540533-- -------------------------------------------------------- 
     
    614607  `modified` datetime default NULL, 
    615608  PRIMARY KEY  (`id`) 
    616 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=77
     609) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    617610 
    618611--  
     
    620613--  
    621614 
    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`) 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'); 
    626615 
    627616-- -------------------------------------------------------- 
     
    640629-- Dumping data for table `images_tags` 
    641630--  
    642  
    643 INSERT INTO `images_tags` (`image_id`, `tag_id`) VALUES  
    644 (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); 
    698631 
    699632-- -------------------------------------------------------- 
     
    803736  `modified` datetime NOT NULL, 
    804737  PRIMARY KEY  (`id`) 
    805 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
     738) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    806739 
    807740--  
    808741-- Dumping data for table `pages` 
    809742--  
    810  
    811 INSERT 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'); 
    814743 
    815744-- -------------------------------------------------------- 
     
    872801  `comments` varchar(255) collate utf8_unicode_ci NOT NULL, 
    873802  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
    875804 
    876805--  
     
    919848  `modified` datetime default NULL, 
    920849  PRIMARY KEY  (`id`) 
    921 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=27
     850) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    922851 
    923852--  
     
    925854--  
    926855 
    927 INSERT INTO `posts` (`id`, `title`, `byline`, `body`, `post_date`, `comments_count`, `user_id`, `subject_id`, `access_level`, `stub`, `tags`, `frontpage`, `published`, `created`, `modified`) VALUES  
    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'); 
    929856 
    930857-- -------------------------------------------------------- 
     
    943870-- Dumping data for table `posts_tags` 
    944871--  
    945  
    946 INSERT INTO `posts_tags` (`post_id`, `tag_id`) VALUES  
    947 (2, 3), 
    948 (3, 4), 
    949 (3, 5), 
    950 (3, 6), 
    951 (3, 7), 
    952 (3, 8), 
    953 (3, 16), 
    954 (7, 3); 
    955872 
    956873-- -------------------------------------------------------- 
     
    970887  `modified` datetime NOT NULL, 
    971888  PRIMARY KEY  (`id`) 
    972 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     889) ENGINE=MyISAM DEFAULT CHARSET=utf8
    973890 
    974891--  
     
    987904  `name` varchar(50) NOT NULL, 
    988905  PRIMARY KEY  (`id`) 
    989 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
     906) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
    990907 
    991908--  
     
    994911 
    995912INSERT INTO `sections` (`id`, `name`) VALUES  
    996 (1, 'Top Navigation'), 
    997 (2, 'User Menu'), 
    998 (3, 'admin_home'); 
     913(1, 'Main Navigation'); 
    999914 
    1000915-- -------------------------------------------------------- 
     
    11031018  `modified` datetime default NULL, 
    11041019  PRIMARY KEY  (`id`) 
    1105 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3
     1020) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2
    11061021 
    11071022--  
     
    11101025 
    11111026INSERT 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'); 
    11141028 
    11151029-- -------------------------------------------------------- 
     
    11231037  `tag` varchar(255) collate utf8_unicode_ci NOT NULL, 
    11241038  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
    11261040 
    11271041--  
    11281042-- Dumping data for table `tags` 
    11291043--  
    1130  
    1131 INSERT INTO `tags` (`id`, `tag`) VALUES  
    1132 (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'); 
    11751044 
    11761045-- -------------------------------------------------------- 
     
    11881057-- Dumping data for table `tags_tracks` 
    11891058--  
    1190  
    1191 INSERT INTO `tags_tracks` (`tag_id`, `track_id`) VALUES  
    1192 (4, 4), 
    1193 (4, 3), 
    1194 (4, 5), 
    1195 (4, 6); 
    11961059 
    11971060-- -------------------------------------------------------- 
     
    12271090-- Dumping data for table `tags_videos` 
    12281091--  
    1229  
    1230 INSERT INTO `tags_videos` (`tag_id`, `video_id`) VALUES  
    1231 (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); 
    12431092 
    12441093-- -------------------------------------------------------- 
     
    12621111  `modified` datetime default NULL, 
    12631112  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
    12651114 
    12661115--  
    12671116-- Dumping data for table `tracks` 
    12681117--  
    1269  
    1270 INSERT INTO `tracks` (`id`, `filename`, `dir`, `mimetype`, `filesize`, `trackname`, `artist`, `infourl`, `tags`, `image_id`, `created`, `modified`) VALUES  
    1271 (3, '01__Heatseeker.mp3', 'files/Media', 'audio/mpeg', 1399270, 'Heatseeker', 'The Hedrons', 'http://www.7digital.com/stores/productDetail.aspx?shop=34&amp;product=55080&amp;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&amp;product=55080&amp;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&amp;product=55080&amp;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&amp;product=55080&amp;sid=639775', 'The Hedrons', 45, '2007-06-05 15:59:45', '2007-06-05 15:59:45'); 
    12751118 
    12761119-- -------------------------------------------------------- 
     
    12871130  `visitdate` datetime NOT NULL, 
    12881131  PRIMARY KEY  (`id`) 
    1289 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
     1132) ENGINE=MyISAM DEFAULT CHARSET=utf8
    12901133 
    12911134--  
     
    13211164  UNIQUE KEY `email` (`email`,`username`), 
    13221165  KEY `group_id` (`group_id`) 
    1323 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5
     1166) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4
    13241167 
    13251168--  
     
    13541197  `modified` datetime NOT NULL, 
    13551198  PRIMARY KEY  (`id`) 
    1356 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21
     1199) ENGINE=MyISAM  DEFAULT CHARSET=utf8
    13571200 
    13581201--  
    13591202-- Dumping data for table `videos` 
    13601203--  
    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`) VALUES  
    1363 (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  
    33 
    44        var $name = 'Event'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'venue' => VALID_NOT_EMPTY, 
  • branch/models/gallery.php

    r63 r69  
    33 
    44        var $name = 'Gallery'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'title' => VALID_NOT_EMPTY, 
  • branch/models/page.php

    r60 r69  
    33 
    44        var $name = 'Page'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'title' => VALID_NOT_EMPTY, 
  • branch/models/playlist.php

    r55 r69  
    33 
    44        var $name = 'Playlist'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'title' => VALID_NOT_EMPTY, 
  • branch/models/post.php

    r66 r69  
    33 
    44        var $name = 'Post'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'title' => VALID_NOT_EMPTY, 
  • branch/models/tag.php

    r55 r69  
    102102        ); 
    103103 
     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         
    104124} 
    105125?> 
  • branch/models/track.php

    r55 r69  
    33 
    44        var $name = 'Track'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'filename' => VALID_NOT_EMPTY, 
  • branch/models/user.php

    r55 r69  
    33 
    44        var $name = 'User'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'username' => VALID_NOT_EMPTY, 
  • branch/models/video.php

    r55 r69  
    33 
    44        var $name = 'Video'; 
     5         
     6        var $actsAs = array('CounterCache','Tag'); 
     7         
    58        var $validate = array( 
    69                'title' => VALID_NOT_EMPTY, 
  • branch/views/galleries/view.ctp

    r63 r69  
    88<?php endforeach; ?> 
    99</ul> 
    10 <br style="clear:both;" /> 
     10 
    1111<?php endif; ?> 
  • branch/views/layouts/default.ctp

    r68 r69  
    3232    <div class="yui-gb first"> 
    3333        <div class="yui-u first"> 
    34         <!-- YOUR DATA GOES HERE --
     34                       <?php e($this->element('tagcloud'));?
    3535                </div> 
    3636        <div class="yui-u">