News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Question for birthday text

Started by Panoulis64, July 07, 2021, 10:18:41 AM

Previous topic - Next topic

Panoulis64

The birthday text can be found at EmailTemplates.english-utf8

In the posts to the members, it does not mention the name of the forum !!!
This is the code I have
@additional_params: happy_birthday

REALNAME: The real (display) name of the person receiving the birthday message.

@description: A message sent to members on their birthday.

*/

$birthdayEmails = array(

'happy_birthday' => array(

'subject' => 'Happy birthday from {FORUMNAME}.',

'body' => 'Dear {REALNAME},

We here at {FORUMNAME} would like to wish you a happy birthday.  May this day and the year to follow be full of joy.
{REGARDS}',

'author' => '<a href="http://www.simplemachines.org/community/?action=profile;u=2676">Thantos</a>',


In the beginning, in the commands, there is "REALNAME: The real (display) name of the person receiving the birthday message."
but not something about FORUMNAME?

Given that the problem is that it does not write the name of the forum in the e-mails received by members, should there be something about it or should I fill it in?
And how;
Thank you very much.

Sir Osis of Liver

Forum name should appear twice -



subject' => 'Happy birthday from {FORUMNAME}.',

We here at {FORUMNAME} would like to wish you a happy birthday.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Panoulis64

This happens in all forms birthday and everything does not send the name of the forum
Once or twice even if you repeat

Shambles

Download and look inside your Profile-Actions.php script from the Sources folder.

Copy & paste here a few lines after the line "// Replace all the common variables in the templates."

Panoulis64


// Replace all the common variables in the templates.
foreach ($context['notification_templates'] as $k => $name)
$context['notification_templates'][$k]['body'] = strtr($name['body'], array('{MEMBER}' => un_htmlspecialchars($context['member']['name']), '{MESSAGE}' => '[url=' . $scripturl . '?msg=' . $context['warning_for_message'] . ']' . un_htmlspecialchars($context['warned_message_subject']) . '[/url]', '{SCRIPTURL}' => $scripturl, '{FORUMNAME}' => $mbname, '{REGARDS}' => $txt['regards_team']));
}



Shambles

Ok, so that rules out any failure to address the substitution.

You have actually set a forum name/title in your Admin server settings...?

Panoulis64

Unfortunately, it was missing, as you said.
Of course now, I have to see if this was to blame.
Thanks.

Shambles

Quote from: Panoulis64
Of course now, I have to see if this was to blame.

How's this looking...?

Panoulis64

I just found out, a small problem.
Corrected the problem in sending messages and writes the name of the forum.
However, the name of the forum appeared in the title of the forum and I do not know where and how not to display it.

<div id="top_section">
<h1 class="forumtitle">
<a href="https://triglianoi.gr/index.php">Απανταχού Τριγλιανοί Απόγονοι</a>

         

Sir Osis of Liver

You can comment it out in index template, or look for something like this in index.css -



h1.forumtitle
{
line-height: 45px;
font-size: 1.8em;
font-family: Geneva, verdana, sans-serif;
margin: 0;
padding: 0;
float: left;
        display: none;
}



Just add display: none;
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Panoulis64

Thank you for your response.
In the first case I did not understand exactly what and where I need to make the change.
in the second I did it, to no avail.

I attach a photo, what exactly do I want to remove.

Shambles

What Sir advised was to edit your ostara2 index.css file, around line 1277, to add the "display:none;" to the css.

Doing that will remove the text you no longer want.




Don't forget to hard-refresh your browser to pick up the change.

Panoulis64

On the left, in black letters, there is a red line.
This is that I do not want you to display.


Kindred

It looks like you put your name/logo to replace the SimpleMachines image...      If you had put your name/logo in the palce intended for it, it would replace the text version of the forum name.

SInce you did what you did,     the way to address it and make it NOT show, as you ask is to do what Sir Osis suggested.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Panoulis64

If you look at the whole conversation from the beginning, the problem was initially in the birthday emails.
I put the name of the forum and all is well. It was solved.

But, you show it to me on the tablet and I do not want it there.
This is the new problem.

I replied to Sir Osis of Liver

QuoteΣτάλθηκε από: Panoulis64
« στις: Σήμερα στις 01:00:54 μμ »Εισαγωγή παράθεσης
Thank you for your response.
In the first case I did not understand exactly what and where I need to make the change.
in the second I did it, to no avail.

I attach a photo, what exactly do I want to remove.
Στάλθηκε από: Sir Osis of Liver
« στις: Σήμερα στις 12:22:04 μμ »Εισαγωγή παράθεσης
You can comment it out in index template, or look for something like this in index.css -

Κώδικας: [Επιλογή]

h1.forumtitle
{
   line-height: 45px;
   font-size: 1.8em;
   font-family: Geneva, verdana, sans-serif;
   margin: 0;
   padding: 0;
   float: left;
        display: none;
}

shadav

in your admin under configuration and then server settings, you placed your Forum Title there
in your admin under configuration and then current theme
you set your logo there?
Logo image URL:
(leave blank to show forum name or default logo.)
and then you can also add a slogan that would replace the default smf logo
Site slogan:
Add your own text for a slogan here. It will replace the SMF logo.

then in your theme's index.template.php find where you added to code for your logo and replace it with the default code
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '

here is what it will look like if you do it this way (keep in mind I've played with my css to move the logo and slogan to the center)

Shambles

I'm totally confused.

Is this what you want it to look like?





??? If so, do what Sir Osis and I suggested.

shadav

Quote from: Shambles on July 14, 2021, 03:02:04 PM
I'm totally confused.

Is this what you want it to look like?





??? If so, do what Sir Osis and I suggested.

wouldn't setting the h1.forumtitle to display none still give the issue with emails not displaying the forum title or is it that the h1 isn't used in emails?
and setting an h1 to display none couldn't that cause some seo/validation type issues or am I over thinking that  :P

Shambles

The issues with emails has been solved already - he'd left the Forum Title blank in the server settings section, meaning $mbname was empty throughout all missive functions.

Panoulis64

I apologize for the delay in replying, due to the different hours we have.
Thank you very much everyone for your interest in my problem.

In our case.
1. The image you presented is the one I want to have.
2. The logo that exists is a photo that replaced, that of smf

3. In the management, I added the logo and all the emails that are sent automatically work normally. So something should not change there, I think.
4. I do not know codes, I just know only small interventions and to make the translation of the language.
If you could tell me exactly what to change and with what, I would be grateful.


Advertisement: