Skip to content

Instantly share code, notes, and snippets.

View DrMabuse23's full-sized avatar
🏠
Working from home

Pascal Brewing DrMabuse23

🏠
Working from home
View GitHub Profile
<?php echo CHtml::activeDropDownList($model,
'country_id',
CHtml::listData( Countries::model()->findAll(),
'id',
'country' ),
array('prompt'=>'Country')) ?>
MODEL LOCATIONS lokk at cityName
<?php
/**
* This is the model class for table "fz_locations".
*
* The followings are the available columns in table 'fz_locations':
* @property integer $id
config/main.php
'image'=>array(
'class'=>'application.extensions.image.CImageComponent',
// GD or ImageMagick
'driver'=>'GD',
// ImageMagick setup path
// 'params'=>array('directory'=>'/opt/local/bin'),
'params'=>array('directory'=>'/Applications/MAMP/Library'),
),
'clientScript'=>array(
'class' => 'CClientScript',
'coreScriptPosition' => CClientScript::POS_HEAD,
'corePackages' => array(
'jquery'=>array(
'baseUrl'=>null,//unset the defaults
'js'=>null,
'depends'=>array('jquery-1.6.4'),//tell the component that it depends your package
),
),
$yii=realpath(dirname(__FILE__).'/../framework/yii.php');
$config=realpath(dirname(__FILE__).'/../site/protected/config/main.php');
require_once($yii);
Yii::createWebApplication($config);
$as=Yii::app()->assetManager;
$as->setBasePath(realpath(dirname(__FILE__).'/../site/assets/'));
Yii::app()->run();
<?php
/**
* This is the model class for table "wr_user".
*
* The followings are the available columns in table 'wr_user':
* @property integer $id
* @property integer $group_id
* @property integer $password_length
* @property string $username
(function ($)
{
"use strict";
var images = [];
var columns = [];
var collection;
var Container_Drag = {
$itemCollection:[],
init: function ()
var query = '';
var self = this;
var counter = 0;
this.$filterFormStrucure = [];
var add = false;
log(this.$filterFormResult.length,'length');
for(var i = 0,l = structure.length;i < l;i++)
{
_animationOut:function(){
var self = this;
var itemCount = images.length;
var left = this._findLeftElement();
var itemStart = (left.element.index()-1)*2;
if(itemStart < 0)
itemStart = 0;
var itemEnd = itemStart+12;//12 items von links nach rechts
@DrMabuse23
DrMabuse23 / gist:5379614
Created April 13, 2013 18:58
How To use Theme in Yii
//I wil show you 2 Types
/**
* 1.
* in you want put this in your main.php
* this way is for all controllers
*/
return array(
'theme' => NAME of your Folder in www/themes/ example:'bootstrap',