|
May 4, 2012
Posted on May 04, 12 @ 06:17 pm under Diary and has no comments.
Whole website era is moving onto mobility. Now its time to recode this site. This time, with some better tools. Codeigniter, HTML5, CSS 3 and ofcourse Eclipse. Have to see how many days will the re-work take. By the way, I am planning for mobile access too. may be m.krishnasrikanth.com. 
April 13, 2012
Posted on April 13, 12 @ 08:38 pm under Diary and has no comments.
Today is a funny day. i came across a well crafted php software, fitting exactly to one of office work requirements, but the showdown is.... its in korean language. I wonder what my boss will do, if i go and show this to him. first thing he will do is .. he will start laughing. may be he will throw me to korea to learn the language and convert the software. 
March 07, 2012
Posted on March 07, 12 @ 10:40 am under Diary and has no comments.
PHP turned into 5.4 this month. Have to learn this new version of software. Zend Framework 2 is about to come. Firefox 11 Beta. Apache HTTPD 2.4 is already released. and Ubuntu 12.04 LTS is also in its way. Have to catchup with the new changes. 
List of mobile emulators
Posted on March 01, 12 @ 09:04 am under Uncategorized and has no comments.
http://www.mobilexweb.com/emulators 
Mac4Lin Configuration on Ubuntu 11.10
Posted on February 11, 12 @ 06:14 am under Uncategorized and has no comments.
1. Download Mac4Lin from sourceforge.net site,
2. Create these directories before running the install.sh file: ~/.themes, ~/.icons, /usr/share/gdm, /usr/share/gdm/themes/, /etc/gdm
3. create /etc/gdm/gdm.conf as sudo.
4. extract the zip file, and run the Mac4Lin_Install_v1.0.sh from terminal.
5. Restart the machine. (I guess logout might work, but restart is better).
6. Copy the icon folder in the installer archive to /usr/share/icons.
7. Install dconf-editor from apt-get. Run dconf-editor.
8. Go to org > gnome > desktop > interface > icon-theme. Give the icon folder name here. Press enter. Icon theme will be changed.

Post 9: Managing application.ini and session data in Zend Framework
Posted on February 09, 12 @ 07:05 am under Zend Framework and has no comments.
A. Accessing application.ini data
There will be times when configuration items are needed in the logic. There is a way you can access it.
This line can be given in init() of the controller.
$this->_config = $this->getInvokeArg('bootstrap')->getOptions();
Now the config data is available as array for controllers.
_____________________________________________________________________________________
B. Accessing session data.
Session data is available as class members by instantiating session namespace.
For easiness,
1. the session namespace can be specified in the application.ini. and can be called in the code.
2. as an alternate, instead of calling many times, in init(), you can instantiate a class member variable, which will be available for the controller.
$this->_session = new Zend_Session_Namespace($this->_config['sessionName']);
_____________________________________________________________________________________
C. Making session data available for view.
In init() of controller, you can add following line, after the above line.
$this->view->sessionData=$this->_session; 
Post 8: Enabling Modules in Zend Framework
Posted on February 09, 12 @ 06:23 am under Zend Framework and has no comments.
Modules will help organizing the program logic into folders and files. Modules can be enabled as follows.
Using zf command tool, give this command in terminal: zf create module MyModuleName
This will create modules/MyModuleName directory.
To create controllers in this module, you need to specify the module name in zf create controller command.
Example: zf create controller Dashboard index-action-included=1 MyModuleName
Note: The index-action-included=1 option will automatically create indexAction() in the controller created.
If the module name is not specified, the controller will be created as the normal controller.

Post 7: Using custom libraries in Zend Framework
Posted on February 09, 12 @ 06:08 am under Zend Framework and has no comments.
While developing projects based on Zend Framework, programmers usually consolidate some classes and methods, which they want to reuse in other projects. For example, displaying datagrids, custom calendars, etc.
In that case, those libraries can be present in library folder. as per the predefined structure.
For example. Jasmine_Db_Datagrid class should be present in zf_project/library/Jasmine/Db/Datagrid.php.
i.e while auto loading ZF will replace underscore with slash and includes that file.
Wait Wait !!!
Having the files is not enough to auto enable it, They have to be configured in the application.ini file, with these two lines.
autoloadernamespaces[] = "Zend"
autoloadernamespaces[] = "Jasmine"
Note: The Zend namespace should also be included. 
Post 6: Adding database information in Zend Framework
Posted on February 09, 12 @ 05:45 am under Zend Framework and has no comments.
In application/configs/application.ini, there will be production, testing and development sections. Settings given in production section can be overridden in others.
Following lines have to be added, for MySQL database. The values can be changed for sqlite, or odbc or some other, according to the configuration planned.
; database settings
resources.db.adapter="pdo_mysql"
resources.db.params.dbname="my_app_db"
resources.db.params.username="my_app_db_user"
resources.db.params.password="my_app_db_user"
resources.db.params.host="localhost"
resources.db.isDefaultTableAdapter = true
Few tutorials have said to add it Zend_Registry and all. But its not needed, adding just here, makes the database available to the models developed. 
Post 5-2: Organizing images, styles, javascripts in Zend Framework
Posted on February 09, 12 @ 01:56 am under Zend Framework and has no comments.
Images, stylesheets, javascripts can be placed in public folder and their references can be given using $this->baseUrl(); in the view scripts.
For example, to include an image, in the view script (.phtml file of controller's action):
< img src="< ?php echo $this->baseUrl(); ? >" ... />
Similar code can be used for Javascript files, styles etc.
< script language="javascript" src="< ?php echo $this->baseUrl(); ? >">< /script>
The baseUrl() value can also be accessed from controller by using this:
$this->view->baseUrl();
This technique is useful in layouts, where the layout file has to include these assets.
For ease of use, at the beginning of layout.phtml, you can specify
< ?php $viewBaseUrl=$this->baseUrl(); ? >
This will be useful in reducing the calls to the baseUrl() methods and improves performance. 
Pages: [1] - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35
|