First private WB site

NETZLAST.com

Okay, here's the code i've added to the file

WB_ROOT/modules/guestbook/gstbk_save.php

ATTENTION - Always make a backup before modifying a file!

1)
Open the file gstbk_save.php in your favorite texteditor

2)
Search for the line

$name = addslashes(strip_tags($_POST['u_name']));

and add the following after it

mail('name@domain.com', 'Text for the subject of the mail', 'Text of the mail');

3)
Save the changes and upload the file

...that's all....try it out with a new entry  :wink:



If i'll have a little bit more experience in coding with php i'll try to make this a seperate module with the abillity to enter the needed textes for subject, mail and email adress in the admin-panel and...maybe support for variables (ie. sitename, admin)

I hope you'll find this minimalistic modification usefull...

Rolf

NETZLAST.com

Hi Klaus,

thx for your feedback! The integration of my Blog in my site is a little problem because of the fixed with of the Template i use, the entrys in the Blog contains big pictures and 480 px width videos and if i integrate them in my site the right side of the page explodes......so far i've found no way to fix that problem but i'm still on :-)

Surely i provide the code i've added.....it is a simple phpmail() function in the codepart that submits the new entry, the mail adress and the mail text is hardcoded in that line of code....maybe theres a much better way to realize this functionality but, like I've said, i'm a php-noob and it will take a time until i'm expirienced enough for things like that ;-)

I'll provide the code later from home...my ftp doesn't work on work.

greetings

Rolf

P.S. Falls mein Englisch unverständlich ist antworte ich auch gern nochmal auf Deutsch  :-D

kweitzel

#2
Great Start ... when are you converting your BLOG to WebsiteBaker :-D

For this feature, did you modify the news-module? If yes, would you like to share the changed code incl. a little documentation? Maybe we can put it in as a change request ...

cheers

Klaus

NETZLAST.com

Hi @ all,

please check out my first steps with WB on my private Site.
It's design is based on the Template " Round" from Ryan Djurovich with a few small modifications and a graphic on top of the menu.

A little feature that i've added (and of which I am proud because i'm absolutly new to php) is that the Guestbook sends me a Mail if anyone signs it.

http://www.netzlast.com

Please feel free to leave criticism and comments!