Why I dropped Pligg for Drupal's Drigg
July 28, 2011
In this post, I talked about the idea of an open-source business plan website.
I’m planning to set it up with a few components: a Digg-like voting system for entering ideas and voting on them, a random idea generator along the lines of my cheese plate generator, and possibly a Wiki for writing more detailed notes, which is tied in with the voting system (e.g. each idea has a Wiki page assigned to it upon creation). All of this will be public-accessible so other people can use this repository if they want.
The only piece I wasn’t sure about how to do was the Digg-like system. There are quite a few CMSes out there for this, including Pligg and Hotaru (a Pligg fork, as it turns out). Pligg seemed like the right thing to use - the default install looks great, and it’s set up to do exactly what I want out of the box. There didn’t seem to be too much flexibility beyond that, but I thought that was probably OK.
I thought I’d write up the rather frustrating resulting experiences I had so that others can take them into account when making the same decision I did. Note that I’m certainly not a PHP genius, though I do know enough about it to write functional hacks to do pretty much whatever I want. That will be the perspective of this article - smart hackers may not be too sympathetic to my complaints!
Installation and initial testing
Pligg has a fairly slick install script so getting it on the server, and setting it up, was easy. I submitted a test story; so far, so good.
Next, I attempted to modify the default layout so that I could exclude some of the default items that Pligg wants to show on every page (Top News, Top Comments, things like that). These aren’t appropriate for what I’m trying to do, which is create a news voting site with encyclopedic elements.
Pligg’s templating system
In Drupal and Wordpress, you can literally use checkboxes for this sort of thing. If worse comes to worst, it’s pretty easy to find the code that generates the offending elements, and change it or switch it off.
No checkboxes in Pligg. So I looked for ways to simply comment out the appropriate PHP and HTML for the page elements I didn’t want. But… where do I find the file that controls this? Ah, templates? Yes. OK. Which one? I’ll guess “sidebar.tpl”. Not that one. Alright, maybe “sidebar2.tpl”. Something like this looks promising…