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
$arg = "%".drupal_get_path_alias($_GET['q'])."%"; | |
echo $arg; | |
$query = db_select('url_alias', 't'); | |
$query->fields('t'); | |
$query->condition('t.alias', '$arg', 'LIKE'); | |
$query->range(0, 1); | |
$result = $query->execute(); | |
while ($record = $result->fetchAssoc()) { | |
print_r($record); |
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 | |
/** | |
* Completely reverts a feature based on the settings in its .info file. | |
* | |
* @param string $feature_module | |
* Name of feature/module to revert. | |
*/ | |
function full_feature_revert($feature_module) { | |
$info = drupal_parse_info_file(drupal_get_path('module', $feature_module) . '/' . $feature_module . '.info'); |
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
# Only works for vars that are expressed on one line, grep -A1 or a multilne pcregrep | |
# might be useful if you have longer var definitions. | |
# Check extant definitions | |
egrep "[$]conf\['related_videos_return'\]" --include site.conf.php . | |
# Blast em (note bsd/osx sed syntax, the first "" is not needed on gnu grep) | |
find . -type f -name site.conf.php -exec sed -i "" "/[$]conf\['related_videos_return'\]/d" {} \; | |
# Check them again, they are gone! | |
egrep "[$]conf\['related_videos_return'\]" --include site.conf.php . |
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 | |
array( | |
0 => | |
array ( | |
'file' => '/Users/cam8001/Sites/drupal/core/includes/bootstrap.inc', | |
'line' => 2220, | |
'function' => '_drupal_log_error', | |
'args' => | |
array ( |
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
javascript:alert(window.location.pathname.replace("/node/", '') + '-' + document.getElementsByTagName('h1')[0].innerHTML.replace(/'/g, '').replace(/[\s]/g, '-').toLowerCase()); |
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 | |
/** | |
* @file | |
* Sets up a field formatter, which can run custom theming or whatever else for a field. | |
* | |
* Once you have implemented the formatter, choose it on the 'display options' for a node. | |
*/ | |
/** |
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 | |
// The raw path to the image. | |
$path = $node->field_product_image[0]['filepath']; | |
// Let imagecache generate a different sized image using 'Product_large' | |
$large_path = imagecache_create_url('Product_large', $path); | |
// Render the original image and save the path to the large one in the tag. | |
// Your output will be something like: | |
// <img src="blah.jpg" large_img="large-blah.jpg" class='img-swap' /> | |
theme('imagecache', $path, '', '', array('large_img' => $large_path, 'class' => 'img-swap')); |
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
/** | |
* Implements hook_node_view(). | |
*/ | |
function superpoll_node_view($node, $view_mode, $langcode) { | |
// Provide a link back to the parent poll on superpoll options. | |
if ($node->type == 'superpoll_option' && $view_mode == 'full') { | |
$node->content['linkback_to_poll'] = array( | |
'#theme' => 'superpoll_option_header', | |
'#title' => $node->title, |
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
13emerueuniversal.fr | |
13thstreet.de | |
13thstreet.pl | |
13thstreetuniversal.com.au | |
13thstreetuniversal.nl | |
calle13universal.es | |
divauniversal.asia | |
divauniversal.ro | |
divauniversal.ru | |
scifiuniversal.pl |
OlderNewer