PDA

View Full Version : Question about Languages & Phrases


chriske
09-25-2011, 03:30 PM
I want to use a different phrases for my forum title (of the forum itself) and the Sender (The name of the sender in the emails)
So basically I want to create a second title $vboptions[bbtitle2] and use that one in all the emails my forum sends.

How can I achieve this?

BirdOPrey5
09-25-2011, 06:05 PM
You just need to edit the phrases... you can put anything you want in them. Instead of using the board name which might be in a variable like {1} or {2} in the phrase, just hard-code what you want.

Example-

Change:
"Welcome to {1}"
to
"Welcome to the XYZ forum"

chriske
09-25-2011, 09:38 PM
Thanks for your reply.

The thing is I can't find the specific phrase for the name of the sender (i can see the phrases of the subject titles). The sender of the email is just "$vboptions[bbtitle]" and it is not in the phrases.

BirdOPrey5
09-25-2011, 10:03 PM
I see what you mean now...

The only way I can see to do this is with a file edit...

You'll need to edit the file includes/class_mail.php

Find the lines:


if (isset($vbphrase['x_mailer']))
{
$mailfromname = construct_phrase($this->fetch_first_line($vbphrase['x_mailer']), $vbulletin->options['bbtitle']);
}
else
{
$mailfromname = $vbulletin->options['bbtitle'];
}


and change the 2 instances of $vbulletin->options['bbtitle'] to the hard coded name of your choice:


if (isset($vbphrase['x_mailer']))
{
$mailfromname = construct_phrase($this->fetch_first_line($vbphrase['x_mailer']), "My Forum Name");
}
else
{
$mailfromname = "My Forum Name";
}


I didn't test this so backup the original file of course, but it should work.