Showing posts with label Drupal. Show all posts
Showing posts with label Drupal. Show all posts

Monday, 5 March 2012

Avoid ckeditor encoding

Hi
Ckeditor is a very good tool to publish data in drupal. Ckeditor can be applied on textarea and hence dull looking textarea can be changed to a good looking form.
There is a problem with Ckeditor that it take its own encoding and decoding while writing . Sometime it become hard to decode Ckeditor date in case of "'" , "-" and some special characters like these.
This problem can be solved by writing
config.htmlEncodeOutput = True;
in core/editor.js. Its default value is false. This is done to escape HTML in case when editor updates original input element.
This can also be changed in advance option field in ckeditor configuration UI. Write
config.htmlEncodeOutput = True;
in advance settings to avoid any special character encoding.
Queries and suggestions welcome.

More information on www.narendrarathore.com

Saturday, 24 September 2011

Google Custom Search Engine

Using Google CSE module on Drupal Sites

The most beautiful thing that I like about Drupal CMS is that there is a contributed module for almost everything. You just have to know your requirements and search effectively for specific module. While you are searching for Google custom Search Engine you must already know what is the use of this Google feature. More information about Google custom Search Engine can be taken from http://www.google.com/cse. 

Now when you go on the above link they ask you for either creating a new Google custom Search Engine or managing old ones. Lets make a new search engine for our website. It takes only 3 steps. Firstly you have to give the name, description, sites to search description. Secondly you have to make changes to look and feel of search box and finally get the code.
Once you have generated your own site code, download and extract contributed drupal module from http://drupal.org/project/google_cse. Put this module in modules folder of your site. Enable this module by going in admin/modules section of your site administrator. When you go in site configuration and click on Google CSE you will be asked for CSE unique ID which we already have generated from http://www.google.com/cse/manage/all. Thats it. Our google search engine is ready to work. A block is generated by this module which can be activated for showing a search form wherever we need. This feature is readily used in sites made in Drupal and whose database is very big.

More information on www.narendrarathore.com

Wednesday, 14 September 2011

Make Drupal CCK field visible to anonymous users in Views

This is a common problem faced by most of the Drupal users. When they apply CCK fields to Views fields are not visible to anonymous users but are available to Admin.
The reason is that each CCK field wheather newly created or old has there permissions. Whenever we add a new field we need to go to /admin/user/permissions and change the settings to viewable for anonymous users if we want people who are not logged in to be able to see that field.
So simple.......    :)

More information on www.narendrarathore.com