123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- // $Id$
- //
- // jqplug.module
- //
- //
- //
- // Created by Bach on 2008-04.
- // Copyright 2008 gui. All rights reserved.
- //
- /**
- * @file
- * Loads plugins for jQuery
- *
- *
- *
- */
- /**
- *
- * hook_perm()
- *
- */
- function jqplug_perm(){
- return array('administer jqplug');
- }
- /**
- * Implementation of hook_init().
- */
- function jqplug_init() {
- # Add the JS for this module.
- $mod_path = drupal_get_path('module', 'jqplug');
-
- /*drupal_add_js($mod_path.'/js/jquery.dimensions.pack.js', 'module', 'header', FALSE, TRUE);*/
-
- drupal_add_js($mod_path.'/js/jquery.mousewheel.pack.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_js($mod_path.'/js/jqem-compressed.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_js($mod_path.'/js/jScrollPane.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_css($mod_path.'/css/jScrollPane.css', 'module', 'all', FALSE);
-
- // http://plugins.jquery.com/project/Easing
- drupal_add_js($mod_path.'/js/jquery.easing.1.2.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_js($mod_path.'/js/jquery.checkbox.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_js($mod_path.'/js/jquery.cookie.js', 'module', 'header', FALSE, TRUE);
-
- drupal_add_js($mod_path.'/js/jquery.color.js', 'module', 'header', FALSE, TRUE);
-
- // url = http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/
- drupal_add_js($mod_path.'/js/jqminmax-compressed.js', 'module', 'header', FALSE, TRUE);
- //
- drupal_add_js($mod_path.'/js/AC_OETags.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/swfobject.js', 'module', 'header', FALSE, TRUE);
-
- }
- /**
- *
- * Implementation of hook_menu().
- *
- */
- function jqplug_menu($may_cache = false) {
- /*
- $items = array();
- if ($may_cache) {
- #
- }
- else {
- # Add the JS for this module.
- $mod_path = drupal_get_path('module', 'jqplug');
- drupal_add_js($mod_path.'/js/jquery.dimensions.pack.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/jquery.mousewheel.pack.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/jqem-compressed.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/jScrollPane.js', 'module', 'header', FALSE, TRUE);
- drupal_add_css($mod_path.'/css/jScrollPane.css', 'module', 'all', FALSE);
- drupal_add_js($mod_path.'/js/jquery.easing.1.2.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/jquery.checkbox.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/jquery.cookie.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/AC_OETags.js', 'module', 'header', FALSE, TRUE);
- drupal_add_js($mod_path.'/js/swfobject.js', 'module', 'header', FALSE, TRUE);
-
-
- }
- return $items;
- */
- }
- /**
- * nouveaute_admin
- *
- * */
- function jqplug_admin(){
- /*
- drupal_set_title('nouveaute administration');
-
- $form = array();
- $form['nouveautes']['#tree'] = TRUE;
-
-
- $form['nouveautes']['nouveaute_bouton_ic_presetid'] = array(
- '#type' => 'select',
- '#title' => t('image_bouton'),
- '#multiple' => FALSE,
- '#description' => t('Select the imageCache preset which will be choose for image bouton.'),
- '#options' => $presetsname,
- '#default_value' => array_search(variable_get('nouveaute_bouton_ic_presetid', 0), $presetsid),
- );
- $form['hidden'] = array('#type' => 'value', '#value' => $presetsid);
- return system_settings_form($form);
-
- }
- */
- }
- function jqplug_admin_submit($form_id, $form_values){
- /*
- print('<pre>');
- print_r($form_values);
- print('</pre>');
- */
- //
- /*
- foreach($form_values['nouveautes'] as $var => $pos){
- variable_set($var, $form_values['hidden'][$pos]);
- }
- drupal_set_message(t('nouveaute configuration has been saved.'));
- */
- }
|