Archive

Archive for the ‘PHP’ Category

Use Jquery with Smarty Template Engine

August 31st, 2010 emran No comments

Smarty is the template engine which is fast and nicely design for php programmers. Smarty makes your PHP code cleaner and promotes the V in MVC.

Jquery is the another lightweight JavaScript Library for rapid web development.

Anyway, do you see the problem that might arise when you try to embed your jQuery code or any other javascript library (like Prototype, MooTools, Extjs, etc.) that uses $ as a function name in the ?

The solution:
Use Smarty’s {literal}…{/literal} directives to tell Smarty parsing engine that it should not interpret the code within the block. Smarty will not parse the code which is inside of literal block.

Example:

User
<script type=”text/javascript”>// <![CDATA[
{literal}
$(document).ready(function(){
$(".clazz").css("color", "red");
});
{/literal}
// ]]></script>

User Information:

Name: {$name}

Categories: Jquery, PHP Tags:

How to make money from Twitter

June 7th, 2010 admin No comments
If you have a twitter account with many followers or just a few, you still can make money through a Twitter advertising company called Ad.ly.

You set the price and once an advertiser is interested to put an ad in your tweet, you’ll earn money. For how much? It depends on how much price you have set.

Categories: CMS, Linux, Others, PHP Tags:

How to disable PHP warning

September 18th, 2009 admin No comments

Just type starting of php script:

error_reporting(0);

Categories: PHP Tags:
6 visitors online right now
6 guests, 0 members
Max visitors today: 6 at 12:02 am UTC
This month: 8 at 09-03-2010 11:34 pm UTC
This year: 43 at 06-10-2010 04:02 pm UTC
All time: 43 at 06-10-2010 04:02 pm UTC