signature-like text [message #7015] |
Fri, 01 November 2002 19:23 |
zapal
Messages: 68 Registered: October 2002 Location: Poland
Karma: 0
|
Member |
|
|
Hi
I'd like to add signature-like text to every message but before posting it. What I want to achive is that when I create new message (not a queoted reply) in the body message I've already got this text (something like "Hi\n\nBest regards.".
The only problem is that I can't make it work. I tried to hardcode it in forum_data/src/post.php.t just before $msg_body=str_replace("\r", "", $msg_body), then created upgrade.php and upgraded the forum. I always get the blank body.
Maybe I chose incorrect file?
|
|
|
Re: signature-like text [message #7028 is a reply to message #7015] |
Mon, 04 November 2002 17:47 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You were correct in modifying forum_data/src/post.php.t, however I suspect you did not make your modification in the correct place.
you should add something like this:
if (!strlen($msg_body)) {
$msg_body = "Hi\n\nBest regards.";
}
FUDforum Core Developer
|
|
|
Re: signature-like text [message #7030 is a reply to message #7028] |
Mon, 04 November 2002 21:14 |
zapal
Messages: 68 Registered: October 2002 Location: Poland
Karma: 0
|
Member |
|
|
Hi
What I've found out is that I made modifications in the right place, but the forum wasn't rebuild after upgrade. So post.php in every theme wasn't even touched. I think this is an upgrade bug.
Also post.php.t in $forum_data/src in the fudforum installation wasn't touched.
[Updated on: Mon, 04 November 2002 21:16] Report message to a moderator
|
|
|
Re: signature-like text [message #7033 is a reply to message #7030] |
Mon, 04 November 2002 23:50 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
What do you mean was not rebuilt? You made the modifications to post.php.t, then rebuilt a theme and you are saying the compiled post.php was identical?
FUDforum Core Developer
|
|
|
Re: signature-like text [message #7037 is a reply to message #7033] |
Tue, 05 November 2002 10:23 |
zapal
Messages: 68 Registered: October 2002 Location: Poland
Karma: 0
|
Member |
|
|
No.
I took the CVS version (cvs checkout fud21_upgrade) and changed post.php.t in that directory structure. Then I generated upgrade.php file, and upgraded forum.
After doing above things, I noticed that post.php.t and post.php (in the theme dir) in already installed forum haven't changed.
Or maybe I should change the version number so that upgrade.php would install new post.php.t file?
|
|
|
Re: signature-like text [message #7039 is a reply to message #7037] |
Tue, 05 November 2002 14:22 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You should not do upgrade and so on, simply modify the post.php.t in the installed forum and then rebuilt the theme.
FUDforum Core Developer
|
|
|