Designed and developed By DrupalNetworks.com. Drupal Networks is a division of YAS Global.

Blogs

Table already exists drupal 6

I have the same issue due to multi database setup in D6.
plz read the following
https://drupal.org/node/662860#comment-2391510

Increase Memory limit htaccess

In your .htaccess you can try this code:
php_value memory_limit 64M

Change the Search-URL of WordPress

function wpp_change_search_url_rewrite() {
if ( is_search() && ! empty( $_GET['s'] ) ) {
wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) );
exit();
}
}
add_action( 'template_redirect', 'wpp_change_search_url_rewrite' );

wordpress css cache issue

Plz add this code in your functions.php file

/** CSS Cache Buster */
add_filter( 'stylesheet_uri', 'child_stylesheet_uri' );
function child_stylesheet_uri( $stylesheet_uri ) {
    return add_query_arg( 'v', filemtime( get_stylesheet_directory() . '/style.css' ), $stylesheet_uri );
}

How to use Wurfl PHP library to test / detect mobile devices

<?php
if($device->getCapability('is_wireless_device') == 'true') { print 'This is a mobile device'; }
else { print
'This is NOT a mobile device'; }
?>

Need to change blog title

My clients want to change drupal blog->articles and i have done this using string override module http://drupal.org/project/stringoverrides

But for blog links we need to use these strings

!username's blog -> !username's article

!username's latest blog -> !username's latest article

@name's blog ->@name's article

@username's blog ->@username's article

Blog -> Article

blog -> article

Log out not working in drupal 6

you need to change the line

header("Cache-Control: store, no-cache, must-revalidate");

to

header("Cache-Control: no-store, no-cache, must-revalidate");

in function drupal_page_header() in ./include/bootstrap.inc

How to set third-party cookies with iframe in IE drupal facebook app

write this line at the top of settings.php file :

<?php
  header
('P3P: CP="CAO PSA OUR"');
?>

This line allows IE to accept 3rd party cookies.

Creating a Batch API operation to parse a large CSV file

n this code snippet, I'll show how you can parse a (large) CSV file using Drupal's Batch API. The purpose of batching an operation is to avoid PHP memory limits and time outs. Before you begin, I recommend reviewing the following two articles. Be sure to review the additional batch parameters outlined in the documentation, you might need to use them.
function MYMODULE_callback_csv_import() {
// define path to CSV file
$csv_file_path = file_directory_path() . '/import_path/myfile.csv';
// define a redirect path upon batch completion
$redirect_path = 'admin/import-csv';

assign drupal theme programmatically

global $custom_theme;
$custom_theme = 'garland';
init_theme();

Follow Us

Aliya's Tags