Tips and Tricks

Tips and Tricks

How to turn off all contrib modules

Posted 04/17/2008 - 13:57 by Michelle

If your site is totally crashed and you suspect it's a contrib module but don't know which, here's a quick way to turn them all off in the database:

UPDATE `system` SET status=0 WHERE filename LIKE '%sites%'

This simply disables them; it doesn't uninstall them. It also assumes you are putting your contrib under sites\all or sites\sitename.

Michelle

Converting from nodeprofile to bio

Posted 04/01/2008 - 21:47 by Michelle

I decided to convert CRO from nodeprofile to bio. Nodeprofile is nice for really complex profiles with multiple nodes but I didn't need anything that fancy. More important to me was the ability to put individual fields on the registration page.

How to move the comments on node display

Posted 12/13/2007 - 22:44 by Michelle

Now that Fivestar has the ability to add rating to comments, I decided to switch from the way I was doing rate and review to using comments for reviews. But I have my nodes heavily themed including parcelling out bits into tabs and reviews are one of those bits. I didn't want them stuck down where the comments normally go.

Populating a forum with devel

In working on the advanced forum module, I needed a full forum to work on. I used the devel module and ended up with forums full of "this post has been moved". It turns out that devel doesn't fill in forum.tid. So I needed to run this SQL:

update forum
inner join term_node on forum.nid = term_node.nid

How to tell if there are nodes on a page

Posted 08/28/2007 - 21:01 by Michelle

On my CRO site, I wanted to have a border around pages that have no nodes on them. This makes them match with the pages that are just one node. But I went nuts trying to find a way, in page.tpl.php, to determine if the page has nodes on it.

Syndicate content