Drupal
hook_permission() is a handy way to allow certain roles to access certain pages, i.e. the 'Administrator' to change settings and say 'Comms Team' to view the results. As per a lot of Drupal building the return value must be a nested array, and that can be tricky to remember... So here is an example…
This can be tricky, especially trying to get a latest video from a channel to show in Drupal…. I’ve seen several attempts, using several modules, custom modules, you name it… However, it’s actually quite straight forward….
First, get your YouTube RSS Feed code from here: www.jonmoore.co.uk/html-…
So here’s the scenario… A perfectly working Drupal site, without errors suddenly starts spitting out an error:
Unable to save result set in /includes/database.mysql.inc on line 115
With the help of good ol’ Google, I managed to find FISHTRAP who had also experienced the same error…
In both of…
Sometimes it’s handy to use a different page.tpl.php for a certain content type. Maybe the page has a different layout, needs additional regions not used on other pages, etc…
For starters, lets use some example names/variables, lets say:
The theme I’m using is called ‘myTheme’
The ‘content…
In light of recent events, where I managed to delete a database that I shouldn’t have… I figured I should make sure that all of my Heart Internet hosted Drupal accounts are backed up on a daily basis…
As this is very easily done on a Drupal site via the ‘Backup and Migrate’ module, I figured I’d…
OK, I’ve managed to get to the bottom of it… For the life of me I couldn’t figure out how to get the XML Sitemap module to show pages other than the home page…
Then I found it!
Step 1 – Enable the module(s)
. Go to ‘admin/build/modules/list’ and at the very bottom is the ‘XML Sitemap’ module.
.…
This is more for myself, but good if it helps someone else too….
This is a Drupal 6 (6.22) set-up on Heart Internet hosting (Reseller account).
There are loads of themes available, but you’ll rarely find one that’s exactly what you want (or what the client wants), straight out of the bag… So at some point you’ll need to add a region, and this is how.
In each ‘theme’ you will have a .info file, a page.tpl.php file and the style sheet. The…
There are several ways to do this, one would be using a list of allowed IP addresses in the .htaccess file…. But, if you want something simple, that can be accessed anywhere, by anyone you want to have access, then we can simply create a ‘dev’ mode. To access the site, we just add ‘?dev=1‘ at the…
Ever wanted to see the variables in a page? Warning!! It’ll show all of them….
<?php
print_r(get_defined_vars());
?>