Guestbook

sky writer


Gast

its possible, to use this field as hidden (and invisible) field and the problem (your notice) is gone

add this line

<input class="input_website_field" type="hidden" [WEBSITE_INPUT] />

somewhere between the opening and the closing form-tag, normalize directly behind the <form>-Tag, like

Guestbook-Options / Field: Sign guestbook, new code in Ln 2

<form [GB_FORM]> [ASP_FIELDS]
<input class="input_website_field" type="hidden" [WEBSITE_INPUT] />
  <table class="input_form" cellpadding="2" cellspacing="0" align="center" border="0">


Important!: remove this line, if you use somewhere in the future the Homepage-Adress-field again (your commented-out-area)

P.S.: i'm not sure, but maybe, you get with this hidden field now a information in your admin-email after a new entry



sky writer

Thank you for the clarification.  I do have a "home.gif" icon in the IMAGES folder.  Not a "homepage.gif" icon.

I do notice the code you mention is commented out in my install.  I don't remember doing this, but I must have.
<!--  <tr>
    <td>[WEBSITE_STR]:</td>
    <td><input class="input_website_field" [WEBSITE_INPUT] /></td>
  </tr>
-->


I know the client would have no need to have a homepage entered.  I can just ignore the notice, unless there is a simple way to suppress it.

Additionally, can you also explain what the following select box entries achieve?
Show Unused Fields:
Show image links:
Store $_SERVER-Array:

Gast

if i remember correct, HOMEPAGE has a icon like a house and also some input fields in the form for the guestbook entry with a default value = "http://www."

its possible, to change this form in guestbook-option here
<tr>
    <td>[WEBSITE_STR]:</td>
    <td><input class="input_website_field" [WEBSITE_INPUT] /></td>
  </tr>


if you remove this lines or this field, the POST-Check in gstbk_save.php doesnt have the part $_POST['homepage'] and you get this error

sky writer

Quote from: jacobi22 on August 21, 2017, 05:50:09 PM
do you remove the homepage-Icon from the Template?? (this placeholder here -> [HOMEPAGE] )

Not sure what icon you are referring to.  Is this an icon from the backend template, or something used in the frontend of the Guestbook module?  Or do you mean a placeholder which needs to be in my frontend template?

Gast

do you remove the homepage-Icon from the Template?? (this placeholder here -> [HOMEPAGE] )

if YES, everything is clear, but we need a repaired module version for case's like this

sky writer

WB 2.10.0
Guestbook v2.8.8 (downloaded from this link - https://forum.websitebaker.org/index.php/topic,30074.msg210988.html#msg210988 )

Get this notice every time a guestbook entry is made:
[E_NOTICE] /modules/guestbook/gstbk_save.php:[69]  from /modules/guestbook/gstbk_save.php:[69] WbErrorHandler "Undefined index: homepage"


line 69:
$homepage_clean_db   = addslashes(htmlspecialchars(strip_tags($wb->strip_slashes($_POST['homepage'])),ENT_QUOTES));

line 69 in context:
// homepage
$homepage_clean_html = htmlspecialchars(strip_tags($wb->strip_slashes($_POST['homepage'])),ENT_QUOTES);
$homepage_clean_db   = addslashes(htmlspecialchars(strip_tags($wb->strip_slashes($_POST['homepage'])),ENT_QUOTES));
if($homepage_clean_html=='http://www.') {
        $homepage_clean_html = $homepage_clean_db = '';
}