code snippet
0 answers
Graph OAuth 2.0: How to request extended permission from facebook
1 year 18 weeks ago Tags:
- Read more
- View Orignal Stackoverflow Question
- login or register to post comments
0 answers
Code Snippet: How to store multiple values per key in PHP
1 year 18 weeks ago Tags:
- Read more
- View Orignal Stackoverflow Question
- login or register to post comments
0 answers
PHP Code to Encrypt /Decrypt text with RSA : Code Snippet
1 year 18 weeks ago Tags:
- Read more
- View Orignal Stackoverflow Question
- login or register to post comments
How to debug in Drupal using drupal_set_message and come to the exact line that is causing the error?
Put the following code snippet in includes/bootstrap.inc in the drupal_set_message function.. .
<code> if ($type == 'error') { $message .= '<pre>'. print_r(debug_backtrace(), 1) .'</pre>'; } </code>
Remove Tabs from Drupal Site
Use the following function in '_phptemplate_variables' function in template.php. In the following code snippet, if I want to remove the "Edit" tab:
<?php
function _phptemplate_variables($hook, $vars = array()) {
if($hook == 'page') {
yourthemename_removetab('Edit', $vars);
// add additional lines here to remove other tabs
}
return $vars;
}
function yourthemename_removetab($label, &$vars) {
$tabs = explode("\n", $vars['tabs']);
$vars['tabs'] = '';
foreach($tabs as $tab) {
if(strpos($tab, '>' . $label . '<') === FALSE) {