Author Archive for R Arun Raj
me : yeay its me arun
Symfony Study Guide – Small Project Implementation
Download Symfony Sandbox 1.4 Source : www.symfony-project.org/installation Requirement : Xampp or Wamp Package PHP: 5.2 Above Download Symfony and put this into your website root Rename sf_sandbox to your project name. Here it is CRM open config/properties.yml file and put below details [symfony] name=CRM author=Arun Raj R orm=Doctrine
Symfony 1.4 Doctrine Pagination
Doctrine Pagination is made very simple . public function executeIndex(sfWebRequest $request) { $this->pager = new sfDoctrinePager(‘TableName’, sfConfig::get(‘app_max_jobs_on_homepage’); $this->pager->setQuery(Doctrine::getTable(‘TableName’)->createQuery(‘a’)); $this->pager->setPage($request->getParameter(‘page’, 1)); $this->pager->init(); } Success page <?php foreach ($pager->getResults() as $post): ?><div> <?php if($post->getTitle()) { echo link_to($post->getTitle(), ‘news/fullstory?expand=’.$post->getId(),’class=”mhead”‘); } ?> <?php if($post->getDn2()!=”) { echo image_tag($post->getDn2()); } ?> <?php $content=$post->getContent(); $stripcontent=substr($content,” “,700); echo $stripcontent; ?> <div style=”display:block;” > [...]
Add a page that you’d like to see the next time you search for : Google add url
I noticed a new feature from google while doing Search Engine Optimization. You can able to results to google search results. Here we can inlcude our search results to google. I think this move is an alternative to twitter search. What I meant is twitter updates are done by a manual invention, But google results [...]
PHP MYSQL Tips and Tricks
This is a small article containing tricks and tips I aquired by reading PHP 6 Text Book. I was used isset() function to check whether these arguements are set or not. And also I need to check this is empty or not. Here is another function to check both of this requirement at single line. empty() [...]
PHP 6 upgrade : Advantages covered
PHP Personal Home Page now it is Hypertext Pre Processor. Version : 6 (PHP 6) Advantages, Addition of improved MySql Extension PHP 6 support Unicode, so that PHP 6 can handle all languages in the world. I faced lot of problems with ‘Malayalam’ font integration. PHP 6 cleans up a lot of garbbages that was [...]
Image Resize Simple class
Here is a sample class file for image resize. imageResize.class Download the File save it in web root and add .php extension to the file . How to use ? <?php require_once(‘imageResize.class.php’); // Path to File imagejpeg(imageResize::Resize($fileSavePath,$width,$height),$newFileName); ?> $fileSavePath should be the pathname of source file. Say “uploads/arun.jpg”. $newFileName this should be the source File [...]
Symfony 1.2 File Upload
class mymoduleActions extends sfActions { public function executeUpload($request) { if ($request->hasFiles()) { foreach ($request->getFileNames() as $uploadedFile) { $fileName = $request->getFileName($uploadedFile); $fileSize = $request->getFileSize($uploadedFile); $fileType = $request->getFileType($uploadedFile); $fileError = $request->hasFileError($uploadedFile); $uploadDir = sfConfig::get(‘sf_upload_dir’); $request->moveFile($uploadedFile, $uploadDir.’/’.$fileName); } } }
Unexpected Error in new PHP 5.3
Syntax Error , Unexpected ‘]’ in C:\xampp\php\browscap\browscap.ini on line 297.



