[fw-general] How to implement .remove() in ajaxLink()

2010-04-05 Thread Enkhbilguun Erdenetsogt
Hello,

I'm creating 'Edit/Delete this article' link above per article with jQuery
Ajax. Then I started from Delete link with $this->ajaxLink() in my view
script because I thought it's simplest action. Link is being created without
any problem. Even that link removes the article from db and clears the
article content from browser view. However, article container "" is still in place until I refresh the browser
manually.

Like:
ajaxLink("Delete", "/article/delete/id/".$id,
array('update' =>
'#about-item-'.$id',
  'beforeSend' =>
'hide',
  'complete' =>
'remove()', // i'm not sure here
  'noscript' => false,
  'method' => 'post'))
?>

Is it possible to implement manipulation functions of jQuery such as
.remove("#id"), .replaceWith() from ZendX_JQuery?



Any advise will be greatly appreciated..

Thank you very much in advance.




---
Sincerely,
Enkhbilguun Erdenetsogt


Re: [fw-general] how to implement WYSIWYG editor on zend framework

2010-02-25 Thread Fred Jiles
ckeditor allows you to do a replace by class.  So you can use a
zend_form_element_textarea and then set the class to wysiwyg or whatever. Or
if you have one on the page just use

CKEDITOR.replace('put for element name here'),{

width: "500",
height: "500"

});

inside script tags.

There is nothing specific I am aware of to Zend Framework.

Fred

On Thu, Feb 25, 2010 at 12:01 PM, ulduz114  wrote:

>
> hi to all
>
> anyone may explain with details how to implements a WYSIWYG editor like
> (tinymce or ckeditor,...) on zend framework ?
> --
> View this message in context:
> http://n4.nabble.com/how-to-implement-WYSIWYG-editor-on-zend-framework-tp1569326p1569326.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>


[fw-general] how to implement WYSIWYG editor on zend framework

2010-02-25 Thread ulduz114

hi to all

anyone may explain with details how to implements a WYSIWYG editor like
(tinymce or ckeditor,...) on zend framework ?
-- 
View this message in context: 
http://n4.nabble.com/how-to-implement-WYSIWYG-editor-on-zend-framework-tp1569326p1569326.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] how to implement wysiwygPro into Zend Framework

2008-06-10 Thread etopian

Ok I fixed it. The include line needs to be inside the class with a normal
path reference. 



etopian wrote:
> 
> Hi,
> 
> I'm trying to get wysiwygPro to work inside a Zend Framework application.
> So far I've written a view helper, which correctly calls the wysiwygPro
> class, but will not display the editor. This has probably got to do
> something with the WPRO_EDITOR_URL or the editorURL. The directory
> structure used is as follows:
> 
> application
> library
> wysiwygPro
> Zend
> views
> helpers
> Editor.php
> www
> index.php
> 
> 
> Did anyone else successfully implement a wysiwygPro editor in Zend
> Framework? Or can anyone tell me how to get it working?
> 
> Thanks!
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-implement-wysiwygPro-into-Zend-Framework-tp17529965p17752135.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] how to implement wysiwygPro into Zend Framework

2008-06-10 Thread etopian

After discussing this with the creators of the editor, a partial conclusion
is that because of the structure of the editor, the files can not be inside
the application, but have to reside in the public folders. So I moved the
wysiwygPro folder to:

application
library
Zend
views
helpers
Editor.php
www
_editor
wysiwygPro
index.php


However, calling the:

   require_once('../editor/wysiwygPro/wysiwygPro.class.php') ;

Will generate an error.

Can anyone tell me how I can include the class file that is outside the
application? It is called from:

application
library
Zend
views
helpers
Editor.php



etopian wrote:
> 
> Ok, I've got a little further with this, so here's more details on the
> question.
> 
> I've created a View Helper called Editor, this should create the editor
> when calling the helper. What I run into now is that the framework router
> catches the call to the editor and gives an error message:
> 
> "Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message
> 'Invalid controller specified (www) in
> /home/7373-61/etopiademo.nl/application/library/Zend/Controller/Dispatcher/Standard.php:249"
> 
> And this is the code for the helper:
> 
>  
>   require_once('library/wysiwygPro/wysiwygPro.class.php') ;
> 
> 
>   class Zend_View_Helper_Editor {
>   public function Editor($instance = 'content', $value='Enter 
> text here',
> $height= 600, $width=600){
>   $view=$this->view;
>   
>   $editor = new wysiwygPro();
>   
>   $editor->editorURL =
> '/www/etopiademo.nl/HTML/application/library/wysiwygPro/';
>   
>   $editor->loadPlugins(array('tagPath', 'eConfig'));
>   
>   $editor->name   = $instance; 
>   $editor->width  = $width;
>   $editor->height = $height;
>   $editor->value  = $value;
>   
>   $editor->display();
>   
>   }
> 
> public function setview(Zend_view_Interface $view){
> $this->view = $view;
> return $this;
> }
> 
>   
>   }
> 
> 
> Can anyone tell me what needs to be done to get this working? Do I have to
> add  a rule to the .htaccess?
> 
> 
> 
> 
> etopian wrote:
>> 
>> Hi,
>> 
>> I'm trying to get wysiwygPro to work inside a Zend Framework application.
>> So far I've written a view helper, which correctly calls the wysiwygPro
>> class, but will not display the editor. This has probably got to do
>> something with the WPRO_EDITOR_URL or the editorURL. The directory
>> structure used is as follows:
>> 
>> application
>> library
>> wysiwygPro
>> Zend
>> views
>> helpers
>> Editor.php
>> www
>> index.php
>> 
>> 
>> Did anyone else successfully implement a wysiwygPro editor in Zend
>> Framework? Or can anyone tell me how to get it working?
>> 
>> Thanks!
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-implement-wysiwygPro-into-Zend-Framework-tp17529965p17751126.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] how to implement wysiwygPro into Zend Framework

2008-06-05 Thread etopian

Ok, I've got a little further with this, so here's more details on the
question.

I've created a View Helper called Editor, this should create the editor when
calling the helper. What I run into now is that the framework router catches
the call to the editor and gives an error message:

"Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message
'Invalid controller specified (www) in
/home/7373-61/etopiademo.nl/application/library/Zend/Controller/Dispatcher/Standard.php:249"

And this is the code for the helper:

view;

$editor = new wysiwygPro();

$editor->editorURL =
'/www/etopiademo.nl/HTML/application/library/wysiwygPro/';

$editor->loadPlugins(array('tagPath', 'eConfig'));

$editor->name   = $instance; 
$editor->width  = $width;
$editor->height = $height;
$editor->value  = $value;

$editor->display();

}

public function setview(Zend_view_Interface $view){
$this->view = $view;
return $this;
}


}


Can anyone tell me what needs to be done to get this working? Do I have to
add  a rule to the .htaccess?




etopian wrote:
> 
> Hi,
> 
> I'm trying to get wysiwygPro to work inside a Zend Framework application.
> So far I've written a view helper, which correctly calls the wysiwygPro
> class, but will not display the editor. This has probably got to do
> something with the WPRO_EDITOR_URL or the editorURL. The directory
> structure used is as follows:
> 
> application
> library
> wysiwygPro
> Zend
> views
> helpers
> Editor.php
> www
> index.php
> 
> 
> Did anyone else successfully implement a wysiwygPro editor in Zend
> Framework? Or can anyone tell me how to get it working?
> 
> Thanks!
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-implement-wysiwygPro-into-Zend-Framework-tp17529965p17666468.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] how to implement wysiwygPro into Zend Framework

2008-05-29 Thread etopian

Hi,

I'm trying to get wysiwygPro to work inside a Zend Framework application. So
far I've written a view helper, which correctly calls the wysiwygPro class,
but will not display the editor. This has probably got to do something with
the WPRO_EDITOR_URL or the editorURL. The directory structure used is as
follows:

application
library
wysiwygPro
Zend
views
helpers
Editor.php
www
index.php


Did anyone else successfully implement a wysiwygPro editor in Zend
Framework? Or can anyone tell me how to get it working?

Thanks!


-- 
View this message in context: 
http://www.nabble.com/how-to-implement-wysiwygPro-into-Zend-Framework-tp17529965p17529965.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] how to implement?

2007-04-23 Thread Jude Aakjaer
The main Zend Framework manual has some easy to follow documentation on how to 
implement Zend_Auth http://framework.zend.com/manual/en/zend.auth.html
and Zend_Acl http://framework.zend.com/manual/en/zend.acl.html

I would recommend reading these as a starting point. I've not implimented ACL 
but I did Zend_Auth by following the main manual instructions

-Jude A.

On Monday 23 April 2007 23:15, José de Menezes Soares Neto wrote:
> Hi friends,
>
> I would like to implement zend_acl in the zend_auth tutorial...
> But I really dont know how to!
>
> I was thinking of tree roles (guest, member and admin)
>
> guest -> only see the albums
> member -> can add albums but can't delete them.
> admin -> can do everything
>
> The resources are the actions builded by the Akra's tutorial?
> http://akrabat.com/zend-auth-tutorial/
>
> Could someone give me a light? Or a source code? Or a book? :P
>
> Best regards,
>
> José de Menezes


[fw-general] how to implement?

2007-04-23 Thread José de Menezes Soares Neto

Hi friends,

I would like to implement zend_acl in the zend_auth tutorial...
But I really dont know how to!

I was thinking of tree roles (guest, member and admin)

guest -> only see the albums
member -> can add albums but can't delete them.
admin -> can do everything

The resources are the actions builded by the Akra's tutorial?
http://akrabat.com/zend-auth-tutorial/

Could someone give me a light? Or a source code? Or a book? :P

Best regards,

José de Menezes


Re: [fw-general] How to implement Zend_Acl ?

2007-04-20 Thread Maurice Fonk

Thank you for your reply,

It does help. I hadn't consired using the field names in the priviliges. 
That does make sense. Using your example, one can refine it to say, make 
an article readable by all, but create a privilige 'update_title', to 
allow some users to update it's title field.


I guess the whole confusion comes from the fact that I have a resource 
(The article) for which there are fields (The title) for which I want to 
register priviliges (read, update, etc.). Sometimes you'd just want to 
make a whole (Zend_Db_Table deprived) model accessible whole, but 
sometimes you may want to limit access to parts of it. It then is 
unclear whether the whole Zend_Db_Table, or one of it's fields is the 
actual resource for which I want to register a privilege.


Greetings,
Maurice Fonk

Darby Felton wrote:

Hi Maurice,

Zend_Acl also supports the idea of "privileges" upon resources. If you
were to utilize such privileges for updating the username and for the
timestamp, to follow your example, then you need not create a resource
object for these.

To use another simple example, imagine an article resource, to which
there are "create", "read", "update", and "delete" privileges. Each of
these is not a resource itself but rather a privilege upon a resource.

Examples using privileges are documented in the manual:

http://framework.zend.com/manual/en/zend.acl.html

The Zend_Acl unit tests also contain usage examples with privileges.

Maybe you could map your model columns to privileges?

Hope this helps!

Best regards,
Darby

Maurice Fonk wrote:
  

Hello,

I too would like to comment on this. I've been trying to use Zend_Acl to
restrict access to my models. Basically, what I want is to make certain
fields of a database row editable to some, but not to all. It's not that
difficult to make some class extending Zend_Db_Table_Row implement
Zend_Acl_Resource_Interface. But that only gets you halfway there. If I
make getResourceId() return the name of the model I can restrict access
(create/edit/delete) of a row to certain groups of users.

But if I want to, say, restrict a user to update his or her username,
but not the timestamp their account was created (because it's fixed)
would I really have to create acl resources for all the fields?

I came across this while thinking about my little javascript
Zend_Db_Table implementation. I have written a post on my blog (
http://naneau.nl/2007/04/18/securing-jstable/ ) about this. But like I
said before, if you make the row, or model, your resource, there are
still some restrictions left you have to cover.

Do you  have any thoughts on this?

Best regards,
Maurice Fonk

Juan Felipe Alvarez Saldarriaga wrote:


Hey :)

I want to implement Zend_Acl into my application, but I dont know how
to put work that with a database model, there are some tutorial or
page that I can see ?

Another question about Zend_Acl, in the example to add resources:
$acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter

This "newsletter" is what ? a controller ? a method ?, cause I want to
restrict access to the controllers, this is my idea, check permissions
of the current user using Zend_Acl, then restrict the access to some
controllers to this user, is this possible ?

Thx.


  




  




Re: [fw-general] How to implement Zend_Acl ?

2007-04-20 Thread Darby Felton
Hi Maurice,

Zend_Acl also supports the idea of "privileges" upon resources. If you
were to utilize such privileges for updating the username and for the
timestamp, to follow your example, then you need not create a resource
object for these.

To use another simple example, imagine an article resource, to which
there are "create", "read", "update", and "delete" privileges. Each of
these is not a resource itself but rather a privilege upon a resource.

Examples using privileges are documented in the manual:

http://framework.zend.com/manual/en/zend.acl.html

The Zend_Acl unit tests also contain usage examples with privileges.

Maybe you could map your model columns to privileges?

Hope this helps!

Best regards,
Darby

Maurice Fonk wrote:
> Hello,
> 
> I too would like to comment on this. I've been trying to use Zend_Acl to
> restrict access to my models. Basically, what I want is to make certain
> fields of a database row editable to some, but not to all. It's not that
> difficult to make some class extending Zend_Db_Table_Row implement
> Zend_Acl_Resource_Interface. But that only gets you halfway there. If I
> make getResourceId() return the name of the model I can restrict access
> (create/edit/delete) of a row to certain groups of users.
> 
> But if I want to, say, restrict a user to update his or her username,
> but not the timestamp their account was created (because it's fixed)
> would I really have to create acl resources for all the fields?
> 
> I came across this while thinking about my little javascript
> Zend_Db_Table implementation. I have written a post on my blog (
> http://naneau.nl/2007/04/18/securing-jstable/ ) about this. But like I
> said before, if you make the row, or model, your resource, there are
> still some restrictions left you have to cover.
> 
> Do you  have any thoughts on this?
> 
> Best regards,
> Maurice Fonk
> 
> Juan Felipe Alvarez Saldarriaga wrote:
>> Hey :)
>>
>> I want to implement Zend_Acl into my application, but I dont know how
>> to put work that with a database model, there are some tutorial or
>> page that I can see ?
>>
>> Another question about Zend_Acl, in the example to add resources:
>> $acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter
>>
>> This "newsletter" is what ? a controller ? a method ?, cause I want to
>> restrict access to the controllers, this is my idea, check permissions
>> of the current user using Zend_Acl, then restrict the access to some
>> controllers to this user, is this possible ?
>>
>> Thx.
>>
>>
> 
> 


Re: [fw-general] How to implement Zend_Acl ?

2007-04-19 Thread Maurice Fonk

Hello,

I too would like to comment on this. I've been trying to use Zend_Acl to 
restrict access to my models. Basically, what I want is to make certain 
fields of a database row editable to some, but not to all. It's not that 
difficult to make some class extending Zend_Db_Table_Row implement 
Zend_Acl_Resource_Interface. But that only gets you halfway there. If I 
make getResourceId() return the name of the model I can restrict access 
(create/edit/delete) of a row to certain groups of users.


But if I want to, say, restrict a user to update his or her username, 
but not the timestamp their account was created (because it's fixed) 
would I really have to create acl resources for all the fields?


I came across this while thinking about my little javascript 
Zend_Db_Table implementation. I have written a post on my blog ( 
http://naneau.nl/2007/04/18/securing-jstable/ ) about this. But like I 
said before, if you make the row, or model, your resource, there are 
still some restrictions left you have to cover.


Do you  have any thoughts on this?

Best regards,
Maurice Fonk

Juan Felipe Alvarez Saldarriaga wrote:

Hey :)

I want to implement Zend_Acl into my application, but I dont know how 
to put work that with a database model, there are some tutorial or 
page that I can see ?


Another question about Zend_Acl, in the example to add resources:
$acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter

This "newsletter" is what ? a controller ? a method ?, cause I want to 
restrict access to the controllers, this is my idea, check permissions 
of the current user using Zend_Acl, then restrict the access to some 
controllers to this user, is this possible ?


Thx.






Re: [Fwd: Re: [fw-general] How to implement Zend_Acl ?]

2007-04-19 Thread Juan Felipe Alvarez Saldarriaga

Nice, thx :)

Darby Felton wrote:

Reply to all, reply to all... ;)

 Original Message 
Subject: Re: [fw-general] How to implement Zend_Acl ?
Date: Thu, 19 Apr 2007 09:59:23 -0700
From: Darby Felton <[EMAIL PROTECTED]>
To: Juan Felipe Alvarez Saldarriaga <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>

Hi Juan,

Zend_Acl operates by registering Role and Resource objects to it and
specifying the rules that determine how Roles may access Resource objects.

Juan Felipe Alvarez Saldarriaga wrote:
  

I want to implement Zend_Acl into my application, but I dont know how to
put work that with a database model, there are some tutorial or page
that I can see ?



You ask about integrating with database model, and Zend_Acl should be
able to accommodate your needs here, because an object need only
implement Zend_Acl_Role_Interface or Zend_Acl_Resource_Interface if you
want the object to be a valid Role or Resource, respectively. This is
documented in the manual:

http://framework.zend.com/manual/en/zend.acl.html

An example:

class Building implements Zend_Acl_Resource_Interface
{
public function getResourceId()
{
// implement this method
}
}

In essence, an object need only uniquely identify itself to Zend_Acl in
order to be treated as a Role or Resource. With the above defined, any
object of class Building can be a Zend_Acl Resource, provided that it
uniquely identifies itself with getResourceId().

  

Another question about Zend_Acl, in the example to add resources:
$acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter

This "newsletter" is what ? a controller ? a method ?, cause I want to
restrict access to the controllers, this is my idea, check permissions
of the current user using Zend_Acl, then restrict the access to some
controllers to this user, is this possible ?



Zend_Acl_Resource is an extremely simple implementation of
Zend_Acl_Resource_Interface, where you pass the identifier to the
object's constructor. In the above example, 'newsletter' is the
identifier for the added resource, nothing more.

Simon Mundy and Matthew Weier O'Phinney and others whom I cannot
immediately recall have posted many times in the past how this can be
done. Searching the mailing list should reveal some useful results.

The short version... implement preDispatch() in a controller plugin.

You might also take a look at this:

http://www.nabble.com/Re%3A-ACL-for-modules-p10019759s16154.html

The unit tests for Zend_Acl may also illustrate how to use the component
and the results you can expect when using it.

We have planned to provide tutorial-style documentation that would cover
this use case, but it will most likely be completed after 1.0.0, since
we are currently focused on getting the framework ready for this release.

Hope this helps!

Best regards,
Darby


  




[Fwd: Re: [fw-general] How to implement Zend_Acl ?]

2007-04-19 Thread Darby Felton
Reply to all, reply to all... ;)

 Original Message 
Subject: Re: [fw-general] How to implement Zend_Acl ?
Date: Thu, 19 Apr 2007 09:59:23 -0700
From: Darby Felton <[EMAIL PROTECTED]>
To: Juan Felipe Alvarez Saldarriaga <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>

Hi Juan,

Zend_Acl operates by registering Role and Resource objects to it and
specifying the rules that determine how Roles may access Resource objects.

Juan Felipe Alvarez Saldarriaga wrote:
> I want to implement Zend_Acl into my application, but I dont know how to
> put work that with a database model, there are some tutorial or page
> that I can see ?

You ask about integrating with database model, and Zend_Acl should be
able to accommodate your needs here, because an object need only
implement Zend_Acl_Role_Interface or Zend_Acl_Resource_Interface if you
want the object to be a valid Role or Resource, respectively. This is
documented in the manual:

http://framework.zend.com/manual/en/zend.acl.html

An example:

class Building implements Zend_Acl_Resource_Interface
{
public function getResourceId()
{
// implement this method
}
}

In essence, an object need only uniquely identify itself to Zend_Acl in
order to be treated as a Role or Resource. With the above defined, any
object of class Building can be a Zend_Acl Resource, provided that it
uniquely identifies itself with getResourceId().

> Another question about Zend_Acl, in the example to add resources:
> $acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter
> 
> This "newsletter" is what ? a controller ? a method ?, cause I want to
> restrict access to the controllers, this is my idea, check permissions
> of the current user using Zend_Acl, then restrict the access to some
> controllers to this user, is this possible ?

Zend_Acl_Resource is an extremely simple implementation of
Zend_Acl_Resource_Interface, where you pass the identifier to the
object's constructor. In the above example, 'newsletter' is the
identifier for the added resource, nothing more.

Simon Mundy and Matthew Weier O'Phinney and others whom I cannot
immediately recall have posted many times in the past how this can be
done. Searching the mailing list should reveal some useful results.

The short version... implement preDispatch() in a controller plugin.

You might also take a look at this:

http://www.nabble.com/Re%3A-ACL-for-modules-p10019759s16154.html

The unit tests for Zend_Acl may also illustrate how to use the component
and the results you can expect when using it.

We have planned to provide tutorial-style documentation that would cover
this use case, but it will most likely be completed after 1.0.0, since
we are currently focused on getting the framework ready for this release.

Hope this helps!

Best regards,
Darby



[fw-general] How to implement Zend_Acl ?

2007-04-19 Thread Juan Felipe Alvarez Saldarriaga

Hey :)

I want to implement Zend_Acl into my application, but I dont know how to 
put work that with a database model, there are some tutorial or page 
that I can see ?


Another question about Zend_Acl, in the example to add resources:
$acl->add(new Zend_Acl_Resource('newsletter'));   // newsletter

This "newsletter" is what ? a controller ? a method ?, cause I want to 
restrict access to the controllers, this is my idea, check permissions 
of the current user using Zend_Acl, then restrict the access to some 
controllers to this user, is this possible ?


Thx.