Displaying 191-200 of 276 results.
Resolved: Yii CListView unique id attribute div
posted by admin on March 30, 2016

<?php
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>


I want to edit and change id of parent divRead more
Resolved: Yii - Modifing html generated by CListView by default
posted by admin on March 30, 2016
I want to change generated HTML by CListView to ul li construction.
This is my CListView

<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>
Read more
Resolved: Yii get value from url GET name
posted by admin on March 30, 2016
I'd like to know if there is an Yii function to get a value from url. The url that I have is:

http://www.domain.com/index.php/module/controller/update/id/111

I need to get the value '111' before it gets to the update action, is there an Yii method to do it?Read more
Resolved: Yii CListView itemView from another directory
posted by admin on March 30, 2016
In controller

$dataProvider = new CActiveDataProvider('Media');
$this->render('index',array(
'dataProvider'=>$dataProvider,
));


In View index.php

<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
)); ?>


I want to pass $dataProvider to another file in another directory.
For example I want to call the file post/_view.phpRead more
Resolved: Yii Readonly Field in CActiveForm form textField
posted by admin on March 30, 2016
My row in _form.php

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'user-form',
// Please note: When you enable ajax validation, make sure the corresponding
// controller action is handling ajax validation correctly.
// There is a call to performAjaxValidation() commented in generated controller code.
// See class documentation of CActiveForm for details on this.
'enableAjaxValidation'=>true,
)); ?>

<p class="note">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>
. . .
<div class="row">
<?php echo $form->labelEx($model,'username'); ?>
<?php echo $form->textField($model,'username',array('size'=>50,'maxlength'=>50)); ?>
<?php echo $form->error($model,'username'); ?>
</div>
. . .
<div class="row buttons">
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
</div>

<?php $this->endWidget(); ?>

</div><!-- form -->


I want to make my username readonlyRead more
Resolved: PHP trim my strings in array
posted by admin on March 27, 2016
I have array, and I want to trim my array elements
My array

$arr = array(" one", " two", " three ", ..., etc);
Read more
Resolved: PHP remove empty strings from array
posted by admin on March 27, 2016
I have array

$arr = array("one", "two", "", "four");


I want to remove empty string from array with indexRead more
Resolved: PHP Compose array from string, by comma and space
posted by admin on March 27, 2016
I have hashtags, and I want to compose array from my hashtags string. My hashtags format is

one, two, three, four, five, six, 0909090, ... etc
Read more
Resolved: PHP Regex Remove special chars, symbols from string, allow only comma and space
posted by admin on March 27, 2016
I have tags on my blog.
Tags format, which user write is like

one, two, three, four, five, six, seven, 11887, ... etc


I want to protect my tags, and exclude situations like

#asdad, asdsad#adsd, ***m,
Read more
Wiki: Using font-face cross browser. Синтаксис Fontspringwiki
posted by admin on March 25, 2016

@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?') format('eot'), /* IE9 Compat Modes */
url('myfont-webfont.woff') format('woff'), /* Pretty Modern Browsers */
url('myfont-webfont.ttf') format('truetype'), /* Safari, Android, iOS */Присылайте
url('myfont-webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
Read more