Page 1 of 1

small issue, assist if possible.

Posted: Thu Jan 01, 2009 1:11 am
by Darelm
Script URL:http://www.bluelodge-wa.org/olympus298/ ... /gbook.php
Version of script:1.6
Hosting company:Telebyte
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:Images, smileys

Write your message below:

everything works but the smileys. i cant seem to figure this one out. please see the above link and offer assistance if you can.

Darel

Posted: Thu Jan 01, 2009 9:12 pm
by Klemen
You have been editing gbook.php, haven't you? The problem is in your printEntries function (HTML code there), use the code from original gbook.php there.

Default Load

Posted: Fri Jan 02, 2009 1:28 am
by Darelm
small changes to settings.php, nothing else modified. same results.

http://www.bluelodge-wa.org/olympus298/ ... php?page=1


copy of settings.php:

/* Password for admin area */
$settings['apass']='******';

/* Website title */
$settings['website_title']="Mt Olympus Lodge No. 298 F.&A.M.";

/* Website URL */
$settings['website_url']='http://www.bluelodge-wa.org/olympus298/';

/* Guestbook title */
$settings['gbook_title']="Mt Olympus Lodge No. 298 F.&A.M. Guestbook";

/* Name of the file where guestbook entries will be stored */
$settings['logfile']='******.txt';

/* Use "Your website" field? 1 = YES, 0 = NO */
$settings['use_url']=0;

/* Open URLs in a new window? 1 = YES, 0 = NO */
$settings['url_blank']=0;

/* Allow private posts (readable only by admin)? 1 = YES, 0 = NO */
$settings['use_private']=1;

/* Hide e-mail addresses? 1 = YES, 0 = NO */
$settings['hide_emails']=1;

/* Allow smileys? 1 = YES, 0 = NO */
$settings['smileys']=1;

/* Send you an e-mail when a new entry is added? 1 = YES, 0 = NO */
$settings['notify']=0;

/* Your e-mail. Only required if $settings['notify'] is set to 1 */
$settings['admin_email']='dmaxfield5@centurytel.net';

/* URL of the gbook.php file. Only required if $settings['notify'] is set to 1 */
$settings['gbook_url']='http://www.bluelodge-wa.org/olympus298/ ... /gbook.php';

/* Filter bad words? 1 = YES, 0 = NO */
$settings['filter']=1;

/* Filter language. Please refer to readme for info on how to add more bad words to the list! */
$settings['filter_lang']='en';

/* Prevent automated submissions (recommended YES)? 0 = NO, 1 = YES, GRAPHICAL, 2 = YES, TEXT */
$settings['autosubmit']=1;

/* Checksum - just type some digits or chars. Used to help prevent SPAM */
$settings['filter_sum']='k39dw28rh3';

/* Use JunkMark(tm) SPAM filter (recommended YES)? 1 = YES, 0 = NO */
$settings['junkmark_use']=1;

/* JunkMark(tm) score limit after which messages are marked as SPAM */
$settings['junkmark_limit']=60;

/* Ban IP address if JunkMark(tm) score is 100 (100% SPAM)? 1 = YES, 0 = NO */
$settings['junkmark_ban100']=1;

/* Ignore proxy servers from JunkMark check? 1 = YES, 0 = NO */
$settings['ignore_proxies']=0;

/* Show "NO GUESTBOOK SPAM" banner? 1 = YES, 0 = NO */
$settings['show_nospam']=1;

/* Prevent multiple submissions in the same session? 1 = YES, 0 = NO */
$settings['one_per_session']=1;

/* Maximum chars word length */
$settings['max_word']=75;

/* Language file */
$settings['language']='language.inc.php';

/* Allow IPv6 format? 1 = YES, 0 = NO */
$settings['allow_IPv6']=0;


/* DO NOT EDIT BELOW */
if (!defined('IN_SCRIPT')) {die('Invalid attempt!');}
ini_set('display_errors', 0);
ini_set('log_errors', 1);
?>

Posted: Fri Jan 02, 2009 1:42 am
by Darelm
the URL for the smileys is shown as :
http://www.bluelodge-wa.org/%22images/bonk.gif/%22

while the url for all other images is shown as:
http://www.bluelodge-wa.org/olympus298/ ... delete.gif

hope this helps.

Posted: Fri Jan 02, 2009 7:46 am
by Henrie
Hi Darelm

Are you sure you have not been editing GBook (although it does not look like it)?
Your image links for the smilies are shown as:

Code: Select all

<img src=\"images/icon_smile.gif\" border=\"0\" alt=\"\" />
With 'escaped' quotes.

The links should look like

Code: Select all

<img src="images/icon_smile.gif" border="0" alt="" />
Try uploading the gbook.php file again.

If that does not work.
Please post a link to the phpinfo.php file (like was asked to fill in in your first post). You can download a zip-file with the phpinfo.php in it here http://www.phpjunkyard.com/extras/phpinfo.zip

It could also be helpfull if you could put you gbook.php file in a zip-file and make it available for download. I could take a look if the code is alright.

Greetings,
Henrie

as requested.

Posted: Fri Jan 02, 2009 6:22 pm
by Darelm
http://www.bluelodge-wa.org/olympus298/phpinfo.php PHPinfo as requested.

http://www.bluelodge-wa.org/olympus298/ ... /gbook.zip gbook ziped for download as requested.

What is on the site is a fresh, clean gbook install. i wiped it all and started over from scratch. only the ****.txt with the messages was kept. only minimal changes to settings.php.

Posted: Fri Jan 02, 2009 6:38 pm
by Klemen
If you open the entries file (******.txt) directly in your browser do the images have \ before quotes " ?

Posted: Fri Jan 02, 2009 10:09 pm
by Darelm
if i open it directly in the browser, the smileys work.

Posted: Fri Jan 02, 2009 11:21 pm
by Henrie
Helle Darlm and Klemen,

I have located the problem.

The setting magic_quotes_runtime set to On is causing the problems.

I tested on my own server. Correct entries in the entries.txt are shown as \"\" \"\" because of this setting.

So changing the setting magic_quotes_runtime to Off in the php.ini file should solve your problems (i hope you have access to the php.in file. If not, contact you hosting provider).

Greetings,
Henrie

resolved

Posted: Sat Jan 03, 2009 12:00 am
by Darelm
that did the trick. Thank you both. very appreciated.