Re: [fw-general] Page Expired
This is a common problem. To avoid it, create a separate action for processing your forms and instead of rendering a view, use $this->_redirect() to a presentation page. This will mean that you need to store either the result of the query or the form data in a session variable while you redirect. If you do this, the final page the user lands on is the result of a GET operation and not a POST, which will alieviate the 'resend' prompt from the browser. The redirect will also not create a history entry, so pressing back will take you to the form. Kevin McArthur - Original Message - From: "Mauro Casula" <[EMAIL PROTECTED]> To: Sent: Monday, March 12, 2007 12:18 PM Subject: [fw-general] Page Expired Hi all, i have a problem... In a page I have a form, that form send a lot of parameters to an action that extract a lot of record from a DB. So there is a link that go to the details of that record. When I Click Back on the Browser ( IE 6.0 ) it return: The page is Expired... and bla bla bla.. What can I do to solve this problem? Thanks in advance.. Mauro Casula. -- View this message in context: http://www.nabble.com/Page-Expired-tf3391579s16154.html#a9441280 Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Page Expired
Hi all, i have a problem... In a page I have a form, that form send a lot of parameters to an action that extract a lot of record from a DB. So there is a link that go to the details of that record. When I Click Back on the Browser ( IE 6.0 ) it return: The page is Expired... and bla bla bla.. What can I do to solve this problem? Thanks in advance.. Mauro Casula. -- View this message in context: http://www.nabble.com/Page-Expired-tf3391579s16154.html#a9441280 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Search_Lucene field boost?
Great! Thanks Alexander. -- View this message in context: http://www.nabble.com/Zend_Search_Lucene-field-boost--tf3391214s16154.html#a9441132 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_Search_Lucene field boost?
Hi! Yes, it's possible. $titleField = Zend_Search_Lucene_Field::Unstored('title', $Title); $titleField->boost = 1.5; $doc->addField($titleField); Some info can be found here: http://framework.zend.com/apidoc/core/Zend_Search_Lucene/Document/Zend_Search_Lucene_Field.html PS Fields' boost factors affects hits' scores, but can't be retrieved from index with returned result set, because they are not stored directly in the index. Index contains only "normalization factor" for each pair, which is calculated from boost factor and field length normalization value (http://framework.zend.com/apidoc/core/Zend_Search_Lucene/Search/Zend_Search_Lucene_Search_Similarity.html#lengthNorm). With best regards, Alexander Veremyev. peterVG wrote: The documentation mentions http://framework.zend.com/manual/en/zend.search.query-language.html#zend.search.query-language.boosting boosting a query term but I want to be able to boost the hit relevance of all terms stored in a given field. Let's say I have an index for a book collection that contains the fields Title, Author, Description. I want to be able to boost ALL terms stored in the Title field by a factor of 1.5. I expected it would be possible to boost a field using a parameter when I add the field to an index document (e.g., $doc->addField(Zend_Search_Lucene_Field::Unstored('title', $Title, 1.5);) However, I browsed the source code and this does not seem to be the case. The documentation talks about creating your own http://framework.zend.com/manual/en/zend.search.extending.html#zend.search.extending.scoring Similarity class to modify the scoring algorithm but the examples don't seem to address field boosting. Also, I found http://www.nabble.com/Zend_Search_Lucene-field-boost-tf2859815s16154.html#a7990207 this thread in the Zend Framework forum that seems to suggest that it is possible but, again, the details are vague. Can anyone clarify if field boosting is possible and, if so, how exactly do I implement it? Many thanks, peterVG
[fw-general] Zend_Search_Lucene field boost?
The documentation mentions http://framework.zend.com/manual/en/zend.search.query-language.html#zend.search.query-language.boosting boosting a query term but I want to be able to boost the hit relevance of all terms stored in a given field. Let's say I have an index for a book collection that contains the fields Title, Author, Description. I want to be able to boost ALL terms stored in the Title field by a factor of 1.5. I expected it would be possible to boost a field using a parameter when I add the field to an index document (e.g., $doc->addField(Zend_Search_Lucene_Field::Unstored('title', $Title, 1.5);) However, I browsed the source code and this does not seem to be the case. The documentation talks about creating your own http://framework.zend.com/manual/en/zend.search.extending.html#zend.search.extending.scoring Similarity class to modify the scoring algorithm but the examples don't seem to address field boosting. Also, I found http://www.nabble.com/Zend_Search_Lucene-field-boost-tf2859815s16154.html#a7990207 this thread in the Zend Framework forum that seems to suggest that it is possible but, again, the details are vague. Can anyone clarify if field boosting is possible and, if so, how exactly do I implement it? Many thanks, peterVG -- View this message in context: http://www.nabble.com/Zend_Search_Lucene-field-boost--tf3391214s16154.html#a9439937 Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend_View, reference inside helpers
Yep. Think they really should have a separate template renderer class. But what they do have seems to work well enough as long as tweaking is not required. > > Art Hundiak wrote: > >> Be nice if we could just extend the view class and tweak it but someone >> went 'private' happy when they wrote the code. > > Actually private variables are there for a reason. And it's pretty clever. > They're protecting internal properties from being accessed directly form > the > view scripts. But it makes subclassing a hell at the same time. > > -- > Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | > http://aie.pl/martel.asc > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > "Idleness is not doing nothing. Idleness is being free to do anything." -- > Floyd Dell > >
Re: [fw-general] Zend_View, reference inside helpers
Art Hundiak wrote: Be nice if we could just extend the view class and tweak it but someone went 'private' happy when they wrote the code. Actually private variables are there for a reason. And it's pretty clever. They're protecting internal properties from being accessed directly form the view scripts. But it makes subclassing a hell at the same time. -- Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | http://aie.pl/martel.asc =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Idleness is not doing nothing. Idleness is being free to do anything." -- Floyd Dell
Re: [fw-general] Zend_Search_Lucene result sorting problem
Hi Graeme, I saw something like this once. But don't remember what was the problem... Which PHP version do you use? With best regards, Alexander Veremyev. Graeme Merrall wrote: Hi. I'm trying to sort my search results by an alternate field named 'publication_time'. $results = $index->find($query, 'publication_time', SORT_NUMERIC, SORT_DESC); However, I get an error when I do. This error occurs both in 0.8.0 and the latest snapshot (20070310-3855). Error is: Notice: Undefined offset: 4 in /usr/local/php5/lib/ZendFramework-20070310-3855/library/Zend/Search/Lucene.php on line 585 Warning: array_multisort() [function.array-multisort]: Argument #3 is expected to be an array or a sort flag in /usr/local/php5/lib/ZendFramework-20070310-3855/library/Zend/Search/Lucene.php on line 608 When I poke around in the code, it seems that the $sortArgs array passed to array_multisort has had SORT_NUMERIC set empty. Is this a bug or have I missed something? Cheers, Graeme
Re: [fw-general] SQL-like LIMIT for Zend_Search_Lucene->find() ?
Hi! Zend_Search_Lucene needs to check all hits to sort them depending on scores. Java Lucene can also sort result set in "document order". "First N" clause is applicable in this case and may reduce search time for large result sets. Zend_Search_Lucene is designed to have these features, but they are not implemented yet. PS Referencing any document field (like $hit->title) invokes retrieving document from index. It takes a lot of time. If you don't touch documents from result set after some limit, it may significantly increase search performance. With best regards, Alexander Veremyev. Georg von der Howen wrote: It might be a good idea to add some sort of a SQL-like LIMIT clause to Zend_Search_Lucene's find() method. I am experimentally replacing my fulltext search in MySQL with Zend_Search_Lucene and with some queries I get 500 and more results. Would it improve performance and memory footprint significantly when a LIMIT with COUNT and OFFSET was introduced to Lucene? Or is Lucene's architecture not suited for that. Then large result set should probably be cached? Thanks and best regards, Georg
Re: [fw-general] Zend_View, reference inside helpers
AFAIK it's not a convenient solution because it produces iterations (when looking into the registry) that could be avoided...which is really important for a busy website Le lundi 12 mars 2007, Art Hundiak a écrit : > Register your view in the registry and then the helper can pull it out. > > Be nice if we could just extend the view class and tweak it but someone > went 'private' happy when they wrote the code. > > > > Any problem to use > >> > >> $this->myHelperNeedView($this)? > > > > it's not convenient, the view should provide this reference > > out-of-the-box... > > but for the time being, this seems to be a reasonable solution. > > > > thanks, > > kai
Re: [fw-general] Zend_View, reference inside helpers
Register your view in the registry and then the helper can pull it out. Be nice if we could just extend the view class and tweak it but someone went 'private' happy when they wrote the code. > > > Any problem to use >> $this->myHelperNeedView($this)? > it's not convenient, the view should provide this reference > out-of-the-box... > but for the time being, this seems to be a reasonable solution. > > thanks, > kai > >
Re: [fw-general] Zend_View, reference inside helpers
+1 to this the first parameter of every helpers I wrote is always a reference to the caller view which is very annoying something like $this->view in a helper would be very much appreciated Olivier Le lundi 12 mars 2007, Kai Meder a écrit : > > Any problem to use > > > > $this->myHelperNeedView($this)? > > it's not convenient, the view should provide this reference > out-of-the-box... > but for the time being, this seems to be a reasonable solution. > > thanks, > kai
[fw-general] Controller problem 0.8.0
Hi.. i'm using zf 0.8.0 and i ran into a strange problem when deploying into an IIS 6 server... i'm using ISAPI_rewrite... the problem is , only the indexController is called for no matter wat url for example even if i type http://host/controller_1/action_1/ ... only the default controller is called :-( can somebody please tell me what mistakes i have done here... thankx.. my httpd.ini file [ISAPI_Rewrite] RepeatLimit 20 RewriteRule ^[\w/\%]*(?:\.(?!(?:js|ico|gif|jpg|png|css)$)[\w\%]*$)? /index.php [I] index.php setControllerDirectory( "./controllers/" ); try { $objZend->throwExceptions(true); $objZend->dispatch(); } catch (Exception $e) { header('Location: '._URL.'errors/'); //echo $e->getMessage(); die(); } ?>
Re: [fw-general] Zend_View, reference inside helpers
> Any problem to use $this->myHelperNeedView($this)? it's not convenient, the view should provide this reference out-of-the-box... but for the time being, this seems to be a reasonable solution. thanks, kai
Re: [fw-general] Zend_View, reference inside helpers
"Alexander Netkachev" <[EMAIL PROTECTED]> napisał(a): > Any problem to use > $this->myHelperNeedView($this)? Actually there is. It's pretty inconvenient to use and write. Especially when you have three or four additional parameters to work with. > Alexander -- Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | http://aie.pl/martel.asc =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Idleness is not doing nothing. Idleness is being free to do anything." -- Floyd Dell
Re: [fw-general] Zend_View, reference inside helpers
On 3/12/07, Kai Meder <[EMAIL PROTECTED]> wrote: Michał Minicki wrote: > Kai Meder <[EMAIL PROTECTED]> napisał(a): >> is there any way that the a view-helper may access the view, in which it >> was executed? > > I was discussing this problem with Matthew some time ago and he agreed to > do it eventually. > http://framework.zend.com/issues/browse/ZF-936 > I have no idea when this will be implemented though. thanks for your fast answer. without the view-reference, how do you others implement view-helpers?? currently i have patched the source myself to get that reference... Any problem to use $this->myHelperNeedView($this)? Sincerely, -- Alexander http://www.alexatnet.com/ - Blog and CMS created with Zend Framework and Ajax.
Re: [fw-general] Zend_View, reference inside helpers
Michał Minicki wrote: Kai Meder <[EMAIL PROTECTED]> napisał(a): is there any way that the a view-helper may access the view, in which it was executed? I was discussing this problem with Matthew some time ago and he agreed to do it eventually. http://framework.zend.com/issues/browse/ZF-936 I have no idea when this will be implemented though. thanks for your fast answer. without the view-reference, how do you others implement view-helpers?? currently i have patched the source myself to get that reference... yours, kai
Re: [fw-general] Zend_View, reference inside helpers
Kai Meder <[EMAIL PROTECTED]> napisał(a): > is there any way that the a view-helper may access the view, in which it > was executed? I was discussing this problem with Matthew some time ago and he agreed to do it eventually. http://framework.zend.com/issues/browse/ZF-936 I have no idea when this will be implemented though. > kai -- Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | http://aie.pl/martel.asc =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "Idleness is not doing nothing. Idleness is being free to do anything." -- Floyd Dell
[fw-general] Zend_View, reference inside helpers
is there any way that the a view-helper may access the view, in which it was executed? e.g. $view->escape this would be extremely helpful to outsource common view-code into helpers... thanks, kai
[fw-general] Zend_View, reference inside helpers
is there any way that the a view-helper may access the view, in which it was executed? e.g. $view->escape this would be extremely helpful to outsource common view-code into helpers... thanks, kai
[fw-general] Routing
Hi I want to run Zend as a multi domain - multi module - multi bucket scenario So users come in on blah.domain.com and get offered something completely different from domain.com for instace. Hi, I can achieve some of this within the config.ini i.e. [blah.domain.com : default_site] translation_file = locale/blah.domain.com/signup/en.mo show_bread= false; [domain.com : default_site] translation_file = locale/domain.com/en.mo show_bread = false; db_name = properties google_channel = 3267063621 However when the user goes to the very front page it will always seek controllers/index/index I already have routing set up for instance through this signup module. routes.signup.route = ":lang/signup/:controller/:action/*" routes.signup.defaults.lang = en routes.signup.defaults.controller = index routes.signup.defaults.action = index Can I set up the default router for each domain like: routes.default.route = ":module/:controller/:action/*" routes.default.defaults.lang = en routes.default.defaults.controller = blah.domain.com routes.default.defaults.action = index Trying this however reaps no rewards If anyone has any more info on routing then I Would appreciate it I find this aspect in Zend quite confusing but very important for what I want to do. Regards Ian
[fw-general] Gdata Blogger
I've tried to retrive articles of my blog using something like this in the Action method of my controller : ... $gdataBlog = new Zend_Gdata_Blogger(); // One way to get a feed for a blog... $feed = $gdataBlog->getBloggerFeed('blogname'); // Another way to get a feed for a blog... $gdataBlog->setBlogName('blogname'); $feed = $gdataBlog->getBloggerFeed(); ... The previous code seems to work (no errors) and if I do a var_dump($feed) in the View I could see that $feed is a complex table But I want to know how to get each item of $feed ... where is the documentation about the fields in the object return by getBLoggerFeed() method ? Thanks for your help