Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 41-50 of 182 result(s).

Hyphenation of routes in URL management

Created 7 months ago by qiangHow-tos4 comments – viewed 6,325 times – ( +15 )
In this article, we introduce an approach that allows automatic hyphenation of the route part in URLs.
tags: URL

Run Yiic directly from your app without a shell

Created about a year ago by jacmoeHow-tos5 comments – viewed 11,142 times – ( +15 )
Sometimes it would be nice if we could run yiic from an action, for example a migrate database button in our admin panel. Or because you are on a host which doesn't have shell access. Or maybe you are not allowed run popen or exec.

How to use PHPExcel external library with Yii

Created 2 years ago by Antonio RamirezHow-tos12 comments – viewed 34,417 times – ( +22 / -1 )
Trying to learn and help some other programmers to find their solutions on the Yii Forum (I think is a superb way to learn the framework), I was facing one challenge with an external library that a fellow programmer wanted to use -quite good indeed: PHPExcel. And what is PHPExcel?
tags: yii, libraries

Moving project code outside of webroot (plus multiple project support)

Created 2 years ago by Steve FriedlHow-tos5 comments – viewed 24,257 times – ( +22 / -1 )
Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).
tags: config, security

AssetManager: clearing browser's cache on site update

Created about a year ago by dhampikHow-tos2 comments – viewed 12,183 times – ( +14 )
If you like the things to be short and clear, then you can skip right to a short summary of instructions at the end of this article.

How to avoid multiple Ajax Request

Created 2 years ago by nickcvHow-tos12 comments – viewed 19,317 times – ( +14 )
CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs: the sent ajax requests will multiply themselves.

How to log and debug variables using CWebLogRoute

Created 2 years ago by Antonio RamirezHow-tos4 comments – viewed 28,724 times – ( +13 )
I have seen a couple of articles about how to integrate external libraries to debug our PHP code (i.e. firePHP) but after you read this article you will realize that there is no need for such libraries when using Yii.
tags: Logging

URL management for Websites with secure and nonsecure pages

Created 7 months ago by qiangHow-tos3 comments – viewed 6,443 times – ( +13 )
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
tags: URL

Using Bootstrap with LESS

Created 3 months ago by Chris83How-tos1 comment – viewed 10,610 times – ( +13 )
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular bootstrap extension. Now that the extension is quite widely used in the community I felt that it was time to write about how to use Bootstrap to its full potential. If you use the Bootstrap CSS files you're really missing out on some great features. After reading this article you'll be able to take full advantage of Bootstrap using LESS.

Creating a CSS Driven Drop Down Menu using CMenu

Created about a year ago by blindMoeHow-tos7 comments – viewed 36,321 times – ( +19 / -1 )
CMenu offers great functionality and the ability to customize just about every aspect of the output. There are many times when I need to create a drop down menu or simply modify the look to make the designers happy. Because this seems to be a common task for me, I figured I would share my code to create a very simple drop down menu that other people could use.