Hello,
I have this code for previous arrow from HTML coder
<img src="<?=$this->webroot?>img/arrow_button_prev.png" alt="Previous Event"
style="opacity:1.0;filter:alpha(opacity=100); " onmouseover="this.style.opacity=0.7;this.filter.alpha.opacity=70"
onmouseout="this.style.opacity=1.0;this.filter.alpha.opacity=100" />
...
This code
$html->link(" »", '/events/view/'.$event['Event']['id']), array('escape'=>false,'class'=>'more') )
Outputs
<a href="/events/view/4"> &raquo;</a>
instead of >>
Any idea?
...
Hi,
I am new to Magento and impressed by the MVC framework that powers it, making module development a well thought out solution. I am strong CakePHP developer.
I am working on a project that uses a dropshipper for the physical products. As a result, every day at 4am a feed needs to be parsed and the products / categories modified, plu...
I've found that loading the same javascript file twice or more (via PHP) can cause errors in IE (such as: line 1 char 1 code 0). This occurs when a webpage is constructed from nested templates - in this case, CakePHP.
Is there a way to include a file only once?
Perhaps, in CakePHP, it can be done by manipulating the $scripts_for_layou...
Reading through the core and looking at nearly all of the helpers/plugins etc. that are available, I notice there are a lot of comments.
CakePHP is structured in such a way that it is very simple to determine where things are and what they are doing. Is it really necessary to comment all of this code? Does it make the source more messy...
Hi,
I have Event HABTM Category with categories_events table.
I want to display only Event with given category_id. So since I have catId I don't need to go till Category model. I could dynamically bind hasMany association from Event to Cat_Event.
How do I set find() second parameter array to achieve this?
Thanks
...
I am new to cakePHP and I am trying to figure out how to create the following relationship:
The employees.manager_id will point to the employees.id of their manager. So, in other words, employee Jason will have a manager of Jill. Jason is employees.id 1 with employees.manager_id 2. Jill is employees.id 2 and employees.manager_id nu...
I want set error validation to input field manually in controller
example:
if ($remainTime < 30) {
..... set error validation in here (error: limitTime ), ( error is not in model )
}
other question: i want to ask :
bindModel ( in this case , I use bindModel in Behaviors ) 'll cause loss of relationship with other model
but...
if $this->Session->setFlash('this is message','flash_error');
only need create flash_error.ctp in elements folder.
Then $this->Session->setFlash('this is message'). How modify it. I dont want modify only css or javascript
...
Hi,
I'm running in a problem with cakephp pagination. Currently, my pagination is rather standard. After x results, it creates a second page. And so on.
What i would like to do is to order them by month. As it is a news archive, I would like to be able to select the month instead of the page.
So instead:
Page 1
Page 2
Page 3
I wou...
Hi,
For a given date field (formatted in sql as: yyyy-mm-dd), I would like to output it as week number.
I tried to work with date() but that didn't really work out.
SQL field: YYYY-MM-DD
Desired output: Week 12 - 2010
Does anyone know how to do this? thanks in advance!!
...
I'm developing a CakePHP 1.3 application which needs to login users backend and frontend.
On the backend, admins and others must login to edit pages and data.
On the frontend, users can login to see "private" pages.
I'm using CakePHP ACL/Auth to login backend users (but i dont'have so clear how it works).
What do you suggest? I was t...
What would you do
- when you feel frustrated that want a simple value like a URL parameter and don't know where to get it?
- tired of searching book.cakephp.org, bakery.cakephp.org or every other sites?
...
I was trying to validate my User model data and I came upon this problem.
Say i have the following validation rules, stored in $validate variable:
var $validate=array(
"username" => array(
"usernameCheckForRegister" => array(
"rule" => ...,
"message" => ...
),
...
I am trying to get the neighbors Ids of the current Id.
What I have below works, but I cannot separate the [prev] from the [next] link.
The function in the controller looks as follows:
function prevNext() {
return $this->System->find('neighbors', array('fields' => 'name', 'value' => 3));
}
Which will output something like this:
...
Hi
I'm using this MeioUpload Behavior. And i installed both phpThumb component and phpThumb vendor.
Thumbnail generation is working fine but zoom-cropping is not.
Here is my code. You can see i've tried every possible variables. I also set every default zc or zoom_crop variables I found in component and vendor to 1. 1 is the same as C ...
If you say TinyMCE, kindly provide example how to configure.
...
I have the $validate variable in my model which contains:
var $validate=array(
"username" => array(
"usernameValid" => array(
"rule" => "__alphaNumericDashUnderscore",
"message" => "The username you entered is not valid!"
)
)
);
The question is: how do I return an error message from the __alphaNumericDashUnderscore...
hi,
this is the code for edit
function edit($id){
if(!empty($this->data)) {
if($this->Article->save($this->data)) {
pr($this->Article);
$this->Session->setFlash("Article Saved!");
$this->redirect('/articles/view');
}
}
else
$this->data = $this->...
I use requestAction with parameter return $this->requestAction (....,array('return');
request action in plugin . plugin render view has $js->submit('Save',array('updade'=>'#fsjkfsj');
but it dont show any javascript when i view source code. I tested with code $js->alert('ksldjflkjs'); but it dont , too
how make requestAction width JS ...