Gmap center and resize when block is collapsed

When you have a problem with google map when hiding or collapsing it within a block you need to do something to fix this. A way to do this is to make gmap block absolute in position and -10000 px in left like

    position: absolute;
   left: -10000px;

and then use jquery to show it with js script

Simple google map

You want simple google map without some extra modules, API keys etc? This is rather simple, all you need is to go to google maps, choose your location and go to upper right corner where is "Paste HTML to embed in website" code, copy that code. Go to Block sections in your drupal administration, create new block and place that code in block.

Custom imagecache output of image

You are looping through some arrays and you have some image variable, path of original image. You want to print out some variation of that image, this is what you do

Get and loop results from view

You constructed a view and want to get view results and fine tune some usage of them by PHP this is how you get them

 $view = views_get_view_result('Name_of_View'); print_r($view);  

You will get classic array of values where you can choose which one you want to use and print out. You can also add name of display you want to use.

Node loading, simple variable passing to flash banner

So in previous post with made drupal custom block now lets make custom block with flash banner where data to banner is passed from node that has CCK fields.Make content type with 4 cck text fields, or just use one field, even body can do and then you can manauly manipulate string with PHP, just have some separator in your input.

Custom block

Sometimes you want to customize block more then its available through drupal admin, then you start themeing. Quickest way is to copy default block.tpl.php file and then edit its name to something you want to customize. Lets say we customize block number 4, which is block created with views, then you make your file name like "block-block-4.tpl.php" and then change its content.