This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USAGE: | |
First thing first - Make a backup of all your files. !Important | |
Execution Method 1 | |
Just drop this line inside the folder where your PHP program or buggy scripts reside then open command line and go to this directory. Execute the scripts by typing the command "php bug_fixer.php" without a quote, then press enter and just wait, then VIOLA! all bugs are gone! Congrats! | |
Execution Method 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Implementation of hook_preprocess_commerce_line_item_summary | |
* | |
*/ | |
// Replace the name of the hook with your theme or module name. | |
function HOOK_preprocess_commerce_line_item_summary(&$variables) { | |
// Replace the label ( default to Total ) with your own label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Make sure you include jquery equal heights plugin before using this snippet of code. Add entry reference to your scripts in your theme .info file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_menu_tree | |
* Wrap main menu with 2 division (Bootstrap) | |
* | |
*/ | |
function speedy_menu_tree__main_menu($vars) { | |
return '<div class="navbar"><div class="navbar-inner"><ul class="nav">' . $vars['tree'] . '</ul></div></div>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Replace with any function | |
if (function_exists('shell_exec')) { | |
echo "The function shell_exec() is available."; | |
} else { | |
echo "The function shell_exec() not available."; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reload .bashrc after editing, example after editing and adding the Drush alias | |
# to user specific aliases and functions -> alias drush="~/drush/drush" | |
# Execute the below shell commands | |
source ~/.bashrc | |
# This one goes to .bash_profile | |
# User specific environment and startup programs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Usage | |
* Insert to specific code block, div or regions | |
* | |
*/ | |
<?php if (theme_get_setting('footer_credits')): ?> | |
<span class="credits"><?php print t('Powered by: '); ?> <a href="http://github.com/danreb/abtik">Abtik Base Theme</a></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://drupal.org/node/350634 | |
http://highrockmedia.com/blog/customizing-user-login-page-drupal-7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will just remove log-in tab for customizing in theme, use this together with the code found in https://gist.github.com/3850448 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_form_alter | |
* | |
*/ | |
function arma_form_alter(&$form, $form_state, $form_id) { | |
if ($form_id === 'commerce_cart_add_to_cart_form_2' || $form_id === 'commerce_cart_add_to_cart_form_1') { | |
$form['submit']['#attributes']['title'] = $form['submit']['#attributes']['value'] = t('Buy Corporate Membership'); | |
} |
OlderNewer