 | How to... |  |
Posted: 08/07/2007 7:17 PM |
|
|
|
|
|
| Seagull |
| Posts |
110 |
| Word Cnt. |
24,559 |
| BDay |
N/A |
| Sign |
N/A |
| Sex |
 |
|
|
|
Joined: Mar 21, 2007
Local time: 7:41 AM
Location: Northern Ireland
|

|
|
|
|
 |
I want to change the colour of the text in the following sentance
"an activation email has been sent blah blah" lol
Which file do i edit
Its the bit that shows when you click submit to register |
|
|
 |
 |
| Back to Top |
|
|
 | Re: How to... |  |
Posted: 08/08/2007 12:14 AM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 8:41 AM
Location: St Pete, FL
|

|
|
|
|
 |
There doesn't seem to be a tpl file for displaying this message. The code is assigned and displayed in the includes/usercp_register.php file. This is where it is being assigned:
| Code:
|
else if ( $board_config['require_activation'] == USER_ACTIVATION_SELF )
{
$message = $lang['Account_inactive'];
$email_template = 'user_welcome_inactive';
}
else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN )
{
$message = $lang['Account_inactive_admin'];
$email_template = 'admin_welcome_inactive';
}
else
{
$message = $lang['Account_added'];
$email_template = 'user_welcome';
}
|
This covers the 3 options of whether the admin or user has to activate the account or whether no activation is required. The message is stored in the $message variable...
The rest of the message is added here:
| Code:
|
|
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
|
This adds a hyperlink that will return the new member to the index page. This is where the message is displayed:
| Code:
|
|
message_die(GENERAL_MESSAGE, $message);
|
If you wanted to change everything to display the message in Red font, you could do the following:
OPEN
includes/usercp_register.php
FIND
| Code:
|
|
$message = $message . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
|
REPLACE WITH
| Code:
|
|
$message = '<font color="red">' . $message . '<br /><br />' . sprintf($lang['Click_return_index'], '</font><a href="' . append_sid("index.$phpEx") . '">', '</a>');
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: How to... |  |
Posted: 08/08/2007 4:56 PM |
|
|
|
|
|
| Seagull |
| Posts |
110 |
| Word Cnt. |
24,559 |
| BDay |
N/A |
| Sign |
N/A |
| Sex |
 |
|
|
|
Joined: Mar 21, 2007
Local time: 7:41 AM
Location: Northern Ireland
|

|
|
|
|
 |
For some reason it hasnt changed colour
It makes the text a bit smaller but thats it
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: How to... |  |
Posted: 08/08/2007 5:27 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 8:41 AM
Location: St Pete, FL
|

|
|
|
|
 |
Could you please provide a link to your usercp_register.php file???
Creating text Links for phpBB files
First create a duplicate of the phpBB file on your PC, then rename the file by adding .txt to the end of the file name. Next upload the file to a location on your FTP Server accessible to the public and provide a link back here for us to analyze it...
The path to your file could look something like this now:
| Code:
|
|
http://yourdomain.com/downloads_folder/usercp_register.txt
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: How to... |  |
Posted: 08/08/2007 5:56 PM |
|
|
|
|
|
| Seagull |
| Posts |
110 |
| Word Cnt. |
24,559 |
| BDay |
N/A |
| Sign |
N/A |
| Sex |
 |
|
|
|
Joined: Mar 21, 2007
Local time: 7:41 AM
Location: Northern Ireland
|

|
|
|
|
 |
|
|
 |
 |
| Back to Top |
|
|
 | Re: How to... |  |
Posted: 08/08/2007 10:24 PM |
|
|
|
|
|
| Site Admin |
| Posts |
30757 |
| Word Cnt. |
2,628,690 |
| BDay |
Jul 28 |
| Sign |
Leo |
| Sex |
 |
|
|
|
Joined: Sep 25, 2004
Local time: 8:41 AM
Location: St Pete, FL
|

|
|
|
|
 |
I took another look at the code and found a better way to handle this. I had thought that the message_die function was a php function but found that it is actually a phpBB function instead. And the message_die function actually does use a template file named message_body.tpl. If you don't mind if all messages displayed in the message_body.tpl file have the same color, then you can modify the HTML code to display the font color of your choosing...
I don't know if you know anything about creating classes in the css file, but that would be the best way to handle this. The quick and dirty approach is to continue using HTML font tags. It's up to you which you prefer to use. This is what you could do using the classes. All we are doing is creating and using a new class named gen2, but if you have a class that already uses the color that you want, you could use it too:
OPEN
templates/subSilver/message_body.tpl - you would want to adjust the code in all of your templates
FIND
| Code:
|
|
<td align="center"><span class="gen">{MESSAGE_TEXT}</span></td>
|
REPLACE WITH
| Code:
|
|
<td align="center"><span class="gen2">{MESSAGE_TEXT}</span></td>
|
OPEN
templates/subSilver/subSilver.css - you would want to adjust the code in all of your templates
FIND
| Code:
|
|
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: #DD6900; text-decoration: underline; }
|
AFTER, ADD
| Code:
|
/* this is set to red & maroon but you can change it to anything you want */
.gen2 { font-size : 12px; color : #FF0000; }
a.gen2 { color : #FF0000; text-decoration: none; }
a.gen2:hover { color: #CC0033; text-decoration: underline; }
|
 |
|
|
 |
 |
| Back to Top |
|
|
 |
 | Information |  |
|