Skip to main content

Posts

Showing posts from 2012

Hope that makes a BIG change in YOU

The Professor began his class by holding up a glass with some water in it. He held it up for all to see & asked the students “How much do you think this glass weighs?” ’50gms!’….. ’100gms!’ …..’125 gms’ … the students answered. “I really don’t know unless I weigh it,” said the professor, “ but , my question is: What would happen if I held it up like this for a few minutes ? ‘Nothing’ …. . the students said.   Ok what would happen if I held it up like this for an hour?’ the professor asked. ‘Your arm would begin to ache’ said one of the student “You’re right, now what would happen if I held it for a day?” “Your arm could go numb; you might have severe muscle stress & paralysis & have to go to hospital for sure!” ….. Ventured another student & all the students laughed  “Very good .  But during all this, did the weight of the glass change?” Asked the professor . ‘ No’ Was the answer. “Then what caused the arm ache & the muscle stress ?” The stud

Migrate to Drupal 7

Follow this page for more details  http://bhanu555prakash.blogspot.com/p/migrate-to-drupal-7.html it will continuously updates.... These link will be helpful http://btmash.com/article/2011-02-25/migrating-content-using-migrate-module http://drupal.org/migrate Thanks, Bhanu

Smart pagination or page break in Drupal(wysiwyg)

1)Install Smart Paging module   Go to Administration › Configuration › Administer Smart Paging settings.   Under 'Default page break method', select "Manual placement of page break placeholder". 2)Install "wysiwyg" module and 'ckeditor' profile   Go to Administration › Configuration > Wysiwyg profiles > Filtered HTML   Edit the settings of Filtered HTML Profile. Under 'Buttons and plugins' section, check the required options like "Smart Paging ","Image","Bold". 3)Edit the configuration settings of input formats(Filtered HTML, Full HTML, Plain Text)   Go to Administration › Configuration > Text formats. Edit the required input format. For example say "Filtered HTML". Under  "Enabled filters" section, check the 'Smart Paging' option and uncheck all the remaining checkboxes. 4)Go to Content type 'article' and create new content. We will see the wy

Here is the Solution for Every Problem

Here is the Solution for Every Problem Nice approach towards the problems “Life is a problem” Vs. “In Life there are problems” If we get any problem we usually say “Life is a Problem” better than this we can say that “In Life will have some problems” this sounds good and we will try to solve those, because we said problem will be a part of life. If you feel that, you have many problems then here is the solution…… to make them less… >  Know about your Problems. Take a chart and Marker. Write your problems on chart using marker (Might be small, silly or important) which includes all types (Social, Professional, Personal, Ethical). Write whatever comes to your mind. ( Note : It should complete in 5 min). Read them only once (Complete it in one min). If you get some more problems than write them but in separate section called Late Entries (Don’t read them again). At this stage you have to feel free because you have your problems on paper. Don’t add probl

Resetting Drupal 7 administrator password using a php file

This snippet will be helpful if you don’t have command-line access to the server to run the password-hash.sh shell file or no Drush access. In most shared hosts, command-line access is not provided. Please keep in mind that leaving the code below on your server after resetting the password is highly critical security problem that anyone can reset your administrator password. Use this carefully. All we are going to do is, bootstrapping Drupal, getting the necessary functions that generates the password and then updating the database with new password. First, create a file with a random name (gh34tu9.php for example) and put the following content in it. <?php define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); require_once DRUPAL_ROOT . '/includes/password.inc'; if (isset($_GET['pass']) && !empty($_GET['pass'])) { $newhash =  user_hash_passw

how to excute a .sql file through php

<?php ini_set(‘memory_limit’, ’5120M’); set_time_limit ( 0 ); /*************************************************************************** *                             sql_parse.php *                              ——————- *     begin                : Thu May 31, 2001 *     copyright            : (C) 2001 The phpBB Group *     email                : support@phpbb.com * *     $Id: sql_parse.php,v 1.8 2002/03/18 23:53:12 psotfx Exp $ * ****************************************************************************/ /***************************************************************************  *  *   This program is free software; you can redistribute it and/or modify  *   it under the terms of the GNU General Public License as published by  *   the Free Software Foundation; either version 2 of the License, or  *   (at your option) any later version.  *  ***************************************************************************/ /********************************************

creating folder and copy of folder through php in drupal

getenv() which gives the total path of the site from where it is comming. $directory= getenv("DOCUMENT_ROOT").base_path() . 'sites/<name_of_folder>';   drupal_mkdir($directory); // if u want to copy a file to desired path then here is the code. $desired_filepath = getenv("DOCUMENT_ROOT").base_path() . <path>;   $new_filepath = file_unmanaged_copy($desired_filepath, $directory, FILE_EXISTS_ERROR); please reach me if u find any problem. Thanks, Bhanu Prakash