Tagged: project RSS Toggle Comment Threads | Keyboard Shortcuts

  • webscriptz 15:48 on 23/02/2011 Permalink | Reply
    Tags: , , , project, , ,   

    Yiiframework Captcha problem 

    While lanching a new website I had problems with the AJAX request allowing the captcha to refresh itself. The link ‘Get a new code’ didn’t work properly and I didn’t really find an alternative at first.

    The only alternative I found it to add in the $this->widget(); add an array after ‘CCaptcha’:

    widget(‘CCaptcha’, array(‘clickableImage’=>true, ‘showRefreshButton’=>false)); ?>

     
  • webscriptz 22:03 on 21/10/2010 Permalink | Reply
    Tags: , marchandiseduweb, mdw, mdw.com, , , project,   

    MarchandiseDuWeb.com 

    Alright,

    The first real website I’ve written in Yii framework is online, just head over to http://marchandiseduweb.com (hopefully you know some French).

    I’m not telling you it’s a finished project because the database needs some items in it and you don’t see all the website (yet) online, just the ‘front website’ because the other parts have yet to be scripted, luckely the database design is complet/

     
  • webscriptz 21:37 on 19/10/2010 Permalink | Reply
    Tags: , , project,   

    I made my decision about my project, having learned a lot with it, I think it’s time to recode the little thing. The database only counts 12 or 13 tables so it’s a not much but it’s rather that part of my application that needs some love and attention to get it to look more professional and uniform.

     
  • webscriptz 15:00 on 04/09/2010 Permalink | Reply
    Tags: load, , profile, profiling, project, server   

    Profiling a php application 

    Today I’ve been talking with a friend of mine, Pieter. We share a server together for our websites,programming adventures etc.

    I’ve been talking about a project I’m writing and reminded me to go profile my application so the load of the application keeps low. So I’ve been searching the web for some easy profiling system, I came across Xdebug and others but the one that really struck my fancy was PHP quick profiler.

    It might not have every single feature other applications have in their toolbox but it’s easy to install and easy to work with. The things I’m most concerned about are shown nicely so I don’t need more

     
  • webscriptz 23:47 on 20/12/2009 Permalink | Reply
    Tags: , , , , , , project, ,   

    YII framework configuration 

    I’m toying with the Yii Framework for some time now and even if i cost me a lot of anger and frustration in the beginning I’m starting to like it more and more, alas I do have to say that the documentation isn’t always that clear and for someone who begins or who’ll write some large applications the configuration file can be a hassle so here’s my solution:

    Brake down the configuration file in multiple files, this will give you some speed disadvantage and some will  saying that I’m raping Yii framework purpose for speed but at least to me it seems more clear

    This is the protected.config/main.php

    dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'WEBSITENAME',
    'modules'=>array(
    'users'=>array(
    //sub modules in the module users
    'modules'=>array(
    'messaging',
    'profile',
    'dashboard',
    )
    ),
    'about',
    'forums',
    ),
    // preloading 'log' component active loading
    'preload'=>array('log'),
    
    // autoloading model and component classes lazy loading
    // I make the difference between CformModel and CActiveRecord
    'import'=>array(
    'application.models.*',
    'application.models.forms.*',
    'application.models.database.*',
    ),
    
    // application components
    'components'=>array(
    // enable cookie-based authentication
    'user'=>array('allowAutoLogin'=>true),
    
    // data relinquished to database.php
    // for easy access and usability as also for the future
    // installation procedure, it's less to write to a file
    'db'=>include(dirname(__FILE__).'/database.php'),
    
    // for a better overview we exculded url routes to a seperate file
    'urlManager'=>include(dirname(__FILE__).'/routes.php'),
    
    //authentication component needs data from db for CdbConnection
    'authManager'=>array(
    'class'=>'CDbAuthManager',
    'connectionID'=>'db',
    'defaultRoles'=>array('authenticated', 'guest'),
    ),
    
    //security measures
    'request'=>array(
    'enableCsrfValidation'=>true,
    'enableCookieValidation'=>true,
    ),
    ),
    
    // application-level parameters that can be accessed
    // using Yii::app()->params['paramName']
    // uncomment the following if you want static params in the application
    //'params'=>array(include(dirname(__FILE__).'/params.php'))
    );

    database.php

    'CDbConnection',
    'connectionString'=>'mysql:host=localhost;dbname=mysql',
    //'connectionString'=>'pgsql:host=localhost;port=5432;dbname=mysql',
    'username' => 'root',
    'password' => '',
    );
    ?>
    

    routes.php

    'path', // path or get
    'urlSuffix' => '', //.html .whateverextentionyouwant
    'showScriptName' => true,
    'rules'=>array(
    'users/recovery/perimeterSecurity/'=>'users/recovery/perimeterSecurity',
    ),
    );
    ?>
    

    param.php

    //nothing in it at the moment

     
    • Cherry 10:58 on 30/12/2009 Permalink | Reply

      Hi,I’m trying Yii now.Almost everything could be done with Yii.But all the components,those how I configure ,will run.Something ,like,DB session…
      well,my english is so poor!

    • webscriptz 03:32 on 01/01/2010 Permalink | Reply

      I’m a bit torn between speed and programming luxury and because sometimes Yii is poorly documented, nice example code but not all the options are given actually sometimes very few.

      I’m currently doing models and testing them in Yii and i can’t get my head really around it, Codeigniter was really easy to use in the model logic but now what’s the logic, Model driven or controller driven because of the AR layer and the model sql query which seems implemented in the controllers. I thought controllers were just a gateway between view and model because it’s the model that usually contains all the logic not the controller.

  • webscriptz 23:09 on 24/09/2009 Permalink | Reply
    Tags: , , , , , project, , register,   

    Register & Yii projects 

    So, I think ti’s time for some updates on the website.

    I has been a bit wild the last 3 weeks. School has started yet again and I had a project to finish not to mention that i’m starting to see through the Yii framework structure. I’ve been writing diagrams for different project that I have in my head too and that takes a lot of time. Besides figuring out how I want the database to be and my database system had schifted, alto mysql is the favorite, a friend encouraged that i take a look to postgresql. Yii has given me a hard time to basically because it’s been a bit of a struggle to change coding methodes in function of Yii and then I don’t start talking about the RBAC system it has build-in. It took every neuron to understand everything form begin to end. Models was also something, Yii has two model types and the active records model is something to understand, I was a bit lost at how I would have to write my own AR functions but thanks to the forums I got that figured out too. All in all everything is good at the moment.

    I’ll be uploading some pictures of the system I wrote recently so you can get some sneaky peaks at it but unfortunately it won’t be open source system.

     
  • webscriptz 23:41 on 09/02/2009 Permalink | Reply
    Tags: ideas, installer, ongoing, part of, , project, script,   

    PHP app installer 

    The last 2 to 3 days I’ve been working on a system that can be easely integrated into any application so that it can install itself on a server. I’ve added some ideas to suit myself, one is that data is installed to 2 databases. One for the users and one for the data of the users.

    Why? Because you can scale a lot easier if parts are in other databases. And it includes some of my projects that I want to start, see Google, users tend to user a website more when they are registerated but what if, like google, I register for Gmail and I can have Google docs with the same account but not the annoying registration? That is what I want to do.

    Great and Free? …..I’m not yet at that stage

    TODO:

    • The things that are left for me to do is basically that I scale everything more
    • Maybe port to smarty all the vars and everything
    • Maybe make a installer creator script for the people who want to implement my script.
    • Do something to the mysql files
    • Make more comments in the code
    • Document the script
     
    • webscriptz 20:40 on 21/02/2009 Permalink | Reply

      I’ve finished a second version which is basically far better and preforms better then the old one.

      Inserted smarty into the system and multiple language support also.

      Forget the docs who needs them anyway? Didn’t really took the time to document it:p

      The database has been scaled down to a single database and the sql files have been scaled down to one file that’s it really. Oh almost forgot this, got some oop in it, not really strong, just one class that does it all.

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel