Search results and php in cgi mode, part 2

Author Message

Vjeran Vlahovic

Monday 02 May 2005 2:10:56 am

I've changed all search form submit methods from GET to POST as Lukasz suggested in http://www.ez.no/community/forum/install_configuration/kernel_20_search
and that did the trick when search forms are submited, but there is one more issue to be solved.

Paging of search results is also done by submiting GET parameters, so link to the next page looks like this:

/index.php?/hr/content/search/(offset)/10?SearchText=bla

which, of course, doesn't work because of double question mark.

Anyone who solved this problem or has idea? Thanks.

http://www.netgen.hr/eng

Ɓukasz Serwatka

Wednesday 04 May 2005 12:08:45 am

Hi Vjeran,

To solve it you will have to modify links in google.tpl template. Your links should be like

After ?/hr/content/search/(offset)/10 set & sign

/index.php?/hr/content/search/(offset)/10&SearchText=bla

Stanard google.tpl file is in design/standard/templates/navigator/

There is $page_uri_suffix in google.tpl which returns ?SearchText=bla If you don`t want hack the kernel, you can replace ? with & using string functions (more in doc).

I hope it will help.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Vjeran Vlahovic

Wednesday 04 May 2005 1:20:41 pm

Thanks a lot, Lukasz :)

Here's what I did, somebody can find it usefull:
I've replaced original page_uri_suffix with the new one page_uri_suffix_cgi in google.tpl:

{let page_uri_suffix_cgi=concat("&",$page_uri_suffix|extract_right( $page_uri_suffix|count_chars|dec( 1 ) ) )}

http://www.netgen.hr/eng

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:14:46
Script start
Timing: Jan 18 2025 19:14:46
Module start 'layout'
Timing: Jan 18 2025 19:14:46
Module start 'content'
Timing: Jan 18 2025 19:14:46
Module end 'content'
Timing: Jan 18 2025 19:14:46
Script end

Main resources:

Total runtime0.6858 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.1484152.6406
Module start 'layout' 0.00650.0033 740.789139.4766
Module start 'content' 0.00980.6744 780.2656544.7266
Module end 'content' 0.68430.0015 1,324.992212.1250
Script end 0.6858  1,337.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4895160.0002
Check MTime0.00140.1985160.0001
Mysql Total
Database connection0.00080.112110.0008
Mysqli_queries0.627391.4677570.0110
Looping result0.00080.1228550.0000
Template Total0.650994.920.3254
Template load0.00230.340320.0012
Template processing0.648594.566520.3243
Template load and register function0.00010.015410.0001
states
state_id_array0.00150.218110.0015
state_identifier_array0.00290.416020.0014
Override
Cache load0.00190.2715250.0001
Sytem overhead
Fetch class attribute can translate value0.00170.251620.0009
Fetch class attribute name0.00140.209450.0003
XML
Image XML parsing0.00110.155520.0005
class_abstraction
Instantiating content class attribute0.00000.002460.0000
General
dbfile0.00090.1285250.0000
String conversion0.00000.001540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs