Useful Drupal hacks
Include random Gallery image from remote Gallery2 site as Drupal block
Submitted by sysop on Sun, 2008-08-24 12:20Today I was looking for a block or a piece of code to include a random image from my Gallery2 (Menalto) site. A drupal module exists, but I was not only looking for just a block, but also for a solution which uses a remote gallery.
The following code at http://gallery.menalto.com/node/29268 does the trick perfectly.
<?php @readfile('http://www.example.com/g2gallerymain/main.php?g2_view=imageblock:External&g2_blocks=randomImage&g2_show=title'); ?>
Separate "management" theme for administrative pages
Submitted by sysop on Mon, 2007-01-29 12:49http://drupal.org/project/manage
This module provides a way to set a dedicated theme for your site's admin pages. You can define URL path patterns for included and excluded pages, and configure a menu. This module works nicely with the manage theme.
What's the point? People - including me - find it hard to develop themes for drupal, partly because there are so many CSS classes to cover and partly because you loose your backend when your new template breaks. With this module, you no longer have to elaborate all those administrative CSS classes to make your design work with drupal. And you keep your admin interface even if you break things during development. Third, clients used to more conventional CMSses like Typo3 might prefer the separation of backend from frontend.
Striping menu id 1 from the admin/menu page
Submitted by sysop on Mon, 2007-01-29 12:47On the admin/menu page, two menus can be seen: Navigation (mid1) and Main (mid3), the latter being the actual site navigation. I need to acheive the following:
Users with role x & y should be able to view and edit the Main menu while not being presented with the Navigation menu.
These users should also be kept away from the possibility of editing any items belonging to the Navigation menu.
User with role z should have access to view and edit both menus.
[...]
I don't see any way of doing this without hacking core.
3 steps are needed:
Define a new permission
