When you are working with Drupal form API or in module development, most probably you met this problem to add a maanged file field(uplaoding a file via ajax inside the form API). Here I am showing how to hide/remove a upload/remove button from managed_file uplaod field. May be its seems a bit crazy, but my…Continue Reading
Creating a module in Drupal 7
Drupal is an open source content management platform powering millions of websites and applications. It’s built, used, and supported by an active and diverse community of people around the world.-Drupal.org Modules are a set of functions and hooks(read more about hooks here). As part of module development in Drupal, we have to write functions to…Continue Reading
Hide PDOException errors are displayed in drupal screen
Question I need to hide PDOException errors are displayed in drupal screen, sometimes its happening if some problem with database server its showing some error with path to my folder I had solved this situation by using below code, added this code in settings.php
Magento VAT (tax) rates not working correctly on displayed prices and also in admin
I’m working on a store and have already got prices on products. I have created all the price rules as per the Magento documentation. Next, I had set all the required settings for the Tax display, in System > Configuration > Sales > Tax. But when I adding the price its not showing the label…Continue Reading
Show language bar in task bar windows 7
There is a quick solution to enable the language bar in taskbar(windows 7) Control Panel > Regional and Language settings > Keyboards & Languages > Change keyboards > Language bar > Show in system tray :
Enable Template/Block Hints in Admin Panel in Magento
To enable the template path hints in Magento for admin side, there is no settings out of the box. we need to do it manually in a database. 1) Insert some records in core_config_data table Run below query in your database query browser This will enable the path hints in your applicaiton 2) To remove…Continue Reading
Get simple products belonging to configurable products in magento
While learning Magento development you may have encountered this functionality, to get simple products belonging to the configurable product.First of all, just decide this is a configurable product. Our next step is to get a product collection based on the current product. We’ll also say we want to get all attributes. Yea now we got all…Continue Reading
Magento notification system
While building your Magento module or tweaking the code you will need to handle the errors and notifications. Notice Success Error Warning (admin side only) Above methods, you can use in anywhere in Magento, like controller, model etc. Sample usage in controller
Magento Merged CSS Cache Clear Not Working
Merged CSS cache not clearing in Magento In production environment, everyone uses caching. Most of the Magento websites might be having this issue. When you make changes to CSS and you are using the magneto built in CSS merge functionality, you will be pulling your hair with browser cache. I have experienced the same with…Continue Reading
Changing the position of store switcher to header magento
Magento has a good amount of template overriding methods. As per the Magento documentation, we will follow the standard method. Instead of editing core files we will use local.xml located in our custom theme. Step 1 Adding the below line in to the header section of local.xml find in app/design/frontend/[your-package]/[your-theme]/layout/ After adding above code the…Continue Reading
Google map with markers and popup
Google maps are using everywhere in websites. Below is a simple way to show Google map with marker and popup.
Cross-Browser Image Grayscale with CSS
Grayscale effect for images using CSS. You have noticed that some filters.svg in the firefox section . Save below as file named filters.svg and place in your css folder.
CodeIgniter pagination url with get parameters
CodeIgniter pagination url with get parameters In pagination config: if (count($_GET) > 0) $config[‘suffix’] = ‘?’ . http_build_query($_GET, ”, “&”); Your current $_GET vars will be shown in pagination links. You can replace $_GET by another associative array. This won’t add a query string unless one already exists. Update: I just saw, if you go…Continue Reading
How to get the path to an image with ImageCache preset
Get the path to an image with ImageCache preset in Drupal 7, its very easy Use this function image_style_url($style_name, $path) See Example
How To Remove Scrollbar from Textarea in IE
Remove the scrollbar from textarea in IE good question. There is a scrollbar on texarea by default in IE versions. This is the easist way to remove that, just try the below code.
How to get the aliased path from a node ID in drupal
If you want to use the aliased path of a node , in drupal. You can use this one drupal_lookup_path Example. Url http://mysite.com/node/20 OR Function drupal_lookup_path($action, $path = ”, $path_language = NULL) Parameters $action: One of the following values: wipe: delete the alias cache. alias: return an alias for a given Drupal system path (if one exists)….Continue Reading
Removing index.php from URL in Codeigniter
Removing index.php from URL in Codeigniter it’s an easy task to do. Most of the guys don’t wanna see the index.php in the middle of an URL. Here is the way to remove the index.php from URL Step1 Create a .htacess file in the root folder and paste the below code Step 2 Go to…Continue Reading
Check if user is logged in Drupal 7
Here is a way to find the user logged or not in in custom Drupal Development. It is very usual you will face this question while developing a drupal website. You can use the following snippet to perform that
Drupal SEO Modules
Drupal SEO is pretty good out of the box. Adding things more to your site will be an advantage to more readable for search engines. Moreover, you should know about some SEO modules, custom Drupal Development to enhance your site. Here we are listing some modules pathauto The Pathauto module automatically creates URL/path aliases(human-friendly URLs)…Continue Reading
Share with Facebook, Feed Dialog
The Feed Dialogue prompts the user to publish an individual story to a profile’s feed. This does not require any extended permissions. Your application can also publish directly to a profile’s feed without user interaction, use the corresponding Graph API call.
Changing font color on click when using Cufon and Jquery
Changing font colour on click when using Cufon and Jquery it’s an easy task. I have faced some problem with Cufon and Jquery. When I tried to change the font colour using jQuery CSS , It’s not working. Solution I have added Cufon.refresh(); after the colour change function. It has been solved my problem. For instance.
Create custom content type from module – Drupal 7
Create a custom content type with a module in drupal, it’s very easy for even a newbie. Modules are an essential part of a drupal website. There will be plenty of modules when comes to custom drupal development. So here I am showing how to create a custom content type programmatically in Drupal7. Just follow…Continue Reading
Google Airport set for San Jose, California
A new deal is in the works this week that would have Google running their own fabulous Google-branded airport out of San Jose has been reported this week, city approval and all. This report comes from the current San Jose airport where officials are “urging” the city to sign a deal that would allow two…Continue Reading
TimThumb – PHP Image Resizer
TimThumb is a simple, flexible, PHP script that resizes images. You give it a bunch of parameters, and it spits out a thumbnail image that you can display on your site. TimThumb has seen a massive amount of use across the WordPress world, and a few months after we released it, I took over development…Continue Reading
How to Use PHP to Force a File Download
How to Use PHP to Force a File Download Download a file rather viewing in the browser. It’s easy method, to implement a force download using PHP. Below script, we are using PHP headers to download a file.
Google Maps API Examples – Google Maps JavaScript API
Google maps are using everywhere with websites, gadgets etc. Integrating Google maps to our website is easy process. Below see some points. Step1 First step is obtaining the Google map API key. All Maps API applications should load the Maps API using an API key. Using an API key enables you to monitor your application’s…Continue Reading
30 Addictively Engrossing HTML5 Games
The discussion about whether HTML5 will render Flash obsolete has been ongoing for some time now, and at the time of writing, Flash still has a place both in web design and game development. However, we can follow the progress of HTML5 development through online games. Currently, the graphics and effects are lagging behind Flash game development, but the gameplay…Continue Reading
Masking images with jQuery/css
Masking the images using jquery, it’s an interesting subject.In so many websites we have seen some images are curved shaped. Here the below script is helping you to implement this technique. I am not telling all of them are using this but many people are using. But I am satisfied with this method.
On Mac safari facebook app not returning the current users details
Safari 3rd party cookie iframe trick no longer working? I have faced this same problem while developing the Facebook application. I found a good stuff in stack overflow
CUFON NOT WORKING IN IE7
I had faced the same issue with cufon in IE, for all browsers it was working fine. But in IE 7 only it was not showing, I find out the below wiki article in GitHub Load a JavaScript framework or a stand-alone selector engine before Cufón. Cufón detects most frameworks automatically. Just load your framework…Continue Reading