Replacing mail and website text with gifs

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
jayceegee
Posts: 33
Joined: Sun May 21, 2006 6:33 pm

Replacing mail and website text with gifs

Post by jayceegee »

Hello Klemen and Henrie,

In past years, one of the frequent requests has been for the inclusion of gifs to replace the email and website text.

It is relatively easy to change the email to a gif in the language file in previous versions and v1.7 (t27) by changing the word contact with an html relative (or absolute) path to the image.

In v1.6 it was easy to change the website on line 972 with target as a path.

But in v 1.7 have not been able to find a similar path, the nearest I found was at lines 723 and 1014, but at 1014 (in gbook) it gave a syntax error.

Could you or Henrie please post the information that would allow the use of an image for websites.

It would also be appreciated if the next version could have a simple method (for us mere mortals) to change the text into gifs.

Thank you for the new version of Guestbook, it really is superb. :D

Best Regards, Jim.
jayceegee
Posts: 33
Joined: Sun May 21, 2006 6:33 pm

Replacing mail and website text with gifs

Post by jayceegee »

:cry: Having received no reply to my query, I have looked again to try and find the answer to my question, and after many hours, and the loss of even more hair have found the following.

Original code at line 1114 in gbook

Code: Select all

$url = '<a href="'.$url.'" class="gbook_submitted" '.$settings['target'].' rel="nofollow">'.$url.'</a>';
New code

Code: Select all

$url = '<a href="'.$url.'" class="gbook_submitted" '.$settings['target'].' rel="nofollow"><img src="images/home.gif" border="0"></a>';
I have not put any headers in, as the new guestbook is being viewed locally (WAMP), so there is nothing to show online.

Although it now shows the gif with no text, it would be appreciated if you would look at the above and let me know if it is correct, and more importantly, if it will mess up any other code in the guestbook.
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

I wanted to reply earlier, but i have been busy working and it was not a quick answer for me also (i could not find it easily, like you).

First of all. Good you searched yourself. Don't think it does not cost the people that answer here any time to find answers (and it is not a paid job).

First of all, what you have done looks like you have done it in the right place. I would however change the code a little to make valid xhtml (add an alt="" text and a closing / tag)

Code: Select all

$url = '<a href="'.$url.'" class="gbook_submitted" '.$settings['target'].' rel="nofollow"><img src="images/home.gif" border="0" alt="website" /></a>';
But that is not all, i discovered a small error in gbook.
In the file comments.php (template/default/comments.php)

Code: Select all

echo '<span class="gbook_submitted_by">'.$lang['t19'].' '.$url.'</a></span><br class="clear" />';
should be changed to (remove the </a>)

Code: Select all

echo '<span class="gbook_submitted_by">'.$lang['t19'].' '.$url.'</span><br class="clear" />';
Update October 1, 2009: I received a message from Klemen that this is silently fixed in the available gbook download.

Greetings,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
jayceegee
Posts: 33
Joined: Sun May 21, 2006 6:33 pm

Replacing mail and website text with gifs

Post by jayceegee »

Hello Henrie,

:D Thank you for your reply to my posting. Have corrected the alt and closing tag, some thing which I often forget until it is checked with W3C.

You have helped me on several occasions, and it is very much appreciated by me, and no doubt many other people, so have bought you a drink (or two).

Best regards, Jim
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Thank you very much for that. I got the confirmation mail already.
You are the second one to buy me some drinks :D (Klemen was the first).

Btw, I often forget the closing tag too. And lots of other things too which i only notice when i do the W3C check.

To be honest, i did the check because i was not sure if border="0" was allowed. I mostly try to use xhtml 1.1 or xhtml 1.0 strict in which it is not allowed.
That is how i discovered the double </a> in the generated code.

Good luck with the GBook and your site.

Regards,
Henrie
I do not monitor the Gbook forums regularly anymore since I do not use the Gbook script myself anymore for a long time. But it helped me a lot in learning to understand php.
Post Reply