Removing comment link from the homepage (AkoComment)

Note: This was written for Mambo 4.5.1a Stable and AkoComment 2.0

AkoComment gives your users the capability to post comments on content items. I personally use this on my website. AkoComment puts links to comments on the homepage. Unfortunately, this does not look visually appealing, most especially if you turned on Read More of Mambo.

  1. To remove the comment link from the homepage, open the file Mambo/mambots/content/akocommentbot.php in your favorite text editor.
     
  2. Go to the code near the bottom of the file, approximately at line 268.
     
  3. Comment-out some of the code, like so:

# If we are not on the content page
} #else {
# $replacementlink = ($ac_openingmode) ? "<a class=\"readon\" href=\"javascript:void window.open('".sefRelToAbs("index2.php?option=com_content&task=view&id=$row->id&pop=1&page=0")."', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\">" : "<a class=\"readon\" href='".sefRelToAbs("index.php?option=com_content&task=view&id=$row->id")."'>";
# if ($ac_mainmode == "0") {
# $row->text = str_replace( "{moscomment}", "<p><img src='$mosConfig_live_site/components/com_akocomment/images/comment.png' hspace='5' align='absmiddle'>$replacementlink"._AKOCOMMENT_WRITECOMMENT." ($total "._AKOCOMMENT_COMMENTS.")</a></p>", $row->text );
# } elseif (in_array ($row->sectionid, $seclistarray)) {
# $row->text = str_replace( "{moscomment}", "", $row->text );
# $row->text = $row->text."$replacementlink"._AKOCOMMENT_WRITECOMMENT." ($total "._AKOCOMMENT_COMMENTS.")</a>";
# }
# }

Lucien Sanchez

June 14, 1960 to January 30, 2005

To me, he was the older cousin who would always greet us with his signature smile. When I grew older, I found out that we technically weren’t even related (his half brother is my cousin, though). But we lived in the same street and he took care of us – in my mind, in his, and in the minds of all our relatives, we were family.

In our family, he was the painter, the carpenter, the all-around-guy – the person even my adept relatives would depend on whenever there was a renovation or repair.

When we were kids, we would always stare at him in awe. He was the guy in control. We would always see him handling some problem in our street, ending a fight, or guarding the precincts during elections.

In every funeral in our street, he would be the one making arrangements with the barangay, putting up the black tents, and setting the chairs and tables. He would be there for the bereaved family every night of the wake, until the traditional funeral march, when he would be the one to lead the traffic enforcers, his black cap covering his head.

No words could explain how we felt last Sunday, when time came for us to make the arrangements for Lucien’s own funeral. We needed him to comfort us in our loss — unconsciously waiting for him to tap us on our shoulders, to tell us that everything is okay.

Later, at 12:30PM, the family and the entire neighborhood will join in the funeral march. It will be different, not seeing him walking beside us, and leading the traffic along the way. But it is our turn now, and nothing will make us prouder than to be the ones to walk by his side to his final resting place.

Module Basics: Putting custom HTML content on the sideblocks

Note: This was written for Mambo 4.5.1a Stable

Mambo allows you to easily include custom HTML content on the sideblocks of your website. For example, if you want to put a donation button on the right column of your page.

The old way of doing this is by hard coding the custom HTML content on your template. This, however, would be a time-consuming process. Imagine if you just need to correct a misspelling, or if you simply want to temporarily hide this content from your users — you would need to edit and manually upload your new template every time.

Additionally, if you hard code this in your template, your custom HTML content will be displayed on all your pages. As a general rule, the only things that you should hard code in your template are the elements that you want to appear permanently on all your pages.

Mambo has a more efficient way to add custom HTML content through modules. In most templates, modules are the sideblocks (or sideboxes), usually located on the left and right columns of the website.

Modules can contain various things – text, HTML, or components such as menus, polls, newsflash, etc.

Modules can also be placed on various positions. Most templates use the left and right positions. As the name suggests, the left position are for modules you want to put on the left side of the website, and vice versa. (You can also create custom positions – header, footer, etc. I’ll try to cover that in a future article.)

The Project

Let’s say we want to put the text “Mabuhay! Welcome to my homepage!” in the left-hand portion of chette.com, right below the menu. And, we would want this text in boldface font.

The first step is to login to your administration page. This is located in /YourMambo/administrator/. Then, from the top menu, go to Modules > Site Modules.

This will bring you to your Site Modules page. You should now be able to see the list of the modules of your website.

We now need to create a new module. On the upper right hand side of the page, click on the New icon.

This will bring you to a form where you can enter the information about your module.

Let’s start with the Title. The title is how you would like to call and appear on your module.

For the purposes of this project, let’s use “My Module” as the title.

In Show title, we will be selecting Yes. (If we only want our HTML content to appear, without the title, then we would be selecting No.)

Now we will specify where we want to place our module. If you are not yet comfortable with modifying your template, it is safest to just use the left or right positions. Most templates use these positions.

For this project, we will be choosing the left position, because we want our module to appear on the left column.

Module Order determines the ordering of all the modules that were placed in that position. Remember: There can be more than one module for a position. In chette.com, there are actually two modules placed in the left position: (1) the menu and (2) the newsletter module. The newsletter is ordered lower than the menu, so it appears at the bottom.

For this project, we are going to select the first item (1::Main Menu), because we want it to appear below the Main Menu module.

In Access Level you can define who can see your module — all users (Public), or only users who are registered on your website (Registered). For this project, we will be selecting Public.

Published is a very useful feature. Selecting Yes means your module will be displayed (or “published”) on the website. If you select No, then this module will be hidden from all your users. This is useful if you need to temporarily hide or disable a module on your website.

For this project, we would be selecting Yes.

Content contains the meat of your module. This is where you put the content that you want to be displayed. You can put HTML code in the Content field, including image tags, forms, etc.

For this project, we would be entering the following HTML:

<strong>Mabuhay! Welcome to my homepage!</strong>

On the right hand side, you will see a tab labeled Location. Location is where you select the menu items that will display your module. (This is confusing to a lot of people because of the text Module Position. This is not the same as the module positions that was previously discussed in this article.).

For example, I previously created a menu item called Mambo Tips (which points to the Blog Content Category also called Mambo Tips). If I select Mambo Tips under Menu Item Links, then the module will only appear for anything that can be found in Mambo Tips, like if a user reads a Mambo Tip article. If I select None, then the module will not appear anywhere (similar effect when you set Published to No).

For this project, since we want the module to appear on all pages, we will select All.

We will not be using the Parameters tab for this project, but here’s an overview: The Parameters tab (beside the Location tab) lists some configurations related to RSS (when you syndicate news to other websites). At the bottom is a field called Module Class Suffix, which you can use to define custom CSS for this module.

Now we’re ready to save the project. On the upper right hand side of the page, click Save.

Our module will now appear exactly where we want it to be.

The 15-minute rule: Dancing with time

Although it is not something you would usually admit at a job interview (and if you do, I highly suggest you don’t), there is a procrastinator in all of us, most especially concerning tasks which we find boring or tedious. Thankfully, the 15-minute rule is here to rescue us from the hole. The “rule” is an effective way to minimize this procrastination, as it encourages you to do the most you can within a certain span of time.

In my job, I get more excited in the planning, tracking, and process-improvement aspects of project management. (Also in ordering people around, as my bitter half ruefully added. But that’s another story.)

Although in love with my work, there are parts of my standard job description which I don’t exactly look forward to:

  • Writing the weekly status reports
  • Reviewing and verifying change requests
  • Task reviews
  • Auditing the test cases and results

I would sometimes hold these off until the last minute (or until my boss starts taking a deep breath, whichever comes first). It drove me crazy — cramming gave me a lot of stress, and basically threw my sophisticated Outlook scheduling out the window.

It is by sheer luck (and a lot of procrastinated time on my hands) that I discovered FlyLady, who introduced me to the concepts of this rule.

The 15-minute rule: Shall we dance?

The 15-minute rule states that you should do a task within 15 minutes. After the allotted 15 minutes, you should stop working on that particular task. You may then proceed to another one for the next 15 minutes, or maybe even take a short break.

Sira ba tuktok mo? 15 minutes lang?” (Literal English translation: “Is your head destroyed? Only 15 minutes?” Hehe.). However, after trying it with seven other people in the team, I realized FlyLady isn’t as crazy as I thought:

  • There is a noticeable improvement in our productivity, and that’s saying something in a team which thrives on Spider Solitaire and Counter Strike. Our biggest problem was actually just getting started. However, with this rule, fifteen minutes just doesn’t seem like a big deal. That’s a lot less time as compared to our weekly Minesweeper Championships.
      
  • One of my colleagues is now a Time Management Evangelist, and boasts she can do anything in 15 minutes. She explained that the 15-minute deadline actually boosted her concentration, and gave her a surge of energy to work as fast as we could. (We always chide our boss it’s time to increase her workload.)
      
  • A guy in the QA department actually thought there was something wrong with his cellphone’s timer, because he keeps on finishing his test cases way before the alarm would go off

Right foot first, left foot next

Why don’t you try it?

Choose a task that you have been procrastinating on — writing that proposal, doing the laundry, wrapping a gift, or that pending status report.

Now, grab a timer (any timer with an alarm), and set it for 15 minutes. This is important, because the alarm is the big jolt telling you when to stop. We usually get carried away with one task, leaving no more room for more.

Now, do that task for only 15 minutes, and nothing more.

Notice the difference?

Now shake it

Here are some personal variations:

  • When I need to continue on the same task, I make sure that I alternate it with another one. Keeps me on my toes, and prevents burnouts.
      
  • When I’m feeling unnaturally lazy, I would do my revised “10-minute rule”, which is basically the same thing, except that I set the timer to 10 minutes instead of 15.
      
  • I noticed this rule is particularly useful in doing the Dreaded Client Routine Calls. Surprises of surprises, I discovered I only spend an average of 3 minutes per phone call — definitely something I should not have procrastinated on before.
      
  • Whenever I fall of the wagon and go back to my procrastinating ways (old dogs, new tricks, and all that crap), I would use a different timer for variety. Or sometimes I would ask a co-worker to use the same timer with me. Misery, and deadlines, love company

Let’s boogie

But don’t take my word for it: Browse thru the FlyLady website and read the inspiring anecdotes of how this rule actually helped people all over the globe. Now that you’re at it, might as well browse the other tips too, and with a little creativity, you will see how you can apply these tips to the workplace. (I especially love the article on zoning.)

Now let’s go crazy. Get that butt and timer rolling, and tell me how it works for you.

Changing the text “Send an Email to this Contact” in the contact form

Note: This was written for Mambo 4.5.1a Stable

By default, the contact form of Mambo will display the contact information, then the text “Send an Email to this Contact,” followed by the actual email form.

To change the text “Send an Email to this Contact:”

  1. Download the file /Mambo/language/english.php to your computer.
      
  2. Open the downloaded english.php file in your favorite text editor.
      
    Note: It is highly recommended to backup this file before making any modifications.
      
  3. Look for the line containing the following text:

    DEFINE('_EMAIL_DESCRIPTION','Send an Email to this Contact:');
  4. Change the text Send an Email to this Contact to your desired text. Make sure that you only modify the text between the quotation marks (‘ ’). Leave the rest of the code intact.
      
    For example:

    DEFINE('_EMAIL_DESCRIPTION','Hey! Email me now!');

Showstoppers: When work just can’t happen

I screamed at our cat, and watched in delight as she scurried out of my way. This happened right after I slammed the phone down on my bitter half, because of an argument I obviously started. A few hours ago, I also scathingly replied to a mailing list post by some smart aleck who thinks that all websites should conform to his personal “standards.”

Someone needs to outlaw these menstrual cramps.

I consider cramps one of my “showstoppers,” which basically means a (seemingly) valid reason not to work.

Each person at work has his own list of showstoppers. The ones which are generally unavoidable, less frequent, and “reasonable” are usually tolerated. For instance, my boss finally considered cramps as valid showstoppers when a colleague found me crawling in the bathroom (although it’s not exactly a vacation staying at home and watching DVDs with a hot bottle on your tummy).

What’s in your Showstopper List? Here are mine:

  1. Menstrual cramps. A cramp, or dysmenorrhea, is a painful menstruation. Some women experience it, some don’t. Apparently, when the angels showered the women the blessings of unobtrusive menstrual cycles, I was locked up somewhere in a dungeon.
      
  2. Desktop computers. Not exactly a showstopper, but I have always considered it a major annoyance. Desktops are not only meant to take up the desk space, they are actually a form of Chinese torture meant to imprison me in my cubicle, to deafen me from the office noise, and simply to bore my brains out.
      
    Lest you think I had it going well in the workplace, I did experience working on a desktop in a previous job. Believe me, it was a major test of willpower. It was also a major test of resourcefulness — in the continuous search for office corners offering peace, quiet, and emancipation, and in figuring out the least eye-straining way to draft a report on a Nokia 9210.
      
    One good thing happened in that experience though: I rediscovered my handwriting, thanks to the numerous Release Bulletins I actually wrote in longhand while sipping a nice Chocolate Frappuccino in Starbucks.

There is no doubt in my mind that there would be more showstoppers to come. Stay tuned to this page.

And before I forget: what are yours?

Enabling search engine friendly URLs

Note: This was written for Mambo 4.5.1a Stable

Mambo has a special feature to make your URLs Search Engine Friendly (or SEF). This means that your URLs can be converted to a format that is recognized by most search engine spiders, giving your website a higher placement in search results.

An explanation

Website packages such as Mambo generate your website dynamically. Because of this, these websites usually have URLs containing certain special characters, such as ?, =, and &.

For example, the About section of chette.com used to have the following URL:

http://www.chette.com/main/component/
option,com_frontpage/Itemid,1/index.php?option=com_content&task=view&id=23&Itemid=48

Some search engines do not recognize URLs containing these special characters. This prevents some search engine spiders from indexing the other sections of your website, which may give your website a lower ranking in search results.

This website has SEF enabled, thus the About section has this URL:

http://www.chette.com/main/content/view/23/48/

Because search engine placement is important to a majority of web owners, the SEF feature of Mambo is usually activated.

SEF requirements

In order to use Mambo’s SEF feature, your server must meet all of the following requirements:

  • It must be running on Apache
  • It must have mod_rewrite enabled
  • It must allow .htaccess override

When in doubt, as your host provider if your server fulfills the above requirements.

Enabling SEF

Note: It is highly recommended that you make a backup of your files before doing any modification.

  1. Download your configuration.php file from website’s server, and save this on your computer.
      
    Open this downladed file in your favorite text editor.
      
    Now look for the line where $mosConfig_sef appears, and change the value to 1 (the default value is 0).
      
    Don’t change anything else, not even the quotation marks. The line should look like this: $mosConfig_sef= "1"

      
    Upload configuration.php back to your server, overwriting the old one.
      

  2. Login to your server once again, and look for the file htaccess.txt in your Mambo main directory. Rename this file to .htaccess
      
    Please don’t forget to include the period (.) before “htaccess”
      
    Note: Most FTP clients nowadays allow for the renaming of files by simply right clicking the file, and selecting rename.
      
  3. Login to your administration panel (/Mambo/administrator/).

      
    Go to Site > SEO. Verify that Search Engine Friendly URLs is set to Yes.
      

  4. Test your website. Check if the URLs are already search engine friendly.
      
    If you encounter any
    errors, a good resource is the Mambo’s support community. Don’t forget to do a search first before posting a new thread.

Manigong Bagong Taon – Let’s Mambo!

Some of you might have noticed the new footer line on the website. Yes, for the past week, chette.com has been running on Mambo, an open source Content Management System (CMS).

Chette.com has been formerly using pMachine as its main engine. I had some reservations since the beginning — the developers have released a commercial version of pMachine, a big sign that support for the free version will be affected. Sure enough, months after I have downloaded it, pMachine is still stuck on version 2.3.

The decision to finally make the switch came in late 2004, when comment spams started invading this website. Manually deleting each spam was becoming a chore, as there is no comment moderation in pMachine (nor were there any patches or fixes released, for that matter). This made me realize the importance of a stable support system and community, especially with the continuous emergence of new spam techniques and website viruses.

The Shortlist

There were two packages left in the shortlist: Tikiwiki, and of course, Mambo.

It is a personal choice not to include Nuke packages (no offense to the users of PostNuke and PHP-Nuke):

  • I have this (maybe unfounded) fear that Nuke sites are a security risk waiting to happen,
  • I am very uncomfortable with their administrative interfaces, and
  • Sad to say, I have not been exposed to Nuke sites which have impressed me. Call me unreasonable, but this is one of my personal ways of really determining the ease of customization of a CMS package.

Why not Tikiwiki

For those who are not aware of Tikiwiki, it is an engine with enough features to make any website owner drool — polls, wiki, blog, image gallery, banner ads, etc.

The main caveat, aside from its clunky frontend and backend interface, is that this particular version Tikiwiki seems to disregard the basic functionalities of articles management — for instance, in the lack of flexibility in the display of category headers.

It does, however, have a lot of options for their blog and wiki. This may be attributed to the general direction of the development, which I found disturbing. For one thing, a lot of people (this writer included) already conceive that there is a very thin line between a blog entry and an article entry.

I actually believe that “blog” and “wiki” are mere methods of manipulating or displaying articles, and that article management, display, and categorization should be given priority by any CMS system.

Why Mambo

Mambo, winner of the Linux User & Developer Award 2004, gained extreme popularity last year. We ran a test during the 2nd quarter of 2004 on PhilMusic.com. However, this test did not produce any satisfactory results. Mambo was, at that time, a diamond in the rough.

However, this particular version, Mambo 4.5.1a Stable, was enough to bowl me over.

Ever heard of the expression “love at first sight?” In evaluating a website package, it is usually “love at first sight of the admin interface.”

Even in my full-time job as a software project manager, I emphasize usability each project, and make sure that usability tests are included in all test cases. I have learned the hard way that usability is the primary thing a Customer wants, yet ironically rarely stated in Requirements Specifications.

As a website manager of a personal CMS-based website in my spare time, the first impression is on the organization and labeling of the administration. Mambo’s usability might not yet meet the standards of Jakob Nielsen, but it is enough to merit the over 100,000 downloads of its current release alone.

As with most website managers, a big concern is the speed of maintenance and incorporation of templates. Mambo is living up to its “Power in simplicity” slogan, with an easy-to-use article management interface. Articles, or items, are classified into Categories, and Categories are classified into Sections.

Adding an article is pretty straightforward — all the pertinent fields are displayed on one page, and merely involved copying and pasting the articles. It also features the capability to include images in the body of the article by simply selecting the desired image from a list, and specifying the desired position.

Adding an image can be done on the same page, or thru Media Manager. I personally use the Media Manager to be able to control the folder structure of the images.

Customizing the templates was the ticket. The template basically involves two files (index.php and template_css.css), and there are numerous tutorials available on the internet. Cascading Style Sheets (CSS) plays a major role on the templates, and the CSS guide found in Visual Density is sufficient to determine what needs to be modified.

One of the biggest strength of Mambo, though, is on its strong support community. Mambo’s forum is a wealth of information, as long as you use the search feature wisely. The people in this community have an amazing knowledge on the Mambo code structure and an admirable sense of altruism.

There are still some features I would like to see in Mambo, though:

  • Commenting feature. Although there are downloadable commenting modules for Mambo, I would still like to see this feature as part of the package’s core components.

    The Mambo website explained that the lack of commenting support is due to the fact that Mambo is concentrating on its CMS features. However, I beg to disagree. There is already a paradigm shift on the definition of an article. Comments are now being seen as integral content, as they are being used by authors to update information about an article, and also by the readers to contribute to the article.

  • Capability to display a unique thumbnail for each content item.
  • Capability to display a unique category image (or header) for the article listing and viewing of the article.
  • User permissions. This particular release only supports two kinds of users: registered, and public (or anonymous).
  • A more usable menu and module interface . There are some menu display configurations that I have not yet figured out, which are located both in the menu and module interfaces.
  • A community to develop stronger integration with other open source applications such as phpBB and Coppermine.

And to conclude

As of this writing, chette.com is now proudly powered by Mambo.

This doesn’t mean though that I am closing my doors on the other CMS engines. As what we have learned thru our Mambo experience, what we have despised before may be what we might end up using in the future.

There is a steady growth in the open source development community, and as long as this community is around, I shall watch with baited breath on discovering the magic that they continue to perform.