Guestbook: Changing "Show E-Mail" default setting

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
harrybo
Posts: 23
Joined: Wed 2. Feb 2005, 16:27

Guestbook: Changing "Show E-Mail" default setting

Post 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
User avatar
Pappnase
Posts: 6845
Joined: Thu 30. Oct 2003, 23:48
Location: Berlin, Germany

Post by Pappnase »

hello

call the template for the guestbook into your browser then you will se a detailed description! :-)
Pappnase
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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//-->
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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 ;)
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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>
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update »

This should work, doesn't it?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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?
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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..)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update »

Here is the whole story ;)
http://www.hscripts.com/tutorials/html/ ... button.php (and thousand other placed of course, too) ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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?
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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>
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post 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?
User avatar
update
Moderator
Posts: 6425
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply