Page 1 of 2

Guestbook: Changing "Show E-Mail" default setting

Posted: Thu 26. May 2005, 01:02
by harrybo
Hello,

how can I change the default setting "Show E-Mail" in the guestbook content part? I want to set the default to "Hide E-Mail". I changed the checked value within the form of the file "phpwcms_template/inc_cntpart/guestbook/default.html" but on the site the default value remains the first entry "Show E-Mail"

Regards
Harry

Posted: Thu 26. May 2005, 08:23
by Pappnase
hello

call the template for the guestbook into your browser then you will se a detailed description! :-)

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Thu 16. Jun 2011, 21:20
by larmann
That's a pretty old post, but anyway: I can't find the place where to change the "checked" from the radiobutton "show email" to the radiobutton "hide email". Can someone give me an hint?

Thank you

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Thu 16. Jun 2011, 22:33
by update
it can be found in guestbook-template (/template/inc_cntpart/guestbook):
...
<input type="radio" id="emailradio2" name="guestbook_show" value="2" checked /><span class="radio-label">Zeige eMail als "info at mail dot com"</span>
...
or similarly - see "checked" as the important part...

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 09:01
by larmann
Well, that was my idea too, but there isn't anythink to be un-checked in the template. The section looks like this:

Code: Select all

<!--IMAGE_UPLOAD_END//-->

		<p>
			<label>E-Mail:</label>
			<input name="guestbook_show" type="radio" value="0" id="guestbook_show0"{GBSHOW_0} />
			<label for="guestbook_show0">anzeigen</label>

			<input name="guestbook_show" type="radio" value="1" id="guestbook_show1"{GBSHOW_1} />
			<label for="guestbook_show1">verstecken</label>

			<input name="guestbook_show" type="radio" value="2" id="guestbook_show2"{GBSHOW_2} />
			<label for="guestbook_show2">als "info at mail dot com"</label>
		</p>

<!--CAPTCHA_START//-->

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 12:24
by update
<!--IMAGE_UPLOAD_END//-->

<p>
<label>E-Mail:</label>
<input name="guestbook_show" type="radio" value="0" id="guestbook_show0"{GBSHOW_0} />
<label for="guestbook_show0">anzeigen</label>

<input name="guestbook_show" type="radio" value="1" id="guestbook_show1"{GBSHOW_1} />
<label for="guestbook_show1">verstecken</label>

<input name="guestbook_show" type="radio" value="2" id="guestbook_show2"{GBSHOW_2} checked />
<label for="guestbook_show2">als "info at mail dot com"</label>
</p>

<!--CAPTCHA_START//-->
Try this and send money to Santa Claus ;)

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 12:41
by larmann
Well, I tryed that. But at the point where to hide the adress completly (after guestbook_show1). The source code now looks like this:
<label>E-Mail:</label>
<input name="guestbook_show" type="radio" value="0" id="guestbook_show0" checked="checked" />
<label for="guestbook_show0">anzeigen</label>
<input name="guestbook_show" type="radio" value="1" id="guestbook_show1" checked />
<label for="guestbook_show1">verstecken</label>
<input name="guestbook_show" type="radio" value="2" id="guestbook_show2" />
<label for="guestbook_show2">als "info at mail dot com"</label>

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 15:50
by update
This should work, doesn't it?

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 16:35
by larmann
Well, yes. It works, at least in firefox. But it doesn't look like a proper code to declare "checked" two times and just one radiobutton is actually checked. And firefox marks it in the source code as a mistake. Isn't there any better way, Claus?

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 17:28
by update
No no no - there has to be only one "checked" (right this button you want to be pre-checked) ;)
(sorry - overlooked the second one in your example..)

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 17:32
by update
Here is the whole story ;)
http://www.hscripts.com/tutorials/html/ ... button.php (and thousand other placed of course, too) ;)

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 17:53
by larmann
Dear Claus,
we still don't understand each other. My problem is, that in the guestbook template, there is no "checked" entry behind the first label. Nevertheless, and I wonder why and how, there is an entry in the source code after phpwcms has rendered the template. Look into my first post: that's my guestbook template.
Got the point?

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 18:10
by update
OK. It's the cache of phpwcms.
Open the article head information (of the article where your guesbook is living), scroll down to the bottom and activate the cache=off checkbox.
Save.
Clear Browser cache, visit another page come back and you'll succeed :)
<label>E-Mail:</label>
<input name="guestbook_show" type="radio" value="0" id="guestbook_show0" />
<label for="guestbook_show0">anzeigen</label>
<input name="guestbook_show" type="radio" value="1" id="guestbook_show1" checked />
<label for="guestbook_show1">verstecken</label>
<input name="guestbook_show" type="radio" value="2" id="guestbook_show2" />
<label for="guestbook_show2">als "info at mail dot com"</label>

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 18:43
by larmann
In my config.inc.php I found:
$phpwcms['cache_enabled'] = 0; //cache On/Off - 1 = caching On / 0 = caching Off (default)
and that's a screenshot from the article head.
Image

What can I do? Cache is allways off, isn't it?

Re: Guestbook: Changing "Show E-Mail" default setting

Posted: Fri 17. Jun 2011, 18:55
by update
In config I've enabled it and disabled it for the guestbook article. It is for the header information of the browser whether it should cache content or not. Normally pages don't change very often so chache=on is accelerating the loading process. Only pages like guestbook or forms would need fresh info every time...

Code: Select all

$phpwcms['cache_enabled']     = 1;        //cache On/Off - 1 = caching On / 0 = caching Off (default)
$phpwcms['cache_timeout']     = 86400;  //default cache timeout setting in seconds - 0 = caching Off