Re: [fw-general] IE issues and i have no idea

2009-05-11 Thread dele454

Thanks Matt. The JSlink was very useful and helpful. But the problem still
persists.

I have tried a couple of things;

1. I have validated all my pages to make sure that all the tags are closed
2. check all my js code with JSLint for any errors
3. used the defer attribute of the js declaration to defer loading

:(

-
dee
-- 
View this message in context: 
http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23481338.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] IE issues and i have no idea

2009-05-06 Thread dele454

Hi,

Whenever i browse the site i am working on at the moment using IE, i get the
error below. I have tried to pin it on something but i dont know when it is
giving such a message in IE. I have checked everything in my bootstrap but i
cant find anything out of the ordinary there. Please i need help with this
bug.

It works perfectly on FF, Chrome and Opera. And  I am not experiencing this
problem locally - ONLY LIVE.

Thanks in advance.

http://www.nabble.com/file/p23412418/bug.gif 

-
dee
-- 
View this message in context: 
http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23412418.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] IE issues and i have no idea

2009-05-06 Thread dele454

Hi Mark,

Long time. How are you doing?

Thanks for the reply. Well i am using ver 7.0.5730.11. You made a valid
point there so i checked my source file and discovered the custom dojo build
was loading after my js scripts. So i changed it to
headScript()-prependFile() instead. - so that was sorted.

I cleared cache but the problem still persists :( I wish i could ignore IE
but i cant. Alot of our clients use this silly browser. In fact a client
mailed this bug to me :( They cant view their company's details page using
this God forsaken browser.

Now i am so stuck with this error i cant even pin it on something

ARRR!!



Mark Wright-3 wrote:
 
 Which versions of IE are you testing?
 
 Anyways, this wouldn't be a ZF problem. It might be javascript. We
 have seen rare instances where loading javascripts in the wrong order
 can cause IE to show a similar error (might be the same error - I
 don't remember what it said). I think the best solution is to ignore
 IE entirely and let people who use it fend for themselves.
 Unfortunately the boss man disagrees.
 
 
 Mark
 
 On Wed, May 6, 2009 at 1:14 PM, dele454 d...@killerinstinct.co.za wrote:

 Hi,

 Whenever i browse the site i am working on at the moment using IE, i get
 the
 error below. I have tried to pin it on something but i dont know when it
 is
 giving such a message in IE. I have checked everything in my bootstrap
 but i
 cant find anything out of the ordinary there. Please i need help with
 this
 bug.

 It works perfectly on FF, Chrome and Opera. And  I am not experiencing
 this
 problem locally - ONLY LIVE.

 Thanks in advance.

 http://www.nabble.com/file/p23412418/bug.gif

 -
 dee
 --
 View this message in context:
 http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23412418.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


 
 
 
 -- 
 Have fun or die trying - but try not to actually die.
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23416089.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] IE issues and i have no idea

2009-05-06 Thread dele454

HI,

Thanks for the reply.I was just about to post this:

I noticed that if i remove my js declarations the page loads fine in IE
without that Error - which simply butresses your point that the error is
truly from js. Thanks for this mate. I am going to google it and see how i
can apply the delay.

I'll keep you posted. thanks once again!



Themselves wrote:
 
 This is caused by Javascript trying to manipulate the page content before
 the page has completely loaded, other browsers handle it fine, IE doesn't.
 It's a well known problem. If you google the error message you'll find
 heaps
 of info, but the basic gist of it is that you need to delay the execution
 of
 any JS that is going to manipulate the page.
 
 On Thu, May 7, 2009 at 5:40 AM, dele454 d...@killerinstinct.co.za wrote:
 

 Hi Mark,

 Long time. How are you doing?

 Thanks for the reply. Well i am using ver 7.0.5730.11. You made a valid
 point there so i checked my source file and discovered the custom dojo
 build
 was loading after my js scripts. So i changed it to
 headScript()-prependFile() instead. - so that was sorted.

 I cleared cache but the problem still persists :( I wish i could ignore
 IE
 but i cant. Alot of our clients use this silly browser. In fact a client
 mailed this bug to me :( They cant view their company's details page
 using
 this God forsaken browser.

 Now i am so stuck with this error i cant even pin it on something

 ARRR!!



 Mark Wright-3 wrote:
 
  Which versions of IE are you testing?
 
  Anyways, this wouldn't be a ZF problem. It might be javascript. We
  have seen rare instances where loading javascripts in the wrong order
  can cause IE to show a similar error (might be the same error - I
  don't remember what it said). I think the best solution is to ignore
  IE entirely and let people who use it fend for themselves.
  Unfortunately the boss man disagrees.
 
 
  Mark
 
  On Wed, May 6, 2009 at 1:14 PM, dele454 d...@killerinstinct.co.za
 wrote:
 
  Hi,
 
  Whenever i browse the site i am working on at the moment using IE, i
 get
  the
  error below. I have tried to pin it on something but i dont know when
 it
  is
  giving such a message in IE. I have checked everything in my bootstrap
  but i
  cant find anything out of the ordinary there. Please i need help with
  this
  bug.
 
  It works perfectly on FF, Chrome and Opera. And  I am not experiencing
  this
  problem locally - ONLY LIVE.
 
  Thanks in advance.
 
  http://www.nabble.com/file/p23412418/bug.gif
 
  -
  dee
  --
  View this message in context:
 
 http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23412418.html
  Sent from the Zend Framework mailing list archive at Nabble.com.
 
 
 
 
 
  --
  Have fun or die trying - but try not to actually die.
 
 


 -
 dee
 --
 View this message in context:
 http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23416089.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23416646.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] IE issues and i have no idea

2009-05-06 Thread dele454

Apparently it is an IE7 bug and it can be a result of the following reasosn
listed here:

1. http://support.microsoft.com/kb/927917#more_information
2. http://www.fergusweb.net/coding/ie-operation-aborted-javascript-issues/

So i tried no 2. I left my js declaration and took out the flash header
declaration.I didnt see the error again too.

After running various tests i can safely say no 2 is the cause of my
problem.



dele454 wrote:
 
 HI,
 
 Thanks for the reply.I was just about to post this:
 
 I noticed that if i remove my js declarations the page loads fine in IE
 without that Error - which simply butresses your point that the error is
 truly from js. Thanks for this mate. I am going to google it and see how i
 can apply the delay.
 
 I'll keep you posted. thanks once again!
 
 
 
 Themselves wrote:
 
 This is caused by Javascript trying to manipulate the page content before
 the page has completely loaded, other browsers handle it fine, IE
 doesn't.
 It's a well known problem. If you google the error message you'll find
 heaps
 of info, but the basic gist of it is that you need to delay the execution
 of
 any JS that is going to manipulate the page.
 
 On Thu, May 7, 2009 at 5:40 AM, dele454 d...@killerinstinct.co.za
 wrote:
 

 Hi Mark,

 Long time. How are you doing?

 Thanks for the reply. Well i am using ver 7.0.5730.11. You made a valid
 point there so i checked my source file and discovered the custom dojo
 build
 was loading after my js scripts. So i changed it to
 headScript()-prependFile() instead. - so that was sorted.

 I cleared cache but the problem still persists :( I wish i could ignore
 IE
 but i cant. Alot of our clients use this silly browser. In fact a client
 mailed this bug to me :( They cant view their company's details page
 using
 this God forsaken browser.

 Now i am so stuck with this error i cant even pin it on something

 ARRR!!



 Mark Wright-3 wrote:
 
  Which versions of IE are you testing?
 
  Anyways, this wouldn't be a ZF problem. It might be javascript. We
  have seen rare instances where loading javascripts in the wrong order
  can cause IE to show a similar error (might be the same error - I
  don't remember what it said). I think the best solution is to ignore
  IE entirely and let people who use it fend for themselves.
  Unfortunately the boss man disagrees.
 
 
  Mark
 
  On Wed, May 6, 2009 at 1:14 PM, dele454 d...@killerinstinct.co.za
 wrote:
 
  Hi,
 
  Whenever i browse the site i am working on at the moment using IE, i
 get
  the
  error below. I have tried to pin it on something but i dont know when
 it
  is
  giving such a message in IE. I have checked everything in my
 bootstrap
  but i
  cant find anything out of the ordinary there. Please i need help with
  this
  bug.
 
  It works perfectly on FF, Chrome and Opera. And  I am not
 experiencing
  this
  problem locally - ONLY LIVE.
 
  Thanks in advance.
 
  http://www.nabble.com/file/p23412418/bug.gif
 
  -
  dee
  --
  View this message in context:
 
 http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23412418.html
  Sent from the Zend Framework mailing list archive at Nabble.com.
 
 
 
 
 
  --
  Have fun or die trying - but try not to actually die.
 
 


 -
 dee
 --
 View this message in context:
 http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23416089.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


 
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/IE-issues-and-i-have-no-idea-tp23412418p23417144.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_paginator + AJAX controls

2009-04-30 Thread dele454

http://www.nabble.com/file/p23310898/pag.gif 

I'm not sure if this is the right place to post it but i'll simply go ahead.

From the view above the table's data uses the Zend_Paginator to return the
data from the db. 

The following describes what i am doing:

- I am trying to control the pages using Ajax without having to reload the
whole page. 

- The table is housed in a DIV container called 'table_sort'. 

- Each of those numbered page links has an id of lnk1, lnk2 etc.

- Depending on which link is clicked the page no is sent to the controller
which then populates its view script and that gets sent back to the AJAX
callback action which then inserts all the contents of the viewscript into
the DIV Container mentioned above

The whole system works but only by clicking once on any of those links the
table is populated and the control shows the present page number. But the
moment i click on another pagination link the whole page reloads.

So my question is this is there a way of not having this behaviour? Can js
recognise the ids of the newly insert control after table have been
populated?


Any help offered will be deeply appreciated. Thanks
 

Here is my js code:

dojo.addOnLoad(function(){

dojo.query([id^=lnk]) . onclick(function(evt){

evt.preventDefault();
var source = evt.target.id;

 var page  = source.substr(3); 

 dojo.xhrGet({
 
 url: /venues/pagination-table/page/ + page,
 handleAs: text,
 load: function(response){

 
dojo.byId(table_sort) . innerHTML 
= response;
return response;
 }

 });

  

  

  
 });


Action controller:

public function paginationTableAction(){

$this-_helper-layout-disableLayout();

$venues = new Venues();
$allVenues  = 
$venues-getEventsPerVenue();

$paginator = 
Zend_Paginator::factory($allVenues);  
//tell the paginator which page we're 
on  

$paginator-setCurrentPageNumber($this-_getParam('page'));  

//get page no from url 
$page= 
$this-_request-getParam('page');
$paginator-setCurrentPageNumber($page);
$paginator-setItemCountPerPage(3);
$this-view-paginator = $paginator;  


}


View script:

?php 
 
$venues= $this-getNewVenues;
?

table width=585 border=0 cellpadding=0 cellspacing=1 class=data
  tr
td width=250 
class=heading id=left_bg  Venue  ?=$this-
baseUrl()?/img/venues/ddown2.gif alt=sort  width=5 height=3/ /td
td width=140 
class=heading   Category  ?=$this-
baseUrl()?/img/venues/ddown2.gif alt=sort  width=5 height=3/ /td
td width=120 
class=heading   Area   ?=$this-
baseUrl()?/img/venues/ddown2.gif alt=sort  width=5 height=3/ /td
td width=65 
class=heading id=right_bg  Events  ?=$this-
baseUrl()?/img/venues/ddown2.gif alt=sort  width=5 height=3/ /td
  /tr
  




  

Re: [fw-general] Zend_paginator + AJAX controls

2009-04-30 Thread dele454

I have it sorted now :)


http://www.dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-support/how-can-dojo-pick-new-ids-after-ajax-response#comment-24280

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_paginator-%2B-AJAX-controls-tp23310898p23322589.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Iterating through Zend_Paginator items

2009-04-24 Thread dele454

Hi,

I am trying to use the Zend_Paginator for the first time.

i just need to know how to iterate through the pagination object to get the
items from the multidimensional array.

echoing the contents of the paginator:

Zend_Paginator Object ( [_adapter:protected] = Zend_Paginator_Adapter_Array
Object ( [_array:protected] = Array ( [0] = Array ( [VenueName] = CTICC
[VenueID] = 9 [Events] = 2 [CategoryName] = Art Galleries [Area] =
Greenpoint ) [1] = Array ( [VenueName] = Fiesta Bar and Tapas [VenueID] =
11 [Events] = 0 [CategoryName] = Internet Cafes [Area] = Greenpoint ) [2]
= Array ( [VenueName] = Lakers Shark [VenueID] = 10 [Events] = 4
[CategoryName] = Gentlemen's Club [Area] = Kraifontein ) [3] = Array (
[VenueName] = Loft Lounge  Bar [VenueID] = 3 [Events] = 3 [CategoryName]
= Gentlemen's Club [Area] = Blouberg ) [4] = Array ( [VenueName] = Nose
Restaurant  Bar [VenueID] = 567 [Events] = 3 [CategoryName] = Conference
Centres [Area] = VA Waterfront ) [5] = Array ( [VenueName] = Pok bar
itan [VenueID] = 4 [Events] = 0 [CategoryName] = Coffee Shops [Area] =
Gardens ) [6] = Array ( [VenueName] = Rondebosch Gold Club [VenueID] = 8
[Events] = 2 [CategoryName] = Restaurants [Area] = Greenpoint ) [7] =
Array ( [VenueName] = Stones TygerValley [VenueID] = 12 [Events] = 3
[CategoryName] = Coffee Shops [Area] = Rondebosch ) [8] = Array (
[VenueName] = Unreal stones stone [VenueID] = 566 [Events] = 1
[CategoryName] = Coffee Shops [Area] = Durbanville ) [9] = Array (
[VenueName] = Villa Zest Boutique Hotel [VenueID] = 7 [Events] = 1
[CategoryName] = Hotels [Area] = Greenpoint ) ) [_count:protected] = 10 )
[_currentItemCount:protected] = [_currentItems:protected] =
[_currentPageNumber:protected] = [_itemCountPerPage:protected] = 10
[_pageCount:protected] = [_pageItems:protected] = Array ( )
[_pageRange:protected] = 10 [_pages:protected] = [_view:protected] = ) 1 


but using:

!-- testing pagination --
?=print_r($this-paginator);?

?php if (count($this-paginator)){?  
ul  
?php foreach ($this-paginator as $items = $item){ ?  
li  
h3?=$item-VenueName; ?/h3  // line 319
div?=$item-Events; ?/div  // line 320
/li  

?}?  
/ul  

?}?  

?= $this-paginationControl($this-paginator, 'Elastic',
'../partials/_pagination_control.phtml'); ?

!-- testing pagination --  

I get the the error: Trying to get property of non-object on line 319  320.


There is something am not doing right but i cant seem to pin it down.

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Iterating-through-Zend_Paginator-items-tp23213957p23213957.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Iterating through Zend_Paginator items

2009-04-24 Thread dele454

Oops! Thanks mate i see where i should have know better. Thanks for
clarifying. Much appreciated.

-
dee
-- 
View this message in context: 
http://www.nabble.com/Iterating-through-Zend_Paginator-items-tp23213957p23223768.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] URL rewriting

2009-03-23 Thread dele454

Hi,

I have urls like this http://www.domain.com/venue/details/id/667. But i have
been advised that in order to generate more traffic and increase my search
rankings i need to re-write my URLs to have more descriptive name of the
venue instead something like:

http://www.domain.com/venue/details/id/667/VenueName

OR

http://www.domain.com/venue/details/VenueName

I am not a SEO guy but how would i go about this rewriting my URLs. Apache
directive or a view Helper in ZF?

Sorry if i sound naive- never done this before

Thanks :)

-
dee
-- 
View this message in context: 
http://www.nabble.com/URL-rewriting-tp22656394p22656394.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-24 Thread dele454

I AM GLAD TO SAY I HAVE FINALLY SORTED THIS LINGERING ISSUE OUT!!

What i basically did was a combination of what Rob suggested and some
changes on my side. What i did is to change add baseUrl() to all my assets
links (css+ images etc) and changed the layout script for those pages
behaving badly from to layout_site.phtml. So instead of me using 3+4 layout
scripts i will be using just one. as long as i add the baseUrl() view helper
all the control show for the Lightbox irrespective of whether the url takes
parameters or not.

Thanks you Matthew and Thanks Rob for all your help thus far. The thread can
now REST IN PEACE :)


-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22190076.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-23 Thread dele454

I have added the baseUrl() view helper to my layout +view scripts but still
having the issue. Any help out there still?

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22157586.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-22 Thread dele454

Hi All,

I have looked into this issue again and i dont think it has anything to do
with any apache directive or so. I think i has to do with the path dojo is
in relation to my innner pages. I mean it shows perfectly on pages with no
parameters attached to the URL but the moment you hit a page like:
www.mydomain/event/id/4 - then you see the image above. 

And this goes on with any tooltips, dialog windows etc that  insert images
via the dijit.css. I mean look at the view below on the dialog too. It
completely looses the title tab and the 

http://www.nabble.com/file/p22146376/dialog2.gif 

and should like:

http://www.nabble.com/file/p22146376/dialog.gif 

I have tried moving the images from the dijit.css file to my images folder
and then reference those images to my folder but not working either.

Has anyone had issues like that - there has to be a way out of this nagging
issue.


Please any help will be appreciated. Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22146376.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-22 Thread dele454

Thanks Matthew. This is how i am declaring dojo helper in my layout script:
[code]

? if ($this-dojo()-isEnabled()){

   
$this-dojo()-setLocalPath('/js/dojo/dojo.js')
  
-addStyleSheetModule('dijit.themes.tundra');
echo $this-dojo();
 }
   ?

And in my bootstrap:

   $view = new Zend_View;

$view-setEncoding('UTF-8');
$viewRenderer = new
Zend_Controller_Action_Helper_ViewRenderer($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
Zend_Dojo::enableView($view); 

[/code]

Thanks i will really appreciate any help that can make me put this behind me
:) thanks



Matthew Weier O'Phinney-3 wrote:
 
 -- dele454 d...@killerinstinct.co.za wrote
 (on Sunday, 22 February 2009, 04:43 AM -0800):
 I have looked into this issue again and i dont think it has anything to
 do
 with any apache directive or so. I think i has to do with the path dojo
 is
 in relation to my innner pages. I mean it shows perfectly on pages with
 no
 parameters attached to the URL but the moment you hit a page like:
 www.mydomain/event/id/4 - then you see the image above. 
 
 Could you show how  you're configuring the dojo() view helper, and, in
 particular, how you're specifying the path to the local dojo? 
 
 My suspicion is that you're doing something like this:
 
 $view-dojo()-setLocalPath('js/dojo/dojo.js');
 
 which will lead to issues, as it will then look for dojo relative to the
 current URL. The path should always be absolute from the document root:
 
 $view-dojo()-setLocalPath('/js/dojo/dojo.js');
 
 And this goes on with any tooltips, dialog windows etc that  insert
 images
 via the dijit.css. I mean look at the view below on the dialog too. It
 completely looses the title tab and the 
 
 http://www.nabble.com/file/p22146376/dialog2.gif 
 
 and should like:
 
 http://www.nabble.com/file/p22146376/dialog.gif 
 
 I have tried moving the images from the dijit.css file to my images
 folder
 and then reference those images to my folder but not working either.
 
 Has anyone had issues like that - there has to be a way out of this
 nagging
 issue.
 
 
 Please any help will be appreciated. Thanks
 
 -- 
 Matthew Weier O'Phinney
 Software Architect   | matt...@zend.com
 Zend Framework   | http://framework.zend.com/
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22148755.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-22 Thread dele454

Maybe this might also help.

Another point to mention here is that i have 3 layout scripts for my site:

 - layout-site.phtml
 - layout-site-view.phtml
 - layout-site-view-l2.phtml

Now pages like www.mydomain.com/events/browse - use the layout-site.phtml

But i  couldnt use the same layout script(layout-site.phtml) for those urls
with parameters because the css+images dont show up. 

so i needed another layout script that could reference those assets
differently hence the layout-site-view.phtml for URLs with parameters like 
www.mydomain.com/events/details/id/34. If the page takes two parameters then
layout-site-view-l2.phtml comes into play.


In referencing my css file in for e.g the layout-site.phtml file the link
ref would look like:

link href=../../css/venues_content.css media=screen rel=stylesheet
type=text/css /



but for layout-site-view.phtml -

link href=../../../css/venues_content.css media=screen rel=stylesheet
type=text/css /

I just thinking maybe the referencing of dojo also needs to change on
layout-site-view.phtml like that of the css file since the pages are more
inner and not on the 'root' per say?

Just mentioning this may be it provides some sort of leads.

Thanks


-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22149060.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-22 Thread dele454

Thanks Rob, I do have the baseUrl() view helper in place but am into the
habit of just doing it the html way ;). I will change it as suggested and
give it a try to see if it will work as per the widget issues i am having.

Thanks i'll let you know the outcome. ;)

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p22156755.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Quick Question

2009-02-20 Thread dele454

Thanks Colin,

I am going to be looking into this over the weekend. And let you know the
outcome on your suggestions.

Thanks a mil. Will keep you posted.



Colin Guthrie-6 wrote:
 
 'Twas brillig, and dele454 at 20/02/09 07:34 did gyre and gimble:
 Hi,
 
 I have this issue that's been lingering in my codes. Whenever i use the
 Zend_Mail or Zend_Captcha or any component that generates some kind of
 resource, i always get such resource twice. In context, if  i use the
 Zend_Mail to send out mails - will recieve the same copy of that mail
 twice.
 
 Likewise for captcha, the image will be generate twice and saved in my
 captcha image location - though with two different texts on them.
 
 I have tried all sorts to recitfy this but to no avail. Any reason why
 this
 is so?
 
 I'm guessing that your dispatch loop is running twice for some reason... 
 either that or you are handling it in the pre/postDispatch methods of a 
 controller that you actually initialise twice (e.g. by running an action 
 of that controller via an actionStack()).
 
 I'd imagine something like that is happening. You can easily test this 
 by copying the Dispatcher class and sprinkling it with log calls.
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Quick-Question-tp22116080p22118173.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Quick Question

2009-02-20 Thread dele454

Thanks Colin. But in my case i dont have a button linking directly to the
component.

The typical scenerio is, you submit the form, my controller processes it,
and at the end sends all the values via email. For captcha, it render with
the page loading. So there isnt any direct user action to the components so
to speak.



Colin Guthrie-6 wrote:
 
 'Twas brillig, and dele454 at 20/02/09 10:22 did gyre and gimble:
 Thanks Colin,
 
 I am going to be looking into this over the weekend. And let you know the
 outcome on your suggestions.
 
 Thanks a mil. Will keep you posted.
 
 No worries.
 
 Other things that can cause this (but not specifically ZF based):
 
   1. Users double clicking submit buttons! Always use javascript to 
 disable the button after the first click. It doesn't stop it 100% but it 
 helps.
   2. Using ajax to submit the form but not disabling the default form 
 handler when doing so and thus having it submit organically also.
 
 So watch out for those too :)
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Quick-Question-tp22116080p22118336.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Quick Question

2009-02-19 Thread dele454

Hi,

I have this issue that's been lingering in my codes. Whenever i use the
Zend_Mail or Zend_Captcha or any component that generates some kind of
resource, i always get such resource twice. In context, if  i use the
Zend_Mail to send out mails - will recieve the same copy of that mail twice.

Likewise for captcha, the image will be generate twice and saved in my
captcha image location - though with two different texts on them.

I have tried all sorts to recitfy this but to no avail. Any reason why this
is so?

-
dee
-- 
View this message in context: 
http://www.nabble.com/Quick-Question-tp22116080p22116080.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-02-12 Thread dele454

Hi,

Sorry I am only responding to this now. I have been out of town for a while.
My structure looks pretty much the same. I tried changing my .htaccess file
to yours but still the problem persists. I have also tried adding the
absolute paths of my images in the css file but no luck there too.

There should be a solution to this! Isn’t it?

Thanks please I will appreciate any more help concerning this issue.

Thanks once again for the help.


-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p21987716.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-01-28 Thread dele454

http://www.nabble.com/file/p21706098/struc.gif 

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p21706098.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Some widget issues

2009-01-27 Thread dele454

hi,

I just noticed that bg images, bg colours set in the tundra theme stylesheet
(tundra.css) dont apply to some of my pages especially pages whose URLs
require parameters like 

www.mydomain.com/event/details/144.

For the lightbox widget:

 - the controls dont show but shows on pages like www.mydomain.com/event

For tooltips:

- the background colour and connecting arrow dont show up. How can i resolve
this issue? 
This is how it should show
http://www.nabble.com/file/p21686243/2.gif 

This is how it is showing on pages that accept parameters:
http://www.nabble.com/file/p21686243/1.gif 

Thanks please help is needed


-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p21686243.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Some widget issues

2009-01-27 Thread dele454

Thanks for the feedback Matthew. That is exactly how my rewrite look like
line for line. Not working still. Any other possible leads?

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Some-widget-issues-tp21686243p21691624.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Captcha

2009-01-13 Thread dele454

Out of curiosity i just need to know if the PNGs created by Zend_Captcha gets
deleted after expiration or later on. I just noticed this files can grow in
immensely in number on the server and hence populate unnecessary space.

Is there a way of configuring the component such that it deletes expired or
used captcha images?

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Captcha-tp21447893p21447893.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] hidden form value null problem

2008-12-24 Thread dele454

   $criteria = array();

$this-getFrontController()-setParam('noViewRenderer', TRUE);
$view = $this-getView();
$form = $this-getForm('detail');
$form-setAction('update');
$view-form = $form;

$request = $this-getRequest();
$criteria['id'] = $request-getParam('id');

// You didnt supply $criteria['id'] as an argument into 
findDetailMailData(). Instead you supplied the whole Array. Change this line
to $mailDataArray = $mailDelivery-findDetailMailData($criteria['id')
instead.
$mailDataArray = $mailDelivery-findDetailMailData($criteria);
$view-detail = $mailDataArray;

Hope this helps :)  

-
dee
-- 
View this message in context: 
http://www.nabble.com/hidden-form-value-null-problem-tp21155700p21156967.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Dojo Problem

2008-12-24 Thread dele454

Any help out there?

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21156968.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Dojo Problem

2008-12-24 Thread dele454

Am still in need of assistance passing layout variables to view scripts.
Sounds trivial but dont know how ;)

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21156971.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Dojo Problem

2008-12-23 Thread dele454

Whao!! Thanks for this comprehensive explanation. You really shed light on a
lot of things. Am reading a few books on Dojo so i reckon i was adapting the
code to the ZF rather than find out how the framework would have it
rendered. Above all your covered a lot of things the documentation doesnt
make mention about. Thanks Matthew, i really appreciate your help. I will be
reading through your comments again to juice out every info. I will let you
know if i was able to render the dijit ZF-way!

Thanks once again

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21145648.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re: re[fw-general] quest and action problem

2008-12-23 Thread dele454

You definately  need to send some codes through for ppl to see. You
explanation gets to mix up in my head just by reading it. Provide some
sample codes of your view script and model so you can get the help u
require.

Cheers

-
dee
-- 
View this message in context: 
http://www.nabble.com/request-and-action-problem-tp21154522p21155907.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Dojo Problem

2008-12-22 Thread dele454

hi,

I dont know why this is so but this is the problem i am encountering. If i
use dojo declaratively, the dojo view helper applies the dijit params as
expected as well as the theme specified. But if i add a form element
programmatically, though it create the form element none of the dijit
paramters as well as the choosen theme is applied

input 
type=text
id=firstName
size=20
dojoType=dijit.form.ValidationTextBox
required=true
propercase=true
promptMessage=Enter first name.
invalidMessage=First name is required.
trim=true
onchange=userNameOnChange()

/

?= $this-validationTextBox(
'firstname',
'Start writing here...',
array('required' = true, 
  'propercase' = true, 
  'promptMessage' = 'Enter first name',
  'invalidMessage' = 'First name is required'),
array('size' = '20')
   
);?

These  two textbox creation produces the view attached..

http://www.nabble.com/file/p21136696/me.gif 

Doing this programmtically, is it correct as per the docucmentation? Is this
the programmtic way of creating Dijit Elements?:

Programmatic usage allows the developer to decorate existing elements by
pulling them by ID or CSS selectors and passing them to the appropriate
object constructors in Dojo. Because no non-standard HTML attributes are
used, pages continue to validate.

Sorry but i seem very confused at the moment ;)

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21136696.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Dojo Problem

2008-12-22 Thread dele454

Thanks Matthew, am quite unclear on your repsonse. What do you mean by saying
the paramaters are mixed on client side by Javascript...?

I was just wondering why dijit parameters were not applied to the dijit
using the programmtic approach. It only applies the html attributes to the
widget!!

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21139942.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Dojo Problem

2008-12-22 Thread dele454

Ok i do understand the theory behind these explanations but it still doesnt
click to me. I know yes the programmatic style is to allow one's doc to be
parsed by the validator because of the dijit specific attributes when
compared to the declarative. 

But if javascript is going to do the inserts (parameters) why then isnt this
textbox the same in look and feel with that of the first one? Sorry if i
sound naive but i need a practical explanation as to why.

I need to make it behave like the declarative view below:

http://www.nabble.com/file/p21140240/show.gif 

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21140240.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Dojo Problem

2008-12-22 Thread dele454

because i do understand there are two way of doing something with this
context in mind. Irrespective of the approach used shouldnt the
output/behaviour be the same??

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-Problem-tp21136696p21140250.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Json and escaping...

2008-12-21 Thread dele454

Hi,

I used the Zend_Json::encode function to convert a php array to a Json
object. But what i realised is that Json seems to be escaping the '/' in the
items/properties. I file mappings saved in the db and for each record
returned by my model, Json escapes the paths specified:


[{EventID:144,EventName:Wordpress 2009,VenueName:Nose Restaurant
and Wine Bar
,VenueID:567,MainThumbnail:event1440914\/main_thumbnail\/thumb_event1440914.jpg,Area:Durbanville,City:Cape
Town,FromDate:2008-02-03,IsFeatured:0,DateAdded:2008-09-14
21:03:28,ToDate:2009-03-03,RSVP:George
Micheal,RSVPContact:0219531253}]

Is there any property that turns this escaping off?

Thanks and will be looking forward to your responses :)

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Json-and-escaping...-tp21119364p21119364.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] ZF live settings

2008-12-10 Thread dele454

These are the error logs in my apache error.log file

I dont know what it means specifically. PLEASE CAN SOMEONE HELP


[Wed Dec 10 11:15:03 2008] [warn] [client 190.30.20.221] mod_include:
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Dec 10 11:15:05 2008] [error] [client 190.30.20.221] File does not
exist: /usr/local/apache/htdocs/administrator
[Wed Dec 10 11:15:05 2008] [warn] [client 190.30.20.221] mod_include:
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Dec 10 11:15:08 2008] [error] [client 190.30.20.221] File does not
exist: /usr/local/apache/htdocs/administrator
[Wed Dec 10 11:15:08 2008] [warn] [client 190.30.20.221] mod_include:
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Dec 10 11:15:10 2008] [error] [client 190.30.20.221] File does not
exist: /usr/local/apache/htdocs/administrator
[Wed Dec 10 11:15:10 2008] [warn] [client 190.30.20.221] mod_include:
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Dec 10 11:15:12 2008] [error] [client 190.30.20.221] File does not
exist: /usr/local/apache/htdocs/administrator
[Wed Dec 10 11:15:12 2008] [warn] [client 190.30.20.221] mod_include:
Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed

-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings-tp20911516p20930664.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] ZF live settings

2008-12-10 Thread dele454

SORTED!!! :)

-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings-tp20911516p20937634.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] ZF live settings

2008-12-09 Thread dele454

Any help out there still? I havent being able to resolve it yet!!



dele454 wrote:
 
 Hi,
 
 I am trying to move my files over to the remote server but my pages appear
 blank. I have tried everything i know to rectify this from setting my
 include path, config files etc but nothing is working. Checked the apache
 error log file but nothing captured on what am experiencing. not logging
 it.
 
 I am just attaching all my files here for any help/assistance. Am so tired
 been battling with this since last night and i can't still figure out why
 this is so. Please i will appreciate any help!!! Am on a linux VPS
 platform
 
 .HTACCESS 
 
 RewriteEngine on
 RewriteCond %{SCRIPT_FILENAME} !-f
 RewriteCond %{SCRIPT_FILENAME} !-d
 RewriteRule ^(.*)$ index.php/$1
 
 ExpiresActive On
 ExpiresByType image/gif A0
 ExpiresByType image/png A0
 ExpiresByType image/jpg A0 
 
 
 index.php on public_html folder:
 
 require_once 'Bootstrap.php';
 Bootstrap::run();
 
 
 BOOTSTRAP:
 
 require_once 'Zend/Loader.php';
 require_once 'Zend/Session.php';
 
 
 class Bootstrap{
 
 public static $front = null;

 public static function run()
 {
 try {
   self::setupEnvironment();
   self::prepare();
   $response = self::$front-dispatch();
   self::sendResponse($response);
   self::$front-dispatch();
   } catch(Exception $e) {
 

 }
 }

 public static function setupEnvironment()
 {
 error_reporting(E_ALL|E_STRICT);
 ini_set('display_errors', true);// should be set to false after
 deployment
 date_default_timezone_set('Africa/Johannesburg');
 }

 public static function prepare()
 {
 self::setupController();
 self::setupView();
 }

 public static function setupController()
 {

   // load the Zend Components
   Zend_Loader::registerAutoload();
   
   //add the setting declared in settings.ini
   $config = new Zend_Config_Ini('config/settings.ini', 
 'development');
 Zend_Registry::set('config', $config);
   
 //create an instance of the front controller 
   self::$front = Zend_Controller_Front::getInstance();
 self::$front-throwExceptions(true);
 self::$front-returnResponse(true);
   
   
   // Set the default controller directory:
   self::$front-setControllerDirectory(array('default' =
 $config-paths-data . '/controllers', 
   
'admin'   = $config-paths-data .
 '/modules/admin/controllers'));   
   Zend_Layout::startMvc(array('layoutPath' = 
 $config-paths-data .
 '/views/layouts'));
   
   
   // setup database connection variables
   $params = array(
   'host' = $config-database-hostname,
   'username' = $config-database-username,
   'password' = $config-database-password,
   'dbname'   = $config-database-database);
   
   $db = Zend_Db::factory($config-database-type, $params);
   Zend_Db_Table_Abstract::setDefaultAdapter($db);
   Zend_Registry::set('db', $db);
   
   
 
   
 }

 public static function setupView()
 {
 $view = new Zend_View;
   
   
 $view-setEncoding('UTF-8');
 $viewRenderer = new
 Zend_Controller_Action_Helper_ViewRenderer($view);
 Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
 }

 public static function sendResponse(Zend_Controller_Response_Http
 $response)
 {
 
   $response-setHeader('Content-Type', 'text/html; 
 charset=UTF-8', true);
 $response-sendResponse();
 }
   
   
 
 }
 
 
 FOLDER STRUCTURE:
  http://www.nabble.com/file/p20911516/Untitled-1.jpg 
 
 
 SETTINGS.INI file:
 
 [development]
 
 database.type  = pdo_mysql
 database.hostname   = mydomain.co.za
 database.username   = mydb007
 database.password   = mypass
 database.database   = mydb
 
 paths.data  = /usr/local/lib/apps
 paths.modules.admin = /usr/local/lib/apps/modules/admin
 
 
 PHPINI file(includes):
 
 ; UNIX: /path1:/path2  
 include_path =
 .:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/apps:/usr/local/lib/apps/lib:/usr/local/lib/apps/models
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings

[fw-general] ZF live settings

2008-12-09 Thread dele454

Hi,

I am trying to move my files over to the remote server but my pages appear
blank. I have tried everything i know to rectify this from setting my
include path, config files etc but nothing is working. Checked the apache
error log file but nothing captured on what am experiencing. not logging it.

I am just attaching all my files here for any help/assistance. Am so tired
been battling with this since last night and i can't still figure out why
this is so. Please i will appreciate any help!!! Am on a linux VPS platform

.HTACCESS 

RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1

ExpiresActive On
ExpiresByType image/gif A0
ExpiresByType image/png A0
ExpiresByType image/jpg A0 


index.php on public_html folder:

require_once 'Bootstrap.php';
Bootstrap::run();


BOOTSTRAP:

require_once 'Zend/Loader.php';
require_once 'Zend/Session.php';


class Bootstrap{

public static $front = null;
   
public static function run()
{
try {
self::setupEnvironment();
self::prepare();
$response = self::$front-dispatch();
self::sendResponse($response);
self::$front-dispatch();
} catch(Exception $e) {
  
 
  }
}
   
public static function setupEnvironment()
{
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', true);// should be set to false after
deployment
date_default_timezone_set('Africa/Johannesburg');
}
   
public static function prepare()
{
self::setupController();
self::setupView();
}
   
public static function setupController()
{
   
// load the Zend Components
Zend_Loader::registerAutoload();

//add the setting declared in settings.ini
$config = new Zend_Config_Ini('config/settings.ini', 
'development');
Zend_Registry::set('config', $config);

//create an instance of the front controller 
self::$front = Zend_Controller_Front::getInstance();
self::$front-throwExceptions(true);
self::$front-returnResponse(true);


// Set the default controller directory:
self::$front-setControllerDirectory(array('default' =
$config-paths-data . '/controllers', 

   'admin'   = $config-paths-data .
'/modules/admin/controllers')); 
Zend_Layout::startMvc(array('layoutPath' = 
$config-paths-data .
'/views/layouts'));


// setup database connection variables
$params = array(
'host' = $config-database-hostname,
'username' = $config-database-username,
'password' = $config-database-password,
'dbname'   = $config-database-database);

$db = Zend_Db::factory($config-database-type, $params);
Zend_Db_Table_Abstract::setDefaultAdapter($db);
Zend_Registry::set('db', $db);




}
   
public static function setupView()
{
$view = new Zend_View;


$view-setEncoding('UTF-8');
$viewRenderer = new
Zend_Controller_Action_Helper_ViewRenderer($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
}
   
public static function sendResponse(Zend_Controller_Response_Http
$response)
{

$response-setHeader('Content-Type', 'text/html; 
charset=UTF-8', true);
$response-sendResponse();
}



}


FOLDER STRUCTURE:
http://www.nabble.com/file/p20911516/Untitled-1.jpg 


SETTINGS.INI file:

[development]

database.type  = pdo_mysql
database.hostname   = mydomain.co.za
database.username   = mydb007
database.password   = mypass
database.database   = mydb

paths.data  = /usr/local/lib/apps
paths.modules.admin = /usr/local/lib/apps/modules/admin


PHPINI file(includes):

; UNIX: /path1:/path2  
include_path =
.:/usr/lib/php:/usr/local/lib/php:/usr/local/lib/apps:/usr/local/lib/apps/lib:/usr/local/lib/apps/models

-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings-tp20911516p20911516.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] ZF live settings

2008-12-09 Thread dele454

Still looking for help. I think despite the fact that i have my ZF included
the php.ini file i dont think it is seeing any of my ZF file still. I am in
the process of deleting all the ZF folders, refreshing my home page doesnt
even give an warning of a component missing or so. which is strange!!



rcastley wrote:
 
 You will need the AllowOverride set to All so that the .htaccess can be
 picked up in your application directory.
  
 Also check the DirectoryIndex had index.php appended to it as well.
  
 - Robert
 
   _  
 
 From: Dele [mailto:[EMAIL PROTECTED] 
 Sent: 09 December 2008 15:49
 To: Robert Castley; fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF live settings
 
 
 Thanks I removed the references to Expires, still nothing. Do you think
 this
 could help adding it to the Virtual Host declarations :
  
 AllowOverride All
 Options All
  
 Because I have it for my local version on my apache config file. Thanks
 for
 all your help
  
  
 Regards
  
 Dele
  
 (C) 071 673 4130  (E) [EMAIL PROTECTED]  (S) dee454
  
 Start by doing what's necessary; then do what's possible; and suddenly
 you
 are doing the impossible. - St. Francis of Assisi.
 
 Disclaimer: This email and any files transmitted with it are confidential
 and intended solely for the use of the individual or entity to whom they
 are
 addressed. If you have received this email in error please notify the
 system
 manager. This message contains confidential information and is intended
 only
 for the individual named. If you are not the named addressee you should
 not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete
 this e-mail from your system. If you are not the intended recipient you
 are
 notified that disclosing, copying, distributing or taking any action in
 reliance on the contents of this information is strictly prohibited.
  
 From: Robert Castley [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 09, 2008 5:40 PM
 To: Dele; fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF live settings
  
 Sometimes you are not allow to put apache module configurations in
 .htaccess.
  
 Try also removing the references to Expires* and just use the .htaccess
 content I sent previously.
  
 - Robert
  
   _  
 
 From: Dele [mailto:[EMAIL PROTECTED] 
 Sent: 09 December 2008 15:14
 To: Robert Castley; fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF live settings
 Thanks for the feedback Robert. I replaced the .htaccess file you sent me
 with the one I currently have. Still nothing L
  
 Regards
  
 Dele
  
 (C) 071 673 4130  (E) [EMAIL PROTECTED]  (S) dee454
  
 Start by doing what's necessary; then do what's possible; and suddenly
 you
 are doing the impossible. - St. Francis of Assisi.
 
 Disclaimer: This email and any files transmitted with it are confidential
 and intended solely for the use of the individual or entity to whom they
 are
 addressed. If you have received this email in error please notify the
 system
 manager. This message contains confidential information and is intended
 only
 for the individual named. If you are not the named addressee you should
 not
 disseminate, distribute or copy this e-mail. Please notify the sender
 immediately by e-mail if you have received this e-mail by mistake and
 delete
 this e-mail from your system. If you are not the intended recipient you
 are
 notified that disclosing, copying, distributing or taking any action in
 reliance on the contents of this information is strictly prohibited.
  
 From: Robert Castley [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 09, 2008 3:28 PM
 To: dele454; fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF live settings
  
 Your .htaccess file doesn't look right to me. 
 Have you tried this? 
 RewriteEngine On 
 RewriteCond %{REQUEST_FILENAME} -s [OR] 
 RewriteCond %{REQUEST_FILENAME} -l [OR] 
 RewriteCond %{REQUEST_FILENAME} -d 
 RewriteRule ^.*$ - [NC,L] 
 RewriteRule ^.*$ index.php [NC,L] 
   
 -Original Message- 
 From: dele454 [mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] ] 
 Sent: 09 December 2008 12:33 
 To: fw-general@lists.zend.com 
 Subject: Re: [fw-general] ZF live settings 
  
 Any help out there still? I havent being able to resolve it yet!! 
  
 dele454 wrote: 
 
 Hi, 
 
 I am trying to move my files over to the remote server but my pages 
 appear blank. I have tried everything i know to rectify this from 
 setting my include path, config files etc but nothing is working. 
 Checked the apache error log file but nothing captured on what am 
 experiencing. not logging it. 
 
 I am just attaching all my files here for any help/assistance. Am so 
 tired been battling with this since last night and i can't still 
 figure out why this is so. Please i will appreciate any help!!! Am on 
 a linux VPS platform 
 
 .HTACCESS 
 
 RewriteEngine on 
 RewriteCond %{SCRIPT_FILENAME} !-f 
 RewriteCond %{SCRIPT_FILENAME

RE: [fw-general] ZF live settings

2008-12-09 Thread dele454
: Robert Castley [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 09, 2008 3:28 PM
 To: dele454; fw-general@lists.zend.com
 Subject: RE: [fw-general] ZF live settings
  
 Your .htaccess file doesn't look right to me. 
 Have you tried this? 
 RewriteEngine On 
 RewriteCond %{REQUEST_FILENAME} -s [OR] 
 RewriteCond %{REQUEST_FILENAME} -l [OR] 
 RewriteCond %{REQUEST_FILENAME} -d 
 RewriteRule ^.*$ - [NC,L] 
 RewriteRule ^.*$ index.php [NC,L] 
   
 -Original Message- 
 From: dele454 [mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] ] 
 Sent: 09 December 2008 12:33 
 To: fw-general@lists.zend.com 
 Subject: Re: [fw-general] ZF live settings 
  
 Any help out there still? I havent being able to resolve it yet!! 
  
 dele454 wrote: 
 
 Hi, 
 
 I am trying to move my files over to the remote server but my pages 
 appear blank. I have tried everything i know to rectify this from 
 setting my include path, config files etc but nothing is working. 
 Checked the apache error log file but nothing captured on what am 
 experiencing. not logging it. 
 
 I am just attaching all my files here for any help/assistance. Am so 
 tired been battling with this since last night and i can't still 
 figure out why this is so. Please i will appreciate any help!!! Am on 
 a linux VPS platform 
 
 .HTACCESS 
 
 RewriteEngine on 
 RewriteCond %{SCRIPT_FILENAME} !-f 
 RewriteCond %{SCRIPT_FILENAME} !-d 
 RewriteRule ^(.*)$ index.php/$1 
 
 ExpiresActive On 
 ExpiresByType image/gif A0 
 ExpiresByType image/png A0 
 ExpiresByType image/jpg A0 
 
 
 index.php on public_html folder: 
 
 require_once 'Bootstrap.php'; 
 Bootstrap::run(); 
 
 
 BOOTSTRAP: 
 
 require_once 'Zend/Loader.php'; 
 require_once 'Zend/Session.php'; 
 
 
 class Bootstrap{ 
 
 public static $front = null; 

 public static function run() 
 { 
 try { 
   self::setupEnvironment(); 
   self::prepare();
   $response = self::$front-dispatch(); 
   self::sendResponse($response); 
   self::$front-dispatch(); 
   } catch(Exception $e) { 
 

 } 
 } 

 public static function setupEnvironment() 
 { 
 error_reporting(E_ALL|E_STRICT); 
 ini_set('display_errors', true);// should be set to false 
 after deployment 
 date_default_timezone_set('Africa/Johannesburg'); 
 } 

 public static function prepare() 
 { 
 self::setupController(); 
 self::setupView(); 
 } 

 public static function setupController() 
 { 

   // load the Zend Components 
   Zend_Loader::registerAutoload(); 
   
   //add the setting declared in settings.ini 
   $config = new Zend_Config_Ini('config/settings.ini',
 'development'); 
 Zend_Registry::set('config', $config); 
   
 //create an instance of the front controller 
   self::$front = Zend_Controller_Front::getInstance(); 
 self::$front-throwExceptions(true); 
 self::$front-returnResponse(true); 
   
   
   // Set the default controller directory: 
   self::$front-setControllerDirectory(array('default' = 
 $config-paths-data . '/controllers', 

 'admin'   = $config-paths-data .
 '/modules/admin/controllers'));   
   Zend_Layout::startMvc(array('layoutPath' =
 $config-paths-data . 
 '/views/layouts')); 
   
   
   // setup database connection variables 
   $params = array( 
   'host' = $config-database-hostname, 
   'username' = $config-database-username, 
   'password' = $config-database-password, 
   'dbname'   = $config-database-database); 
   
   $db = Zend_Db::factory($config-database-type, $params); 
   Zend_Db_Table_Abstract::setDefaultAdapter($db); 
   Zend_Registry::set('db', $db); 
   
   
 
   
 } 

 public static function setupView() 
 { 
 $view = new Zend_View; 
   
   
 $view-setEncoding('UTF-8'); 
 $viewRenderer = new 
 Zend_Controller_Action_Helper_ViewRenderer($view); 
 Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); 
 } 

 public static function sendResponse(Zend_Controller_Response_Http 
 $response) 
 { 
 
   $response-setHeader('Content-Type', 'text/html;
 charset=UTF-8', true); 
 $response-sendResponse

RE: [fw-general] ZF live settings

2008-12-09 Thread dele454

When i put a try and catch block in my setupController function. I get this
error on my webpage:


Error parsing config/settings.ini on line 6 as well as 

Fatal error: Call to a member function dispatch() on a non-object in
/usr/local/lib/apps/Bootstrap.php on line 18

line 18 looks like this

$response = self::$front-dispatch();


public static function setupController()
{
   try{
// load the Zend Components
Zend_Loader::registerAutoload();
$date = new Zend_Date();

  // Output of the desired date
   echo $date-get();



//add the setting declared in settings.ini
$config = new Zend_Config_Ini('config/settings.ini', 
'development');
Zend_Registry::set('config', $config);

//create an instance of the front controller 
self::$front = Zend_Controller_Front::getInstance();
self::$front-throwExceptions(true);
self::$front-returnResponse(true);





// Set the default controller directory:
self::$front-setControllerDirectory(array('default' =
$config-paths-data . '/controllers', 

   'admin'   = $config-paths-data .
'/modules/admin/controllers')); 
Zend_Layout::startMvc(array('layoutPath' = 
$config-paths-data .
'/views/layouts'));


// setup database connection variables
$params = array(
'host' = $config-database-hostname,
'username' = $config-database-username,
'password' = $config-database-password,
'dbname'   = $config-database-database);

$db = Zend_Db::factory($config-database-type, $params);
Zend_Db_Table_Abstract::setDefaultAdapter($db);
Zend_Registry::set('db', $db);


}
catch(Exception $e) {
 echo  $e-getMessage();

}



}

and settings.ini looks like this:

development]

 database.type  = pdo_mysql
 database.hostname   = mydomain.co.za
 database.username   = mydb007
 database.password   = mypass
 database.database   = mydb

 paths.data  = /usr/local/lib/apps
 paths.modules.admin = /usr/local/lib/apps/modules/admin 


is this a permission issue on Linux from my bootstrap file?




-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings-tp20911516p20930232.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] ZF live settings

2008-12-09 Thread dele454

putting a double quote around the db password. took the error away but then
am still getting blank pages  :(

database.password   = jserjs=tusju72

-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF-live-settings-tp20911516p20930394.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Include directive..

2008-12-08 Thread dele454

Hi,

I am modifying the apache config file on my domain to include the path to
the Zend Framework on a specified location outside the public folder.

So in my http.conf file i simply include the path to where the includes file
is to customise the virtual host:

[CODE]

# To customize this VirtualHost use an include file at the following
location
 Include
/usr/local/apache/conf/userdata/std/2/domains/mydomain.co.za/me.conf
[/CODE]

And then me.conf looks like this:
[CODE]
Include /home/domain/apps
Include /home/domain/apps/models
Include /home/domain/apps/lib
[/CODE]

But then i get this error:

[CODE]
Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at
/usr/local/apache/conf/httpd.conf.1228614930
Error:
Configuration problem detected on line 277 of file
/usr/local/apache/conf/httpd.conf.1228614930:: Syntax error on line
1 of /usr/local/apache/conf/userdata/std/2/domain/mydomain.co.za/me.conf:
Syntax error on line 1 of /home/domain/apps/Bootstrap.php:
/home/maineven/apps/Bootstrap.php:1: ?php was not closed.[/CODE]

But i do have the ?php tag closed in my Bootstrap file. I dont know why it
is saying otherwise.

Please help is needed.

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Include-directive..-tp20893928p20893928.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Auth: Advanced Usage By Example

2008-11-30 Thread dele454

Thanks for your response. Doesnt work either. Access is stillo granted :(



Bruno Friedmann-2 wrote:
 
 Hi
 Just a word : be carefull with 0/1 TRUE/FALSE and the type of your column
 and the database used.
 
 
 I suspect if you write you
 $authAdapter = new Zend_Auth_Adapter_DbTable($db, 'Members',
 'Email', 'Password', 'AND IsActive != 0');
 
 AND IsActive != 0
 
 this would work ... :-)
 As another advice to be more SQL linguistic I would inverse the  and '
 AND IsActive != '0')
 
 
 
 dele454 wrote:
 Am trying to implement a similar scenario where if the column IsActive is
 set
 to '0' the authentication should fail. A typical scenario is when a user
 just signed up and still needs to active acct before allowed to gain
 access.
 
 I followed the instruction in the Ref Guide but it isnt working. If the
 user
 supplies email+password before acct is activated - login is granted.
 
 The only code i didnt implement from the advanced useage example is the
 MD5(?) because i have something similar implemented already. Except if it
 does something else - i cant loggin with any credentials if i include it
 though
 
 
 $db= Zend_Registry::get('db');
 $authAdapter = new Zend_Auth_Adapter_DbTable($db,
 'Members',
 'Email', 'Password', 'AND IsActive != 0');
 
 $config = Zend_Registry::get('config');
  $password = $logins['password'];
  $salt = $^##@;
 $password =
 md5($salt.$logins['password']);
  
  $authAdapter-setIdentity($logins['email']);
  $authAdapter-setCredential($password);
  return $authAdapter;
 
 Please help is needed thanks :)
 
 -
 dee
 
 
 -- 
 
  Bruno Friedmann
 
 Ioda-Net Sàrl
   2830 Vellerat - Switzerland
 
   Tél : ++41 32 435 7171
   Fax : ++41 32 435 7172
   gsm : ++41 78 802 6760
   www.ioda-net.ch
 
  Centre de Formation et de Coaching En Ligne
  www.cfcel.com
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend-Auth%3A-Advanced-Usage-By-Example-tp20740513p20760074.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Auth: Advanced Usage By Example

2008-11-30 Thread dele454

AWESOME WORKS PERFECTLY :) Thank you so so much Bruno. I wonder why the
password placeholder is needed there.

Anyway thanks a mil :)



Bruno Friedmann-2 wrote:
 
 Sorry Jason in Postgresql something refer to a db, schema, table, column
 name
 so a 0=0 - column doesn't exist
 
 but yes a select false = '0' is true.
 
 But here what I've use as code which work in similar conditions
 
 $db = Zend_Db_Table_Abstract::getDefaultAdapter();
 $dbAdapter = new Zend_Auth_Adapter_DbTable($db, 'users', 'login',
 'password', 'MD5(?) AND active = TRUE');
 $dbAdapter-setCredential( $values['userpassword'] )
   -setIdentity( $values['userlogin'] );
 $result = $this-_auth-authenticate($dbAdapter);
 
 In dele454 code it's seem you missed the place for hashed password in the
 marked place for the password
 so a
 $authAdapter = new Zend_Auth_Adapter_DbTable($db, 'Members','Email',
 'Password', '? AND IsActive != 0');
  would do the trick.
 
 
 Jason Webster wrote:
 Not really...
 
 SELECT 0 = 0 // true
 SELECT FALSE = 0 // true
 SELECT FALSE = 0 // true
 
 Bruno Friedmann wrote:
 Hi
 Just a word : be carefull with 0/1 TRUE/FALSE and the type of your
 column and the database used.


 I suspect if you write you
 $authAdapter = new Zend_Auth_Adapter_DbTable($db, 'Members',
  
 'Email', 'Password', 'AND IsActive != 0');
 

 AND IsActive != 0

 this would work ... :-)
 As another advice to be more SQL linguistic I would inverse the  and '
 AND IsActive != '0')



 dele454 wrote:
  
 Am trying to implement a similar scenario where if the column
 IsActive is set
 to '0' the authentication should fail. A typical scenario is when a
 user
 just signed up and still needs to active acct before allowed to gain
 access.

 I followed the instruction in the Ref Guide but it isnt working. If
 the user
 supplies email+password before acct is activated - login is granted.

 The only code i didnt implement from the advanced useage example is the
 MD5(?) because i have something similar implemented already. Except
 if it
 does something else - i cant loggin with any credentials if i include
 it
 though


 $db= Zend_Registry::get('db');
 $authAdapter = new Zend_Auth_Adapter_DbTable($db,
 'Members',
 'Email', 'Password', 'AND IsActive != 0');

 $config = Zend_Registry::get('config');
 $password = $logins['password'];
 $salt = $^##@;
 $password =
 md5($salt.$logins['password']);

 $authAdapter-setIdentity($logins['email']);
 $authAdapter-setCredential($password);
 return $authAdapter;   

 Please help is needed thanks :)

 -
 dee
 


   
 
 
 
 -- 
 
  Bruno Friedmann
 
 Ioda-Net Sàrl
   2830 Vellerat - Switzerland
 
   Tél : ++41 32 435 7171
   Fax : ++41 32 435 7172
   gsm : ++41 78 802 6760
   www.ioda-net.ch
 
  Centre de Formation et de Coaching En Ligne
  www.cfcel.com
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend-Auth%3A-Advanced-Usage-By-Example-tp20740513p20760477.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Auth: Advanced Usage By Example

2008-11-28 Thread dele454

Am trying to implement a similar scenario where if the column IsActive is set
to '0' the authentication should fail. A typical scenario is when a user
just signed up and still needs to active acct before allowed to gain access.

I followed the instruction in the Ref Guide but it isnt working. If the user
supplies email+password before acct is activated - login is granted.

The only code i didnt implement from the advanced useage example is the
MD5(?) because i have something similar implemented already. Except if it
does something else - i cant loggin with any credentials if i include it
though


$db= Zend_Registry::get('db');
$authAdapter = new Zend_Auth_Adapter_DbTable($db, 'Members',
'Email', 'Password', 'AND IsActive != 0');

$config = Zend_Registry::get('config');
$password = $logins['password'];
$salt = $^##@;
$password = md5($salt.$logins['password']);

$authAdapter-setIdentity($logins['email']);
$authAdapter-setCredential($password);
return $authAdapter;

Please help is needed thanks :)

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend-Auth%3A-Advanced-Usage-By-Example-tp20740513p20740513.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] SPAM + Zend Filter

2008-11-26 Thread dele454

Hi

I just have a question regarding spam prevention on forms. Does Filtering
input with the Zend_Filter_StripTags help remove injection headers and tags
that could initiate spam sending?

Am using the component at the moment for my forms which strips out any tag
elements and was thinking since it would strip out any tag then the spammer
wont be able to execute his spam sending.

Am i correct on this assumption?

Thanks and looking forward to the responses. Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/SPAM-%2B-Zend-Filter-tp20714805p20714805.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] How do I ...

2008-11-16 Thread dele454

Hi,

Is there a way of detecting/knowing using an Action Helper what
controller+action the user click before getting to another page. In order
words the controller+action that brought the user to the current page?

Thanks will be looking forward to any response concerning this :)

-
dee
-- 
View this message in context: 
http://www.nabble.com/How-do-I-...-tp20529701p20529701.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How do I ...

2008-11-16 Thread dele454

Thanks Tobias. I currently have an implementation of the FlashMessenger for
sending error messages to view. Will have a look at it shortly on how i can
implement your suggestion. 

Thanks once again. Will let you know how it turns out :)



Tobias Gies wrote:
 
 hey dee,
 
 you could use the flashMessenger action helper for that, or your can
 create
 your own action helper/plugin that saves this data to a session namespace
 w/
 expirationHops set to 1.
 
 Best regards,
 Tobias
 
 2008/11/16 dele454 [EMAIL PROTECTED]
 

 Hi,

 Is there a way of detecting/knowing using an Action Helper what
 controller+action the user click before getting to another page. In order
 words the controller+action that brought the user to the current page?

 Thanks will be looking forward to any response concerning this :)

 -
 dee
 --
 View this message in context:
 http://www.nabble.com/How-do-I-...-tp20529701p20529701.html
 Sent from the Zend Framework mailing list archive at Nabble.com.


 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/How-do-I-...-tp20529701p20529880.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Capcha

2008-11-05 Thread dele454

For some reason it seems the Zend_Captcha component is creating two images
instead of one because it is seeing two session ids. I dont know why this is
so or where the other is coming from

On running print_r($captcha-getSession(), only one session echoes out. So i
wonder where the second is coming from and i dont have any persistent
session active. 

I have found a solution to the validation - though i dont think it is ideal
but i need to get this working.

On generation of the captcha image i sent to the word to the view to a
hidden field. On form submisssion i simply check the entered text with that
of the generated captcha word from the hidden field for sameness. if same
then the user has entered the right text.




dele454 wrote:
 
 Thanks for the code. Am not using Zend_Form for my forms. Am using plain
 html. I just didnt find it flexible enough for views such as floating
 three drop downs side by side and etc. It was taking too much of my time
 trying to make my view display as intended.
 
 Thanks for the code anyway.
 
 
 
 vRandom wrote:
 
 
 I found this example code in one of the bug reports ...
 (http://framework.zend.com/issues/browse/ZF-4045)
 
 Works good enough to get an idea of how to put the captcha to use. (as
 there
 is limited documentation examples)
 
 I didn't see one of these Zend_Form_Element_Captcha in your code, maybe
 it
 is what you need.
 
 Slightly modified for quick test...
 
 Try something like this : 
 
  // (fix pathing for your dev setup)
  // setup for captcha image
 
$captchaImage = new Zend_Captcha_Image();
 $captchaImage-setFont(DATAPATH.'/VeraBd.ttf');
 $captchaImage-setFontSize(30);
 $captchaImage-setWordlen(6);
 $captchaImage-setImgDir(CAPTCHAPATH);
 $captchaImage-setImgUrl('/images/captcha/');
 $captchaImage-setWidth(175);
 $captchaImage-setHeight(75);
 $captchaImage-setName('captcha');
 
  // text box for user input
 $elementCaptcha = new Zend_Form_Element_Captcha(
 'captcha', array('captcha' = $captchaImage)
 );
 
  // make form
 $form = new Zend_Form(array(
 'action' = '/manage/',
 'method' = 'post',
 ));
 
  // add items to form
 $form-addElement($elementCaptcha, 'captcha')
 -addElement('submit', 'process', array(
 'required' = false,
 'ignore'   = true,
 'label'= 'Process',
 ));
 
  // set image to view
 $this-view-captcha = $captchaImage;
 
  // check if form post
 $request = $this-getRequest();
 if (!$request-isPost()) {
  // if not show form
 $this-view-form = $form;  
 }
 
  // test form valid?
 if (!$form-isValid($request-getPost())) {
  // if not show form
 $this-view-form = $form;
 }
 
  
  // this was originally in the view script
  // but I didn't want to wack my existing so
  // modified it to work here
 
  // if we have form, show it - or form did validate
 if (isset($this-view-form)) {
  echo 'h2Testing Captcha/h2';
  echo $this-view-form;
  } else {
  echo 'h2Captcha Form validated!/h2';
  }
 
  // dump the capcha data
 if (isset($this-view-captcha)) {
  echo 'h4Captcha word dump/h4';
  echo 'pre'.
 var_dump($this-view-captcha-getWord()).'/pre';
 } 
 
 
 
 -Original Message-
 From: dele454 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 04, 2008 5:19 AM
 To: fw-general@lists.zend.com
 Subject: Re: [fw-general] Zend_Capcha
 
 
 Any one out there with help? Please!!
 
 dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. 
 If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action {
 
 public function indexAction(){
 
 $this-_helper-layout-setLayout('layout-site');
 $view = new Zend_View();
 // Originating request:
 $captcha = new Zend_Captcha_Image(array(
 'name' = 'foo',
 'height' = 100,
 'width' = 202,
 'wordLen'= '6',
 'expiration' = '300',
 'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',

 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
 'imgUrl' = '../img/captcha',
 'fontSize' = '24',
 
 
 
 ));
 $id = $captcha-generate();
 $this-view-showCaptcha = $captcha-render($view);
 
 
 
 if ($captcha-isValid($_POST['captcha'])) {
echo

RE: [fw-general] Zend_Capcha

2008-11-05 Thread dele454

For some reason it seems the Zend_Captcha component is creating two images
instead of one because it is seeing two session ids. I dont know why this is
so or where the other is coming from

On running print_r($captcha-getSession(), only one session echoes out. So i
wonder where the second is coming from and i dont have any persistent
session active.

I have found a solution to the validation - though i dont think it is ideal
but i need to get this working.

On generation of the captcha image i sent to the word to the view to a
hidden field. On form submisssion i simply check the entered text with that
of the generated captcha word from the hidden field for sameness. if same
then the user has entered the right text.




Thanks for the code. Am not using Zend_Form for my forms. Am using plain
html. I just didnt find it flexible enough for views such as floating three
drop downs side by side and etc. It was taking too much of my time trying to
make my view display as intended.

Thanks for the code anyway.


dele454 wrote:
 
 Thanks for the code. Am not using Zend_Form for my forms. Am using plain
 html. I just didnt find it flexible enough for views such as floating
 three drop downs side by side and etc. It was taking too much of my time
 trying to make my view display as intended.
 
 Thanks for the code anyway.
 
 
 
 vRandom wrote:
 
 
 I found this example code in one of the bug reports ...
 (http://framework.zend.com/issues/browse/ZF-4045)
 
 Works good enough to get an idea of how to put the captcha to use. (as
 there
 is limited documentation examples)
 
 I didn't see one of these Zend_Form_Element_Captcha in your code, maybe
 it
 is what you need.
 
 Slightly modified for quick test...
 
 Try something like this : 
 
  // (fix pathing for your dev setup)
  // setup for captcha image
 
$captchaImage = new Zend_Captcha_Image();
 $captchaImage-setFont(DATAPATH.'/VeraBd.ttf');
 $captchaImage-setFontSize(30);
 $captchaImage-setWordlen(6);
 $captchaImage-setImgDir(CAPTCHAPATH);
 $captchaImage-setImgUrl('/images/captcha/');
 $captchaImage-setWidth(175);
 $captchaImage-setHeight(75);
 $captchaImage-setName('captcha');
 
  // text box for user input
 $elementCaptcha = new Zend_Form_Element_Captcha(
 'captcha', array('captcha' = $captchaImage)
 );
 
  // make form
 $form = new Zend_Form(array(
 'action' = '/manage/',
 'method' = 'post',
 ));
 
  // add items to form
 $form-addElement($elementCaptcha, 'captcha')
 -addElement('submit', 'process', array(
 'required' = false,
 'ignore'   = true,
 'label'= 'Process',
 ));
 
  // set image to view
 $this-view-captcha = $captchaImage;
 
  // check if form post
 $request = $this-getRequest();
 if (!$request-isPost()) {
  // if not show form
 $this-view-form = $form;  
 }
 
  // test form valid?
 if (!$form-isValid($request-getPost())) {
  // if not show form
 $this-view-form = $form;
 }
 
  
  // this was originally in the view script
  // but I didn't want to wack my existing so
  // modified it to work here
 
  // if we have form, show it - or form did validate
 if (isset($this-view-form)) {
  echo 'h2Testing Captcha/h2';
  echo $this-view-form;
  } else {
  echo 'h2Captcha Form validated!/h2';
  }
 
  // dump the capcha data
 if (isset($this-view-captcha)) {
  echo 'h4Captcha word dump/h4';
  echo 'pre'.
 var_dump($this-view-captcha-getWord()).'/pre';
 } 
 
 
 
 -Original Message-
 From: dele454 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 04, 2008 5:19 AM
 To: fw-general@lists.zend.com
 Subject: Re: [fw-general] Zend_Capcha
 
 
 Any one out there with help? Please!!
 
 dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. 
 If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action {
 
 public function indexAction(){
 
 $this-_helper-layout-setLayout('layout-site');
 $view = new Zend_View();
 // Originating request:
 $captcha = new Zend_Captcha_Image(array(
 'name' = 'foo',
 'height' = 100,
 'width' = 202,
 'wordLen'= '6',
 'expiration' = '300',
 'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',

 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
 'imgUrl' = '../img/captcha',
 'fontSize' = '24

Re: [fw-general] Zend_Capcha

2008-11-04 Thread dele454

http://www.nabble.com/file/p20325789/1.gif 

The captcha gets created but i noticed besides the fact that i cant get the
text on the captcha validated with entered text. On my folder two captcha
images are created on hiting the page.

I have tried to figure out what might be causing this but to no avail. Any
suggestions?

http://www.nabble.com/file/p20325789/2.gif 





dele454 wrote:
 
 Any one out there with help? Please!!
 
 dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action
 {
 
  public function indexAction(){
  
  $this-_helper-layout-setLayout('layout-site');
  $view = new Zend_View();
  // Originating request:
  $captcha = new Zend_Captcha_Image(array(
  'name' = 'foo',
  'height' = 100,
  'width' = 202,
  'wordLen'= '6',
  'expiration' = '300',
  'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',
  
 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
  'imgUrl' = '../img/captcha',
  'fontSize' = '24',
  
  
  
  ));
  $id = $captcha-generate();
  $this-view-showCaptcha = $captcha-render($view);
  
  
  
  if ($captcha-isValid($_POST['captcha'])) {
echo Validated!;

  }
   else{ echo no;
   print_r($captcha-getMessages());}
  }   
   
  
 
 }
 
 When i submit the form it always echos 'no'!. Printing the error message
 i get this
 
 Array ( [missingValue] = Empty captcha value ) 
 
 How can i sort this out. I am thinking the captcha will always have a
 different value on post when compared to the text field. How can i
 resolve this.
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Captcha-tp20300142p20325789.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Capcha

2008-11-04 Thread dele454

Any one out there with help? Please!!

dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action
 {
 
   public function indexAction(){
   
   $this-_helper-layout-setLayout('layout-site');
   $view = new Zend_View();
   // Originating request:
   $captcha = new Zend_Captcha_Image(array(
   'name' = 'foo',
   'height' = 100,
   'width' = 202,
   'wordLen'= '6',
   'expiration' = '300',
   'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',
   
 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
   'imgUrl' = '../img/captcha',
   'fontSize' = '24',
   
   
   
   ));
   $id = $captcha-generate();
   $this-view-showCaptcha = $captcha-render($view);
   
   
   
   if ($captcha-isValid($_POST['captcha'])) {
echo Validated!;
 
  }
else{ echo no;
print_r($captcha-getMessages());}
   }   

   
 
 }
 
 When i submit the form it always echos 'no'!. Printing the error message i
 get this
 
 Array ( [missingValue] = Empty captcha value ) 
 
 How can i sort this out. I am thinking the captcha will always have a
 different value on post when compared to the text field. How can i resolve
 this.
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Capcha-tp20300142p20319514.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend_Capcha

2008-11-04 Thread dele454

Thanks for the code. Am not using Zend_Form for my forms. Am using plain
html. I just didnt find it flexible enough for views such as floating three
drop downs side by side and etc. It was taking too much of my time trying to
make my view display as intended.

Thanks for the code anyway.



vRandom wrote:
 
 
 I found this example code in one of the bug reports ...
 (http://framework.zend.com/issues/browse/ZF-4045)
 
 Works good enough to get an idea of how to put the captcha to use. (as
 there
 is limited documentation examples)
 
 I didn't see one of these Zend_Form_Element_Captcha in your code, maybe it
 is what you need.
 
 Slightly modified for quick test...
 
 Try something like this : 
 
   // (fix pathing for your dev setup)
   // setup for captcha image
 
 $captchaImage = new Zend_Captcha_Image();
 $captchaImage-setFont(DATAPATH.'/VeraBd.ttf');
 $captchaImage-setFontSize(30);
 $captchaImage-setWordlen(6);
 $captchaImage-setImgDir(CAPTCHAPATH);
 $captchaImage-setImgUrl('/images/captcha/');
 $captchaImage-setWidth(175);
 $captchaImage-setHeight(75);
 $captchaImage-setName('captcha');
 
   // text box for user input
 $elementCaptcha = new Zend_Form_Element_Captcha(
 'captcha', array('captcha' = $captchaImage)
 );
 
   // make form
 $form = new Zend_Form(array(
 'action' = '/manage/',
 'method' = 'post',
 ));
 
   // add items to form
 $form-addElement($elementCaptcha, 'captcha')
 -addElement('submit', 'process', array(
 'required' = false,
 'ignore'   = true,
 'label'= 'Process',
 ));
 
   // set image to view
 $this-view-captcha = $captchaImage;
 
   // check if form post
 $request = $this-getRequest();
 if (!$request-isPost()) {
   // if not show form
 $this-view-form = $form;  
 }
 
   // test form valid?
 if (!$form-isValid($request-getPost())) {
   // if not show form
 $this-view-form = $form;
 }
 
   
   // this was originally in the view script
   // but I didn't want to wack my existing so
   // modified it to work here
 
   // if we have form, show it - or form did validate
  if (isset($this-view-form)) {
   echo 'h2Testing Captcha/h2';
   echo $this-view-form;
  } else {
   echo 'h2Captcha Form validated!/h2';
  }
 
   // dump the capcha data
  if (isset($this-view-captcha)) {
   echo 'h4Captcha word dump/h4';
   echo 'pre'.
 var_dump($this-view-captcha-getWord()).'/pre';
  } 
 
 
 
 -Original Message-
 From: dele454 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, November 04, 2008 5:19 AM
 To: fw-general@lists.zend.com
 Subject: Re: [fw-general] Zend_Capcha
 
 
 Any one out there with help? Please!!
 
 dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. 
 If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action {
 
  public function indexAction(){
  
  $this-_helper-layout-setLayout('layout-site');
  $view = new Zend_View();
  // Originating request:
  $captcha = new Zend_Captcha_Image(array(
  'name' = 'foo',
  'height' = 100,
  'width' = 202,
  'wordLen'= '6',
  'expiration' = '300',
  'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',

 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
  'imgUrl' = '../img/captcha',
  'fontSize' = '24',
  
  
  
  ));
  $id = $captcha-generate();
  $this-view-showCaptcha = $captcha-render($view);
  
  
  
  if ($captcha-isValid($_POST['captcha'])) {
echo Validated!;

  }
   else{ echo no;
   print_r($captcha-getMessages());}
  }   
   
  
 
 }
 
 When i submit the form it always echos 'no'!. Printing the error 
 message i get this
 
 Array ( [missingValue] = Empty captcha value )
 
 How can i sort this out. I am thinking the captcha will always have a 
 different value on post when compared to the text field. How can i 
 resolve this.
 
 
 
 -
 dee
 --
 View this message in context:
 http://www.nabble.com/Zend_Capcha-tp20300142p20319514.html
 Sent from the Zend Framework mailing list archive at Nabble.com.
 
 
 
 


-
dee
-- 
View this message in context: 
http

[fw-general] Zend_Capcha

2008-11-03 Thread dele454

hi,

i am trying to verify the text submitted to match that of the captcha. If
valid(same) echo 'validated'.

class JoinController extends Zend_Controller_Action
{

public function indexAction(){

$this-_helper-layout-setLayout('layout-site');
$view = new Zend_View();
// Originating request:
$captcha = new Zend_Captcha_Image(array(
'name' = 'foo',
'height' = 100,
'width' = 202,
'wordLen'= '6',
'expiration' = '300',
'font' =
'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',

'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
'imgUrl' = '../img/captcha',
'fontSize' = '24',
'class' = 'captcha'


));
$id = $captcha-generate();
$this-view-showCaptcha = $captcha-render($view);



if ($captcha-isValid($_POST['captcha'])) {
   echo Validated!;
  
 }
 else{ echo no;
 print_r($captcha-getMessages());}
}   
 


}

When i submit the form it always echos 'no'!. Printing the error message i
get this

Array ( [missingValue] = Empty captcha value ) 

How can i sort this out. I am thinking the captcha will always have a
different value on post when compared to the text field. How can i resolve
this.

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Capcha-tp20300142p20300142.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Capcha

2008-11-03 Thread dele454

Forgot to mention that captcha being the name i gave the textfield to check
the captcha value with.



-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Capcha-tp20300142p20300315.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Capcha

2008-11-03 Thread dele454

I changed the array item:

'name' = 'captcha' instead and now i have a bad captcha value is wrong
error. - though am entering the right characters



dele454 wrote:
 
 hi,
 
 i am trying to verify the text submitted to match that of the captcha. If
 valid(same) echo 'validated'.
 
 class JoinController extends Zend_Controller_Action
 {
 
   public function indexAction(){
   
   $this-_helper-layout-setLayout('layout-site');
   $view = new Zend_View();
   // Originating request:
   $captcha = new Zend_Captcha_Image(array(
   'name' = 'foo',
   'height' = 100,
   'width' = 202,
   'wordLen'= '6',
   'expiration' = '300',
   'font' =
 'C:/xampp/htdocs/xampp/mainevent/public_html/img/font/ravie.ttf',
   
 'imgDir'='C:/xampp/htdocs/xampp/mainevent/public_html/img/captcha',
   'imgUrl' = '../img/captcha',
   'fontSize' = '24',
   'class' = 'captcha'
   
   
   ));
   $id = $captcha-generate();
   $this-view-showCaptcha = $captcha-render($view);
   
   
   
   if ($captcha-isValid($_POST['captcha'])) {
echo Validated!;
 
  }
else{ echo no;
print_r($captcha-getMessages());}
   }   

   
 
 }
 
 When i submit the form it always echos 'no'!. Printing the error message i
 get this
 
 Array ( [missingValue] = Empty captcha value ) 
 
 How can i sort this out. I am thinking the captcha will always have a
 different value on post when compared to the text field. How can i resolve
 this.
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Capcha-tp20300142p20300207.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] ZF Dojo

2008-10-25 Thread dele454

hi,

Am very new to Dojo and reading Dojo as a javascript library and its
implementation in the ZF is bringing a bit of confusion my way.

I just want to know this: does the Zend_Dojo component only offer ONLY
layout  Form dijits capabilities - cos that is all i see in the
documentation?

Am reading a book on Dojo and it mentions some functions in Dojo Base for
events, AJAX etc. Are there any supports for these features too in
Zend_Dojo?

Sorry if i sound confusion or naive but am really a bit confused because the
documentation doesnt make mention of any of these. I am so lost!!

-
dee
-- 
View this message in context: 
http://www.nabble.com/ZF---Dojo-tp20168442p20168442.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Layout

2008-09-23 Thread dele454

Hi Mark,

Thanks for the response. So what you are saying is that as long as i keep
the  startMvc() empty  and specify my module paths, ZF will always look for
the layout.phtml files within the specified module directories?

In my scenario, i just have one module:admin module - where the cms apps
reside. But the main site just resides on the app root folder. For better
understanding here is my folder structure:

- webapp
  -- public_html
--- images
--- bla blah

  ---controllers
  ---views
   ---layouts
---layout.phtml
---layout-browse.phtml
  --modules
   ---admin
   ---controllers
   ---views
   ---layouts
---layout.phtml
---layout-edit-mode.phtml
  
Like i said before i simply want to keep the layout of my CMS separate from 
that of the main site. The main site isnt a module. So what would my
startMvc() look like then with my folder structure in mind.

In my bootstrap i have something like this at the moment:

Zend_Layout::startMvc(array( 
 'layoutPath' = $config-paths-data .
'/module/admin/views/layouts');

I need to include that path layout path for the main site.

Thanks
 


MarkDNA wrote:
 
 
 dele454 wrote:
 
 I just want to know if one can specify more than one layout path in the
 startMvc function? having something like this:
 
 Zend_Layout::startMvc(array(
  'layoutPath1' =
 $config-paths-data . '/module1/admin/views/layouts')
  'layoutPath2' =
 $config2-paths-data . '/module2/admin/views/layouts')
 );
 
 Am asking because since layout.phtml is the default layout to be used
 except if specified otherwise. What if i have the default rendering
 layout.phtml in both folders how then can i let the Front Controller know
 which layout i am referring to in what folder?
 
 
 
 Not sure if this is what you are asking, but if you have modules set up
 with something like:
 $front-addModuleDirectory('application/modules'); 
 where your module1/, module2/, etc directories are in the modules/ dir,
 then ZF uses the layout.phtml file within the views/scripts/ dir for each
 module. I.e. module1/views/scripts/layout.phtml will be used for the
 controllers within module1; module2/views/scripts/layout.phtml will be
 used for the controllers within module2; etc. Looks like you're using
 different paths, but if you have that worked out, it shouldn't be a
 problem. I'm doing that myself right now. I am passing no params to
 Zend_Layout::startMvc().
 
 -Mark
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Layout-tp19608818p19622879.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Layout

2008-09-23 Thread dele454

My other option would be to move the layout folder from the admin module to
the webapp root - so I can the 'global' access - with lack of a better word

But am trying to avoid the CMS layouts all clustering up with the main site
layouts. I just want to keep both separate and manageable.


Ralph Schindler-2 wrote:
 
 For a bit more background: why do you have site wide layouts inside
 specific
 modules?  Shouldn't modules share the same global layout?
 
 -ralph
 
 
 On 9/22/08 9:15 AM, dele454 [EMAIL PROTECTED] wrote:
 
 
 I just want to know if one can specify more than one layout path in the
 startMvc function? having something like this:
 
 Zend_Layout::startMvc(array(
  'layoutPath1' =
 $config-paths-data .
 '/module1/admin/views/layouts')
  'layoutPath2' =
 $config2-paths-data
 . '/module2/admin/views/layouts')
 );
 
 Am asking because since layout.phtml is the default layout to be used
 except
 if specified otherwise. What if i have the default rendering layout.phtml
 in
 both folders how then can i let the Front Controller know which layout i
 am
 referring to in what folder?
 
 Another question is using different layouts in any of the paths
 specified.
 Would i have to include a path to the layout i want to use in my
 controller
 like:
 
 $this-_helper-layout-setLayout('layoutPath2/layout-edit-mode') ???
 
 Thanks in advance.
 
 N.B i just have one path specified at the moment for the module i just
 finished in my bootstrap. I want to use a different layout folder for the
 new module i developing now hence my quest.
 
 
 
 -
 dee
 
 -- 
 Ralph Schindler
 Software Engineer | [EMAIL PROTECTED]
 Zend Framework| http://framework.zend.com/
 
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Layout-tp19608818p19624607.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Layout

2008-09-23 Thread dele454

Hi Mark,

Thanks for the response. Am not confusing views with layouts. The files in
the structure i specfied are just for illustrative purposes.  I have both my
partials and layouts in different folders - just for less confusion for me.
What i decided to do is to move the layout folder to the root and have all
my layouts for both the CMS and Main site in there. so the structure now
becomes:

- webapp
  -- public_html
--- images
--- bla blah

  ---controllers
  ---views
   ---layouts
---layout.phtml
---layout-browse.phtml
  ---partials

  --modules
   ---admin
   ---controllers
   ---views
  


MarkDNA wrote:
 
 I have something similar to that, but I'm not using the layout paths - I'm
 just dropping the layout into the views/scripts/ dir for each module, and
 for the main site (login screen in my case). You might just have to give
 it a try to see what your results are. You can set layouts in the
 controllers with:
 
 $this-_helper-layout-setLayout('foobaz');
 
 Looking at the names for your layouts, I hope you aren't confusing layouts
 with views. A view for your browse action and one for your edit action can
 use the same layout if you want. In a layout file you use
 $this-layout()-content to display the view for your controller action.
 So if you have an editAction() in you controller, $this-layout()-content
 will display edit.phtml where you place it in the layout. You use the
 views to include headers, navs, and footers mostly. Sorry if I'm off-base
 and you know this already!
 
 -Mark
 
 
 dele454 wrote:
 
 Hi Mark,
 
 Thanks for the response. So what you are saying is that as long as i keep
 the  startMvc() empty  and specify my module paths, ZF will always look
 for the layout.phtml files within the specified module directories?
 
 In my scenario, i just have one module:admin module - where the cms apps
 reside. But the main site just resides on the app root folder. For better
 understanding here is my folder structure:
 
 - webapp
   -- public_html
 --- images
 --- bla blah
 
   ---controllers
   ---views
---layouts
 ---layout.phtml
 ---layout-browse.phtml
   --modules
---admin
---controllers
---views
---layouts
 ---layout.phtml
 ---layout-edit-mode.phtml
   
 Like i said before i simply want to keep the layout of my CMS separate
 from  that of the main site. The main site isnt a module. So what would
 my startMvc() look like then with my folder structure in mind.
 
 In my bootstrap i have something like this at the moment:
 
 Zend_Layout::startMvc(array( 
  'layoutPath' = $config-paths-data
 . '/module/admin/views/layouts');
 
 I need to include that path layout path for the main site.
 
 Thanks
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Layout-tp19608818p19631518.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Layout

2008-09-23 Thread dele454

I think i would have been more reusable for me if one could specifya series
of layout paths for possible use. and on setlayout() the ZF would look into
all the paths to render the specified layout choice.

I just implemented a naming convention for the layout files so i can
differentiate between those for the CMS from those for the main site.

Thanks Graham


Graham Anderson wrote:
 
 On Monday 22 September 2008 18:34:06 Ralph Schindler wrote:
 For a bit more background: why do you have site wide layouts inside
 specific modules?  Shouldn't modules share the same global layout?

 -ralph
 
 Layouts need not be specifically site wide, they may be applicable to a 
 certain list of modules. Module's should not be restricted to the same
 batch 
 of global layouts for reasons of re-use and re-distribution.
 
 $layout-setLayout() caters for this to an extent; but like other aspects
 of 
 the MVC I would like to see more options for being module aware.
 
 Graham
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Layout-tp19608818p19631566.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] HeadMeta Helper...

2008-09-19 Thread dele454

Hi

Does anyone know the correct directive for disallowing caching of images
using the HeadMeta Helper?

After replacing some remotes images via an upload, my browser still caches
the old image. I dont want this. Someone suggested having an apache
directive that refuses caching of images. 
Please help.

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/HeadMeta-Helper...-tp19574276p19574276.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] HeadMeta Helper...

2008-09-19 Thread dele454

i have tried something like this but to no avail:

?php echo  $this-headMeta()-appendHttpEquiv('expires', 'Wed, 26 Feb 1997
08:21:57 GMT')
  -appendHttpEquiv('pragma', 'no-cache')
  -appendHttpEquiv('Cache-Control', 'no-cache')
  -appendHttpEquiv('Content-Type', 'image/jpg');
?


dele454 wrote:
 
 Hi
 
 Does anyone know the correct directive for disallowing caching of images
 using the HeadMeta Helper?
 
 After replacing some remotes images via an upload, my browser still caches
 the old image. I dont want this. Someone suggested having an apache
 directive that refuses caching of images. 
 Please help.
 
 Thanks
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/HeadMeta-Helper...-tp19574276p19581853.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: AW: [fw-general] HeadMeta Helper...

2008-09-19 Thread dele454

Thanks for this

Am using the Zend_Layout how then do i make my layout scripts see this
declaration after adding it to my action controller. At present though i
have added it to my controller it isnt visible on my layout template and
image is still caching

Thanks



Stefan Gehrig wrote:
 
 He dele454,
 
 you cannot set HTTP-EQUIV meta-tags on an image... These are (X)HTML-tags
 to
 be used in (X)HTML-pages - images on the other side are send as binary
 data
 in the according format (JPEG, GIF, PNG for example), adding meta-tags to
 these data-streams has no effect other then corrupting the image data.
 You have to set the response headers in your action accordingly:
 
 ?php
 $this-getResponse()-setHeader('Content-Type', 'image/jpg');
 $this-getResponse()-setHeader('Cache-Control', 'no-cache');
 [...]
 ?
 
 Best regards
 
 Stefan
 
 -Ursprüngliche Nachricht-
 Von: dele454 [mailto:[EMAIL PROTECTED] 
 Gesendet: Samstag, 20. September 2008 03:52
 An: fw-general@lists.zend.com
 Betreff: Re: [fw-general] HeadMeta Helper...
 
 
 i have tried something like this but to no avail:
 
 ?php echo  $this-headMeta()-appendHttpEquiv('expires', 'Wed, 26 Feb
 1997
 08:21:57 GMT')
   -appendHttpEquiv('pragma', 'no-cache')
   -appendHttpEquiv('Cache-Control', 'no-cache')
 -appendHttpEquiv('Content-Type', 'image/jpg');
 ?
 
 
 dele454 wrote:
 
 Hi
 
 Does anyone know the correct directive for disallowing caching of images
 using the HeadMeta Helper?
 
 After replacing some remotes images via an upload, my browser still
 caches
 the old image. I dont want this. Someone suggested having an apache
 directive that refuses caching of images. 
 Please help.
 
 Thanks
 
 
 
 -
 dee
 -- 
 View this message in context:
 http://www.nabble.com/HeadMeta-Helper...-tp19574276p19581853.html
 Sent from the Zend Framework mailing list archive at Nabble.com.
 
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/HeadMeta-Helper...-tp19574276p19582595.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Passing an array from PHP to Javascript

2008-09-16 Thread dele454

Thanks for the tips. But i CAN'T apply any of them now. The design has been
approved and i need to i implement things as they are. 'Over engineered' - I
dont care. As long my code works as expected. I simply want to pass my PHP
array into my javascript function. - very simple code i dont see why i need
to implement a library just for that.



Colin Guthrie-6 wrote:
 
 dele454 wrote:
 WHat exactly am i doing wrong??? currently my URL reads as
 Code:
 
 http://mainevent.com/admin/galleries/delete-pics/pid/delete[]/type/event/id/313
 
 I think the main hassle is from posting the form getting all the
 checkboxes
 in array delete[] to the js and then to the controller that then
 initiates
 the delete by reading the parameter from the URL, iterating over the
 array
 variable etc.
 
 Pls help!!
 
 
 As a general bit of advice, I would never do any destructive with GET 
 requests (e.g. manipulating the URL and redirecting via window.location).
 
 If you need to do it fully in javascript, look at some kind of AJAX call 
 that can do POSTs (my preference is jquery, but dojo may be preferred 
 with ZF...)
 
 
 But, really this is over engineered and you should look at a different 
 approach.. here is my hint:
 
 1. Just use a normal form. Have all the checkboxes and the Delete 
 Selected button on the same form.
 2. POST said form (do not use GET).
 3. If you want to give the user a chance to backout with a javascript 
 confirmation, define an onsubmit handler for the form. Depending on what 
 this handler returns, the browser will either process or cancel the form 
 submission. So you in it's most basic form:
 form method=post action=myurl onsubmit=return confirm('Are you 
 sure?');
 
 That should be better!
 
 Oh, and just for future reference if you want to pass arrays or generic 
 classes to javascript from php, you want to look into JSON and 
 specifically the json_encode() function (although there may be a ZF 
 wrapped up version - not sure!)
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19511848p19514015.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Passing an array from PHP to Javascript

2008-09-16 Thread dele454

hi Colin,

My apologies if i came out as been naive and ungrateful. I was just under a
lot of presssure here and just wanted a quick fix - my apologies sincerely.
After taking a break off the work load and having my mind cleared i feel so
stupid for such a reply from me.

So i retract my initial comment. Thanks for taking the time to elaborate on
the possible way of going about this. I will take some time to implement
something - based on your suggestions and let you know the outcome.

Thanks once again and my apologies



Colin Guthrie-6 wrote:
 
 dele454 wrote:
 Thanks for the tips. But i CAN'T apply any of them now. The design has
 been
 approved and i need to i implement things as they are. 'Over engineered'
 - I
 dont care. As long my code works as expected. I simply want to pass my
 PHP
 array into my javascript function. - very simple code i dont see why i
 need
 to implement a library just for that.
 
 I wasn't suggesting you change the visual design, or do you mean a 
 different kind of design?
 
 Do you allow the user to select some pictures and not others? If so your 
 delete multiple button does not work as you pass the *gallery* id, not 
 the list of selected picture ids.
 
 If you do not allow the user to select some and not others, then there 
 is no point in producing the individual checkboxes next to the pictures, 
 just use a Delete gallery button and be done with it.
 
 I've explained how you would implement a form that could happily accept 
 an array of selected picture ids so there is little more help I can give 
 you are not going to follow that route.
 
 I have explained also how to pass a PHP array into JS, but as I said 
 before, this is almost certainly not what you want to do to achieve this 
 kind of interface.
 
 What you actually have is a list of selected items in javascript and you 
 want to pass that back to PHP as an array! it's precisely the other way 
 around. This is easily possible and by naming the checkboxes as you have 
 you are very much on the right route, but you should allow the form to 
 be submitted naturally, do not try to force it via a window.location = 
 'blah' hack. If you insist on doing this then you will have to cycle 
 through the elements of the form with the specific name and append 
 delete[]=ID multiple times to your URL (or /delete/ID multiple times 
 if you've wrapped up the URL parsing in a ZF route appropriately).
 
 But trust me. Use a form. Use POST, submit it normally with an onsubmit 
 confirmation function. (you could also submit the form by calling the 
 submit() method on the form itself, but this will prevent your interface 
 working on browsers which have JS disabled - my recommended way would 
 work just find without javascript, albeit sans a warning).
 
 Col
 
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19511848p19520162.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Passing an array from PHP to Javascript

2008-09-16 Thread dele454

I see exactly what you have been saying - again my mind was too saturated to
see clearly! :(

Anyway, just to reply one some of the questions you asked.

The intention is that the user can either delete the picture indivually
using the delete button next to each picture or select all and delete all. -
but at the same time the user could deselect some pics - the intention is
such that the user can delete a lot of pics at once.

The reason my URL looks like am using a GET method is because the delete
button is not a button but a link. the full view of my design is this just
to explain a bit more:

http://www.nabble.com/file/p19520252/untitled-2.gif 

I see what am doing wrong now - just to butress on your suggestions, i need
to make that 'delete' button an actual button not a link - so the form can
actually get submitted naturally via the POST method. From my controller
retrieve the delete[] and iterate for deletion.

I see clearly now. I think i got confused along the line while coding. 



Colin Guthrie-6 wrote:
 
 dele454 wrote:
 Thanks for the tips. But i CAN'T apply any of them now. The design has
 been
 approved and i need to i implement things as they are. 'Over engineered'
 - I
 dont care. As long my code works as expected. I simply want to pass my
 PHP
 array into my javascript function. - very simple code i dont see why i
 need
 to implement a library just for that.
 
 I wasn't suggesting you change the visual design, or do you mean a 
 different kind of design?
 
 Do you allow the user to select some pictures and not others? If so your 
 delete multiple button does not work as you pass the *gallery* id, not 
 the list of selected picture ids.
 
 If you do not allow the user to select some and not others, then there 
 is no point in producing the individual checkboxes next to the pictures, 
 just use a Delete gallery button and be done with it.
 
 I've explained how you would implement a form that could happily accept 
 an array of selected picture ids so there is little more help I can give 
 you are not going to follow that route.
 
 I have explained also how to pass a PHP array into JS, but as I said 
 before, this is almost certainly not what you want to do to achieve this 
 kind of interface.
 
 What you actually have is a list of selected items in javascript and you 
 want to pass that back to PHP as an array! it's precisely the other way 
 around. This is easily possible and by naming the checkboxes as you have 
 you are very much on the right route, but you should allow the form to 
 be submitted naturally, do not try to force it via a window.location = 
 'blah' hack. If you insist on doing this then you will have to cycle 
 through the elements of the form with the specific name and append 
 delete[]=ID multiple times to your URL (or /delete/ID multiple times 
 if you've wrapped up the URL parsing in a ZF route appropriately).
 
 But trust me. Use a form. Use POST, submit it normally with an onsubmit 
 confirmation function. (you could also submit the form by calling the 
 submit() method on the form itself, but this will prevent your interface 
 working on browsers which have JS disabled - my recommended way would 
 work just find without javascript, albeit sans a warning).
 
 Col
 
 
 Col
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19511848p19520252.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Passing an array from PHP to Javascript

2008-09-16 Thread dele454

Hi Colin,

Am not really bent of having the form process on GET. My forms use the POST
method and i am changing it to GET. I simply used the URL path i posted
earlier as a way of idenitfying which of the pics need to be deleted as a
parameter.





Colin Guthrie-6 wrote:
 
 dele454 wrote:
 I see exactly what you have been saying - again my mind was too saturated
 to
 see clearly! :(
 
 Anyway, just to reply one some of the questions you asked.
 
 The intention is that the user can either delete the picture indivually
 using the delete button next to each picture or select all and delete
 all. -
 but at the same time the user could deselect some pics - the intention is
 such that the user can delete a lot of pics at once.
 
 The reason my URL looks like am using a GET method is because the delete
 button is not a button but a link. the full view of my design is this
 just
 to explain a bit more:
 
 http://www.nabble.com/file/p19520252/untitled-2.gif 
 
 I see what am doing wrong now - just to butress on your suggestions, i
 need
 to make that 'delete' button an actual button not a link - so the form
 can
 actually get submitted naturally via the POST method. From my controller
 retrieve the delete[] and iterate for deletion.
 
 I see clearly now. I think i got confused along the line while coding. 
 
 
 That's OK, and don't worry about the initial reply, it happens to us all 
 from time to time.
 
 You could still keep you delete button as a link if you like.
 
 If you have the form, you can just do something like
 
 form id=myform method=get action=/my/url/handler
   input type=checkbox name=delete[] value=123 /
   input type=checkbox name=delete[] value=456 /
   input type=checkbox name=delete[] value=789 /
   etc.
 /form
 
  # Delete 
 Selected 
 
 That should then post your form to the following URL:
 /my/url/handler?delete[]=123delete[]=456
 
 (assuming the first two checkboxes are selected and the third is not).
 
 This value will appear in PHP's $_GET array and in the ZendFrameworks 
 request object as an array containing two numbers, 123 and 456.
 
 This is pretty much exactly what you want I believe and shouldn't 
 require much in the way of reengineering.
 
 All that said, it's still a good general rule not to do anything 
 destructive with GET requests and links, the reason being that some 
 browsers could (for example) preload links (it wouldn't happen here as 
 there is javascript involved).
 
 If, however you use simple GET links to delete the individual images in 
 your gallery, of the form:
 
  /my/url/handler?delete[]=123 Delete this image 
 
 Then it is *very* possible a browser could try and preload that URL when 
 you visit the page (remember that the AVG antivirus tool used to preload 
 all the links on a page!)
 
 This is why anything destructive should only be done via a POST.
 
 Hope this helps.
 
 Col
 
 
 -- 
 
 Colin Guthrie
 gmane(at)colin.guthr.ie
 http://colin.guthr.ie/
 
 Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
 Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
 
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Passing-an-array-from-PHP-to-Javascript-tp19511848p19525409.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re[fw-general] quest param

2008-08-28 Thread dele454

Hi,

I have URLs typically of this nature
http://mainevent.com/admin/members/view-profile/id/2

What if a parameter is not supplied to the URL. In order words the user
purposefully ommited the id param of the url to
http://mainevent.com/admin/members/view-profile

What would be the ideal thing to do in your controller? redirect to members
home or some sort of error message?

Am keen in knowing ;) thanks



-
dee
-- 
View this message in context: 
http://www.nabble.com/Request-param-tp19213079p19213079.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_File in ZF 1.5

2008-08-24 Thread dele454

hi i want to use the Zend_File component in my 1.5 installation for
production. Is this route advisable? I only want to copy the File component
folder into my 1.5 installation for use.

What is your take on this matter?

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_File-in-ZF-1.5-tp19134480p19134480.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_File in ZF 1.5

2008-08-24 Thread dele454

Thanks for this info. Cant i simply download it from the ZF website 
Downloads section?


Matthew Weier O'Phinney-3 wrote:
 
 -- dele454 [EMAIL PROTECTED] wrote
 (on Sunday, 24 August 2008, 01:29 PM -0700):
 hi i want to use the Zend_File component in my 1.5 installation for
 production. Is this route advisable? I only want to copy the File
 component
 folder into my 1.5 installation for use.
 
 What is your take on this matter?
 
 We're actively fixing issues for a new release candidate of 1.6.0. I'd
 wait for a day or so, and then grab directly from subversion or from an
 RC3 tarball.
 
 The upgrade from 1.5.0 to 1.6.0 is trivial, and I have not heard anybody
 report that their working applications have broken. I'd definitely
 consider upgrading to 1.6.0 as soon as it has a final release (which
 will be very soon now).
 
 -- 
 Matthew Weier O'Phinney
 Software Architect   | [EMAIL PROTECTED]
 Zend Framework   | http://framework.zend.com/
 
 


-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_File-in-ZF-1.5-tp19134480p19134893.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Filters - Alnum

2008-07-22 Thread dele454

Hi I just want to know,

From the ZF doc:

[QUOTE]ALNUM : Returns the string $value, removing all but alphabetic and
digit characters. This filter includes an option to also allow white space
characters. [/QUOTE]

Does this filter allow characters such as ' * _ $  ' when entered with
alphanumeric characters. In context the password field. will a password such
as 'mypass_231' result into mypass231?

Thanks

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Filters---Alnum-tp18602513p18602513.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Filters - Alnum

2008-07-22 Thread dele454



Lepidosteus wrote:
 
 The easy answer is to have a look at the code:
 
 [...]
 $whiteSpace = $this-allowWhiteSpace ? '\s' : '';
 if (!self::$_unicodeEnabled) {
  // POSIX named classes are not supported, use alternative a-zA-Z0-9
 match
 $pattern = '/[^a-zA-Z0-9' . $whiteSpace . ']/';
 [...]
 
 So yes, 'mypass_231' would be filtered into 'mypass231'
 
 -- 
 Vianney Devreese - Lepidosteus
 http://lepidosteus.com
 
 

Thanks :) 

-
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Filters---Alnum-tp18602513p18602947.html
Sent from the Zend Framework mailing list archive at Nabble.com.