Hi,
I'm trying to add Zend_Form_Elements following the radio buttons in my form, but so far I have been unable to do so. If anyone could point me in the right direction it would be greatly appreciated. Form needs to be rendered as shown below:
(*) [____]%
( ) [____]€
( ) [___] for [___]
...
I'm currently using a Zend Controller Plugin to check authentication. The following probably looks familiar:
class SF_Plugin_Member_Auth extends Zend_Controller_Plugin_Abstract {
public function preDispatch(Zend_Controller_Request_Abstract $request) {
if (!SF_Auth::getInstance('Member')->hasIdentity()) {
if ($r...
I'm having a difficult time understanding how Zend_Session_Namespace is integrated with Zend_Auth. I have this method I'm using as the action to Authenticate my login page-it is working correctly and redirecting to the /monthly view:
public function authAction(){
$request = $this->getRequest();
$registry = Zend_Registry::...
i seen from here 2 ways to redirect from a controller plugin ... i wonder which is more efficient. i am wondering in the 2nd method, it maybe slower because the response is created? what happens in the 1st method tho? it will redirect immediately?
$request->setModuleName('default')
->setControllerName('search')
->setAct...
i am creating a acl controller plugin that checks the if the user is authorized to the resource and redirect to the error controller to handle it. how do i go abt doing this?
...
i am not sure if calling setRedirect from the resource object is the best way. but i wonder why this does not seem to do anything. i have this in a predispatch controller plugin
function preDispatch(Zend_Controller_Request_Abstract $req) {
...
if (!$acl->isAllowed($role, $resource, $privilege)) {
...
$res = $t...
Hi,
I developed a application with Zend Framework and now I want to be able to place the app in an subdirectory of a Documentroot.
e.g. http://www.example.com/myapp/
I read quite a lot of Docu how this could work, but all in all these solutions don´t fit my needs. Is there a trivial way to do the subdir thing, without adding the concre...
I am using Zend_Auth for authentication in a web portal.
A normal mySQL "users" table with a login and password column gets queried against, and a user logged in.
However, I have two additional groups of users that I want to authenticate. All three of these user groups have their logon data in other tables. Their data is coming from ex...
I'm using Zend framework and trying to get the results to be in a random order. This returns the results but doesn't seem to vary the order. Any ideas?
class Model_DBTable_Tblquotes extends Zend_Db_Table
{
public function getQuotes()
{
$select = $this->select();
$select->setIntegrityCheck(false)
->from(...
Hello all,
My current application is not based on Zend Framework and it is based on regular PHP script without a specific framework.
Now, I do need to use the zend lucene function and incorporate into my application.
Is there a good starting tutorial/book that I easily follow? It looks like the learning curve to Zend Framework is high...
i am using Zend Framework Zend_Acl i am wanting to throw an exception when the user is denied access to a resource. which exception class do i use?
...
after starting with zend framework for sometime, i started to think which classes shld be put where, in the /library or /application?
i think that reusable classes shld go to /library and application specific to /application? am i correct?
1 thing that i find more troublesome when using /application is that its not in the include pat...
Hi all,
I am rather new to ZendFramework and am trying to figure this out. In my view script (index.phtml), I have this bit of code that says:
<?php
function getErrorString($element)
{
echo "<pre>";
print_r($this);
echo "</pre>";
$string = '';
if(!empty($this->error[$element]))
{
$string = $string.'<label class="error" for="'.$e...
Is there any good solution for the following requirement:
An Form with one field for the zip code and default validators like (number, length 4..).
After submit, the form is checked against an database.
If the zip code is not unique we have to ask for an city.
Examples
Case 1: Submited zip code is unique in database : everything o...
I have usual url, where params and values are separated by /
And i have this url piece
word//show-count/1
On my local machine zend retrieves
word = ''
show-count = '1'
On test-machine it retrieves
word = 'show\-count'
Why it happens and who is guilty. I think, that problem is in ignoring double //
...
how do i set up routing as follows
these work with the standard routing
/posts => index action (listing)
/posts/view => view action (individual post)
/posts/add => add action
/posts/edit => edit action
what abt these?
/posts can by filtered based on 1 or more query strings, in any order. eg.
/posts/t...
I just moved my ZF application from one server to another, and everything is loading smoothly, except for forms. It just throws this error:
Fatal error: Class 'Admin_Form_Cms_AddForm' not found in /xx/application/modules/admin/controllers/CmsController.php on line 42
The modules, models, controllers are loaded as they should be, but n...
Hey,
I got two forms and they share some ids as two input fields are called 'title'.
Zend generates me a nice output like this:
<dl class="zend-form">
<dt id="title-label">
<label for="form1-title" class="required">Description</label>
</dt>
<dd id="title-element">
<input name="form1[title]" id="form1-title" value="..." t...
Hello
I'm fairly new to Zend Framework and MVC in general so I'm looking for some advice. We have a base controller class in which we have some methods to obtain some user information, account configurations, etc.
So I'm using some of those methods to write out code in various controllers actions, but now I want to avoid duplicating th...
I just found and installed Zend Framework CE to test my web sites. I've used Apache before but this seems to be a great deal more gui and automated. My question is how do I change the Apache C:/Program Files (x86))/Zend/Apache2/htdocs/ with Zend Framework? Is there a way to do it and have it update everywhere it needs to?
also, I'm pl...