Commit 84ff7622 authored by theo lem's avatar theo lem
Browse files

Merge branch 'forms_feature' into 'master'

Installation profile

See merge request framasoft/framaforms!36
parents e774a44b 7ebd360b
......@@ -2,30 +2,27 @@
**Developed with :heart: by [Framasoft](**
## Introduction
## Introduction
Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. Detailed features and usage can be found [here]( (in French).
Framaforms is an online forms and surveys service. Registered users are allowed to create forms, share them, collect and visualize results through a simple interface. Detailed features and usage can be found [here]( (in French).
See why we created it ([#1]( and [#2]( in French) for further general information.
Framaforms is based on Drupal 7 and makes extensive use of the `webform` modules as well as others.
Framaforms is based on Drupal 7 and makes extensive use of the `webform` modules as well as others.
## Installation
You don't need superpowers to install Framaforms, as it is based mainly on Drupal, however the installation can be a little more demanding as it is.
*NB : Framaforms being dependent on PostgreSQL, it cannot be "[distributed as a module](" per the Drupal community standard. **However** we are working on an easier way to install it.*
Follow detailed instructions [here](
You don't need superpowers to install Framaforms. If you've already installed Drupal, you'll be on familiar ground. If you haven't, don't you worry, you only need basic knowledge.
Follow detailed instructions [here](
## Homemade tweaking of Drupal
As mentioned above, Framaforms is mainly Drupal, and we try as much as possible not to mess with the upstream code.
As mentioned above, Framaforms is mainly Drupal, and we try as much as possible not to mess with the upstream code.
However, due to our environment and needs, a few custom modifications have been made to the original code. **If you ever need to update the Drupal core or a module** and that update is not commited to the code on the repo, you'll find all the instructions [on this wiki page](
However, due to our environment and needs, a few custom modifications have been made to the original code. **If you ever need to update the Drupal core or a module** and that update is not commited to the code on the repo, you'll find all the instructions [on this wiki page](
## Resources & support
Technical details can be found [on the wiki](
## Resources & support
Technical details can be found [on the wiki](
For community support, please refer to [our Discourse]( (mostly in French).
For community support, please refer to [our Discourse]( (mostly in French).
*Framaforms code is under GPLv2, [Framasoft graphical elements]( are under [CC-BY-SA 4.0](*
\ No newline at end of file
This diff is collapsed.
; framaforms_org make file for d.o. usage
core = "7.x"
api = "2"
; +++++ Modules +++++
projects[admin_menu][version] = "3.0-rc6"
projects[admin_menu][subdir] = "contrib"
projects[ctools][version] = "1.15"
projects[ctools][subdir] = "contrib"
projects[charts][version] = "2.1"
projects[charts][subdir] = "contrib"
projects[date][version] = "2.10"
projects[date][subdir] = "contrib"
projects[interval][version] = "1.2"
projects[interval][subdir] = "contrib"
projects[devel][version] = "1.7"
projects[devel][subdir] = "contrib"
projects[features][version] = "2.11"
projects[features][subdir] = "contrib"
projects[conditional_fields][version] = "3.0-alpha2"
projects[conditional_fields][subdir] = "contrib"
projects[entityreference][version] = "1.5"
projects[entityreference][subdir] = "contrib"
projects[field_group][version] = "1.6"
projects[field_group][subdir] = "contrib"
projects[field_validation][version] = "2.6"
projects[field_validation][subdir] = "contrib"
projects[l10n_update][version] = "2.3"
projects[l10n_update][subdir] = "contrib"
projects[better_formats][version] = "1.0-beta2"
projects[better_formats][subdir] = "contrib"
projects[disable_messages][version] = "1.2"
projects[disable_messages][subdir] = "contrib"
projects[entity][version] = "1.9"
projects[entity][subdir] = "contrib"
projects[form_builder][version] = "2.0-alpha7"
projects[form_builder][subdir] = "contrib"
projects[framaforms][version] = "1.0"
projects[framaforms][subdir] = "contrib"
projects[framaforms_public_results][version] = "1.0"
projects[framaforms_public_results][subdir] = "contrib"
projects[framaforms_share_results][version] = "1.0"
projects[framaforms_share_results][subdir] = "contrib"
projects[libraries][version] = "2.5"
projects[libraries][subdir] = "contrib"
projects[logintoboggan][version] = "1.5"
projects[logintoboggan][subdir] = "contrib"
projects[node_clone][version] = "1.0"
projects[node_clone][subdir] = "contrib"
projects[pathauto][version] = "1.3"
projects[pathauto][subdir] = "contrib"
projects[psr0][version] = "1.4"
projects[psr0][subdir] = "contrib"
projects[subpathauto][version] = "1.3"
projects[subpathauto][subdir] = "contrib"
projects[token][version] = "1.7"
projects[token][subdir] = "contrib"
projects[transliteration][version] = "3.2"
projects[transliteration][subdir] = "contrib"
projects[pdf_export][version] = "1.x-dev"
projects[pdf_export][subdir] = "contrib"
projects[panels][version] = "3.9"
projects[panels][subdir] = "contrib"
projects[rules][version] = "2.12"
projects[rules][subdir] = "contrib"
projects[captcha][version] = "1.7"
projects[captcha][subdir] = "contrib"
projects[honeypot][version] = "1.26"
projects[honeypot][subdir] = "contrib"
projects[riddler][version] = "1.3"
projects[riddler][subdir] = "contrib"
projects[themekey][version] = "3.4"
projects[themekey][subdir] = "contrib"
projects[jquery_update][version] = "2.7"
projects[jquery_update][subdir] = "contrib"
projects[options_element][version] = "1.12"
projects[options_element][subdir] = "contrib"
projects[wysiwyg][version] = "2.6"
projects[wysiwyg][subdir] = "contrib"
projects[views][version] = "3.24"
projects[views][subdir] = "contrib"
projects[views_access_callback][version] = "1.0-beta1"
projects[views_access_callback][subdir] = "contrib"
projects[views_bulk_operations][version] = "3.5"
projects[views_bulk_operations][subdir] = "contrib"
projects[views_conditional][version] = "1.3"
projects[views_conditional][subdir] = "contrib"
projects[views_date_format_sql][version] = "3.3"
projects[views_date_format_sql][subdir] = "contrib"
projects[webform][version] = "4.22"
projects[webform][subdir] = "contrib"
projects[webform_charts][version] = "1.0-beta2"
projects[webform_charts][subdir] = "contrib"
projects[webform_confirm_email][version] = "2.14"
projects[webform_confirm_email][subdir] = "contrib"
projects[webform_report][version] = "1.0"
projects[webform_report][subdir] = "contrib"
projects[webform_share][version] = "1.3"
projects[webform_share][subdir] = "contrib"
projects[webform_validation][version] = "1.17"
projects[webform_validation][subdir] = "contrib"
projects[searchindex_wipe][version] = "1.1"
projects[searchindex_wipe][subdir] = "contrib"
; +++++ Themes +++++
; bootstrap
projects[bootstrap][type] = "theme"
projects[bootstrap][version] = "3.26"
projects[bootstrap][subdir] = "contrib"
; adaptivetheme
projects[adaptivetheme][type] = "theme"
projects[adaptivetheme][version] = "3.4"
projects[adaptivetheme][subdir] = "contrib"
; adminimal_theme
projects[adminimal_theme][type] = "theme"
projects[adminimal_theme][version] = "1.24"
projects[adminimal_theme][subdir] = "contrib"
; black_hole
projects[black_hole][type] = "theme"
projects[black_hole][version] = "4.5"
projects[black_hole][subdir] = "contrib"
; scholarly_lite
projects[scholarly_lite][type] = "theme"
projects[scholarly_lite][version] = "1.1"
projects[scholarly_lite][subdir] = "contrib"
; +++++ Libraries +++++
; CKEditor
libraries[ckeditor][directory_name] = "ckeditor"
libraries[ckeditor][type] = "library"
libraries[ckeditor][destination] = "libraries"
libraries[ckeditor][download][type] = "get"
libraries[ckeditor][download][url] = ""
This diff is collapsed.
* Implements hook_install().
* Perform actions to set up the site for this profile.
function framaforms_org_install() {
// Enable some framaforms_org blocks.
$default_theme = 'frama';
$admin_theme = 'frama';
// disable all themes
->fields(array('status' => 0))
->condition('type', 'theme')
// enable $default_theme
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', $default_theme)
// enable $admin_theme
->fields(array('status' => 1))
->condition('type', 'theme')
->condition('name', $admin_theme)
variable_set('theme_default', $default_theme);
variable_set('admin_theme', $admin_theme);
// activate admin theme when editing a node
variable_set('node_admin_theme', '1');
$blocks = array(
'module' => 'user',
'delta' => 'login',
'theme' => $default_theme,
'status' => 1,
'weight' => 0,
'region' => 'sidebar_first',
'pages' => '',
'cache' => -1,
'module' => 'system',
'delta' => 'help',
'theme' => $default_theme,
'status' => 1,
'weight' => -10,
'region' => 'content',
'pages' => '',
'cache' => -1,
'module' => 'system',
'delta' => 'main',
'theme' => $admin_theme,
'status' => 1,
'weight' => 0,
'region' => 'content',
'pages' => '',
'cache' => -1,
// drop system / user blocks to ensure correct building
db_delete('block')->condition('module', 'system')->execute();
db_delete('block')->condition('module', 'user')->execute();
// add in our blocks defined above
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
foreach ($blocks as $block) {
// From shortcut.install, add shortcuts to the default set on install
$shortcut_set = shortcut_set_load(SHORTCUT_DEFAULT_SET_NAME);
$shortcut_set->links = NULL;
$shortcut_set->links = array(
'link_path' => 'admin/appearance/settings',
'link_title' => st('Theme'),
'weight' => -17,
shortcut_set_save($shortcut_set);// Create a default role for site administrators, with all available permissions assigned.
$admin_role = new stdClass();
$admin_role->name = 'administrator';
$admin_role->weight = 10;
user_role_grant_permissions($admin_role->rid, array_keys(module_invoke_all('permission')));
// Set this as the administrator role.
variable_set('user_admin_role', $admin_role->rid);
// Assign user 1 the "administrator" role.
->fields(array('uid' => 1, 'rid' => $admin_role->rid))
// Update the menu router information.
// ignore any rebuild messages
// ignore any other install messages
* Implements hook_form_FORM_ID_alter().
* Allows the profile to alter the site configuration form.
if (!function_exists("system_form_install_configure_form_alter")) {
function system_form_install_configure_form_alter(&$form, $form_state) {
$form['site_information']['site_name']['#default_value'] = 'Framaforms';
* Implements hook_form_alter().
* Select the current install profile by default.
if (!function_exists("system_form_install_select_profile_form_alter")) {
function system_form_install_select_profile_form_alter(&$form, $form_state) {
foreach ($form['profile'] as $key => $element) {
$form['profile'][$key]['#value'] = 'framaforms_org';
\ No newline at end of file
; framaforms_org make file for local development
core = "7.x"
api = "2"
projects[drupal][version] = "7.x"
; include the d.o. profile base
includes[] = "drupal-org.make"
; +++++ Libraries +++++
; mpdf
libraries[mpdf][directory_name] = "mpdf"
libraries[mpdf][type] = "library"
libraries[mpdf][destination] = "libraries"
libraries[mpdf][download][type] = "get"
libraries[mpdf][download][url] = "" ; TODO add download URI
; highcharts
libraries[highcharts][directory_name] = "highcharts"
libraries[highcharts][type] = "library"
libraries[highcharts][destination] = "libraries"
libraries[highcharts][download][type] = "get"
libraries[highcharts][download][url] = "" ; TODO add download URI
; tcpdf
libraries[tcpdf][directory_name] = "tcpdf"
libraries[tcpdf][type] = "library"
libraries[tcpdf][destination] = "libraries"
libraries[tcpdf][download][type] = "get"
libraries[tcpdf][download][url] = "" ; TODO add download URI
; tinymce
libraries[tinymce][directory_name] = "tinymce"
libraries[tinymce][type] = "library"
libraries[tinymce][destination] = "libraries"
libraries[tinymce][download][type] = "get"
libraries[tinymce][download][url] = "" ; TODO add download URI
Modules extend your site functionality beyond Drupal core.
Placing downloaded and custom modules in this directory separates downloaded and
custom modules from Drupal core's modules. This allows Drupal core to be updated
without overwriting these files.
Contributed modules from the Drupal community may be downloaded at
You may create subdirectories in this directory, to organize your added modules,
without breaking the site. Some common subdirectories include "contrib" for
contributed modules, and "custom" for custom modules. Note that if you move a
module to a subdirectory after it has been enabled, you may need to clear the
Drupal cache so it can be found. (Alternatively, you can disable the module
before moving it and then re-enable it after the move.)
In multisite configurations, modules found in this directory are available to
all sites. Alternatively, the sites/your_site_name/modules directory pattern
may be used to restrict modules to a specific site instance.
Refer to the "Developing for Drupal" section of the README.txt in the Drupal
root directory for further information on extending Drupal with custom modules.
Admin Menu 7.x-3.x, xxxx-xx-xx
#1177202 by das-peter, dereine, sun: Fixed copying and re-injection of child
router items breaks badly. Change them by reference instead.
Requires latest Views 3.x code.
#1212064 by sun: Updated admin_views default views for VBO 3.x.
#1196590 by sun: Fixed errors and notices for admin_views with Views 3.
#1144768 by idlewilder, sun: Fixed devel modules to skip are not displayed.
#1079374 by WillHall: Fixed JS Error: unrecognized expression: [href=/].
#1114132 by joelstein, sun: Added Field UI to list of developer modules.
#1008380 by bdragon, sun: Updated admin_views for D7.
#1146644 by sun: Fixed PHP 5.3 compability in tests.
#442560 by sun: Fixed 'defer' script attribute breaks Drupal.behaviors in FF3.6.
#1022902 by matglas86, sun: Updated for changed core Toolbar styles.
Admin Menu 7.x-3.0-RC1, 2010-01-07
#990774 by sun: Updated for $closure renamed to $page_bottom.
#991906 by johnv, sun: Added configure to .info file.
#947198 by sun: Added hint about disabling Toolbar.
by sun: Updated administrative settings form for D7 UX guidelines.
by sun: Disabled "Rebuild system links" button on settings form.
#420816 by sun, smk-ka: Improved on-demand loading of dynamic paths.
#420816 by tim.plunkett: Fixed dynamic Field UI paths for vocabularies.
#871774 by swentel: Fixed developer modules toggle still uses referer_uri().
#671760 by sun: Updated for new preprocess defaults.
#731462 by sun: Updated for system_rebuild_theme_data().
by sun: Re-added a "Rebuild system links" button to settings form.
#420816 by tim.plunkett: Updated taxonomy path map for machine names.
#857688 by sun: Updated for reverted system_settings_form().
#420816 by smk-ka, sun: Added merging of menu trees containing dynamic paths.
by sun: Fixed tests and minor admin_menu_toolbar styling issues.
by sun: Fixed various styling issues for admin_menu and admin_menu_toolbar.
by sun: Updated for Schema API, DBTNG, coding standards.
by sun: Updated for new admin/modules path.
#701424 by hutch: Updated for new admin/people/people path.
by sun: Removed orphan menu rewrite function.
#667858 by sun: Don't remove the current user from the switch user list.
#631550 by sun: Updated for fixed MENU_VISIBLE_IN_BREADCRUMB behavior.
#658344 by dereine, sun: Updated for removed drupal_session_count().
by sun: Added separate permission to flush cashes.
by sun: Updated for changed Devel settings form.
by sun: Updated for new {system}.info module data.
#614730 by azriprajwala, sun: Updated for hook_theme() key changes.
by sun: Updated for all theme functions should take a single argument.
by sun: Reverted removal of registry cache flushing option.
#578520 by sun: Fixed destination query parameter is processed wrongly.
#578520 by sun: Updated for $query in url() should always be an array.
by Dave Reid: Updated for PHP 5 date constants.
by sun: Updated for new database API.
by smk-ka: Removed remnants of the registry. Fixed flush admin menu cache
#567618 by smk-ka: Revised test cases. Abstracted out base web test class.
by sun: Updated for removed registry, new admin paths.
#326539 by sun: Updated for class attribute array.
#519782 by sun: Updated for hook_footer() replaced by hook_page_alter().
#525638 by Razorraser: Updated for admin/build renamed to admin/structure.
by Dave Reid: Updated for hook_permission().
#482314 by Dave Reid: Updated for node_type_get_types().
#437506 by yched, Dave Reid: Updated for menu_router_build().
#376816 by sun: Updated for compatibility for other JavaScript libraries.
#337820 by Dave Reid: Updated for new user/logout path.
#340546 by Dave Reid: Updated for drupal_add_js().
#340531 by Dave Reid: Updated for module_list().
#266358 by sun: Updated for drupal_add_css().
#320526 by yettyn, sun: Updated to UNSTABLE-2 (DBTNG queries, permissions, etc).
by sun: Changed admin_menu_wipe() to admin_menu_flush_caches().
by sun: Updated content-type edit menu item locations.
by sun: Fixed sess_count() changed to drupal_session_count().
Admin Menu 6.x-3.x, xxxx-xx-xx
#588936 by fenstrat: Fixed Toolbar shortcuts not visible.
#860390 by Kevin Rogers: Fixed .info file parsing error on uncertain platform.
#551484 by sun: Fixed stale hook_admin_menu_output_alter() docs.
Admin Menu 6.x-3.0-ALPHA4, 2010-03-11
#730156 by sun: Fixed Administration views.
by sun: Fixed missing .element-hidden style in D6 for permissions tweak.
#645526 by TravisCarden: Fixed stale local tasks markup after moving them.
#366442 by sun: Added tweak to collapse modules on permissions page.
#655926 by donquixote, sun: Improved performance of delayed mouseout.
#557062 by sun: Fixed admin_menu_toolbar JS/CSS loaded before admin_menu's.
#599462 by sun, koyama: Added background-color to avoid unintentional override.
#601918 by BWPanda: Fixed admin_menu.css overrides admin_menu_toolbar.css.
#586228 by Island Usurper: Fixed for PHP 5.3.
#554124 by Dave Reid: Added missing toolbar.png.
#557062 by Dave Reid: Fixed undefined Drupal.admin error when including
admin_menu_toolbar.js before admin_menu.js.
#511744 by smk-ka, sun: Fixed /admin page links are broken.
by smk-ka: Added missing variables to hook_uninstall().
#571038 by smk-ka: Removed call to admin_menu_wipe() and cleaned install file.
#552190 by Bartezz: Fixed missing t() for user logout link.
Admin Menu 6.x-3.0-ALPHA3, 2009-08-16
#502500 by sun: Added "Create content" menu.
#538714 by sun: Fixed wrong re-parenting in Drupal's menu system.
#550132 by sun: Fixed (temporarily) admin_views menu items.
by sun: Added Administration views sub-module, converting all administrative
listing pages in Drupal core into real, ajaxified, and alterable views.
#547206 by sun: Fixed menu link descriptions lead to mouseover clashes.
#540954 by Rob Loach: Added String Overrides to list of developer modules.
#540762 by Deslack: Added Malay translation.
Admin Menu 6.x-3.0-ALPHA2, 2009-08-02
#527908 by sun: Changed theme_admin_menu_links() to use $element['#children'].
#527908 by markus_petrux, sun: Changed admin menu into a renderable array.
#420812 by sun, smk-ka: Added support for hook_js().
by sun: Fixed destination query string of current page not applied to links.
by sun: Changed Drupal.admin.attachBehaviors() to accept local JS settings.
#276751 by sun: Revamped rendering of menu additions/widgets.
#500866 by sun: Updated for removed t() from getInfo() in tests.
#402058 by sun: Added Administration menu toolbar module.
by markus_petrux, sun: Added API documentation.
#461264 by sun: Added site/domain as CSS class.
#451270 by smk-ka, sun: Changed visual indication for uid1.
by sun: Minor code clean-up.
#490670 by sun: Fixed missing menu after installation/upgrade.
#515718 by joelstein, sun: Added rules_admin module to developer modules list.
#352065 by sun: Added setting to select developer modules to keep enabled.
#511854 by psynaptic: Fixed logout link.
#424960 by markus_petrux, sun: Fixed gzip compression for cached output.
by sun: Fixed opacity of links in sub-menus.
#479922 by sun: Fixed fieldsets not collapsed on admin/build/modules/list*.
#495148 by sun: Fixed MENU_NORMAL_ITEMs do not appear in administration menu.
by sun: Fixed tests for new content-type locations.
#345984 by markus_petrux, sun: Fixed old menu links not removed on upgrade.
#276751 by sun: Major rewrite. Fixed menu items cannot be moved, altered, or
added as well as various performance issues.
by sun: Added variable to allow to disable caching (rewrite).
Admin Menu 6.x-3.0-ALPHA1, 2009-06-10
#236657 by sun: Updated for corrected arguments of system_clear_cache_submit().
#483870 by sun: Fixed compatibility with new Admin module.
#483152 by sun: Fixed admin_menu caches not flushed when clean URLs are toggled.
#479922 by danep: Fixed fieldsets not collapsed on admin/build/modules/list.
#469716 by sun: Fixed wrong AJAX callback URL under various conditions.
#471504 by wulff: Updated Danish translation.
by sun: Fixed admin_menu_suppress() does not suppress margin-top.
#451270 by sun: Added visual indication when working as uid 1.
by Dave Reid: Updated for getInfo() in tests.
#420828 by sun: Added dynamic replacements for cached administration menu.
#420840 by sun: Fixed Drupal.behaviors.adminMenu must be only executed once.
#345984 by markus_petrux, sun: Added client-side caching of administration menu.
Attention: A new era of Drupal user experience starts here. This is the very
first issue of a series of improvements targeting plain awesomeness.
#349169 by sun: Fixed Devel switch user links contain multiple path prefixes.
#345984 by sun: Code clean-up in preparation for client-side caching.
#415196 by psynaptic: Updated for CSS coding standards.
#406672 by mr.j, sun: Fixed "Move local tasks" option leaves stale UL.
by sun: Major code clean-up and sync across 3.x branches.
#349505 by smk-ka, sun: Performance: Added caching of entire menu output.
#315342 by wulff: Added "My account" link (by splitting the "Log out" item).
#384100 by kepol, sun: Fixed content-type items displayed in wrong place.
#373339 by sun: Fixed double-escaped 'Edit <content-type>' link titles.
#373372 by sun: Turned procedural JavaScript into admin menu behaviors.
by sun: Fixed admin menu tests (and updated to 6.x for SimpleTest 2.x).
#359158 by nitrospectide, sun: Fixed Devel Themer breaks admin menu.
#365335 by sun: Fixed not all variables removed after uninstall.
Admin Menu 6.x-1.3, 2009-01-24