March 2013
2 posts
Mod_rewrite
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to… View Post
Using multiple radio button in yii
Using multiple radio button in yii When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a… View Post
February 2013
1 post
Working with Event in Yii
Working with Event in Yii
“We can register several event handlers that will react to certain event types. A handler can get
parameters from an event it works with and react accordingly. Using events allows achieving
great application flexibility…..”
Here… View Post
November 2012
2 posts
Git -Refereance
Git Reference
Create or switch to new branch is explain in the following snippet
git branch devel //create new branch name devel git branch //how all brach branch with * is the current branch git branch -a //list both remote-tracking and local branches…
View Post shared via WordPress.com
Using AJAX with twitter tweet buttons and facebook...
Using AJAX with twitter tweet buttons and facebook like buttons
Currently working on a website which uses ajax to reload parts of the page and the twitter tweet button and the facebook like button disappear and do not reload after calling an ajax request.
View Post shared via WordPress.com
October 2012
5 posts
Remove backup file in linux
find ./ -name ‘*~’ | xargs rm View Post shared via WordPress.com
Use of expression in Access Rule...
Options in Access Rule (controller)
array(
‘allow’, // or ‘deny’
// optional, list of action IDs (case insensitive) that this rule applies to
// if not specified, rule applies to all actions
‘actions’=>array(‘edit’, ‘delete’), // optional, list of… View Post shared via WordPress.com
svn revert and update revision
Update to particular revision
svn update -r [revisionno]
svn update -r 1788
Revert changes
svn merge --dry-run -r 1788:1786 [file_location]
svn diff -r 1788:1786
svn merge -r 1788:1786 [file_location]
Update Reverted files files to latest revision
View Post shared via WordPress.com
Role Based Access Control (RBAC) In Yii-framework
RBAC is one of the good feature we have in yii framework. But i did n’t understand it clearly in the begging. Now by referring several documents i understand the working of Role Based Access Control. Setting AuthManager First go protected/config/main.php… View Post shared via WordPress.com
Latest posts from me →
September 2012
2 posts
1 tag
Mod_rewrite
The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch. mod_rewrite provides a flexible and powerful way to manipulate URLs using an unlimited number of...
5 tags
Ajax & Yii
Ajax Update
simply update a div or anything else simply using update option inside ajax array
2. CHtml::ajaxLink('label',array('url'),
3. array(
4. 'update'=>'#divId'
5. ),
6. array('class'=>'like',’id’=>’like1’)
7. );
8.
When we need to perform Javascript or JQuery operation on the result we get , by using success option or any other JQuery ajax...
June 2012
4 posts
install mongodb php driver in wampserver (windows)
For installing mongodb php driver on wamp server (windows)
check the following blogs.
http://www.pronique.com/blog/installing-mongodb-on-windows-the-wamp-way
http://miofme.blogspot.in/2011/07/installing-mongodb-on-wampserver.html
7 tags
using multiple radio button in yii
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().
‘uncheckValue’=>null
Usage
echo CHtml::radioButton('btn',...
3 tags
What's new in Yii2 →
New features of Yii2 slide show by Alexander Makarov
Napster's Experiments with Freedom: Phonegap for... →
subinsebastien:
Reading time : Less than 10 minutes
Check the date first and make sure you are not reading some old crap. I hope you have properly read my last post and explored the possibilities of Android application development. In this post, I’m trying to introduce another wonderful concept in mobile…
May 2012
3 posts
Nintriva, India, Web & Mobile Development Company... →
9 tags
Role Based Access Control (RBAC) In Yii-framework
RBAC is one of the good feature we have in yii framework. But i did n’t understand it clearly in the begging. Now by referring several documents i understand the working of Role Based Access Control. Setting AuthManager First go protected/config/main.php and add authManager into application component
‘components’=>array( /*. ...
Inappropriate value for facebook userID or Integer...
This issue occurs in when we are displaying facebook Id of some user where user id greater than 10 digit number that is integer of bigint type it show something like this 1.34234422 +E03 we can solve to ways
1 using regular expression
$friends = json_decode(preg_replace(‘/”uid”:(\d+)/’, ‘“uid”:”$1”’, $output),true); $ output is...
March 2012
1 post
8 tags
YII PHP Unit Testing with phpunit selenium...
YII PHP Unit Testing with phpunit selenium server
Installing phpunit and selenium server
Go to links
1 http://www.phpunit.de/manual/current/en/installation.html
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
pear install phpunit/PHPUnit_Selenium
if you not setup pear on you computer
go to the link http://pear.php.net/manual/en/installation.getting.php
in windows...
February 2012
4 posts
5 tags
BootSlider a bootstrap Carousel slider in Yii
Extension: http://www.yiiframework.com/extension/bootslider/
Demo: http://mysamples.pagodabox.com/index.php/site/bootslider
BootSlider use Twitter’s Bootstrap extension together with Yii. There are sevral Yii-widgets that allow you to easily use Bootstrap with Yii.BootSlider is a widget that use Carousel in Twitter’s Bootstrap and extended from CListView so using CArrayDataProvider...
12 tags
Extended yii eexcelview with relational database...
Hi i modified eexcelview to support footer and db relationships
download the edited extension ->downlad file
whcih support relational database and footer functionality also it will automatically convert date format to in dd/mm/yyyy format
$balanceAmt=10;
$this->widget(‘application.extensions.EExcelView’, array( ‘id’=>’grid-view’, ...
17 tags
Deploy yii on pagoda box
pagoda box is very useful tool for a programmer to test their php app online
so its very useful one. For deploying code pagodabox use git command.
Refer:-
http://help.pagodabox.com/customer/portal/topics/86057-getting-started/articles
Refer article about yii:-
http://help.pagodabox.com/customer/portal/articles/175451-yiihttp://help.pagodabox.com/customer/portal/articles/175451-yii
especially...
sirin k: Using Twitter bootstrap in Yii framework →
sirink:
We can easily use twitter bootstrap in yii framework.Let give give you an example for twitter popover below:
$assetsDir = dirname(__FILE__).’/../assets’;
$cs = Yii::app()->getClientScript(); $cs->registerCssFile( Yii::app()->assetManager->
publish($assetsDir.’/css/bootstrap.min.css’) …
January 2012
2 posts
Use of expression in Access Rule or role based...
array( ‘allow’, // or ‘deny’ // optional, list of action IDs (case insensitive) that this rule applies to // if not specified, rule applies to all actions ‘actions’=>array(‘edit’, ‘delete’), // optional, list of controller IDs (case insensitive) that this rule applies to ‘controllers’=>array(‘post’, ‘admin/user’), // optional, list of...
add file var www and add user to group
If you make /var/www writeable by its group and add the user to the group, that user will not have to use sudo. Try this: sudo adduser <username> www-data sudo chown -R www-data:www-data /var/www
(chown -R newuser:newgroup) sudo chmod -R g+rw /var/www The user should then be able to edit /var/www/ files without hassle.
The first line adds the user to the www-data group, the second...
December 2011
2 posts
5 tags
Yii Changing theme via Application Configuration
Changing theme via Application Configuration
‘theme’=>’classic’, //instead of classic put theme in themes folder
Getting the path of object
“<?php echo Yii::app()->theme->baseUrl; ?>/images/calendar.gif”
conditional-validation-rule
public function rules() { return array( .... array('field5', 'validateF5'), .... ); } public function validateF5($attribute, $params) { if ($this->checkbox4>0) { $ev = CValidator::createValidator('required', $this, $attribute, $params); $ev->validate($this); } }
...
November 2011
4 posts
2 tags
chcon linux →
2 tags
Application runtime path “…../protected/runtime” is not valid....
– http://www.yiiframework.com/forum/index.php?/topic/11939-installing-yii-on-fedora-13-selinux/
mysql+apache →
12 tags
ipconfig in linux
for ethernet ip address, mac address subnet mask etc
$...
October 2011
1 post
12 tags
Email from Local host
Using an extension we can send mail from server with out mail server or even from local host
the below link is the link for downloading extension
http://www.yiiframework.com/extension/mail/
( http://code.google.com/p/yii-mail/downloads/list )
then we have to import the extinsion(in “protected/config/main.php)
‘import’=>array(
…. ...
September 2011
4 posts
9 tags
Yii database Migration
migration is used to update the database using code only we have to include file contain updation inside migrate table
Before creating migration we have to edit default content of
“protected/config/console.php”
change the content of ‘db’=>array(); and connect to the database table in which we have to do database migration
yiic migrate create <name>
[eg: yiic...
6 tags
Install phpmyadmin linux
Install phpmyadmin in linux
sudo apt-get install lamp-server^ sudo apt-get install phpmyadmin sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
How to change search engine in firefox?
open firefox then type “about:config” in address bar
then type “keyword.URL” in filter field
double click the result to change preference
Google: “http://www.google.com/search?ie=UTF-8&q=”
Bing: “http://www.bing.com/search?q=”
Yahoo: “http://search.yahoo.com/search?p=”
Ask: “http://www.ask.com/web?q=”
yii installtion
For installing yii first we have to find the path to yiic located in yii framework folder which downloaded from web
"% YiiRoot/framework/yiic webapp WebRoot/helloworld"
this will create an app named as helloworld in the location webroot
in windows7 we must edit yiic.bat file in “% YiiRoot/framework/”
if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe
the above line must be...
August 2011
1 post
2 tags
YII framework
Hi, all am leaving from pure php programing.Instead of using frameworks.And i am going to start with yii now its because it reduce our programing effort.And it can generate some parts like model,module,CRUD etc using gii.so it make coding easy and can concentrate more on logical part of the program.moreover it use OOP(object oriented programing)concept which will help us to reuse the code and...
July 2011
1 post
My Dream!
My big dream was to start my own Software Company…. I prayed several time to the GOD for help me to do that at some stage of my life. Now without having hard work it happened early in my life by accidentally, now i am co-founder of a software company with some of my friends. now its my duty to seize the opportunity and DO well.. so remember me and my company in your prayers
...