Website As Christmas Gift.
by Onse on Dec.29, 2010, under Blog
Its been awhile working on different codes and stuff.. actually its been a year! whew.. been setting up sites and codes for clients and co-workers. A code modification here and a code modification there.. Installing and debugging open source and paid applications/software. Learning new things everyday and developing tons of scripts day in and day out. Well not what you would call a rational work load. But I guess its just my passion for programming and user-interface code functionality.
A year round of PHP scripts, CSS stylesheets and Jquery framework. You can tell that I have coded so many scripts for other people but myself. So just early this december I decided to focus on my own site, I tried to think of a good site for me to build and at the same time enjoy with my family, Looks easy huh? Not really. I pondered a bit and realized that a game site would be great for my kids so they can play on the site at the same time I will have to learn how the search engine optimization (SEO) thing works. Now I have a good niche which I will be able to link build and optimized.
I created a game script structure from scratch and added features that will enable the user to navigate the site around specially since the kids will be the one whose gonna play in it, so I need it to be simple but functional. After finishing the structure I went to mochimedia.com and registered with their free publisher account so that I can use their games to display on my website and the kids can play with it. Their API was really easy and I had no problems implementing the JSON feed on to my arcade site. It was really nice when my daughter, niece’s and sister and law started to play online I felt that I have done a really good job seeing the smile on their faces.
Here is the live URL for the website which is called Dress Up and Cooking Games. You can check out the arcade blog too.
Security Token Fix For ZenCart
by Onse on Dec.12, 2009, under Blog
The new feature of Zen Cart 1.3.8a which is a security token is very neat but very disastrous when you have no idea about it. A zencart site i was managing was working fine till one day customers were getting a security error prompt when they are trying to log in thus creating havoc on the site because of the problem of customer not able to login.
Ive search for answers and turned to the zencart forum which provided excelent tutorial regarding the said problem. The link for the fix is at http://tutorials.zen-cart.com/index.php?article=149 which was very helpful narrowing down the problem. However even if implemented, the problem with the login still persist, this led me to ponder on the for awhile because the setup was properly configured and the template guidelines for the fix was also executed without any unturned stone but it still gives an error.
The solution to the problem was very easy although as a coder you would only rely on the coding bugs to pinpoint the error but it seems there was no error log for the problem, then i realized that if the sessions were being generated and placed into a session file on the cache then it must be the read and write priviledges that is causing the error. So then I asked the tech guy to make the php generated file be available for writing which is a chmod greater than 755 permission, this fix provided the solution for that error and the zencart properly executed once again without anymore problems regarding the security token.
As the tech guy would have said it “Please note that from now onwards no scripts/folders with permission greater than 755 will not work in the server”.
So now that should fix the security login error for the zencart installation. Ive also posted the fix on the zencart forum.
Informative CSS and XHTML Rap..
by Onse on Apr.24, 2009, under Blog
This is very informative and helpful stuff with regards to web development layout and formatting. Ofcourse it has a twist, who would think a rap will compose of XHTML and CSS.. now thats original!!! Very entertaining in its very own way. Two thumbs up!!! So il leave it to him to explain as you watch the video.
Virtuemart – Joomla Issue with SEF plugin for tree view
by Onse on Apr.24, 2009, under Blog
I was updating a Joomla site that uses a Virtuemart component as tree view for it product listing. The joomla version was within 1.0, I was trying to update it with the latest version which was Joomla 1.5.10. However I encountered some drawbacks which was very frustrating, because it seems that virtuemart doesnt support SEF component for joomla so what happens is that the directory tree link was not working as expected. I had to disable the SEF Component for Joomla to be able to use the directory tree. Badly as I wanted that plugin to be used for the site, but never the less I had to take it out because the site wont be functional anymore.
If you would ask me why not just change the layout of the product listing? As if I never have thought of that.. but some things aren’t my decision like for the site product listing. So it had to be like that, I just hope Virtuemart would have a patch in the future that can cope up with the Joomla SEF and URL rewriting component. Till then the non-SEF supported Virtuemart will have to do at the moment. If you have any idea about how I can work it out with the tree view and the SEF component, please leave me a comment. Thanks.
L33tn322!!!
by Onse on Apr.23, 2009, under Blog

Code Jug
Well.. this picture makes me laugh everytime I see it.. I dunno’, I was thinking what if I did the same when I was in my elementary or even highschool days. I’d like to see how my teacher would react specially my computer teachers. Back to the picture above.. the kid is L33t!!!
PHP foreach
by Onse on Apr.22, 2009, under Blog
foreach function in php has so many uses… its one of the functions i use the most specially for post, get and array variable declaration. Why variable declaration? instead of manually declaring or calling variables, I just use foreach for a shorter code but faster process. Here are some examples on how i use it.
foreach($_POST as $postkey => $postvalue) {
$$postkey = $postvalue;
}
this loops through the posted values and setting up variables depending on the input name of the form elements. $$postkey is being declared depending on the input name. This means that if the input name is textfield you can just call the variable $textfield and from the code above it has the corresponding value of the input field. This process applies for $_GET function also.
foreach($_POST as $postkey => $postvalue) {
$$postkey = “”;
}
flushes all post values after youve used it. Like example after every validation when you dont want to populate the form elements after a successfull validation.
Hello world?
by Onse on Apr.07, 2009, under Blog
Welcome to Codinglogic.com, where code and logic meet and gets together to have some fun with programming. This site is everything about code logic and PHP. My name is Onse and I have sum up some snippets, code functions and structures I regularly use in my everyday PHP coding. We’ll generally this is a more of PHP site more than anything else but basically a webpage doesnt just comprise server-side coding, theres client-side like Asynchronous JavaScript + XML (Ajax) and Javascript, theres laying-out the design structure with Cascading Stylesheets (CSS). Theres ofcourse optimization and making everything robust and dynamic as possible, so in layman’s word this site is all about web development. I will also try to tackle some stuff about Content Management Systems (CMS) such as Joomla, Mambo, CRE Loaded and others, there will be discussion about WordPress and other blogging softwares also. Ofcourse what’s there to talk about these softwares? mostly their security, updates and plugins. Many users have diverted their attention to these softwares because its well supported and very much easier to maintain or upgrade.
So much for introductions, well thats the overview of what this site is all about. Thanks and im hoping you can visit again soon and read about newest coding posts. Good day!
