10.11.08

Science Centrum is back!

It's nice to hear that our beloved Philippine Science Centrum can once again be experienced by everyone! Yes. The Science Centrum that we grew up with, enjoyed and the one that sparked our CURIOSITIES is relived, albeit in another place. You can check the link ( http://www.science-centrum.ph/ ) and it would be much better if you can experience it for yourself!

The Philippine Science Centrum, now in Marikina Riverside, will be opened to public on November 22, 2008. I will be there, my wife will be there, hopefully, I can see all of you there also!

We really are winners of cosmic lottery...

6.11.08

Recovering lost network connection on VMWARE Image

I found this really helpful! Thanks to the author. VMWare is cool! (http://www.vmware.com). Qemu is cool too! (http://www.qemu.com)

14.10.08

A good "basic" security site, albeit old

This is a good, albeit old, security site for those who want to learn more about how to create security policies in their workplace. I am putting it here just in case ;)

5.10.08

Trying out GNUDialer

Ok

It's my first time to try and make GnuDialer work. So far, I have been unsuccessful. But I'm not losing hope. I know that it may be easier for me to try using Vicidial but we are planning to create a contact center solution that will be based on open source software. The software will be free but the cost will be setting it up and configuring all the workstations and the servers.

I will try again today and will paste here the steps that I have done to make it work.

See you...

17.9.08

Patching / Editing Symfony 1.0.10 for PostgreSQL's Multiple Schema

I will just post here what had been posted at a different forum, I can't remember where. But this patch had been useful to me to add functionality of PostgreSQL's Schema to be seen and used inside symfony.

symfonyMultipleSchemasPatch-1.0.10.patch

8.9.08

Automated psql from the command line

So I will not forget how to do this.

To run my script in postgres without logging in:

I set the environment variables $PGHOST $PGUSER $PGPASSWORD $PGDATABASE

then run the postgresql script : psql $PGDATABASE -f sql_script.

10.7.08

Trying out TurboGears

There are web frameworks and there are web frameworks. I had been using several in PHP:
Symfony (http://www.symfony-project.com)
CodeIgniter ( http://www.codeigniter.com)
CakePHP (http://www.cakephp.org)

And I have been exposed to these in python:
Turbogears (http://www.turbogears.com)
Django (http://www.djangoproject.com)
Pylons (http://www.pylonshq.com)

Currently, though, I involved myself in developing in Turbogears. As easy as it may seem, the problem with
This framework is the ORM is too simple. I don’t know I think it came to me when I think about using symfony project
that made refactoring to the model possible. Tried google-ing “Model Refactoring in Turbogears” but search almost
always comes irrelevant to what I was looking for.

Sincerely, there is no point in using ORMs if the logic of trimming extra data from your model still resides in the
controller. What happens, is, SQLAlchemy mainly becomes a database abstraction rather than an ORM. ( I see, hence mapper????)

I wish other developers would see it my way.

I am not against Turbogears. I like it. I love the way it handles things. I recently learned how to break down controller parts.  The thing is
I am not used to using ORMs as database abstraction mechanisms. Might as well go with ADODB ;) ( hmmm at least I don’t have to code
SQL by hand) But that’s just IT! Naked Objects come to view.  Every body is going down the way of minimalism. But just how far minimal
should one get? It doesn’t make sense anymore sometimes. People can really be difficult when it comes to decisions like this.

As for now, I will leave all my database queries in the controller, pass them to the view instead of doing the queries in the model, with the controller
being agnostic to what the model contains (WHICH SHOULD HAVE BEEN THE BETTER WAY).

And as far as I am concerned, both languages ARE FAST. It’s just up to the programmer just HOW FAST the software would be.

Good Morning.

Keep the tradition of knowledge sharing alive.  


28.6.08

Excited

I am getting worked up with the new project that is coming. I think that this project should be worked from scratch to be able to dictate the flow of the processes involved. I will not divulge any information yet. You have to see this blog every now and then to be able to track what is happening.

Clue: (1) This project involves packages.

Don't wish us luck as it never really helps anyway, not REALLY.

Over and out.

26.6.08

Running Firefox 2 and 3 Simultaneously


Woot! Firefox 3 is out and it ain't beta.

Here's a neat way to run firefox 2 (if you haven't upgraded yet) and firefox 3 together:

1.) Install your new firefox in a different location, say C:\Firefox3
2.) Copy the file to, say, firefox3.exe and create a shortcut for that
3.) Modify the shortcut to your firefox 2 to read "firefox.exe" -no-remote
4.) Do the same thing for your firefox3.exe
5.) Create a new profile for both ( you have to add -ProfileManager to the shortcuts to access the profile manageer, duh!)
6.) Add the name of your profile to the two modified shortcuts
(i.e. C:\Firefox3\Firefox3.exe -no-remote -P Firefox3Profile AND C:\Firefox2\Firefox2.exe -no-remote -P Firefox2Profile)
7.) Shortcuts!!!

The thing is, you have to create the profiles so plugins from one firefox installation, does not appear to the other.

The only problem is, you have to reinstall all your plugins to the NEW firefox

19.5.08

Almost Done

Whew!

Have I got a hectic week or have I got a hectic week, and all of this painstaking work nearly comes to an end. I am really happy with all the modifications I have done to Joomla! 1.0.15. 

The funny thing is, I am not able to document them all. But, I will be able to document it after. See, I found this link http://www.assembla.com. It made my work easier. It has (1) SVN + Trac (2) Wiki (3) Collaboration [though I don't have to collaborate with anyone].

You should try this site out. 

Renz Out!

3.5.08

Labor day

Wow I'm back. For the past 2 days, I haven't been in front of the computer. I took a holiday from all the work-related things since that's what Labor Day is all about isn't it?

Anyway, back to documenting what I have done so far.

Here is the problem. In Joomla!, I want each page to be unique. I want it to load a different style (if I wanted to, of course).

The solution I came up with is to use the variable pageclass_sfx.

1.) I modified the file content.html.php from the com_content component of Joomla!. I took away all the instances where this variable is being added to some elements of the pages.

2.) Since it is all taken away from the pages, what I did is to put it as global variable. Why would I do this? Because I want to get this variable from the front-end side. and there is no other way of doing so.

3.) Since pageclass_sfx is part of the global scape, what I did was call separate stylesheets for the page for each pageclass_sfx value. I did this to the default template only. It's easier to do this from the default template than the assigned, but it is not impossible.

I don't know if there are other cleaner, more elegant ways to do this. However, for the sake of the site that I am doing now, I need this "modification" to be able to control everything.

Through this hack, I am able to create different "patterns" for the pages that need them and use the default template for the ones that don't need them.

Last week: Printer Drivers

I was able to make 2 out of the 3 non-working printers into working ones. All they needed was update in the printer definitions. It took me about 2 - 3 hours doing them. One was a HP Laser 1600 (Colored LaserJet Printer !!!), the other was a FujiXerox DocumentCenter 550i. (Trademarks for these printers are owned by their owner, not mine)

New Project

I am starting on a new project that computes Water Billing and Rentals. I will be using the CodeIgniter Framework. It will be easier that way. I already created a Library that will make it behave like symfony's view system. Although it's a little bit more complicated since in this view system, I can declare what the output will be (basically, it's glued to XML+XHTML 1.0 Strict). I will be uploading the library in a couple of days, once I tested that it's perfectly working and all that I needed is there.

30.4.08

Another Joomla! wishlist

I am about to create another Joomla! hack. What I would like to have is to create a way to specify a template for each page that I am about to create.

An idea came to me to extend (yet again) joomla com_content component to include (at the backside) a way to "insert" another field, specifically a template field that will load the specific template or the default template if there is none specified.

Good luck for me on this "hack"

22.4.08

Joomla 1.0 :: Hack : styling individiual menu items

Yet again, a Joomla 1.0 Hack:

In file : joomlainstallation/modules/mod_mainmenu.php:

at around line 132, I added these:

$menu_class_add = preg_replace("/[^A-Za-z0-9]+/", "_", strtolower($mitem->name));
$txt = '<a href="'. $mitem->link .'" class="'. $menuclass . "-" . $menu_class_add .'" '. $id .'>'. $mitem->name .'</a>';

This will make your menu items' class be specific to what they contain. For example, your link's display reads: Link To Some Content. what will happen is that the class would read : somclass-link_to_some_content. From thereon, it is easier to specifically target this link as if it has an ID. It is up to you now if you have to modify your css.

Or you could add the $menu_class_add as an ID for the anchor, which, I haven't tried yet.


Joomla 1.0 :: Conditional mosMainBody()

After some research, I have found a way to "properly" call mosMainBody() in Joomla! 1.0.

In this code:

<?php if(!eregi( "no items", $GLOBALS['_MOS_OPTION']['buffer'] )) {mosMainBody();}?>


I am checking if "no items" occurs in the $GLOBALS['_MOS_OPTION']['buffer'] variable where the main body resides. If you check the function declaration for mosMainBody in $joomlainstallation/includes/frontend.php file, you can see that this function echoes the variable above. I could hack this one (yet again) to test before display. But I need a fast way of doing things. This may not be the cleanest way to do it, but hey, it works for me.

!!! I modified the code to reflect other languages as well.... This is the new code:

<?php if(!eregi( _EMPTY_BLOG, $GLOBALS['_MOS_OPTION']['buffer'] ) AND !mb_eregi( _EMPTY_BLOG, $GLOBALS['_MOS_OPTION']['buffer'] ) ) {mosMainBody();}?>

2.4.08

Got new email addresses!

Just got 2 new email addresses.

renz_salmingobreakaway at atheistabreakaway dot netbreakaway - email address says it all. Don't have to expound about it, well not yet at least, except that you have to take out some parts to be able to send email to that address. If you really are a person, then recognizing the pattern would not be that too difficult for you (winking smiley here).

renzsalmingo2008takeaway at gmailtakeaway dot comtakeaway - now why would I want a second gmail account? the first one I created was too formal, too "me" -ish. I guess this one would be not. I still open the old ones that I have though.

Anyway, have to continue working now. It's already wayyyy past your bedtime. Go get some sleep.

Gallery Joomla Component....

I am now creating yet another gallery component for joomla.

Unlike most galleries, this one will have built in scoring system where you can schedule when the voting will begin and then keep track of the votes. I did not use Joomla!'s internal poll system since it has some limitations that I cannot breach (as of now).

I hope to be done by Friday this week so I can upload a copy here.