I like the idea of placing the values in a config, but I don't like the idea
of the view helper reading from the config. It may be better for the view
helper to be injected with value early on, like perhaps in a bootstrap
resource (which works naturally with configs).
// in Bootstrap.php
I've used a query parameter to accomplish this. The link to my login page
looks like this:
a href=/login?to=/some/other/pageLogin/a
When the login page is visited, the auth controller checks for the to
parameter and saves it in a session namespace that automatically expires in
5 minutes. When the
this:
/login/referrer/path/to/page
If you change it to use a query string, it should work:
/login?referrer=path/to/page
--
Hector
On Thu, Aug 20, 2009 at 8:41 AM, Enkhbilguun Erdenetsogt
enkhbilg...@beregu.com wrote:
Thank you Hector Virgen, Daniel Latter and kamil for your kind advise
.
greetings,
Benjamin
On Wednesday 19 August 2009 06:50:52 pm Hector Virgen wrote:
Hello,
I am currently working on an older project that is not in ZF, but I'd
like
to use Zend_Db_Select to help me build some complex select queries. I
don't
want to open a new connection to the database since
Hello,
I am currently working on an older project that is not in ZF, but I'd like
to use Zend_Db_Select to help me build some complex select queries. I don't
want to open a new connection to the database since this application already
has one open using good ol' mysql_connect().
My question is,
That's because objects are copied by reference in PHP. Use clone instead:
$firstSelect = clone $baseSelect;
--
Hector
On Wed, Aug 19, 2009 at 1:38 PM, Phillip Winn pwinn...@gmail.com wrote:
I would like to start with a base query and try first one where clause, and
if that fails, another.
petewarn...@gmail.comwrote:
On Tue, Aug 11, 2009 at 11:07 AM, Hector Virgen djvir...@gmail.comwrote:
I am building a form that uses the multiCheckbox form element. I need to
add class names to specific checkboxes for javascript purposes. Is there a
way to do that?
--
Hector
Why
I've done this before by using .htaccess and a separate index file for the
ZF portion of the website.
Basically it works like this:
Generally, all pages are routed to index.php in your original application
(or maybe visitors hit the pages directly, like signup.php and login.php).
So the idea is
You need to pass your custom view to the layout:
protected function _initLayout()
{
$view = $this-getResource('view');
$layout = Zend_Layout::getMvcInstance();
$layout-setView($view);
}
--
Hector
On Thu, Aug 13, 2009 at 3:35 PM, Steven Szymczak sc.szymc...@googlemail.com
wrote:
It looks like you're missing an apache setting. In order for the routing to
work, you must have .htaccess file in your public folder (which Zend_Tool
provides) *and* you have to allow that directory to use .htaccess files in
your apache config.
Add this to your apache config and restart apache:
/Bootstrap.php on line 63
For some reason, Zend_Layout::getMvcInstance() isn't returning an object.
Hector Virgen wrote:
You need to pass your custom view to the layout:
protected function _initLayout()
{
$view = $this-getResource('view');
$layout = Zend_Layout::getMvcInstance();
$layout
Actually, looks like Zend_Layout has its own setViewSuffix method.
$layout-setViewSuffix('html');
--
Hector
2009/8/13 Steven Szymczak sc.szymc...@googlemail.com
It's still not picking up on the suffix (still wants 'phtml').
Hector Virgen wrote:
Oops, you need to call Zend_Layout::startMvc
Hello,
I am building a form that uses the multiCheckbox form element. I need to add
class names to specific checkboxes for javascript purposes. Is there a way
to do that?
I tried this, but it ended up adding the class name foo to all of the
checkboxes:
$this-addElement('multiCheckbox',
There are a couple ways to store the config. In the past I've stored it in
Zend_Registry, which can be pulled out later at any time:
// in bootstrap
Zend_Registry::set('config', $config);
// in controller
$config = Zend_Registry::get('config');
Another option is to store it directly in the front
Do you need it to be invisible but submitted with the post data? Try making
it a hidden input field:
$this-addElement('hidden', 'myfield', array(/* ... */));
Or you can remove the element completely if you don't need it to be
submitted:
$form = new MyForm();
$form-removeElement('myfield');
Or,
One of the only issues I ran into when upgrading from 1.7.x to 1.8.2 was the
deprecated autoloader (deprecated in 1.8).
// Old code
Zend_Loader::registerAutoloader();
// New code
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader-setFallbackAutoloader(true);
Other than that, I ran
You may want to try suppressing the warnings:
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader-supressNotFoundWarnings(true);
--
Hector
On Tue, Aug 4, 2009 at 9:01 AM, Luiz Vitor prowler...@gmail.com wrote:
I apologize for sending this message again, but does anyone know how
You need to use the value of the select option, not the label. So your $data
array should look like this:
$data = array(
'id' = $row-GetId(),
'machinetype'= 3,
'name' = $row-getName(),
'descr' = $row-getDescr()
);
It may be better to extend Zend_Validate_Db_NoRecordExists to create your
own UniqueUsername validator. This would allow you to pre-define the
table/field properties and add a new method like setCurrentUsername(). The
validator could then check if the username had been changed and, if so,
query
I think you're missing a forward slash:
resources.session.save_path = APPLICATION_PATH /../data/session/
I'd also double-check that the folder is writable by php/apache.
--
Hector
On Fri, Jul 31, 2009 at 8:34 AM, Lucas Corbeaux lucas.corbe...@gmail.comwrote:
Hi there,
I have a strange
Hello,
I am having some trouble with Zend_Form and display groups (ZF 1.8.2). I
want to add an existing form element to an existing display group within the
same form, but when I call $displayGroup-addElement($element), the element
is re-added to the form, causing it to be rendered twice (once in
You can pass in a disable option when you create the element. It accepts
an array of radio IDs to disable, or true to disable them all.
$form-addElement('radio', 'foo', array(
'multiOptions' = array(
1 = 'one',
2 = 'two',
3 = 'three'
),
'disable' = array(3) // disables only radio 3
));
--
Hector
that already exists. I am trying
to alter it after it has already created but the 'disable' option doesn't
appear to help me in this case. I might just remove the option instead and
leave a message indicating the fact.
Thanks though,
Chris
Hector Virgen wrote:
You can pass in a disable option when
enough to know if the element already belongs to the form, but the
workaround above isn't too bad.
--
Hector
On Thu, Jul 30, 2009 at 1:03 PM, Colin Guthrie gm...@colin.guthr.ie wrote:
'Twas brillig, and Hector Virgen at 30/07/09 18:56 did gyre and gimble:
Hello,
I am having some trouble
in the values, but they
are rendered on the page.
Any ideas what might be going on?
--
Hector
Sent from Temecula, California, United States
On Thu, Jul 30, 2009 at 1:19 PM, Hector Virgen djvir...@gmail.com wrote:
Thanks, Colin.
After some tinkering I ended up doing something similar to your
://framework.zend.com/issues/browse/ZF-3496
http://framework.zend.com/issues/browse/ZF-3496Thanks for your help,
Colin. :)
--
Hector
Sent from Temecula, California, United States
On Thu, Jul 30, 2009 at 2:55 PM, Colin Guthrie gm...@colin.guthr.ie wrote:
'Twas brillig, and Hector Virgen at 30/07
Zend_Form uses the view from the action controller's view renderer by
default.
Forgot to send to list :)
--
If you're using the new Zend_Application, you can add this line to your
application.ini:
resources.view.encoding = ISO-8859-1
Or, you can manually set the view early in your application:
Do you need multiple text inputs that post as an array? You could create a
multiText form element that extends Zend_Form_Element_Multi. Take a look
at Zend_Form_Element_MultiRadio to see how it works.
Yesterday I had to create a series of checkboxes that were built to look
like a navigation tree
I believe the front controller has a reference to the bootstrap in its
params:
$bootstrap = Zend_Controller_Front::getInstance()-getParam('bootstrap');
--
Hector
On Wed, Jul 29, 2009 at 1:28 PM, B. Kamer p...@bushbaby.nl wrote:
Hi,
I am unsure if and how I can get an instance to a
Try registering your actual App_User and App_GameSheet objects with your ACL
instead of generic role/resource objects.
Change this:
$acl-addRole(new Zend_Acl_Role('editor'));
$acl-add(new Zend_Acl_Resource('App_GameSheet');
to this:
$acl-addRole(new App_User());
$acl-add(new App_GameSheet());
I think it would make more sense to remove old paths from the stack rather
than push the stack with duplicates.
Maybe it would be better if each module had its own view script stack? That
way they wouldn't interfere with each other at all.
-Hector
On Thu, Nov 13, 2008 at 10:11 AM, Arthur M.
I am using the 1.6.2 branch of ZF, and I'm having trouble using
Zend_Dom_Query with a simple XML file. I have followed the example from
http://framework.zend.com/manual/en/zend.dom.query.html#zend.dom.query.methods.zenddomquerybut
it doesn't seem to be working for me. Am I doing something wrong?
I just tried the same thing with Zend_Dom_Query::queryXpath(), and I got the
same results:
$listings = $dom-queryXpath('/Manifest/Listings/ListingDocument');
Maybe there is something wrong with my XML?
-Hector
On Mon, Nov 10, 2008 at 8:53 PM, Hector Virgen [EMAIL PROTECTED] wrote:
I am using
What should the array of stop words be set up like when being passed to
Zend_Search_Lucene_Analysis_TokenFilter_StopWords?
The online manual says to use an array like this:
$stopWords = array('a', 'an', 'at', 'the', 'and', 'or', 'is', 'am');
Thanks for the update! I have been using -f, which tests if a file exists,
but I see now that using -s is better because it ensures the file
exists andhas a filesize greater than zero.
-Hector
On Wed, Sep 10, 2008 at 11:30 AM, Matthew Weier O'Phinney
[EMAIL PROTECTED]wrote:
Greets --
A number
This is a good idea and I think you've covered all of the issues I've
had with Zend_Feed, particularly with reading Slashdot's RSS feed (which
I still have not been able to do).
I like your caching idea. I'd like to be able to set a default cache as
a static property (similar to
401 - 436 of 436 matches
Mail list logo