Jul 19, 2011
Jul 16, 2011
Features Module Drupal
IMO Absolutely this module should be named as one of the core module in Drupal, This is the feature that we all (Drupal developers) were expecting when we were struggling to get the site 'live' from 'staging' or 'staging' from'development'. So here the most anticipated feature of Drupal developers.
What the module does ?
In a nutshell this module allows you to Import and Export Content types,Views,CCK Fields, Permissions, Roles, Menus etc... from one drupal site to another.
Step by step instructions
What the module does ?
In a nutshell this module allows you to Import and Export Content types,Views,CCK Fields, Permissions, Roles, Menus etc... from one drupal site to another.
Step by step instructions
- Download the module from : http://drupal.org/project/feature
- Upload, Enable it in /admin/build/modules
- After you enable the module you could see the 'Fetures' tab in 'Site Building ' menu or you can directly redirect to /admin/build/features
- Once you click on that tab or go to the admin/build/features link you might get into the features configurations page with two tabs
- Manage
- Create feature
- Click on 'Create feature'
- Note : all the features that your going to create is going to be a separate module/ will export a different module.(you can get a clear picture of what I mean in the end of this chapter)
- In the 'Name' field give an appropriate name for your feature.
- Then a 'Description'
- Then the 'Version' such as 6.x-1.0, 6.x-1.0-beta1
- (This is the normal structure of a module you write in the .info file See module development )
- Leave the "URL of update XML" field for now
- In the "Edit components" dropdown list, select the component that you want to export eg: Views
- Once 'Views' is selected it will give you a list of the views that you've created in /admin/build/views
- Select the view you want to export (you can select multiple views)
- If all set, then hit the 'Download feature' button and export your view(it will download as a zipped/tar/rar file as you download a module)
- Now your done with exporting your view.
- Note 2: Hope you understood why I said 'its a module' in the previous note
- Yipppi!!! we exported our view, and next is to import it to the other Drupal site where we need the same view.
- Go to the other site and make sure the 'Features' module is Installed and enabled
- Now untar the feature you downloaded and then upload it to your /sites/all/modules/ folder via FTP
- Then click the 'Features' configuration page in the 'Site Building' menu or go to admin/build/features
- Click on 'Manage'
- You'll find the feature that you uploaded in the manage page.
- Simply check the chekcbox and enable the feature.
- Hurrraaaay!!! the component you exported would be available for in your new site too
- eg: If you have exported a view and uploaded in the other site, the view would have been created in your site by enabling it, you can still check it in /admin/build/views .
- Enjoy Features module cheers :)
Jul 11, 2011
Adding Custom Markers Open layers and Geocoder in Drupal : Part 2
Part 1
Introduction
This is an area which covers to add ‘Custom markers’ or ‘Multiple Custom markers’ to yourGeo map. This chapter assumes that you have a fair understanding about the Part1 which is in the above link.
Step by Step
Introduction
This is an area which covers to add ‘Custom markers’ or ‘Multiple Custom markers’ to yourGeo map. This chapter assumes that you have a fair understanding about the Part1 which is in the above link.
- Now your map is created and then you see the default marker (ornage/blue ring) sticked in the Address you added.
- now we need to change the marker
Step by Step
- Site building --> Openlayers--> Styles or /admin/build/openlayers/styles
- All the markers will be listed, Clone the ‘Default style’ marker.
- Fill all the fields with your new markers name and description
- Under Style Properties and Plugins--> externalGraphic give the URL of your marker
- then to define the size of the marker size click on pointRadius and adjust then adjust the numeric value in textbox
- Save the Style;
- Your marker will be displayed in the list
- Now you need to select the custom marker for your map
- Go-to the Preset you’ve created already
- Select Layers & Styles tab
- Scroll down to see your ‘View’ you’ve activated and enabled in ‘Overlay layers’
- Select the marker/ style you created from the dropdown list in ‘Style’ column
- Select in all three Dropdown list
- And hit Save.
- Refresh your map-page and you’ll get your newly created markers
Jul 7, 2011
Integrating Open layers and Geocoder in Drupal
Integrating Open layers and Geocoder in Drupal
Required Modules: - Openlayers : http://drupal.org/project/openlayers
- Openlayers geocoder : http://drupal.org/project/openlayers_geocoder
- Views : http://drupal.org/project/views
- Enable all the required modules
- Add a content type eg : ‘Geo Map’
- Create a field on the Content type by clicking on ‘Managing Fields
- Select the ‘ Openlayers WKT’ as your type data to store.
- and ‘Openlayers Geocoder’ Form element type.
- Save the content type
- Create a View : admin/build/views/
- Add a ‘Openlayers Data’ display type
- Add fields :
- Node:title
- Node:teaser
- Content : OpenLayers WKT
- in this field select label ‘none’
- and Format ‘WKT value’
- Filter it by:
- Node type : Geo Map
- Node published: Yes
- Save the view
- View screenshot http://i709.photobucket.com/albums/ww94/ashkarrahman/Openlayers/figure05.jpg
- Now lets create preset
- Go to admin/build/openlayers/presets/
- Clone one of the existing preset ‘eg : Default’
- Rename the fields as you want
- and save the preset
- Now you should find your newly created preset in the admin/build/openlayers/presets/ list.
- Click edit on your preset
- Click the ‘Layers &; Styles’ tab
- Select ‘Map Projection’ 900913
- Display Projection: 4326
- Base layers : Google Maps Normal [Enabled and Default]
- Overlay layers : Enable and Activiate the ‘view’ you created/
- View Screenshot http://i709.photobucket.com/albums/ww94/ashkarrahman/Openlayers/figure02.jpg
- Beahviours is the tab where you can enable popus for the points you add
- The ‘General Information’ tab contains the info about your preset
- The map ‘width’ and ‘height’ could be Adjusted here
- The ‘Center & Bounds’ tab shows where the map will center itself initially.
- Save your preset
Re-check
whether you have selected the correct map preset in
/admin/build/openlayers - Openlayers Default Preset, and Click ‘Save
Configurations’.
- Now go back to our created ‘View’
- Add a ‘Page’ display
- In Basic settings
- Change the style options into ‘OpenLayers Map’
- and click ‘override’ and then ‘update’
- Click the gear icon next to ‘OpenLayers Map’ in styles (Basic settings) and select the Map preset you Created above.
- Override and Update
- Give a path in the ‘Page settings’ below ‘Basic settings’ block eg:map
- Save your ‘View’
- View Screenshot http://i709.photobucket.com/albums/ww94/ashkarrahman/Openlayers/figure04.jpg
- We are almost done with our configurations
- Next lets create a ‘Content’
- The content type is supposed to be the content type you created above.
- And you’ll see your map appearing
- select a location in the map
- or type location in the ‘Search address’ autocomplete field
- and click Save.
- Voila !!!!!
- To view all the locations in one map, go to the path you added in the view eg: http://sitename/path-in-view
- Enjoy and have fun...
- See you in Part2 of the same chapter ‘Adding Custom Multiple Markers’
Demo
Jun 17, 2011
Intro to Module Development
Learn to customize and extend Drupal's features and functionality.
This video is ginormous! yet it gives you a perfect understanding about Drupal Module Development. Ill be coming up with 'step by step' written instructions very soon, for now enjoy this video with a cup of tea ;)
Reference from Drupal
Introduction to Drupal
Drupal is open source software maintained and developed by a community of hundreds of thousands of users and developers. It's distributed under the terms of the GNU General Public License (or "GPL"), which means anyone is free to download it, share it with others, and contribute back to the project.
This open development model means that people are constantly working to make sure Drupal is a cutting-edge platform that supports the latest technologies that the Web has to offer.
Subscribe to:
Posts (Atom)
