| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: drupalbin.profile,v 1.1 2008/01/07 14:19:25 robloach Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 14 |
*/ |
*/ |
| 15 |
function drupalbin_profile_modules() { |
function drupalbin_profile_modules() { |
| 16 |
return array( |
return array( |
| 17 |
// DrupalBin |
// Core - required |
| 18 |
//'drupalbin', |
'block', 'filter', 'node', 'system', 'user', |
| 19 |
|
|
| 20 |
// Core - optional |
// Core - optional |
| 21 |
'color', 'help', 'menu', 'path', 'search', 'taxonomy', |
'color', 'help', 'menu', 'path', 'search', 'taxonomy', |
| 22 |
|
|
|
// Core - required |
|
|
'block', 'filter', 'node', 'system', 'user', 'watchdog', |
|
|
|
|
| 23 |
// GeSHi Filter |
// GeSHi Filter |
| 24 |
'geshifilter', 'geshinode', |
'geshifilter', 'geshinode', |
| 25 |
|
|
|
// Views |
|
|
'views', 'views_ui', 'views_rss', |
|
|
|
|
| 26 |
// Other |
// Other |
| 27 |
'token', 'pathauto', 'auto_nodetitle', 'clone', |
'token', 'pathauto', 'auto_nodetitle', 'clone', |
| 28 |
); |
); |
| 42 |
} |
} |
| 43 |
|
|
| 44 |
/** |
/** |
| 45 |
|
* Return a list of tasks that this profile supports. |
| 46 |
|
* |
| 47 |
|
* @return |
| 48 |
|
* A keyed array of tasks the profile will perform during |
| 49 |
|
* the final stage. The keys of the array will be used internally, |
| 50 |
|
* while the values will be displayed to the user in the installer |
| 51 |
|
* task list. |
| 52 |
|
*/ |
| 53 |
|
function drupalbin_profile_task_list() { |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
|
| 57 |
|
/** |
| 58 |
* Perform any final installation tasks for this profile. |
* Perform any final installation tasks for this profile. |
| 59 |
* |
* |
| 60 |
|
* @param $task |
| 61 |
|
* The current $task of the install system. When hook_profile_tasks() |
| 62 |
|
* is first called, this is 'profile'. |
| 63 |
|
* @param $url |
| 64 |
|
* Complete URL to be used for a link or form action on a custom page, |
| 65 |
|
* if providing any, to allow the user to proceed with the installation. |
| 66 |
|
* |
| 67 |
* @return |
* @return |
| 68 |
* An optional HTML string to display to the user on the final installation |
* An optional HTML string to display to the user. Only used if you |
| 69 |
* screen. |
* modify the $task, otherwise discarded. |
| 70 |
*/ |
*/ |
| 71 |
function drupalbin_profile_final() { |
function drupalbin_profile_tasks(&$task, $url) { |
| 72 |
// Site information |
// Site information |
| 73 |
variable_set('site_name', 'DrupalBin'); |
variable_set('site_mission', 'Post a code snippet.'); |
|
variable_set('site_mission', 'Welcome to <strong>DrupalBin</strong>, the tool to collaborate and debug code snippets.'); |
|
| 74 |
variable_set('site_frontpage', 'node/add/geshinode'); |
variable_set('site_frontpage', 'node/add/geshinode'); |
| 75 |
|
|
|
// Node Types |
|
|
db_query("INSERT INTO {node_type} SET type = '%s', name = '%s', module = '%s', description = '%s', has_title = %d, title_label = '%s', has_body = %d, body_label = '%s', modified = %d, locked = %d, orig_type = '%s'", |
|
|
'geshinode', 'Code', 'geshinode', 'Paste a code snippet.', 1, 'Name', 1, 'Source code', 1, 1, 'geshinode'); |
|
|
|
|
|
// Menus |
|
|
$item = array(); |
|
|
$item['pid'] = 2; // Primary items |
|
|
$item['path'] = 'node/add/geshinode'; |
|
|
$item['title'] = 'Submit Code'; |
|
|
$item['description'] = 'Paste a code snippet.'; |
|
|
$item['weight'] = -6; |
|
|
$item['type'] = 118; |
|
|
menu_save_item($item); |
|
|
|
|
| 76 |
// Permissions |
// Permissions |
| 77 |
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", |
db_query("UPDATE {permission} SET perm = '%s' WHERE rid = %d", |
| 78 |
'create source code node, access content, clone node, search content', 1); |
'create source code node, access content, clone node, search content', 1); |