Im trying to convert this script, in my Zend program.
http://github.com/jackmoore/colorrating/raw/master/rating/rating.php
<?php
class rating{
public $average = 0;
public $votes;
public $status;
public $table;
private $path;
function __construct($table){
try{
$pathinfo = pathinfo(__FILE__);
$this->path = realpath($pathi...
I use Zend_Mail component in my application for sending mails via SMTP protocol.
And I want to persist my messages to files when I'm in development environment(accordingly to application.ini).
How can I detect in my controller action whether it is development or production/staging environment?
...
So I built a site template using Zend_Tool and added these parameters to the application.ini
resources.session.saveHandler.class = "Zend_Session_SaveHandler_DbTable"
resources.session.saveHandler.options.name = "session"
resources.session.saveHandler.options.primary.session_id = "session_id"
resources.session.saveHandler.options.primary...
Friends.
I put together a site with Zend_Acl and Zend_Auth and works perfect.
The problem comes when I enter a page is not permitted and the site returns to the index page, here are the urls that armed with the helper url zend framework are changed.
url(array('module' => 'moduno', 'controller' => 'index', 'action' => 'index'));?>">modun...
hello all,
im new in dojo please how do i construct an XhrPost request in zend?
thanks.
...
Ok so Ive got this Javascript file, simply:
$(document).ready(function() {
$('.status').prepend("<div class='score_this'>(<a href='#'>score this item</a>)</div>");
$('.score_this').click(function(){
$(this).slideUp();
return false;
});
$('.score a').click(function() {
$(this).parent().parent().pa...
I have set the form decorators in this way:
<?php
$this->setElementDecorators(array(
'Label',
array(array('labelTd' => 'HtmlTag'), array('tag' => 'td', 'class' => 'name')),
array(array('elemTdOpen' => 'HtmlTag'), array('tag' => 'td', 'class' => 'form','openOnly' => true, 'placement' => '...
I need to change the output of Zend_View_Helper_Navigation_Menu. I've found the two functions that I'll need to modify, and I know how to make the changes I need. What I don't know is how to make the Navigation object use my view helper instead of the Zend one.
Code snippet representing my class extension:
// file /library/My/View/He...
I'm trying to cache the user timeline of a Twitter feed using Zend_Service_Twitter which returns its results as a SimpleXML object. Unfortunately the regular serialize functions (which Zend Cache uses) don't play nice with SimpleXMl objects. I found this http://www.mail-archive.com/[email protected]/msg18133.html.
So it looks l...
Hello,
How could I set up custom DB adapter (I will use simple DBSimple) and then use it inside of my model? I don't want to extend my model with Zend_Db_Table, it seems pretty useless for me at the moment.
Sorry for question, but I'm real noob in ZF.
Thank you
...
Okay, so we have this site that we took over from a previous firm...PHP, Zend Framework, MySQL etc.
It's an interesting site in that they utilize a CMS that's external (they manage some data like forums, user subscription, etc.)
So there's a library that communicates via web service calls from PHP to the CMS, and then from JavaScript i...
We have got an extjs 3.1.1 form with file upload field (http://www.extjs.com/deploy/dev/examples/form/file-upload.html from here, the latest). After successful submission the reply is {"success":true} with application/json content type.
We use Zend Framework as backend, json is generated with json helper.
This works like a charm in fire...
I'm going to try and distill what's happening down to as little as possible, but still give you all the relevant code. It shouldn't make a difference, but I'm using the Zend Framework. This code executes if the user is not logged in, it fires in a PreDispatch controller plugin:
Zend_Loader::loadClass('Users');
$users = new Users(Zend_...
I don't have any concept about ZF safety. Do I have to use Filter when operating on database? Maybe binding is enough ? How about this:
$users->update($data, 'id=1');
Should $data array be filtered somehow ? Feel free to write anything you know about the issue.
Could you give some links to good articles about safety in ZF (mainly abo...
I have made a default form using Zend Framework which is working well. i need to use any kind of ajax in the form may be dojo which comes with Zend. I dono how to use these form elements and how to call them. like when i click on a radio button called yes,open an textbox or change data.
any example ?
...
Hello,
ATM I set the currency and locale objects in the bootstrap and assign them to zend registry.
Then in the controller that needs them, In the init I do:
public function Init() {
$this->locale = Zend_Registry::get('locale');
$this->currency = Zend_Registry::get('currency');
}
I was wondering if there's away to make v...
You guys know in Pastebin how according to the selected language, the code is colored?
Is there a control I can use on my site? I'm using PHP and Zend Framework.
Edit:
I was thinking something along the lines of:
CodeControl mycontrol = new CodeControl(sourcecode.txt, 'c#');
or
CodeControl mycontrol = new CodeControl(sourcecode.txt...
I want to modify a view from Action Helper in Zend Framework in preDispatch() method.
So I do something like:
class MyHelper extends Zend_Controller_Action_Helper_Abstract {
public function preDispatch() {
$view = $this->getActionController()->view;
$view->doSomething();
}
}
Is it OK to do so? What I want to do...
it's all in index.php
/* Define site root */
defined('DOCUMENT_ROOT') ? null : define('DOCUMENT_ROOT',realpath(dirname(__FILE__)));
defined('SITE_ROOT') ? null : define('SITE_ROOT',realpath(dirname(DOCUMENT_ROOT.'../')));
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', SITE_ROOT . ...
fopen(C:/xampp/htdocs/adv/application/views\helpers/Layout.php) how to fix this path?
And why does ZF is searching for bundled helpers in this folder and not in zend library folder?
By the way, here path is fine, but still searching in wrong folder
fopen(C:/xampp/htdocs/adv/application/controllers/helpers/ViewRenderer.php)
...