Search form and mail form help needed

Author Message

Andreas Widerøe Andersen

Wednesday 07 April 2004 4:06:57 pm

Hi,
I'm am a beginner with Ez and have some hard time finding information about how to add a search option like the one up in the right corner here on the Ez site.

Can someone please give some step-by step help here?

I have also problems with a mail form that I found some info on in the forum:

<form action={"/form/process"|ezurl} method="post">
  <input type="text" name="LastName" value="Navn" />
  <input type="text" name="MailSendFrom" value="E-post adresse" />
  <input type="hidden" name="MailSubject" value="Tips fra leser" />
  <input type="hidden" name="MailSendTo" value="me@email.com" />
  <textarea cols="20" rows="5" name="tips">Skriv inn ditt tips!</textarea>
  <input type="hidden" name="RedirectTo" value="http://www.mysite.com" />
  <input type="submit" value="Send" />
</form>

When I use this I only get:

Access denied
You don't have permission to access this area.

Possible reasons for this is.

You are currently not logged in to the site, to get proper access create a new user or login with an existing user.
You misspelled some parts of your url, try changing it.

I appreciate your help!

Thanks,
Andreas

Alex Jones

Thursday 08 April 2004 6:05:41 am

Andreas, you can use the code below for your search box. I grabbed it from /design/standard/templates/page_topbox.tpl which is included in every eZ publish installation.

<form action={"/content/search/"|ezurl} method="get">

<table class="layout" width="100%" cellpadding="3" cellspacing="0" border="0">
<tr>
    <td class="topline" width="40%">
    <img src={$top_logo|ezimage}  alt="" />
    </td>
    <td class="topbox" align="right" width="50%" valign="bottom">
       &nbsp;<br />
	<input class="halfbox" type="text" size="20" name="SearchText" id="Search" value="" /><br />
	<a class="topline" href={"/content/advancedsearch/"|ezurl}><span class="small">{"Advanced search"|i18n("design/standard/layout")}</span></a><div class="labelbreak"></div>
    </td>
    <td class="topbox" valign="top" width="10%">
       &nbsp;<br />
	<input class="button" name="SearchButton" type="submit" value="{'Search'|i18n('design/standard/layout')}" />
    </td>
</tr>
</table>

</form>

<b>Mail Form</b>
Check the permissions for the <i>Anonymous</i> user (under Users > Roles > Anonymous) to ensure they have the proper rights to use the form module.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Andreas Widerøe Andersen

Thursday 08 April 2004 7:30:28 am

Already did that. It now says:

Role policies

Module Function Limitation

user  login  *  
content  read  Class( Folder , Info page , Info page , Link , Link , File , File , Comment , Comment , Article , Article , Image , Image , Forum , Forum , Forum message , Forum message , Product , Product , Product review , Product review )  
content  read  Class( Ressurser )  
form  *  *  

I've also set this:

[FormProcessSettings]
Module=enabled

in the site.ini.append file for my layout. Any other suggestions?

Btw. I got the search function working - thanks!

Andreas

Andreas Widerøe Andersen

Thursday 08 April 2004 10:37:49 am

I got it fixed. All that was needed was to enable the module. Strange enough I did this several times - but perhaps I missed something?

Thanks for your help!

Alex Jones

Thursday 08 April 2004 11:42:43 am

It's good to hear you have it working! After changing any major setting, it is good to clear all of the caches, which can cause problems with changes not showing up.

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 22:12:56
Script start
Timing: Jan 18 2025 22:12:56
Module start 'layout'
Timing: Jan 18 2025 22:12:56
Module start 'content'
Timing: Jan 18 2025 22:12:57
Module end 'content'
Timing: Jan 18 2025 22:12:57
Script end

Main resources:

Total runtime1.1103 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.0313152.6406
Module start 'layout' 0.00480.0032 740.671939.4766
Module start 'content' 0.00801.1010 780.1484566.2500
Module end 'content' 1.10900.0012 1,346.398416.1406
Script end 1.1103  1,362.5391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2740160.0002
Check MTime0.00130.1183160.0001
Mysql Total
Database connection0.00080.072010.0008
Mysqli_queries1.048894.4625630.0166
Looping result0.00090.0780610.0000
Template Total1.080097.320.5400
Template load0.00200.177820.0010
Template processing1.078097.089920.5390
Template load and register function0.00020.015810.0002
states
state_id_array0.00070.064010.0007
state_identifier_array0.00130.117320.0007
Override
Cache load0.00180.1580400.0000
Sytem overhead
Fetch class attribute can translate value0.00050.048520.0003
Fetch class attribute name0.00190.167960.0003
XML
Image XML parsing0.00070.058620.0003
class_abstraction
Instantiating content class attribute0.00000.001870.0000
General
dbfile0.00080.0763160.0001
String conversion0.00000.000640.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs