Tips and Tricks

Tips and Tricks

How to turn off all contrib modules

Posted by Michelle on Thu, 04/17/2008 - 13:57 in

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 by Michelle on Tue, 04/01/2008 - 21:47 in

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 by Michelle on Thu, 12/13/2007 - 22:44 in

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

Posted by Michelle on Sun, 11/25/2007 - 19:17 in

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 by Michelle on Tue, 08/28/2007 - 21:01 in

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