WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.7 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • Modules »
  • Guestbook
  • Print
Pages: [1]   Go Down

Author Topic: Guestbook  (Read 13845 times)

Offline sky writer

  • Posts: 926
Guestbook
« on: August 21, 2017, 05:17:05 PM »
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:
Code: [Select]
[E_NOTICE] /modules/guestbook/gstbk_save.php:[69]  from /modules/guestbook/gstbk_save.php:[69] WbErrorHandler "Undefined index: homepage"

line 69:
Code: [Select]
$homepage_clean_db   = addslashes(htmlspecialchars(strip_tags($wb->strip_slashes($_POST['homepage'])),ENT_QUOTES));
line 69 in context:
Code: [Select]
// 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 = '';
}
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Guestbook
« Reply #1 on: August 21, 2017, 05:50:09 PM »
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
Logged

Offline sky writer

  • Posts: 926
Re: Guestbook
« Reply #2 on: August 21, 2017, 08:03:57 PM »
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?
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Guestbook
« Reply #3 on: August 22, 2017, 11:16:18 AM »
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
Code: [Select]
<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
Logged

Offline sky writer

  • Posts: 926
Re: Guestbook
« Reply #4 on: August 22, 2017, 05:29:22 PM »
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.
Code: [Select]
<!--  <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:
Logged

Offline jacobi22

  • Betatester
  • **
  • Posts: 5920
Re: Guestbook
« Reply #5 on: August 22, 2017, 11:20:53 PM »
its possible, to use this field as hidden (and invisible) field and the problem (your notice) is gone

add this line

Code: [Select]
<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

Code: [Select]
<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


Logged

Offline sky writer

  • Posts: 926
Re: Guestbook
« Reply #6 on: August 23, 2017, 06:41:39 AM »
Thank you.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.10.x) »
  • Modules »
  • Guestbook
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2