Template Class: Getting the logics in – If loop

In the previous post, we have seen that the template class is not acting as a proper tag replacer. So what it does now is replaces all the variables as a tag. So if we add $tpl->put(”var1?,”SSS”);, it will replace {$var1} in the template with SSS. Now, when we think about the template class, we find that this is still a very raw system. I mean this is a very small system and would be of virtually of no use. So what we do is, we give it some brains. It has to process some logis. It doesnt mean if it can process simple loops such as ifs and fors. So we create a new filter. Our first loop is going to be if loop.

LoveOfPHP Gets Its First PR!!

I was just browsing the internet for a small tool. Then, I just managed to jump to my own blog for some uncertain reason. And my google toolbar popped up a pagerank of 3!! I was quite shocked! I have not done any SEO on this website. Its about me and my development, which can help you. I really don’t care about SEO for this babe. Well, but maybe it is the good content that I am managing to put in, that I have got a page rank of 3!! Google seems to have updated PRs lately, and its been a super cool update! I am loving this man! Have a look at it!

Hurray!! A party on me!!

Hi,
Finally after a few months am I able to give brains to my template system. No longer is my template system a stupid tag replacer. It can easily take care of ifs, fors, and so on… Its fun man!! I am loving it.. though it is not exactly what I had wanted, but nevertheless… it has got what I have struggled for… some brains! I have added “for”,”if” and dynamic variable assigning to it. It can run nicely and take care of a lot of things! Programmers, you can stay away from HTML with me :) . More coming soon!!

More On Template Class Very Soon

Hi,
I am currently working very hard on writing about the template class. This is taking a lot of time. I will try to come up with something on template class very soon. Please hang on meanwhile I am getting the manuscript ready in my mind.

Thanks

Jyot

Working of the template class

Okay… fistly, the grammar above is wrong :P . Well, this post is going to deal with how the template class actually works. The template class actually works in the following method:

  1. First of all, we take up the file of the template into a variable called contents. This variable is the property of the database, and is accessible through $this->contents

Community News: Responses to the Death of PHP4

The community has responded to the fact that PHP4 is officially “dead” with a few posts to their blogs. Here’s the list so far:

Table of contents for Working with Doctrine

Henrik has posted the second part of his look at using Doctrine, this time in combining it with Smarty. (Check out part one here).

We are creating an MVC setup where M is Doctrine, V is Smarty and C is our own stuff we do here. The Zend Framework has been reduced to just another component library for me now, I will pick goodies when I need them.

Function: is_array()

This function checks whether the given variable is an array.

Description : bool is_array($arr);

Return value of this function will be in boolean ie. True or False .

If the given variable $arr is an array then the return value will be True.

Else the return value will be False.

Template Class – The initiation

Getting back to the template class we had started off the lat time, the template class has posed a challenge to me. So what I did was, start off with a very basic replacer. The trick is simple. Lets get on with some coding first.

class template

{

Fooling Rapidshare

Well, Rapidshare seems to have lost it! They have just made their system unsecure. Atleast for me, now they cant let me wait for much longer! Atleast for me, the last few times I have downloaded fom rapid share, I have managed to eliminate the waiting period of 50 HUGE seconds! I have converted it to a small 10 second waiting time! well this is a very simple trick. Just when you reach the download page, where in the count down begins, go to the address bar and type in the following link:

« Previous PageNext Page »