Share » Forums » Developer » Adding a new Operator

Adding a new Operator

Adding a new Operator

Tuesday 29 July 2003 9:53:47 am - 8 replies

Modified on Tuesday 29 July 2003 9:54:21 am by John van der Boom

Author Message

John van der Boom

Tuesday 29 July 2003 12:53:54 pm

Next problem I bumping into is that Ez is not seeing my new operator as a registered one.

Operator 'ezcookie' is not registered

I added these line into all the site.ini(.append.php) files:

[ExtensionSettings]
ActiveExtensions[]=ezcookie

AutoloadPath=lib/eztemplate/classes/;kernel/common/;extension/ezcookie/kernel/common

Any ideas?

John van der Boom

Wednesday 30 July 2003 4:50:28 am

I'm also having problem with these operators:

Operator 'ezcookie' is not registered

upword
shorten

Am I missing something?

Paul Borgermans

Wednesday 30 July 2003 9:54:25 am

Maybe this:

AutoloadPath=lib/eztemplate/classes/;kernel/common/;extension/ezcookie/kernel/common

should be

AutoloadPath=lib/eztemplate/classes/;kernel/common/;extension/ezcookie/kernel/common/

Can you install the contributed ezenv operator? It is doing what you want but for post/get vars. Session and cookie variables should be almost the same.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

John van der Boom

Wednesday 30 July 2003 11:25:23 am

I installed the ezenvoperator. And I think it's working, because it's not giving me the ezenv not registered warning. Si it's the ezcookie operator that's giving me problem.

You're telling me that cookie and session vars should be the same. I have a cookie named member_id so:

{"member_id"|ezenv}

should work right?
That's not the case :(
I took a closer look at the ezenv operator and it wn't work with cookies. Because it's using eZHTTPTool.
I don't think eZHTTPTool can handle cookies. Correct me if I'm wrong.

This cookie thing is giving me a headache. Am I the only one trying to do something with cookies or having problem with cookies? I'm getting desperate here.

Paul Borgermans

Thursday 31 July 2003 2:20:39 am

the ezenv operator indeed only works for post/get vars. Can't you use the $GLOBALS array directly and look up the cookie vars? Which server sets these cookies (it should be done within your ezp server, otherwise it won't show up)?

Make sure you disable viewcaching.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

John van der Boom

Thursday 31 July 2003 10:05:46 am

$_COOKIE is working correctly in the index.php of ezP.
But when I call the $_COOKIE in the template (using the insert operator for a php file) to call the $_COOKIE I get nothing.

Printing the $_COOKIE array also shows me blank, nada, null :-(
eZ isn't showing me the cookies. I'm working on the same server here.

So index.php: cookie are showed perfectly
In template using (insert operator for php): no cookies

John van der Boom

Friday 01 August 2003 2:25:17 am

Can anyone try to show there $COOKIE vars in a template.

Then I will know it's something I'm doing wrong or that this functionality has yet to be implemented in eZ.
Thank you

John van der Boom

Friday 01 August 2003 3:05:23 pm

Found a solution for the cookie problem:

IFRAME!!

Iframe the .php file and everything is working just fine.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu