Thursday, 26 June 2014

drupal 7 where to make new image style

drupal 7 where to make new image style

Here’s how I got to it

Modules  >  search ‘image’


> add style

Monday, 23 June 2014

Acquia Cloud database import error Base table or view not found

SQLSTATE[*]: Base table or view not found: * Table                [error]
‘*.blocked_ips' doesn't exist
Drush call failed. Stderr:SQLSTATE[*]: Base table or view not found: * Table                [error]

‘*dev.blocked_ips' doesn't exist


All I needed to do here was to go in to Acquia download a copy of the latest database and manually import using myPhpAdmin

Wednesday, 18 June 2014

Follow on from Drupal 7 basic Module

this is the next step on from this blog [link: http://littleripplesproject.blogspot.co.uk/2014/06/drupal-7-cant-see-my-module.html] Drupal 7 Can’t see my Module.

Lets print hello world on a page.  Add this to helloworld.module

// calling hook_menu()



function helloworld_menu() {

    

     $menu[‘hello/world'] = array(

          'title' => ‘Hello World Simple Page',

          'page callback' => ‘helloworld_worldview’,  // this is the function underneath

    'access callback' => TRUE,

     );



          return $menu;

}





functionhelloworld_worldview() {





  return ‘Hello World !';

 

}

Monday, 16 June 2014

Timestamp to 0000-00-00 00:00:00 format

here's a quick note on this code; as what worked for me is slightly different to what I've found online

$timestamp = '1410126126';

$datestring = gmdate("Y-m-d H:i:s", $timestamp);

echo $datestring;

Thursday, 12 June 2014

Add a Log In / Log out button to Drupal 7 TB Mega Menu

I thought I may have to make two menus; one for registered users and one for unregistered. Or maybe even write a function that would hide the button. But no all you need to do is set the buttons up; using the URLs for your login and log out. user/login user/logout and the rest happens like magic

Monday, 9 June 2014

drupal 7 entity id comma returned in link value

Seemingly this was an issue with Replacement patterns . But what you need to do is go into your id in Structure > views > [your view] > fields and make sure 'comma' isn't selected as the 'Thousands marker' - it should be -none-

Sunday, 8 June 2014

Drupal 7 - can't see my module

If you can't see your Module in Drupal 7 here's the very basics that's needed.  Check these things are in place and you should be able to see your module.

Create a new folder in your installation

Sites/All/Modules/Custom/helloworld

Create 2 files

helloworld.info
helloworld.module


in helloworld.info

name = "Hello World"
description = "Hello Modules list !."
core = 7.x


files[] = helloworld.module


helloworld.module  can be blank.  And thats it.  Make sure you clear your cache in admin.  

the next step can be seen at http://littleripplesproject.blogspot.co.uk/2014/06/follow-on-from-drupal-7-basic-module.html