Username Password
Bookmark and Share

Templatized Subject Line for Notifications


I was getting annoyed that the subject line in email notifications was uneditable. (in 6.2.9 it defaults to

which is....
'523' => {message => q|Notification|,...} 
in English\ So, I made it templatable, just like the message body. 


This modification is a start towards making the built-in WebGUI message boards a full-fledged Web-enabled mailing list.  My message notification templates include <tmpl_var post.message> and other post-related variables, so I wanted to be able to match the subject line of the email with the subject line of the forum posting.

WebGUI Core Modifications:

In, the following replacement is made:

$lang{$u->profileField("language")}{subject} = 
"Forum/NotificationSubject", $lang{$u->profileField("language")}{var});


$lang{$u->profileField("language")}{subject} = 

Also in under the sub forumProperties, insert the following lines after




lines to insert:


In, at the end of the parameter list (head3) of the sub create, add the line

notificationSubjectTemplateId - Template ID

Also in, add the following line in the new sub:

$properties->{notificationSubjectTemplateId} = 

The changes to the Help and Internationalization modules are too lengthy to be detailed here, but the modified files are included in the zip file.


Here is the installation SQL script you should run against your site's database:

INSERT INTO template VALUES ('1','Default Notification 
	Subject','<tmpl_var post.subject>','Forum/NotificationSubject',1,1);
ALTER TABLE forum ADD notificationSubjectTemplateID varchar(22) default NULL;
UPDATE forum SET notificationSubjectTemplateID='1';

Here is the uninstallation SQL script you should run against your site's database:

DELETE FROM template WHERE namespace='Forum/NotificationSubject';
ALTER TABLE forum DROP notificationSubjectTemplateID;


See the attached .zip file for the modified files (baseline 6.2.9 gamma):

  • WebGUI\lib\WebGUI\Forum\
  • WebGUI\lib\WebGUI\
  • WebGUI\lib\WebGUI\i18n\English\
  • WebGUI\lib\WebGUI\Help\
  • NotifySubject-0.5-install.sql
  • NotifySubject-0.5-UNinstall.sql
  • NotifySubjectEditForum.png


System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
LinksNo Support Offered
Statistics Downloads: 515
Views: 5327
Rating: 0
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2022 Plain Black Corporation | All Rights Reserved