Forums / Setup & design / Search form and mail form help needed

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>

eZ debug

Timing: Jan 31 2025 04:31:12
Script start
Timing: Jan 31 2025 04:31:12
Module start 'content'
Timing: Jan 31 2025 04:31:12
Module end 'content'
Timing: Jan 31 2025 04:31:12
Script end

Main resources:

Total runtime0.2841 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.0469180.8281
Module start 'content' 0.00700.0218 768.875098.0234
Module end 'content' 0.02880.2552 866.8984527.8281
Script end 0.2840  1,394.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.4205200.0002
Check MTime0.00150.5182200.0001
Mysql Total
Database connection0.00100.349510.0010
Mysqli_queries0.205572.34761410.0015
Looping result0.00150.51761390.0000
Template Total0.254389.510.2543
Template load0.00120.420310.0012
Template processing0.253189.081610.2531
Override
Cache load0.00070.231510.0007
Sytem overhead
Fetch class attribute can translate value0.00110.388310.0011
XML
Image XML parsing0.00030.099610.0003
General
dbfile0.02699.4804200.0013
String conversion0.00000.002230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs