Reminders (or event) in topic, is this possible?

3 posters

Go down

Solved Reminders (or event) in topic, is this possible?

Post by SNooPy89 November 22nd 2021, 6:09 pm

Is there a possibility that we have some reminders (or events) within the topic, such as a notification coming out when it's someone's birthday? I know about the birthday option in the footer, but is there any option to set it to be within the topic?


Last edited by SNooPy89 on December 6th 2021, 1:06 am; edited 1 time in total
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SLGray November 22nd 2021, 9:13 pm

Birthday option in the footer?


Reminders (or event) in topic, is this possible? Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 49800
Reputation : 3444
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by Niko November 22nd 2021, 10:00 pm

Hello @SNooPy89

do you mean a kind of "banner" that appears under the posts of someone when it's her/his birthday?
I mean, something automatic in this sense or you mean something the user needs to set-up?

:rose:
Niko
Niko
Hyperactive

Male Posts : 2357
Reputation : 109
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.com

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SNooPy89 November 22nd 2021, 10:14 pm

It's not just birthdays. In addition, most users did not specify a birthday in the profile, but whoever did, usually does not look at the footer.

@Niko, anything, just to be in the topic. It can also be something like a text slider. I tried in the calendar, but it doesn't show an event reminder.
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by Niko November 22nd 2021, 10:22 pm

@SNooPy89 a possible solution that pops in my mind is to show a banner under users' post when their birthday (if set) is close to X days, for example:

Reminders (or event) in topic, is this possible? 2021-135

But I don't know if this is what you had in mind Embarassed
Niko
Niko
Hyperactive

Male Posts : 2357
Reputation : 109
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.com

skouliki, Ape, TonnyKamper and pedxz like this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SNooPy89 November 25th 2021, 1:18 pm

Yes, but more users don't set birhday in profile and other event isn't possible to set in profile?

And how can I do what you stated and will it show on the day of the birthday, for example, that it was someone's birthday (who stated the birthday in the profile)?
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by Niko November 25th 2021, 11:27 pm

@SNooPy89 I would need to write the code, but I haven't started because I wanted to see if that was what you wanted (to avoid doing it for no reason Very Happy Very Happy )

About "other events", you may create a profile field of date type and that could be used as well as a date reference - but in any case, birthday or other date/event, you will always need a reference and an input from the user, because the code would need data to rely on in any case. :rose:
Niko
Niko
Hyperactive

Male Posts : 2357
Reputation : 109
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.com

TonnyKamper likes this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SNooPy89 November 30th 2021, 12:34 am

Okay, then maybe what you suggested. Can you write me that code? Is it possible for the message below the post to appear on the birthday?I will tell users to list birthdays in the profile, and I will set other events in the calendar.
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Niko likes this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by Niko November 30th 2021, 1:05 am

@SNooPy89 sure!
Just give me a confirmation the forum is http://cacak.forumsr.net/ and that your forum version is PhpBB3 (I guess) ? :rose:
Niko
Niko
Hyperactive

Male Posts : 2357
Reputation : 109
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.com

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SNooPy89 December 1st 2021, 12:35 am

I think for my second forum (oh, I forgot ti paste link to my forum) https://odabranodrustvo.forumsr.com/

It is modern version on this forum
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Niko likes this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by Niko December 1st 2021, 10:47 pm

Here I am! Very Happy

Go to ACP > Modules > HTML & Javascript > Javascript codes management and create a new javascript code with these settings:
  • Title: as you prefer
  • Where: in topics
  • Content:
    Code:
    $(function() {
    var d = new Date();
     var month = d.getMonth()+1;
    var day = d.getDate();
    var currentDate = (day<10 ? '0' : '') + day + '.' +    (month<10 ? '0' : '') + month + '.' +    d.getFullYear();
    $(".postprofile").each(function() {
        var element = $(this);
        var profile = $(this).find('.postprofile-name a');
        var username = profile.html();
        var href = profile.attr('href');
        $.ajax({
              url:href,
              type:'GET',
              success: function(data){
                    var birthday = $(data).find('dl#field_id-12 dd div font font').html();               
                    if(birthday == currentDate) {
                        $(element).parent().find('.postbody').append('<div class="birthdayBox">Today is '+username+'\'s birthday</div>');     
                    }
              }

            });
        });
    });


Notes: from this you can change this part
Code:
Today is '+username+'\'s birthday
with your own custom message. It is only important to
  1. keep
    Code:
    '+username+'
    to have it replaced with the user name
  2. If you use any time in the message the symbol
    Code:
    '
    you need to add a backslash
    Code:
    /
    before (as I already did in the default message)


Then you need to go to ACP > Display > Images & Colors > Colors > CSS and add this css code, which you can edit however you wish. I made it look like your forum Wink
Code:
.birthdayBox {
    background: #6c2f00;
    color: white;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
clear: both;
}

If you have any trouble editing, just ask :rose:
this is the demo:

Reminders (or event) in topic, is this possible? 2021-143
Niko
Niko
Hyperactive

Male Posts : 2357
Reputation : 109
Language : English, Italian, French
Location : Italy

View user profile https://www.fmcodes.com

skouliki, SNooPy89, TonnyKamper, pedxz and Winging like this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SNooPy89 December 6th 2021, 1:06 am

Hey Niko, you are the best! Thank you very much.

I am sorry for waiting for an answer, I had a lot of responsibilities these days.
avatar
SNooPy89
Forumember

Posts : 88
Reputation : 1
Language : serbian
Location : Serbia

View user profile http://cacak.forumsr.net

Niko likes this post

Back to top Go down

Solved Re: Reminders (or event) in topic, is this possible?

Post by SLGray December 6th 2021, 5:39 am

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules


Reminders (or event) in topic, is this possible? Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 49800
Reputation : 3444
Language : English
Location : United States

View user profile https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum