PDA

View Full Version : Mambo CMS



Phil
17th Jun 2005, 12:07 pm
Mambo is an open source content management system available for download at mamboserver.com. It’s the best looking of all the CMS’s I’ve looked at, and as you can quickly have a nice looking site complete with funky features like polls, syndication, newsflashes straight out of the box it is very appealing. The look of the site can be changed instantly using css driven templates, there’s loads of extra modules you can download and “plug in” to extend its functionality. It is all database driven, so you can just pour your new articles into the top – via the web based administration pages – and they populate you site according to the rules of the current template.

On the downside I have found Mambo to be quite frustrating – some basic things end up being a real chore and it can make you jump through a lot of hoops to get where you want. The documentation is not all that great either, so there’s a lot of trial and error.

I’ve played around with Mambo and have got some ok results – zombielore.com is my first attempt. As well as playing with that I intend to set up a few more Mambo sites during the summer; one for a resource information site for current students and one for a guide to basic networking for home users.

Stephen has asked me about my experiences so I thought it would be useful to document and share them here. I’m not claiming to be a Mambo expert and I bet a lot of the hacks I’ve done should have been done in a “proper” way, so here’s hoping for a collaborative fumble towards a correct solution.

Phil
17th Jun 2005, 12:24 pm
Mambo Sections / Categories / Items

Information in Mambo is divided up hierarchically into “Sections”, “Categories” and “Items”:

http://www.eds.gre.ac.uk/test/mambo/divisions.jpg

Sections consist of subdivisions of Categories which consist of Items. A section and a category can have an associated descriptive page, but it is the items that are the real information articles. It is tempting to think of the items as “web pages” though you should remember that it is not as static as that, and that those items could crop up in numerous other places in the site.

As an example of relating these divisions to a site, on zombielore I created a section called “Upcoming films”. This section consists of a category for each new film I hear about, then each item within that section is a new snippet about that particular film. So when a new piece of info crops up about, say, Land of the Dead, I go to the web based admin page, select Content – Content Manager – Upcoming Films – Upcoming Film Items, then create a new item within that film’s category. The create item page gives you some control how the text for the item is to be formatted, and you can also drop in pictures and links.

When that’s done then that item appears automatically not only in that films category, but also on the front page as a bullet point in “What’s new”, and potentially also in the “What’s Popular”, “What’s Related” and “Search Site” modules. The item also optionally contains things like its creation date, modification date and author.

In this case the system works nicely and I simply have one of my top menu bar links be “Upcoming Films” which takes you to the section page.

Sometimes the nature of the information doesn’t really lend itself so well to this division. In that situation I’ve ended up taking a few liberties; for example on the Lookalikes section, there’s no need to subdivide further – it is just one page. What I’ve done there is to have the top menu link straight to the - quite long – single item. It does mean that when I make additions to this item then that doesn’t flag up in the What’s New section, but I can live with that.

Stephen Bawa
29th Jun 2005, 01:00 pm
Great stuff phil, many thanks for going to the trouble of documenting this stuff.

I've printed this out so I'll be reading it in greater detail after work. NO doubt it'll come in very handy. Any questions I have I'll post here, if that's ok?

Phil
1st Jul 2005, 05:40 pm
Basic Mambo Page Layout

“Site Modules” in Mambo are essentially instances of code to present aspects of your site information. For example they could be a set of menu links, a poll, a search box, a random image, the latest updates. When you configure the site modules in the Module Manager, you can specify their location on the page.

The page is divided into named areas, the location of these areas are defined by the template you’re using. The illustration shows a typical example.

http://www.eds.gre.ac.uk/test/mambo/page-spaces.jpg

In that example I have “Main Menu” module specified to sit in position “Left”. The Syndication module also lives in the Left module - after Main Menu. I could add polls and stuff here and they’d just stack up down the left hand side. It does take a bit of experimenting to get it looking right; and although you’re offered lots of choices where to place modules, some of these areas don’t actually exist. So putting a search module into user7 in this example would mean my search module doesn’t show at all as this template has no user7 area defined. Sometimes info about the positions exists in Site – Template Manager – Module Positions, but usually it is trial and error. Bear in mind also that some areas are just not right for multiple modules; if I was to put “What’s New” and a poll into the “top” area, they’d just be squeezed together and it looks awful.

When configuring the site module you also specify what pages of your site you want it to appear on – for Main Menu, you could pick All if you want it showing up on every page, or you can just control-click the pages you want in the Pages / Items window and have it appear just there (useful for section specific navigation bars). Note, the term “pages” isn’t really correct - there’s only really one (very clever) page, but it dynamically presents itself in many different ways according to what parameters are passed to it.

Stephen Bawa
6th Jul 2005, 01:54 pm
Here's a curious problem...

My administrator username and password appear to have been compromised. When I set up Mambo (with the help of a friend), I set them up as "admin" and "admin" respectively, so as to prevent me from forgetting them. I am now unable to log in, which as you can imagine is highly annoying, as it means I can't actually DO anything.

I've tried being case sensitive, as well as every other username/password I can think of (I only use a couple of choices for all my accounts), but to no avail.

Phil/anyone with Mambo experience: Is there any way I can find out what's going on? I'm wondering if there's a way by which I can access the login details via my webhost (Clook)'s control panel. I've already been snooping around, but can't seem to find anything useful at present.

Help! :blink:

Phil
6th Jul 2005, 02:37 pm
I expect you could get into the database manually and reset it, but to be honest it'll probably be easier to unintall it and reinstall it via Fantastico in your Clook account area.

If you've not really put anything in there then you've nothing to lose, and if it *has* been comprimised then you'd be better off starting over anyway - using a hard password this time; admin would be one of the first things a brute force cracker would have tried.

David
6th Jul 2005, 03:14 pm
Stephen; first the bad news: you cannot find out what your password is but you can find out your username - passwords can be seen in the database but they are always encrypted. Next; the good news: you can reset your password by updating the password in the database with another encrypted password that you know.

The process is a little complicated if you're not used to it. Basically, you can access the login details by looking at the raw data in your database. This requires that you use phpMyAdmin - comes as standard with your cPanel. You can edit this data (be careful!) so it's possible to give yourself a new encrypted password. Use an online encryption tool like this (http://tools.devshed.com/webmaster-tools/password-encryption/) to change your chosen password. As far as I am aware, Mambo uses MD5 encryption.

James
6th Jul 2005, 05:11 pm
As Phil said, using username / password as admin / admin is asking for trouble - it is probably the first things hackers try.

I took a lucky potshot at your site and hit on this: http://www.giglondon.info/mambo

but I don't think your site has been hacked - I think it is more likely to be a problem with installation / database. As it looks like you haven't loaded any content I would trash everything and install again.

David
6th Jul 2005, 10:11 pm
The site looks OK to me at the moment and there's really no need to do a reinstall (although Fantastico does make this very easy). All you need to do is change your password like this:

1. Go to cPanel and click the phpMyAdmin link.

2. When phpMyAdmin appears, select your database from from the drop-down list on the left. Your database will be called something_mambo (35). The "35" indicates the number of tables in the database.

3. When the database name is selected, you will see a list of all the tables appear in the left column. Click on the table called mambo_users. The table schema appears in the main window. This looks a bit scary but don't worry.

4. Along the top of the window you'll see a number of buttons. Click the one that says Browse. This will show you the actual data in the users table.

http://www.websitearchitecture.co.uk/watson/postimages/mambo-pass.gif

You should see something like the image above. If you haven't added any other users, the admin user will be the only one in the table. Now you can see that your password is encrypted. There is no easy way to decrypt this so you will need to encrypt another password and replace the one in the table.

5. Go to the MD5 Encryption Tool (http://www.allhype.co.uk/tools/md5/index.php). Enter your new password and click the button. Your encrypted password is returned.

6. Copy the encrypted password to the clipboard.

7. Go back to phpMyAdmin and click the Edit icon (small pencil) in the admin row. The main screen changes to display a number of edit boxes. You can actually edit the data in the database.

8. Find the password field and paste your new encrypted password over the old one.

9. Click the Go button to write the edited data to the database.

10. That's it; you should now be able to login to mambo with the username "admin" and the new password you chose.

Give it a go. It can't hurt and if it all goes pear-shaped, just reinstall. :)

Note: This technique can be used on just about all PHP/MySQL applications including phpBB, Drupal, Textpattern, 4Images and the like. You just need to check that the encryption type is MD5 (most are). Bizarrely, Coppermine passwords are not encrypted!

PS Francis, I scrambled the encrypted password in that image so don't even try... ;)

Stephen Bawa
7th Jul 2005, 09:45 am
Phil/Dave: Thanks so much for the rapid response. I'll be putting them into practice over the weekend.

Stephen Bawa
8th Jul 2005, 12:44 pm
Hi all,

Problem solved. I reinstalled Mambo, but it appeared to be a MySQL problem. After looking at your advice and the assistance of a nearby friend, I'm back.

I've changed the login details as suggested (and previously planned). Now I'm getting to grips with the hierarchy of Mambo, the whole process is far less daunting and far more encouraging/engaging for me.

As you're all no doubt aware - but it's still something of a revelation to me - it really isn't quite as hard as one first fears (touch wood...) ;)