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 » Thu 26. May 2005, 01:02

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 » Thu 26. May 2005, 08:23

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 » Thu 16. Jun 2011, 21:20

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Thu 16. Jun 2011, 22:33

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 webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post by larmann » Fri 17. Jun 2011, 09:01

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 12:24

<!--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 » Fri 17. Jun 2011, 12:41

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 15:50

This should work, doesn't it?
It's mostly all about webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post by larmann » Fri 17. Jun 2011, 16:35

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 17:28

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 webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

User avatar
update
Moderator
Posts: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 17:32

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 webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post by larmann » Fri 17. Jun 2011, 17:53

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 18:10

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 webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

larmann
Posts: 311
Joined: Thu 23. Jun 2005, 10:51
Location: Hamburg
Contact:

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

Post by larmann » Fri 17. Jun 2011, 18:43

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: 6394
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update » Fri 17. Jun 2011, 18:55

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 webdesign, logo design, new and old pages refresh, print BUT slowly switching to be supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.

Post Reply