Parent Directory
|
Revision Log
|
Revision Graph
|
Patch
| revision 1.1 by tatien, Tue Aug 28 23:29:47 2007 UTC | revision 1.1.2.1 by tatien, Tue Aug 28 23:29:47 2007 UTC | |
|---|---|---|
| # | Line 0 | Line 1 |
| 1 | <?php | |
| 2 | /** | |
| 3 | * @file | |
| 4 | * Filmforge installation profile. | |
| 5 | * | |
| 6 | * This code was generated by the profile wizard and then heavily | |
| 7 | * hand-edited to add views, panels, blocks and menus | |
| 8 | * | |
| 9 | * @date 25-6-2007 | |
| 10 | * | |
| 11 | * @todo there's still a few functions to implement (see the functions | |
| 12 | * at the end), and a README would be nice. look for other @todo in | |
| 13 | * this file for more information | |
| 14 | * | |
| 15 | */ | |
| 16 | ||
| 17 | /* | |
| 18 | * You must include the crud.inc file in your profile. The file is | |
| 19 | * part of the install_profile_api module. | |
| 20 | * | |
| 21 | * @todo fix this path...? | |
| 22 | */ | |
| 23 | include_once('crud.inc'); | |
| 24 | ||
| 25 | /** | |
| 26 | * The modules that are enabled when this profile is installed. | |
| 27 | * | |
| 28 | * @return | |
| 29 | * An array of modules to be enabled. | |
| 30 | */ | |
| 31 | function filmforge_profile_modules() { | |
| 32 | ||
| 33 | return array( | |
| 34 | ||
| 35 | /* CCK */ | |
| 36 | 'content', 'date', 'fieldgroup', 'nodereference', 'number', 'optionwidgets', 'text', 'userreference', 'votingapi_field', | |
| 37 | ||
| 38 | /* Core - optional */ | |
| 39 | 'aggregator', 'color', 'comment', 'contact', 'help', 'locale', 'menu', 'path', 'profile', 'search', 'taxonomy', 'throttle', 'upload', | |
| 40 | ||
| 41 | /* Core - required */ | |
| 42 | 'block', 'filter', 'node', 'system', 'user', 'watchdog', | |
| 43 | ||
| 44 | /* Image */ | |
| 45 | 'image', 'image_attach', | |
| 46 | ||
| 47 | /* Licenses */ | |
| 48 | 'creativecommons_lite', | |
| 49 | ||
| 50 | /* Multilanguage - i18n */ | |
| 51 | 'i18n', 'i18nblocks', 'i18nmenu', 'i18nprofile', 'i18ntaxonomy', 'i18nviews', 'translation', | |
| 52 | ||
| 53 | /* Multilanguage - i18n - experimental */ | |
| 54 | 'i18ncontent', 'i18nstrings', 'i18nsync', 'ttext', | |
| 55 | ||
| 56 | /* Other */ | |
| 57 | 'autolocale', 'date_api', 'diff', 'panels', 'pathauto', 'pearwiki_filter', 'recent_changes', 'wikitools', | |
| 58 | ||
| 59 | /* Taxonomy */ | |
| 60 | 'tagadelic', | |
| 61 | ||
| 62 | /* Video */ | |
| 63 | 'video', 'video_customfields', 'video_ffmpeg_helper', 'video_image', 'video_multidownload', 'video_optmetadata', 'video_params', 'video_upload', | |
| 64 | ||
| 65 | /* Views */ | |
| 66 | 'nodecloud', 'views', 'views_bonus', 'views_rss', 'views_theme_wizard', 'views_ui', | |
| 67 | ||
| 68 | /* Voting */ | |
| 69 | 'fivestar', 'votingapi', | |
| 70 | ||
| 71 | ); | |
| 72 | ||
| 73 | } | |
| 74 | ||
| 75 | /** | |
| 76 | * Implementation of hook_profile_details(). | |
| 77 | * | |
| 78 | * This contains an array of profile details for display from the main selection screen. | |
| 79 | */ | |
| 80 | function filmforge_profile_details() { | |
| 81 | return array( | |
| 82 | 'name' => st('Filmforge install profile'), | |
| 83 | 'description' => st('This install profile installs a video-based community website.') | |
| 84 | ); | |
| 85 | } | |
| 86 | ||
| 87 | ||
| 88 | /** | |
| 89 | * Implementation of hook_profile_final(). | |
| 90 | * | |
| 91 | * FilmForge platform installation. | |
| 92 | */ | |
| 93 | function filmforge_profile_final() { | |
| 94 | ||
| 95 | /* Build content types */ | |
| 96 | $types = array ( | |
| 97 | 'image' => | |
| 98 | array ( | |
| 99 | 'name' => 'Image', | |
| 100 | 'module' => 'image', | |
| 101 | 'description' => st('An image (with thumbnail). This is ideal for publishing photographs or screenshots.'), | |
| 102 | 'type' => 'image', | |
| 103 | 'has_title' => true, | |
| 104 | 'title_label' => 'Title', | |
| 105 | 'has_body' => true, | |
| 106 | 'body_label' => 'Body', | |
| 107 | 'custom' => false, | |
| 108 | 'modified' => false, | |
| 109 | 'locked' => true, | |
| 110 | 'orig_type' => 'image', | |
| 111 | 'is_new' => true, | |
| 112 | ), | |
| 113 | 'page' => | |
| 114 | array ( | |
| 115 | 'type' => 'page', | |
| 116 | 'name' => 'Page', | |
| 117 | 'module' => 'node', | |
| 118 | 'description' => st('If you want to add a static page, like a contact page or an about page, use a page.'), | |
| 119 | 'help' => '', | |
| 120 | 'has_title' => '1', | |
| 121 | 'title_label' => 'Title', | |
| 122 | 'has_body' => '1', | |
| 123 | 'body_label' => 'Body', | |
| 124 | 'min_word_count' => '0', | |
| 125 | 'custom' => '1', | |
| 126 | 'modified' => '1', | |
| 127 | 'locked' => '0', | |
| 128 | 'orig_type' => 'page', | |
| 129 | 'is_new' => true, | |
| 130 | ), | |
| 131 | 'story' => | |
| 132 | array ( | |
| 133 | 'type' => 'story', | |
| 134 | 'name' => 'Story', | |
| 135 | 'module' => 'node', | |
| 136 | 'description' => st('Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles.'), | |
| 137 | 'help' => '', | |
| 138 | 'has_title' => '1', | |
| 139 | 'title_label' => 'Title', | |
| 140 | 'has_body' => '1', | |
| 141 | 'body_label' => 'Body', | |
| 142 | 'min_word_count' => '0', | |
| 143 | 'custom' => '1', | |
| 144 | 'modified' => '1', | |
| 145 | 'locked' => '0', | |
| 146 | 'orig_type' => 'story', | |
| 147 | 'is_new' => true, | |
| 148 | ), | |
| 149 | 'video' => | |
| 150 | array ( | |
| 151 | 'name' => 'Video', | |
| 152 | 'module' => 'video', | |
| 153 | 'description' => st('Allow a variety of video formats to be posted as nodes in your site'), | |
| 154 | 'type' => 'video', | |
| 155 | 'has_title' => true, | |
| 156 | 'title_label' => 'Title', | |
| 157 | 'has_body' => true, | |
| 158 | 'body_label' => 'Body', | |
| 159 | 'custom' => false, | |
| 160 | 'modified' => false, | |
| 161 | 'locked' => true, | |
| 162 | 'orig_type' => 'video', | |
| 163 | 'is_new' => true, | |
| 164 | ), | |
| 165 | ); | |
| 166 | ||
| 167 | foreach ($types as $content_type) { | |
| 168 | install_add_content_type($content_type); | |
| 169 | } | |
| 170 | ||
| 171 | /* Path alias */ | |
| 172 | path_set_alias('node/add/video', 'publish'); | |
| 173 | ||
| 174 | /* Variables */ | |
| 175 | ||
| 176 | variable_set('creativecommons_lite_video', 1); | |
| 177 | variable_set('file_downloads', '1'); | |
| 178 | variable_set('filter_default_format', '1'); | |
| 179 | // variable_set('filter_html_1', 1); | |
| 180 | variable_set('fivestar_position_teaser_video', 'hidden'); | |
| 181 | variable_set('fivestar_position_video', 'below'); | |
| 182 | variable_set('fivestar_stars_video', '5'); | |
| 183 | variable_set('fivestar_style_video', 'default'); | |
| 184 | variable_set('fivestar_unvote_video', 1); | |
| 185 | variable_set('fivestar_video', 1); | |
| 186 | variable_set('i18n_browser', '1'); | |
| 187 | variable_set('i18n_languages', array ( | |
| 188 | 'site_default' => 'en', | |
| 189 | 'name' => | |
| 190 | array ( | |
| 191 | 'fr' => 'French', | |
| 192 | 'ko' => 'Korean', | |
| 193 | 'en' => 'English', | |
| 194 | ), | |
| 195 | 'rtl' => | |
| 196 | array ( | |
| 197 | 'en' => 0, | |
| 198 | 'fr' => 0, | |
| 199 | 'ko' => 0, | |
| 200 | ), | |
| 201 | 'native' => | |
| 202 | array ( | |
| 203 | 'en' => 'English', | |
| 204 | 'fr' => 'Français', | |
| 205 | 'ko' => '한글', | |
| 206 | ), | |
| 207 | 'enabled' => | |
| 208 | array ( | |
| 209 | 'en' => 'en', | |
| 210 | 'fr' => 'fr', | |
| 211 | 'ko' => 'ko', | |
| 212 | ), | |
| 213 | )); | |
| 214 | variable_set('i18n_node_page', '1'); | |
| 215 | variable_set('i18n_node_story', '1'); | |
| 216 | variable_set('i18n_node_video', '0'); | |
| 217 | variable_set('i18n_selection_mode', 'simple'); | |
| 218 | variable_set('i18n_translation_links', '0'); | |
| 219 | variable_set('i18n_translation_node_links', '1'); | |
| 220 | variable_set('i18n_translation_workflow', '1'); | |
| 221 | variable_set('i18n_variables', array ( | |
| 222 | 0 => 'site_name', | |
| 223 | 1 => 'site_slogan', | |
| 224 | 2 => 'site_mission', | |
| 225 | 3 => 'site_footer', | |
| 226 | 4 => 'anonymous', | |
| 227 | 5 => 'blog_help', | |
| 228 | 6 => 'story_help', | |
| 229 | 7 => 'user_registration_help', | |
| 230 | 8 => 'user_mail_welcome_subject', | |
| 231 | 9 => 'user_mail_welcome_body', | |
| 232 | 10 => 'user_mail_approval_subject', | |
| 233 | 11 => 'user_mail_approval_body', | |
| 234 | 12 => 'user_mail_pass_subject', | |
| 235 | 13 => 'user_mail_pass_body', | |
| 236 | 14 => 'menu_primary_menu', | |
| 237 | 15 => 'menu_secondary_menu', | |
| 238 | )); | |
| 239 | variable_set('i18ntaxonomy_vocabularies', array ( | |
| 240 | 2 => 0, | |
| 241 | 1 => 0, | |
| 242 | )); | |
| 243 | variable_set('image_attach_page', '1'); | |
| 244 | variable_set('image_attach_size_body_video', 'thumbnail'); | |
| 245 | variable_set('image_attach_size_teaser_video', 'thumbnail'); | |
| 246 | variable_set('image_attach_story', '1'); | |
| 247 | variable_set('image_attach_video', '0'); | |
| 248 | variable_set('image_attach_weight_body_page', '0'); | |
| 249 | variable_set('image_attach_weight_body_video', '0'); | |
| 250 | variable_set('image_attach_weight_teaser_page', '0'); | |
| 251 | variable_set('image_attach_weight_teaser_video', '0'); | |
| 252 | variable_set('image_gallery_nav_vocabulary', 1); | |
| 253 | variable_set('image_max_upload_size', '800'); | |
| 254 | variable_set('image_sizes', array ( | |
| 255 | 0 => | |
| 256 | array ( | |
| 257 | 'label' => 'thumbnail', | |
| 258 | 'width' => '200', | |
| 259 | 'height' => '200', | |
| 260 | ), | |
| 261 | 1 => | |
| 262 | array ( | |
| 263 | 'label' => 'preview', | |
| 264 | 'width' => '640', | |
| 265 | 'height' => '640', | |
| 266 | ), | |
| 267 | 2 => | |
| 268 | array ( | |
| 269 | 'label' => 'sidebar', | |
| 270 | 'width' => '150', | |
| 271 | 'height' => '150', | |
| 272 | ), | |
| 273 | 3 => | |
| 274 | array ( | |
| 275 | 'label' => 'videoplayer', | |
| 276 | 'width' => '400', | |
| 277 | 'height' => '300', | |
| 278 | ), | |
| 279 | 4 => | |
| 280 | array ( | |
| 281 | 'label' => '', | |
| 282 | 'width' => '', | |
| 283 | 'height' => '', | |
| 284 | ), | |
| 285 | )); | |
| 286 | variable_set('menu_primary_menu', 2); | |
| 287 | variable_set('menu_secondary_menu', 2); | |
| 288 | // variable_set('menu_trim_menu_1', '1'); | |
| 289 | // variable_set('menu_trim_menu_2', '0'); | |
| 290 | variable_set('node_options_forum', array ( | |
| 291 | 0 => 'status', | |
| 292 | )); | |
| 293 | variable_set('node_options_page', array ( | |
| 294 | 0 => 'status', | |
| 295 | 1 => 'revision', | |
| 296 | )); | |
| 297 | variable_set('node_options_story', array ( | |
| 298 | 0 => 'status', | |
| 299 | 1 => 'promote', | |
| 300 | )); | |
| 301 | variable_set('node_options_video', array ( | |
| 302 | 0 => 'status', | |
| 303 | )); | |
| 304 | variable_set('pearwiki_filter_ignore_regexp_4', ''); | |
| 305 | variable_set('pearwiki_filter_ignore_tags_4', ''); | |
| 306 | variable_set('pearwiki_filter_image_base_4', 'files/'); | |
| 307 | variable_set('pearwiki_filter_interwiki_mapping_4', 'Local drupal path | path | <path> | |
| 308 | groups.drupal.org | gdo | http://groups.drupal.org/freelinking/%s | |
| 309 | Wikipedia | wp | http://en.wikipedia.org/wiki/%s | |
| 310 | '); | |
| 311 | variable_set('pearwiki_filter_pear_path_4', '/var/alternc/html/f/filmforge/www/drupal-5.1/sites/all/modules/pearwiki_filter/'); | |
| 312 | variable_set('pearwiki_filter_space_replacement_4', ''); | |
| 313 | variable_set('pearwiki_filter_syntax_4', 'Mediawiki'); | |
| 314 | variable_set('pearwiki_filter_use_freelinking_4', 0); | |
| 315 | variable_set('pearwiki_filter_use_image_4', 1); | |
| 316 | variable_set('pearwiki_filter_use_liquid_4', 0); | |
| 317 | variable_set('pearwiki_filter_use_wiki_links_4', 1); | |
| 318 | variable_set('pearwiki_filter_use_wikitools_4', 0); | |
| 319 | variable_set('pearwiki_filter_wikilink_base_4', 'wiki/'); | |
| 320 | variable_set('site_footer', 'This site was configured using the Filmforge install profile.'); | |
| 321 | variable_set('site_mission', 'FilmForge is a version of the content management system <a href="http://www.drupal.org">Drupal</a>, tailored to the needs of videomaking communities. FilmForge makes it simple to install and run your own video sharing site.'); | |
| 322 | variable_set('site_name', 'FilmForge'); | |
| 323 | variable_set('site_slogan', 'web video for all!'); | |
| 324 | variable_set('tagadelic_block_tags_2', '12'); | |
| 325 | variable_set('tagadelic_block_title_2', 'Tag cloud'); | |
| 326 | variable_set('tagadelic_levels', '6'); | |
| 327 | variable_set('tagadelic_page_amount', '60'); | |
| 328 | variable_set('tagadelic_sort_order', 'title,asc'); | |
| 329 | variable_set('theme_default', 'filmforge'); | |
| 330 | variable_set('theme_filmforge_settings', array ( | |
| 331 | 'toggle_logo' => 1, | |
| 332 | 'toggle_name' => 1, | |
| 333 | 'toggle_slogan' => 1, | |
| 334 | 'toggle_mission' => 1, | |
| 335 | 'toggle_node_user_picture' => 0, | |
| 336 | 'toggle_comment_user_picture' => 0, | |
| 337 | 'toggle_search' => 0, | |
| 338 | 'toggle_favicon' => 1, | |
| 339 | 'default_logo' => 0, | |
| 340 | 'logo_path' => '', | |
| 341 | 'logo_upload' => '', | |
| 342 | 'default_favicon' => 1, | |
| 343 | 'favicon_path' => '', | |
| 344 | 'favicon_upload' => '', | |
| 345 | 'op' => 'Save configuration', | |
| 346 | 'form_token' => '67b00845f930a0a9867b5f27d3e331f3', | |
| 347 | )); | |
| 348 | variable_set('theme_settings', array ( | |
| 349 | 'toggle_node_info_page' => false, | |
| 350 | )); | |
| 351 | variable_set('upload_extensions_default', 'jpg jpeg gif png txt html doc xls pdf ppt pps avi mpeg mpg mov rm flv wmv 3gp mp4 dir dcr'); | |
| 352 | variable_set('upload_uploadsize_default', 100); | |
| 353 | variable_set('upload_usersize_default', 1000); | |
| 354 | variable_set('upload_video', '1'); | |
| 355 | variable_set('video_block_limit_0', '10'); | |
| 356 | variable_set('video_block_limit_1', '10'); | |
| 357 | variable_set('video_block_limit_2', '10'); | |
| 358 | variable_set('video_block_limit_3', '10'); | |
| 359 | variable_set('video_block_title_0', 'Latest videos'); | |
| 360 | variable_set('video_block_title_1', 'Top videos'); | |
| 361 | variable_set('video_block_title_2', 'Most played videos'); | |
| 362 | variable_set('video_block_title_3', 'Most downloaded'); | |
| 363 | // @todo needs to be documented in README | |
| 364 | // variable_set('video_cortado', 'http://filmforge.koumbit.net/cortado.jar'); | |
| 365 | variable_set('video_displaydownloadlink', '1'); | |
| 366 | variable_set('video_displaydownloadmenutab', '0'); | |
| 367 | variable_set('video_displayfilesize', '1'); | |
| 368 | variable_set('video_displayplaylink', '0'); | |
| 369 | variable_set('video_displayplaymenutab', '0'); | |
| 370 | variable_set('video_displayplaytime', '1'); | |
| 371 | variable_set('video_download_ext', 'mov,wmv,rm,flv,avi,divx,mpg,mpeg,mp4,zip'); | |
| 372 | variable_set('video_downloadcounter', '1'); | |
| 373 | variable_set('video_ffmpeg_helper_auto_conversion', 1); | |
| 374 | variable_set('video_ffmpeg_helper_auto_cvr_audio_bitrate', '64'); | |
| 375 | variable_set('video_ffmpeg_helper_auto_cvr_busy_video_path', 'busy.flv'); | |
| 376 | variable_set('video_ffmpeg_helper_auto_cvr_options', '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate %convertfile'); | |
| 377 | variable_set('video_ffmpeg_helper_auto_cvr_video_bitrate', '200'); | |
| 378 | variable_set('video_ffmpeg_helper_auto_cvr_width', '400'); | |
| 379 | variable_set('video_ffmpeg_helper_auto_playtime', 1); | |
| 380 | variable_set('video_ffmpeg_helper_auto_resolution', 1); | |
| 381 | variable_set('video_ffmpeg_helper_auto_thumbnail', 1); | |
| 382 | variable_set('video_ffmpeg_helper_auto_thumbnail_debug', 0); | |
| 383 | variable_set('video_ffmpeg_helper_auto_thumbnail_only', 0); | |
| 384 | variable_set('video_ffmpeg_helper_auto_thumbnail_seek', '2'); | |
| 385 | variable_set('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg'); | |
| 386 | variable_set('video_ffmpeg_helper_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile'); | |
| 387 | variable_set('video_flvplayerloader', 'FlowPlayer.swf'); | |
| 388 | variable_set('video_flvplayerloader_autoplay', '1'); | |
| 389 | variable_set('video_flvplayerloader_fullscreen', 'http://filmforge.koumbit.net/fullscreen.js'); | |
| 390 | variable_set('video_image_promote_thumbnail', 0); | |
| 391 | variable_set('video_image_publish_thumbnail', 0); | |
| 392 | variable_set('video_multidownload', '1'); | |
| 393 | variable_set('video_playcounter', '1'); | |
| 394 | variable_set('video_playinbody', '1'); | |
| 395 | variable_set('views_defaults', array ( | |
| 396 | 'taxonomy_directory' => 'disabled', | |
| 397 | )); | |
| 398 | variable_set('wikitools_hijack_freelinking', 1); | |
| 399 | variable_set('wikitools_main_page_title', 'Main Page'); | |
| 400 | variable_set('wikitools_node_types', array ( | |
| 401 | 'image' => 'image', | |
| 402 | 'test' => 'test', | |
| 403 | )); | |
| 404 | variable_set('wikitools_options', array ( | |
| 405 | 'node creation' => 'node creation', | |
| 406 | 'node search' => 'node search', | |
| 407 | 'auto redirect' => 'auto redirect', | |
| 408 | 'unique titles' => 'unique titles', | |
| 409 | 'move protection' => 'move protection', | |
| 410 | 'delete protection' => 'delete protection', | |
| 411 | 'underscore as space' => 'underscore as space', | |
| 412 | )); | |
| 413 | variable_set('wikitools_path', 'wiki'); | |
| 414 | ||
| 415 | /* Permissions */ | |
| 416 | ||
| 417 | install_set_permissions(install_add_role('admin'), array ( | |
| 418 | 0 => 'access news feeds', | |
| 419 | 1 => 'administer news feeds', | |
| 420 | 2 => 'administer audio', | |
| 421 | 3 => 'create audio', | |
| 422 | 4 => 'download audio', | |
| 423 | 5 => 'edit own audio', | |
| 424 | 6 => 'play audio', | |
| 425 | 7 => 'view download stats', | |
| 426 | 8 => 'administer blocks', | |
| 427 | 9 => 'use PHP for block visibility', | |
| 428 | 10 => 'access comments', | |
| 429 | 11 => 'administer comments', | |
| 430 | 12 => 'post comments', | |
| 431 | 13 => 'post comments without approval', | |
| 432 | 14 => 'access site-wide contact form', | |
| 433 | 15 => 'access devel information', | |
| 434 | 16 => 'execute php code', | |
| 435 | 17 => 'switch users', | |
| 436 | 18 => 'administer filters', | |
| 437 | 19 => 'rate content', | |
| 438 | 20 => 'use PHP for fivestar target', | |
| 439 | 21 => 'view ratings', | |
| 440 | 22 => 'administer all languages', | |
| 441 | 23 => 'create images', | |
| 442 | 24 => 'edit images', | |
| 443 | 25 => 'edit own images', | |
| 444 | 26 => 'view original images', | |
| 445 | 27 => 'administer locales', | |
| 446 | 28 => 'administer menu', | |
| 447 | 29 => 'access content', | |
| 448 | 30 => 'administer content types', | |
| 449 | 31 => 'administer nodes', | |
| 450 | 32 => 'create page content', | |
| 451 | 33 => 'create story content', | |
| 452 | 34 => 'edit own page content', | |
| 453 | 35 => 'edit own story content', | |
| 454 | 36 => 'edit page content', | |
| 455 | 37 => 'edit story content', | |
| 456 | 38 => 'revert revisions', | |
| 457 | 39 => 'view revisions', | |
| 458 | 40 => 'access all panels', | |
| 459 | 41 => 'create panels', | |
| 460 | 42 => 'administer url aliases', | |
| 461 | 43 => 'create url aliases', | |
| 462 | 44 => 'administer pathauto', | |
| 463 | 45 => 'access profile wizard', | |
| 464 | 46 => 'administer search', | |
| 465 | 47 => 'search content', | |
| 466 | 48 => 'use advanced search', | |
| 467 | 49 => 'access administration pages', | |
| 468 | 50 => 'administer site configuration', | |
| 469 | 51 => 'select different theme', | |
| 470 | 52 => 'administer taxonomy', | |
| 471 | 53 => 'translate nodes', | |
| 472 | 54 => 'upload files', | |
| 473 | 55 => 'view uploaded files', | |
| 474 | 56 => 'access user profiles', | |
| 475 | 57 => 'administer access control', | |
| 476 | 58 => 'administer users', | |
| 477 | 59 => 'change own username', | |
| 478 | 60 => 'access video', | |
| 479 | 61 => 'administer video', | |
| 480 | 62 => 'create video', | |
| 481 | 63 => 'download video', | |
| 482 | 64 => 'edit own video', | |
| 483 | 65 => 'play video', | |
| 484 | 66 => 'view download counter', | |
| 485 | 67 => 'view play counter', | |
| 486 | 68 => 'insert custom fields', | |
| 487 | 69 => 'create multi-file downloads', | |
| 488 | 70 => 'insert optional metadata', | |
| 489 | 71 => 'insert object params', | |
| 490 | 72 => 'upload video files', | |
| 491 | 73 => 'access all views', | |
| 492 | 74 => 'administer views', | |
| 493 | 75 => 'administer voting api', | |
| 494 | 76 => 'register vote', | |
| 495 | )); | |
| 496 | install_set_permissions(1, array ( | |
| 497 | 0 => 'access news feeds', | |
| 498 | 1 => 'download audio', | |
| 499 | 2 => 'play audio', | |
| 500 | 3 => 'view download stats', | |
| 501 | 4 => 'access site-wide contact form', | |
| 502 | 5 => 'rate content', | |
| 503 | 6 => 'view ratings', | |
| 504 | 7 => 'view original images', | |
| 505 | 8 => 'access content', | |
| 506 | 9 => 'search content', | |
| 507 | 10 => 'access user profiles', | |
| 508 | 11 => 'access video', | |
| 509 | 12 => 'download video', | |
| 510 | 13 => 'play video', | |
| 511 | 14 => 'view download counter', | |
| 512 | 15 => 'view play counter', | |
| 513 | 16 => 'register vote', | |
| 514 | )); | |
| 515 | install_set_permissions(2, array ( | |
| 516 | 0 => 'access news feeds', | |
| 517 | 1 => 'download audio', | |
| 518 | 2 => 'play audio', | |
| 519 | 3 => 'view download stats', | |
| 520 | 4 => 'access comments', | |
| 521 | 5 => 'post comments', | |
| 522 | 6 => 'post comments without approval', | |
| 523 | 7 => 'access site-wide contact form', | |
| 524 | 8 => 'rate content', | |
| 525 | 9 => 'view ratings', | |
| 526 | 10 => 'view original images', | |
| 527 | 11 => 'access content', | |
| 528 | 12 => 'search content', | |
| 529 | 13 => 'access user profiles', | |
| 530 | 14 => 'access video', | |
| 531 | 15 => 'download video', | |
| 532 | 16 => 'play video', | |
| 533 | 17 => 'view download counter', | |
| 534 | 18 => 'view play counter', | |
| 535 | 19 => 'register vote', | |
| 536 | )); | |
| 537 | install_set_permissions(install_add_role('editor'), array ( | |
| 538 | 0 => 'access news feeds', | |
| 539 | 1 => 'create audio', | |
| 540 | 2 => 'download audio', | |
| 541 | 3 => 'edit own audio', | |
| 542 | 4 => 'play audio', | |
| 543 | 5 => 'view download stats', | |
| 544 | 6 => 'administer blocks', | |
| 545 | 7 => 'access comments', | |
| 546 | 8 => 'administer comments', | |
| 547 | 9 => 'post comments', | |
| 548 | 10 => 'post comments without approval', | |
| 549 | 11 => 'access site-wide contact form', | |
| 550 | 12 => 'rate content', | |
| 551 | 13 => 'view ratings', | |
| 552 | 14 => 'create images', | |
| 553 | 15 => 'edit images', | |
| 554 | 16 => 'edit own images', | |
| 555 | 17 => 'view original images', | |
| 556 | 18 => 'access content', | |
| 557 | 19 => 'administer nodes', | |
| 558 | 20 => 'create page content', | |
| 559 | 21 => 'create story content', | |
| 560 | 22 => 'edit own page content', | |
| 561 | 23 => 'edit own story content', | |
| 562 | 24 => 'edit page content', | |
| 563 | 25 => 'edit story content', | |
| 564 | 26 => 'revert revisions', | |
| 565 | 27 => 'view revisions', | |
| 566 | 28 => 'create url aliases', | |
| 567 | 29 => 'search content', | |
| 568 | 30 => 'use advanced search', | |
| 569 | 31 => 'translate nodes', | |
| 570 | 32 => 'access user profiles', | |
| 571 | 33 => 'administer access control', | |
| 572 | 34 => 'administer users', | |
| 573 | 35 => 'change own username', | |
| 574 | 36 => 'access video', | |
| 575 | 37 => 'administer video', | |
| 576 | 38 => 'create video', | |
| 577 | 39 => 'download video', | |
| 578 | 40 => 'edit own video', | |
| 579 | 41 => 'play video', | |
| 580 | 42 => 'view download counter', | |
| 581 | 43 => 'view play counter', | |
| 582 | 44 => 'insert custom fields', | |
| 583 | 45 => 'create multi-file downloads', | |
| 584 | 46 => 'insert optional metadata', | |
| 585 | 47 => 'insert object params', | |
| 586 | 48 => 'upload video files', | |
| 587 | 49 => 'access all views', | |
| 588 | 50 => 'administer views', | |
| 589 | 51 => 'register vote', | |
| 590 | )); | |
| 591 | ||
| 592 | /* Themes */ | |
| 593 | install_enable_theme("filmforge"); | |
| 594 | ||
| 595 | _filmforge_profile_create_views(); | |
| 596 | _filmforge_profile_create_panels(); | |
| 597 | _filmforge_profile_create_blocks(); | |
| 598 | } | |
| 599 | ||
| 600 | /** | |
| 601 | * create a few views used in blocks and panels | |
| 602 | * | |
| 603 | * those views were exported from the running install and plain pasted here | |
| 604 | */ | |
| 605 | function _filmforge_profile_create_views() { | |
| 606 | //video_featured_last_block | |
| 607 | $view = new stdClass(); | |
| 608 | $view->name = 'video_featured_last_block'; | |
| 609 | $view->description = 'Shows last featured videos'; | |
| 610 | $view->access = array ( | |
| 611 | ); | |
| 612 | $view->view_args_php = ''; | |
| 613 | $view->block = TRUE; | |
| 614 | $view->block_title = ''; | |
| 615 | $view->block_header = ''; | |
| 616 | $view->block_header_format = '1'; | |
| 617 | $view->block_footer = ''; | |
| 618 | $view->block_footer_format = '1'; | |
| 619 | $view->block_empty = ''; | |
| 620 | $view->block_empty_format = '1'; | |
| 621 | $view->block_type = 'list'; | |
| 622 | $view->nodes_per_block = '5'; | |
| 623 | $view->block_more = TRUE; | |
| 624 | $view->block_use_page_header = FALSE; | |
| 625 | $view->block_use_page_footer = FALSE; | |
| 626 | $view->block_use_page_empty = FALSE; | |
| 627 | $view->sort = array ( | |
| 628 | array ( | |
| 629 | 'tablename' => 'node', | |
| 630 | 'field' => 'created', | |
| 631 | 'sortorder' => 'DESC', | |
| 632 | 'options' => 'normal', | |
| 633 | ), | |
| 634 | ); | |
| 635 | $view->argument = array ( | |
| 636 | ); | |
| 637 | $view->field = array ( | |
| 638 | /* array ( | |
| 639 | 'tablename' => 'video', | |
| 640 | 'field' => 'video_image', | |
| 641 | 'label' => '', | |
| 642 | 'options' => 'sidebar', | |
| 643 | ),*/ | |
| 644 | array ( | |
| 645 | 'tablename' => 'node', | |
| 646 | 'field' => 'title', | |
| 647 | 'label' => '', | |
| 648 | 'handler' => 'views_handler_field_nodelink', | |
| 649 | 'options' => 'link', | |
| 650 | ), | |
| 651 | array ( | |
| 652 | 'tablename' => 'users', | |
| 653 | 'field' => 'name', | |
| 654 | 'label' => '', | |
| 655 | ), | |
| 656 | ); | |
| 657 | $view->filter = array ( | |
| 658 | array ( | |
| 659 | 'tablename' => 'node', | |
| 660 | 'field' => 'type', | |
| 661 | 'operator' => 'OR', | |
| 662 | 'options' => '', | |
| 663 | 'value' => array ( | |
| 664 | 0 => 'video', | |
| 665 | ), | |
| 666 | ), | |
| 667 | array ( | |
| 668 | 'tablename' => 'node', | |
| 669 | 'field' => 'status', | |
| 670 | 'operator' => '=', | |
| 671 | 'options' => '', | |
| 672 | 'value' => '1', | |
| 673 | ), | |
| 674 | array ( | |
| 675 | 'tablename' => 'node', | |
| 676 | 'field' => 'promote', | |
| 677 | 'operator' => '=', | |
| 678 | 'options' => '', | |
| 679 | 'value' => '1', | |
| 680 | ), | |
| 681 | ); | |
| 682 | $view->exposed_filter = array ( | |
| 683 | ); | |
| 684 | $view->requires = array('node', 'video', 'users'); | |
| 685 | $views[$view->name] = $view; | |
| 686 | ||
| 687 | //thisuserscontent | |
| 688 | $view = new stdClass(); | |
| 689 | $view->name = 'thisuserscontent'; | |
| 690 | $view->description = 'Other content by this user'; | |
| 691 | $view->access = array ( | |
| 692 | ); | |
| 693 | $view->view_args_php = ''; | |
| 694 | $view->page = TRUE; | |
| 695 | $view->page_title = 'Other content by this user'; | |
| 696 | $view->page_header = ''; | |
| 697 | $view->page_header_format = '4'; | |
| 698 | $view->page_footer = ''; | |
| 699 | $view->page_footer_format = '4'; | |
| 700 | $view->page_empty = ''; | |
| 701 | $view->page_empty_format = '4'; | |
| 702 | $view->page_type = 'teaser'; | |
| 703 | $view->url = 'thisuserscontent'; | |
| 704 | $view->use_pager = TRUE; | |
| 705 | $view->nodes_per_page = '10'; | |
| 706 | $view->block = TRUE; | |
| 707 | $view->block_title = 'Other content by this user'; | |
| 708 | $view->block_header = ''; | |
| 709 | $view->block_header_format = '4'; | |
| 710 | $view->block_footer = ''; | |
| 711 | $view->block_footer_format = '4'; | |
| 712 | $view->block_empty = ''; | |
| 713 | $view->block_empty_format = '4'; | |
| 714 | $view->block_type = 'list'; | |
| 715 | $view->nodes_per_block = '5'; | |
| 716 | $view->block_more = TRUE; | |
| 717 | $view->block_use_page_header = FALSE; | |
| 718 | $view->block_use_page_footer = FALSE; | |
| 719 | $view->block_use_page_empty = FALSE; | |
| 720 | $view->sort = array ( | |
| 721 | ); | |
| 722 | $view->argument = array ( | |
| 723 | array ( | |
| 724 | 'type' => 'uid', | |
| 725 | 'argdefault' => '2', | |
| 726 | 'title' => '', | |
| 727 | 'options' => '', | |
| 728 | 'wildcard' => '%1', | |
| 729 | 'wildcard_substitution' => '', | |
| 730 | ), | |
| 731 | ); | |
| 732 | $view->field = array ( | |
| 733 | array ( | |
| 734 | 'tablename' => 'node', | |
| 735 | 'field' => 'title', | |
| 736 | 'label' => '', | |
| 737 | 'handler' => 'views_handler_field_nodelink', | |
| 738 | 'options' => 'link', | |
| 739 | ), | |
| 740 | /* array ( | |
| 741 | 'tablename' => 'video', | |
| 742 | 'field' => 'video_image', | |
| 743 | 'label' => '', | |
| 744 | 'options' => 'sidebar', | |
| 745 | ),*/ | |
| 746 | array ( | |
| 747 | 'tablename' => 'image', | |
| 748 | 'field' => 'nid', | |
| 749 | 'label' => '', | |
| 750 | 'handler' => 'image_views_handler_image_img', | |
| 751 | 'options' => 'thumbnail', | |
| 752 | ), | |
| 753 | ); | |
| 754 | $view->filter = array ( | |
| 755 | array ( | |
| 756 | 'tablename' => 'node', | |
| 757 | 'field' => 'status', | |
| 758 | 'operator' => '=', | |
| 759 | 'options' => '', | |
| 760 | 'value' => '1', | |
| 761 | ), | |
| 762 | ); | |
| 763 | $view->exposed_filter = array ( | |
| 764 | ); | |
| 765 | $view->requires = array('node', 'video', 'image'); | |
| 766 | $views[$view->name] = $view; | |
| 767 | ||
| 768 | //latest_featured_videos_in_panels | |
| 769 | $view = new stdClass(); | |
| 770 | $view->name = 'latest_featured_videos_in_panels'; | |
| 771 | $view->description = 'Shows featured videos in panel layout'; | |
| 772 | $view->access = array ( | |
| 773 | ); | |
| 774 | $view->view_args_php = ''; | |
| 775 | $view->page = TRUE; | |
| 776 | $view->page_title = ''; | |
| 777 | $view->page_header = ''; | |
| 778 | $view->page_header_format = '1'; | |
| 779 | $view->page_footer = ''; | |
| 780 | $view->page_footer_format = '1'; | |
| 781 | $view->page_empty = 'There is no recent video activity'; | |
| 782 | $view->page_empty_format = '1'; | |
| 783 | $view->page_type = 'list'; | |
| 784 | $view->url = 'latest_featured_video'; | |
| 785 | $view->use_pager = FALSE; | |
| 786 | $view->nodes_per_page = '1'; | |
| 787 | $view->menu = TRUE; | |
| 788 | $view->menu_title = ''; | |
| 789 | $view->menu_tab = FALSE; | |
| 790 | $view->menu_tab_weight = '0'; | |
| 791 | $view->menu_tab_default = FALSE; | |
| 792 | $view->menu_tab_default_parent = NULL; | |
| 793 | $view->menu_parent_tab_weight = '0'; | |
| 794 | $view->menu_parent_title = ''; | |
| 795 | $view->sort = array ( | |
| 796 | array ( | |
| 797 | 'tablename' => 'node', | |
| 798 | 'field' => 'created', | |
| 799 | 'sortorder' => 'DESC', | |
| 800 | 'options' => 'normal', | |
| 801 | ), | |
| 802 | ); | |
| 803 | $view->argument = array ( | |
| 804 | ); | |
| 805 | $view->field = array ( | |
| 806 | array ( | |
| 807 | 'tablename' => 'node', | |
| 808 | 'field' => 'title', | |
| 809 | 'label' => 'Featured video:', | |
| 810 | 'handler' => 'views_handler_field_nodelink', | |
| 811 | 'options' => 'link', | |
| 812 | ), | |
| 813 | array ( | |
| 814 | 'tablename' => 'users', | |
| 815 | 'field' => 'name', | |
| 816 | 'label' => '', | |
| 817 | ), | |
| 818 | array ( | |
| 819 | 'tablename' => 'video', | |
| 820 | 'field' => 'video_show_video', | |
| 821 | 'label' => '', | |
| 822 | ), | |
| 823 | array ( | |
| 824 | 'tablename' => 'video', | |
| 825 | 'field' => 'play_counter', | |
| 826 | 'label' => 'Play count', | |
| 827 | ), | |
| 828 | ); | |
| 829 | $view->filter = array ( | |
| 830 | array ( | |
| 831 | 'tablename' => 'node', | |
| 832 | 'field' => 'type', | |
| 833 | 'operator' => 'OR', | |
| 834 | 'options' => '', | |
| 835 | 'value' => array ( | |
| 836 | 0 => 'video', | |
| 837 | ), | |
| 838 | ), | |
| 839 | array ( | |
| 840 | 'tablename' => 'node', | |
| 841 | 'field' => 'status', | |
| 842 | 'operator' => '=', | |
| 843 | 'options' => '', | |
| 844 | 'value' => '1', | |
| 845 | ), | |
| 846 | array ( | |
| 847 | 'tablename' => 'node', | |
| 848 | 'field' => 'promote', | |
| 849 | 'operator' => '=', | |
| 850 | 'options' => '', | |
| 851 | 'value' => '1', | |
| 852 | ), | |
| 853 | ); | |
| 854 | $view->exposed_filter = array ( | |
| 855 | ); | |
| 856 | $view->requires = array('node', 'users', 'video'); | |
| 857 | $views[$view->name] = $view; | |
| 858 | ||
| 859 | //featured_videos_in_panels | |
| 860 | $view = new stdClass(); | |
| 861 | $view->name = 'featured_videos_in_panels'; | |
| 862 | $view->description = 'Shows featured videos in panel layout'; | |
| 863 | $view->access = array ( | |
| 864 | ); | |
| 865 | $view->view_args_php = '$offset = 1;'; | |
| 866 | $view->page = TRUE; | |
| 867 | $view->page_title = ''; | |
| 868 | $view->page_header = ''; | |
| 869 | $view->page_header_format = '1'; | |
| 870 | $view->page_footer = ''; | |
| 871 | $view->page_footer_format = '1'; | |
| 872 | $view->page_empty = 'There is no recent video activity'; | |
| 873 | $view->page_empty_format = '1'; | |
| 874 | $view->page_type = 'panels_twocol'; | |
| 875 | $view->url = 'frontpagevideos'; | |
| 876 | $view->use_pager = TRUE; | |
| 877 | $view->nodes_per_page = '11'; | |
| 878 | $view->menu = TRUE; | |
| 879 | $view->menu_title = ''; | |
| 880 | $view->menu_tab = FALSE; | |
| 881 | $view->menu_tab_weight = '0'; | |
| 882 | $view->menu_tab_default = FALSE; | |
| 883 | $view->menu_tab_default_parent = NULL; | |
| 884 | $view->menu_parent_tab_weight = '0'; | |
| 885 | $view->menu_parent_title = ''; | |
| 886 | $view->sort = array ( | |
| 887 | array ( | |
| 888 | 'tablename' => 'node', | |
| 889 | 'field' => 'created', | |
| 890 | 'sortorder' => 'DESC', | |
| 891 | 'options' => 'normal', | |
| 892 | ), | |
| 893 | ); | |
| 894 | $view->argument = array ( | |
| 895 | ); | |
| 896 | $view->field = array ( | |
| 897 | array ( | |
| 898 | 'tablename' => 'node', | |
| 899 | 'field' => 'title', | |
| 900 | 'label' => 'Title', | |
| 901 | 'handler' => 'views_handler_field_nodelink', | |
| 902 | 'sortable' => '1', | |
| 903 | 'options' => 'link', | |
| 904 | ), | |
| 905 | array ( | |
| 906 | 'tablename' => 'node', | |
| 907 | 'field' => 'changed', | |
| 908 | 'label' => 'Last Updated', | |
| 909 | 'handler' => 'views_handler_field_date_small', | |
| 910 | 'sortable' => '1', | |
| 911 | 'defaultsort' => 'DESC', | |
| 912 | ), | |
| 913 | array ( | |
| 914 | 'tablename' => 'users', | |
| 915 | 'field' => 'name', | |
| 916 | 'label' => 'Author', | |
| 917 | ), | |
| 918 | /* array ( | |
| 919 | 'tablename' => 'video', | |
| 920 | 'field' => 'video_image', | |
| 921 | 'label' => 'Preview / Play', | |
| 922 | 'options' => 'preview', | |
| 923 | ),*/ | |
| 924 | array ( | |
| 925 | 'tablename' => 'node', | |
| 926 | 'field' => 'body', | |
| 927 | 'label' => '', | |
| 928 | 'handler' => 'views_handler_field_teaser', | |
| 929 | ), | |
| 930 | array ( | |
| 931 | 'tablename' => 'video', | |
| 932 | 'field' => 'play_counter', | |
| 933 | 'label' => 'Play count', | |
| 934 | ), | |
| 935 | array ( | |
| 936 | 'tablename' => 'votingapi_vote_vote_percent', | |
| 937 | 'field' => 'value', | |
| 938 | 'label' => '', | |
| 939 | 'handler' => 'fivestar_views_value_display_handler', | |
| 940 | ), | |
| 941 | ); | |
| 942 | $view->filter = array ( | |
| 943 | array ( | |
| 944 | 'tablename' => 'node', | |
| 945 | 'field' => 'type', | |
| 946 | 'operator' => 'OR', | |
| 947 | 'options' => '', | |
| 948 | 'value' => array ( | |
| 949 | 0 => 'video', | |
| 950 | ), | |
| 951 | ), | |
| 952 | array ( | |
| 953 | 'tablename' => 'node', | |
| 954 | 'field' => 'status', | |
| 955 | 'operator' => '=', | |
| 956 | 'options' => '', | |
| 957 | 'value' => '1', | |
| 958 | ), | |
| 959 | array ( | |
| 960 | 'tablename' => 'node', | |
| 961 | 'field' => 'promote', | |
| 962 | 'operator' => '=', | |
| 963 | 'options' => '', | |
| 964 | 'value' => '1', | |
| 965 | ), | |
| 966 | ); | |
| 967 | $view->exposed_filter = array ( | |
| 968 | ); | |
| 969 | $view->requires = array('node', 'users', 'video', 'votingapi_vote_vote_percent'); | |
| 970 | $views[$view->name] = $view; | |
| 971 | ||
| 972 | // video tracker | |
| 973 | $view = new stdClass(); | |
| 974 | $view->name = 'video_tracker'; | |
| 975 | $view->description = 'Shows all recent video activity (table format)'; | |
| 976 | $view->access = array ( | |
| 977 | ); | |
| 978 | $view->view_args_php = ''; | |
| 979 | $view->page = TRUE; | |
| 980 | $view->page_title = 'Recent videos'; | |
| 981 | $view->page_header = ''; | |
| 982 | $view->page_header_format = '1'; | |
| 983 | $view->page_footer = ''; | |
| 984 | $view->page_footer_format = '1'; | |
| 985 | $view->page_empty = 'There is no recent video activity'; | |
| 986 | $view->page_empty_format = '1'; | |
| 987 | $view->page_type = 'teaser'; | |
| 988 | $view->url = 'videos/tracker'; | |
| 989 | $view->use_pager = TRUE; | |
| 990 | $view->nodes_per_page = '20'; | |
| 991 | $view->menu = TRUE; | |
| 992 | $view->menu_title = ''; | |
| 993 | $view->menu_tab = FALSE; | |
| 994 | $view->menu_tab_weight = '0'; | |
| 995 | $view->menu_tab_default = FALSE; | |
| 996 | $view->menu_tab_default_parent = NULL; | |
| 997 | $view->menu_parent_tab_weight = '0'; | |
| 998 | $view->menu_parent_title = ''; | |
| 999 | $view->block = TRUE; | |
| 1000 | $view->block_title = ''; | |
| 1001 | $view->block_header = ''; | |
| 1002 | $view->block_header_format = '1'; | |
| 1003 | $view->block_footer = ''; | |
| 1004 | $view->block_footer_format = '1'; | |
| 1005 | $view->block_empty = ''; | |
| 1006 | $view->block_empty_format = '1'; | |
| 1007 | $view->block_type = 'summary_combo'; | |
| 1008 | $view->nodes_per_block = '5'; | |
| 1009 | $view->block_more = FALSE; | |
| 1010 | $view->block_use_page_header = FALSE; | |
| 1011 | $view->block_use_page_footer = FALSE; | |
| 1012 | $view->block_use_page_empty = FALSE; | |
| 1013 | $view->sort = array ( | |
| 1014 | array ( | |
| 1015 | 'tablename' => 'node', | |
| 1016 | 'field' => 'created', | |
| 1017 | 'sortorder' => 'DESC', | |
| 1018 | 'options' => 'normal', | |
| 1019 | ), | |
| 1020 | ); | |
| 1021 | $view->argument = array ( | |
| 1022 | ); | |
| 1023 | $view->field = array ( | |
| 1024 | array ( | |
| 1025 | 'tablename' => 'node', | |
| 1026 | 'field' => 'title', | |
| 1027 | 'label' => 'Title', | |
| 1028 | 'handler' => 'views_handler_field_nodelink', | |
| 1029 | 'sortable' => '1', | |
| 1030 | 'options' => 'link', | |
| 1031 | ), | |
| 1032 | array ( | |
| 1033 | 'tablename' => 'node', | |
| 1034 | 'field' => 'changed', | |
| 1035 | 'label' => 'Last Updated', | |
| 1036 | 'handler' => 'views_handler_field_date_small', | |
| 1037 | 'sortable' => '1', | |
| 1038 | 'defaultsort' => 'DESC', | |
| 1039 | ), | |
| 1040 | array ( | |
| 1041 | 'tablename' => 'users', | |
| 1042 | 'field' => 'name', | |
| 1043 | 'label' => 'Author', | |
| 1044 | ), | |
| 1045 | /* array ( | |
| 1046 | 'tablename' => 'video', | |
| 1047 | 'field' => 'video_image', | |
| 1048 | 'label' => 'Preview / Play', | |
| 1049 | ),*/ | |
| 1050 | array ( | |
| 1051 | 'tablename' => 'video', | |
| 1052 | 'field' => 'play_counter', | |
| 1053 | 'label' => 'Play count', | |
| 1054 | ), | |
| 1055 | ); | |
| 1056 | $view->filter = array ( | |
| 1057 | array ( | |
| 1058 | 'tablename' => 'node', | |
| 1059 | 'field' => 'type', | |
| 1060 | 'operator' => 'OR', | |
| 1061 | 'options' => '', | |
| 1062 | 'value' => array ( | |
| 1063 | 0 => 'video', | |
| 1064 | ), | |
| 1065 | ), | |
| 1066 | array ( | |
| 1067 | 'tablename' => 'node', | |
| 1068 | 'field' => 'status', | |
| 1069 | 'operator' => '=', | |
| 1070 | 'options' => '', | |
| 1071 | 'value' => '1', | |
| 1072 | ), | |
| 1073 | ); | |
| 1074 | $view->exposed_filter = array ( | |
| 1075 | ); | |
| 1076 | $view->requires = array(node, users, video); | |
| 1077 | $views[$view->name] = $view; | |
| 1078 | ||
| 1079 | views_load_cache(); | |
| 1080 | foreach ($views as $view) { | |
| 1081 | views_sanitize_view($view); | |
| 1082 | _views_save_view($view); | |
| 1083 | } | |
| 1084 | ||
| 1085 | } | |
| 1086 | ||
| 1087 | /** | |
| 1088 | * create the front panel | |
| 1089 | * | |
| 1090 | * @todo implement this, look at the raw data in the panels_info and | |
| 1091 | * panels_area tables and create a nice-looking $panels object to pass | |
| 1092 | * to panels_save_panels | |
| 1093 | * @see panels_save_panels | |
| 1094 | */ | |
| 1095 | function _filmforge_profile_create_panels() { | |
| 1096 | ||
| 1097 | } | |
| 1098 | ||
| 1099 | /** | |
| 1100 | * create a few blocks | |
| 1101 | * | |
| 1102 | * Bottom: | |
| 1103 | * * thisuserscontent (view) | |
| 1104 | * * Creativecommon license | |
| 1105 | * | |
| 1106 | * Header: | |
| 1107 | * * Search form | |
| 1108 | * | |
| 1109 | * Header top: | |
| 1110 | * * Language switcher | |
| 1111 | * * Left sidebar | |
| 1112 | * * Publish Button (multilingual) | |
| 1113 | * (made of 2 blocks: | |
| 1114 | * * Publish button (en): the string: | |
| 1115 | <a href="http://filmforge.koumbit.net/fr/publish"><img src="http://filmforge.koumbit.net/sites/all/themes/filmforge/images/publier.png" alt="publish your video" align="center"></a> | |
| 1116 | * * Publish button (fr): the string: | |
| 1117 | <a href="http://filmforge.koumbit.net/en/publish"><img src="http://filmforge.koumbit.net/sites/all/themes/filmforge/images/publish.png" alt="publish your video" align="center"></a> | |
| 1118 | * | |
| 1119 | * * Secondary Links | |
| 1120 | * * Author information | |
| 1121 | * * Navigation | |
| 1122 | * * Tag cloud | |
| 1123 | * | |
| 1124 | * Right sidebar: | |
| 1125 | * * thisuserscontent | |
| 1126 | * * video_featured_last_block | |
| 1127 | * * Most played videos | |
| 1128 | * * Most downloaded | |
| 1129 | * * Top videos | |
| 1130 | * * Latest videos | |
| 1131 | * * Random video | |
| 1132 | */ | |
| 1133 | function _filmforge_profile_create_blocks() { | |
| 1134 | ||
| 1135 | ||
| 1136 | /* Blocks */ | |
| 1137 | ||
| 1138 | install_add_block(array ( | |
| 1139 | 'module' => 'i18nblocks', | |
| 1140 | 'delta' => '1', | |
| 1141 | 'theme' => 'filmforge', | |
| 1142 | 'status' => '1', | |
| 1143 | 'weight' => '-10', | |
| 1144 | 'region' => 'left', | |
| 1145 | 'custom' => '0', | |
| 1146 | 'throttle' => '0', | |
| 1147 | 'visibility' => '0', | |
| 1148 | 'pages' => '', | |
| 1149 | 'title' => '', | |
| 1150 | )); | |
| 1151 | install_add_block(array ( | |
| 1152 | 'module' => 'views', | |
| 1153 | 'delta' => 'comments_recent', | |
| 1154 | 'theme' => 'filmforge', | |
| 1155 | 'status' => '0', | |
| 1156 | 'weight' => '0', | |
| 1157 | 'region' => '', | |
| 1158 | 'custom' => '0', | |
| 1159 | 'throttle' => '0', | |
| 1160 | 'visibility' => '0', | |
| 1161 | 'pages' => '', | |
| 1162 | 'title' => '', | |
| 1163 | )); | |
| 1164 | install_add_block(array ( | |
| 1165 | 'module' => 'views', | |
| 1166 | 'delta' => 'video_featured_last_block', | |
| 1167 | 'theme' => 'filmforge', | |
| 1168 | 'status' => '1', | |
| 1169 | 'weight' => '0', | |
| 1170 | 'region' => 'right', | |
| 1171 | 'custom' => '0', | |
| 1172 | 'throttle' => '0', | |
| 1173 | 'visibility' => '0', | |
| 1174 | 'pages' => 'frontpagevideos', | |
| 1175 | 'title' => 'previous features', | |
| 1176 | )); | |
| 1177 | install_add_block(array ( | |
| 1178 | 'module' => 'views', | |
| 1179 | 'delta' => 'thisuserscontent', | |
| 1180 | 'theme' => 'filmforge', | |
| 1181 | 'status' => '1', | |
| 1182 | 'weight' => '-8', | |
| 1183 | 'region' => 'right', | |
| 1184 | 'custom' => '0', | |
| 1185 | 'throttle' => '0', | |
| 1186 | 'visibility' => '2', | |
| 1187 | 'pages' => '<?php | |
| 1188 | $match = FALSE; | |
| 1189 | $types = array(\'video\' => 1); | |
| 1190 | if (arg(0) == \'node\' && is_numeric(arg(1))) { | |
| 1191 | $nid = arg(1); | |
| 1192 | $node = node_load(array(\'nid\' => $nid)); | |
| 1193 | $type = $node->type; | |
| 1194 | if (isset($types[$type])) { | |
| 1195 | $match = TRUE; | |
| 1196 | } | |
| 1197 | } | |
| 1198 | return $match; | |
| 1199 | ?>', | |
| 1200 | 'title' => '', | |
| 1201 | )); | |
| 1202 | install_add_block(array ( | |
| 1203 | 'module' => 'views', | |
| 1204 | 'delta' => 'video_tracker_block', | |
| 1205 | 'theme' => 'filmforge', | |
| 1206 | 'status' => '0', | |
| 1207 | 'weight' => '6', | |
| 1208 | 'region' => '', | |
| 1209 | 'custom' => '0', | |
| 1210 | 'throttle' => '0', | |
| 1211 | 'visibility' => '0', | |
| 1212 | 'pages' => '', | |
| 1213 | 'title' => '', | |
| 1214 | )); | |
| 1215 | install_add_block(array ( | |
| 1216 | 'module' => 'views', | |
| 1217 | 'delta' => 'video_tracker', | |
| 1218 | 'theme' => 'filmforge', | |
| 1219 | 'status' => '0', | |
| 1220 | 'weight' => '0', | |
| 1221 | 'region' => '', | |
| 1222 | 'custom' => '0', | |
| 1223 | 'throttle' => '0', | |
| 1224 | 'visibility' => '0', | |
| 1225 | 'pages' => '', | |
| 1226 | 'title' => '', | |
| 1227 | )); | |
| 1228 | ||
| 1229 | install_add_block(array ( | |
| 1230 | 'module' => 'translation', | |
| 1231 | 'delta' => '0', | |
| 1232 | 'theme' => 'filmforge', | |
| 1233 | 'status' => '0', | |
| 1234 | 'weight' => '3', | |
| 1235 | 'region' => '', | |
| 1236 | 'custom' => '0', | |
| 1237 | 'throttle' => '0', | |
| 1238 | 'visibility' => '0', | |
| 1239 | 'pages' => '', | |
| 1240 | 'title' => '', | |
| 1241 | )); | |
| 1242 | install_add_block(array ( | |
| 1243 | 'module' => 'video', | |
| 1244 | 'delta' => '4', | |
| 1245 | 'theme' => 'filmforge', | |
| 1246 | 'status' => '0', | |
| 1247 | 'weight' => '5', | |
| 1248 | 'region' => '', | |
| 1249 | 'custom' => '0', | |
| 1250 | 'throttle' => '0', | |
| 1251 | 'visibility' => '0', | |
| 1252 | 'pages' => '', | |
| 1253 | 'title' => '', | |
| 1254 | )); | |
| 1255 | install_add_block(array ( | |
| 1256 | 'module' => 'video', | |
| 1257 | 'delta' => '3', | |
| 1258 | 'theme' => 'filmforge', | |
| 1259 | 'status' => '1', | |
| 1260 | 'weight' => '3', | |
| 1261 | 'region' => 'right', | |
| 1262 | 'custom' => '0', | |
| 1263 | 'throttle' => '0', | |
| 1264 | 'visibility' => '1', | |
| 1265 | 'pages' => 'videos/* | |
| 1266 | video/*', | |
| 1267 | 'title' => '', | |
| 1268 | )); | |
| 1269 | install_add_block(array ( | |
| 1270 | 'module' => 'video', | |
| 1271 | 'delta' => '2', | |
| 1272 | 'theme' => 'filmforge', | |
| 1273 | 'status' => '1', | |
| 1274 | 'weight' => '3', | |
| 1275 | 'region' => 'right', | |
| 1276 | 'custom' => '0', | |
| 1277 | 'throttle' => '0', | |
| 1278 | 'visibility' => '1', | |
| 1279 | 'pages' => 'videos/* | |
| 1280 | video/*', | |
| 1281 | 'title' => '', | |
| 1282 | )); | |
| 1283 | install_add_block(array ( | |
| 1284 | 'module' => 'video', | |
| 1285 | 'delta' => '1', | |
| 1286 | 'theme' => 'filmforge', | |
| 1287 | 'status' => '1', | |
| 1288 | 'weight' => '3', | |
| 1289 | 'region' => 'right', | |
| 1290 | 'custom' => '0', | |
| 1291 | 'throttle' => '0', | |
| 1292 | 'visibility' => '1', | |
| 1293 | 'pages' => 'videos/* | |
| 1294 | video/*', | |
| 1295 | 'title' => '', | |
| 1296 | )); | |
| 1297 | install_add_block(array ( | |
| 1298 | 'module' => 'video', | |
| 1299 | 'delta' => '0', | |
| 1300 | 'theme' => 'filmforge', | |
| 1301 | 'status' => '1', | |
| 1302 | 'weight' => '3', | |
| 1303 | 'region' => 'right', | |
| 1304 | 'custom' => '0', | |
| 1305 | 'throttle' => '0', | |
| 1306 | 'visibility' => '1', | |
| 1307 | 'pages' => 'videos/* | |
| 1308 | video/*', | |
| 1309 | 'title' => '', | |
| 1310 | )); | |
| 1311 | install_add_block(array ( | |
| 1312 | 'module' => 'tagadelic', | |
| 1313 | 'delta' => '0', | |
| 1314 | 'theme' => 'filmforge', | |
| 1315 | 'status' => '0', | |
| 1316 | 'weight' => '0', | |
| 1317 | 'region' => '', | |
| 1318 | 'custom' => '0', | |
| 1319 | 'throttle' => '0', | |
| 1320 | 'visibility' => '0', | |
| 1321 | 'pages' => '', | |
| 1322 | 'title' => '', | |
| 1323 | )); | |
| 1324 | install_add_block(array ( | |
| 1325 | 'module' => 'tagadelic', | |
| 1326 | 'delta' => '2', | |
| 1327 | 'theme' => 'filmforge', | |
| 1328 | 'status' => '1', | |
| 1329 | 'weight' => '4', | |
| 1330 | 'region' => 'left', | |
| 1331 | 'custom' => '0', | |
| 1332 | 'throttle' => '0', | |
| 1333 | 'visibility' => '0', | |
| 1334 | 'pages' => '', | |
| 1335 | 'title' => 'Tag cloud', | |
| 1336 | )); | |
| 1337 | install_add_block(array ( | |
| 1338 | 'module' => 'tagadelic', | |
| 1339 | 'delta' => '1', | |
| 1340 | 'theme' => 'filmforge', | |
| 1341 | 'status' => '0', | |
| 1342 | 'weight' => '0', | |
| 1343 | 'region' => '', | |
| 1344 | 'custom' => '0', | |
| 1345 | 'throttle' => '0', | |
| 1346 | 'visibility' => '0', | |
| 1347 | 'pages' => '', | |
| 1348 | 'title' => '', | |
| 1349 | )); | |
| 1350 | install_add_block(array ( | |
| 1351 | 'module' => 'image', | |
| 1352 | 'delta' => '1', | |
| 1353 | 'theme' => 'filmforge', | |
| 1354 | 'status' => '0', | |
| 1355 | 'weight' => '0', | |
| 1356 | 'region' => '', | |
| 1357 | 'custom' => '0', | |
| 1358 | 'throttle' => '0', | |
| 1359 | 'visibility' => '0', | |
| 1360 | 'pages' => '', | |
| 1361 | 'title' => '', | |
| 1362 | )); | |
| 1363 | install_add_block(array ( | |
| 1364 | 'module' => 'creativecommons_lite', | |
| 1365 | 'delta' => '0', | |
| 1366 | 'theme' => 'filmforge', | |
| 1367 | 'status' => '1', | |
| 1368 | 'weight' => '0', | |
| 1369 | 'region' => 'content_bottom', | |
| 1370 | 'custom' => '0', | |
| 1371 | 'throttle' => '0', | |
| 1372 | 'visibility' => '0', | |
| 1373 | 'pages' => '', | |
| 1374 | 'title' => '', | |
| 1375 | )); | |
| 1376 | install_add_block(array ( | |
| 1377 | 'module' => 'image', | |
| 1378 | 'delta' => '0', | |
| 1379 | 'theme' => 'filmforge', | |
| 1380 | 'status' => '0', | |
| 1381 | 'weight' => '0', | |
| 1382 | 'region' => '', | |
| 1383 | 'custom' => '0', | |
| 1384 | 'throttle' => '0', | |
| 1385 | 'visibility' => '0', | |
| 1386 | 'pages' => '', | |
| 1387 | 'title' => '', | |
| 1388 | )); | |
| 1389 | install_add_block(array ( | |
| 1390 | 'module' => 'user', | |
| 1391 | 'delta' => '3', | |
| 1392 | 'theme' => 'filmforge', | |
| 1393 | 'status' => '0', | |
| 1394 | 'weight' => '0', | |
| 1395 | 'region' => '', | |
| 1396 | 'custom' => '0', | |
| 1397 | 'throttle' => '0', | |
| 1398 | 'visibility' => '0', | |
| 1399 | 'pages' => '', | |
| 1400 | 'title' => '', | |
| 1401 | )); | |
| 1402 | install_add_block(array ( | |
| 1403 | 'module' => 'user', | |
| 1404 | 'delta' => '2', | |
| 1405 | 'theme' => 'filmforge', | |
| 1406 | 'status' => '0', | |
| 1407 | 'weight' => '0', | |
| 1408 | 'region' => '', | |
| 1409 | 'custom' => '0', | |
| 1410 | 'throttle' => '0', | |
| 1411 | 'visibility' => '0', | |
| 1412 | 'pages' => '', | |
| 1413 | 'title' => '', | |
| 1414 | )); | |
| 1415 | install_add_block(array ( | |
| 1416 | 'module' => 'user', | |
| 1417 | 'delta' => '1', | |
| 1418 | 'theme' => 'filmforge', | |
| 1419 | 'status' => '1', | |
| 1420 | 'weight' => '0', | |