Re: [fw-general] One simple problem tooks me 2 hour- hope it will help someone..

2008-09-12 Thread vladimirn

Now i have similar(or not) issue.
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
message 'Plugin by name LoggedInUser was not found in the registry.

I have in application/views/helpers/ file LoggedInUser.php

?php
class Zend_View_Helper_LoggedInUser
{
protected $_view;
function setView($view) 
{ 
$this-_view = $view; 
} 
function loggedInUser()
{
$auth = Zend_Auth::getInstance();
if($auth-hasIdentity()) 
{
$logoutUrl = $this-_view-linkTo('login/logout');
$user = $auth-getIdentity(); 

$username = $this-_view-escape(ucfirst($user));
$string = 'Welcome ' . $username . ' |  ' .
$logoutUrl . ' Log out ';
} else {
//$loginUrl = $this-_view-linkTo('auth/identify'); #4
//$string = ' '. $loginUrl . ' Log in '; #5
}if (isset($user)) {
return $string;}
}
}

In my layout i am trying to do next:
?php if (!$this-loggedInUser()):?
div id=header.

In bootstrap file i have:
$base  = realpath(dirname(__FILE__) . '/../');
$paths = array(
'.', 
$base . '/library',
$base . '/application',
$base . '/application/forms',
$base . '/application/models',
);
ini_set('include_path', implode(PATH_SEPARATOR, $paths));

I would like to say that i already read similar topic here, but didnt helped
me.

Thank you very much,
Vladimir

-- 
View this message in context: 
http://www.nabble.com/One-simple-problem-tooks-me-2-hour--hope-it-will-help-someone..-tp19445706p19460458.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] One simple problem tooks me 2 hour- hope it will help someone..

2008-09-12 Thread Terre Porter

I don't see a reference to a helper path for the view to use.

Something like : $this-_view-addHelperPath('path-to-helpers-dir'); 

Hope it helps

Terre


-Original Message-
From: vladimirn [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 12, 2008 1:19 PM
To: fw-general@lists.zend.com
Subject: Re: [fw-general] One simple problem tooks me 2 hour- hope it will
help someone..


Now i have similar(or not) issue.
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
message 'Plugin by name LoggedInUser was not found in the registry.

I have in application/views/helpers/ file LoggedInUser.php

?php
class Zend_View_Helper_LoggedInUser
{
protected $_view;
function setView($view)
{
$this-_view = $view;
}
function loggedInUser()
{
$auth = Zend_Auth::getInstance();
if($auth-hasIdentity())
{
$logoutUrl = $this-_view-linkTo('login/logout');
$user = $auth-getIdentity(); 

$username = $this-_view-escape(ucfirst($user));
$string = 'Welcome ' . $username . ' |  ' .
$logoutUrl . ' Log out ';
} else {
//$loginUrl = $this-_view-linkTo('auth/identify'); #4 //$string = ' '.
$loginUrl . ' Log in '; #5 }if (isset($user)) { return $string;} } }

In my layout i am trying to do next:
?php if (!$this-loggedInUser()):?
div id=header.

In bootstrap file i have:
$base  = realpath(dirname(__FILE__) . '/../'); $paths = array(
'.', 
$base . '/library',
$base . '/application',
$base . '/application/forms',
$base . '/application/models',
);
ini_set('include_path', implode(PATH_SEPARATOR, $paths));

I would like to say that i already read similar topic here, but didnt helped
me.

Thank you very much,
Vladimir

--
View this message in context:
http://www.nabble.com/One-simple-problem-tooks-me-2-hour--hope-it-will-help-
someone..-tp19445706p19460458.html
Sent from the Zend Framework mailing list archive at Nabble.com.




RE: [fw-general] One simple problem tooks me 2 hour- hope it will help someone..

2008-09-12 Thread vladimirn



vRandom wrote:
 
 
 I don't see a reference to a helper path for the view to use.
 
 Something like : $this-_view-addHelperPath('path-to-helpers-dir'); 
 
 Hope it helps
 
 Terre
 
 
 


Thanks Terre :)
-- 
View this message in context: 
http://www.nabble.com/One-simple-problem-tooks-me-2-hour--hope-it-will-help-someone..-tp19445706p19462333.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] One simple problem tooks me 2 hour- hope it will help someone..

2008-09-11 Thread Matthew Weier O'Phinney
-- vladimirn [EMAIL PROTECTED] wrote
(on Thursday, 11 September 2008, 03:02 PM -0700):
 
 I am windows user.
 So i had in my signupForm:
 -addElement ( 'MultiSelect', 'promotion', 
 
 everything works fine on my computer (windows vista) and when i uploaded
 file on the web server(linux) i got error message that Plugin MultiSelect
 wasnt found
 
 After two hours of updating library from zend framewrok, and headache, i
 found that
 -addElement ( 'multiselect', 'promotion', ... is working.
 All cases had to be lowered.

Not quite. It's more a case of case matters. Plugins are passed to
ucfirst(), and then passed as is to the plugin loader. Both
Multiselect and multiselect will work here, but not multiSelect or
MultiSelect. On the flip side, you want to use MultiCheckbox or
multiCheckbox, but not Multicheckbox or multicheckbox. 

The only character where case does not matter is the first character;
all other characters in the plugin name are case sensitive.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/