Customizing the calendar?
3 posters
Page 1 of 1
Customizing the calendar?
How would I go about customizing the month and day names in the standard forumotion calendar? I want it to have the month and day names of the rp setting at my forum, but I can't find the month and day names in the calendar templates. Where do I change this? Can I even change this?
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
hello
You can read this tutorial https://help.forumotion.com/t1449-the calendar
you can use our new system that is way better and faster https://help.forumotion.com/t153199-new-functionality-the-events
You can read this tutorial https://help.forumotion.com/t1449-the calendar
you can use our new system that is way better and faster https://help.forumotion.com/t153199-new-functionality-the-events
Re: Customizing the calendar?
skouliki wrote:hello
You can read this tutorial https://help.forumotion.com/t1449-the calendar
you can use our new system that is way better and faster https://help.forumotion.com/t153199-new-functionality-the-events
I've already read the calendar tutorial and it doesn't answer my question. Neither does the events information. I want to know how to change the names of the months and dates. Where it says things like "January", "February", "Saturday" or "Thursday" I want it to say something different.
Last edited by Zeta on April 25th 2018, 8:04 am; edited 1 time in total (Reason for editing : spelling)
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
can you provide please your forum url ? iam not quite sure if that is possible
maybe by modifying the calendar template
maybe by modifying the calendar template
Re: Customizing the calendar?
skouliki wrote:can you provide please your forum url ? iam not quite sure if that is possible
maybe by modifying the calendar template
I've already looked at the templates in the calendar section and stated in my first post that I could not find the month and day names there to alter. I am open to a javascript or html solution to this if anybody can present one. Or if somebody else already knows where to look I would appreciate being told. The calendar templates appear to be the same regardless of what forum it is.
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
You should provide a link to the calendar on your forum and say which names you want to change exactly, bacause there are many options. Also it's different if you are referring to the calendar widget, the calendar main page or the calendar schedule.
Anyway what you ask can be done with javascript, filtering the elements and changing the names in their 'html' property directly.
Here I tested this one in a PHPBB2 forum to change this names:
Anyway what you ask can be done with javascript, filtering the elements and changing the names in their 'html' property directly.
Here I tested this one in a PHPBB2 forum to change this names:
- Code:
$(function(){
var days_hash = {
"Sunday": "SUN",
"Monday": "MON",
"Tuesday": "TUES",
"Wednesday": "WED",
"Thursday": "THURS",
"Friday": "FRI",
"Saturday": "SAT"
};
$('table.forumline th').filter(function(){
var e = $(this), d;
for (d in days_hash) {
e.html(e.html().replace(d, days_hash[d]));
}
});
});
Wecoc- Forumember
- Posts : 144
Reputation : 111
Language : Catalan, Spanish, English
Re: Customizing the calendar?
Wecoc wrote:You should provide a link to the calendar on your forum and say which names you want to change exactly, bacause there are many options. Also it's different if you are referring to the calendar widget, the calendar main page or the calendar schedule.
Anyway what you ask can be done with javascript, filtering the elements and changing the names in their 'html' property directly.
Here I tested this one in a PHPBB2 forum to change this names:
- Code:
$(function(){
var days_hash = {
"Sunday": "SUN",
"Monday": "MON",
"Tuesday": "TUES",
"Wednesday": "WED",
"Thursday": "THURS",
"Friday": "FRI",
"Saturday": "SAT"
};
$('table.forumline th').filter(function(){
var e = $(this), d;
for (d in days_hash) {
e.html(e.html().replace(d, days_hash[d]));
}
});
});
That seems to work for the days on the calendar page. Thank you. What about the month names though? I would like it changed for the calendar widget, the calendar main page and the calendar schedule. Basically anywhere it would display.
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
Everywhere calendar would display, or everywhere dates would display?I would like it changed for the calendar widget, the calendar main page and the calendar schedule. Basically anywhere it would display.
Well, it's not recommended to edit it everywhere, should be better to do it case by case.
That way will take less time to process and will avoid problems between full names and abbreviations, or in post contents.
I know dates are displayed many times along the forum but still I would priorizate that.
It's tricky to do, so you should think how much you really need this. Will be easier if it's only in the calendars, of course.
If you want go on with that, search every part where that should be replaced and provide a link in every case (only the forum's main link for widgets).
I understand you don't want to share your forum link here but you should be able to remove it when this is solved anyway, in case this helps...
Wecoc- Forumember
- Posts : 144
Reputation : 111
Language : Catalan, Spanish, English
Re: Customizing the calendar?
Just everywhere the calendar would display. The calendar page, the widget, etc. there is nothing in any of these that is not available for all forums.Wecoc wrote:Everywhere calendar would display, or everywhere dates would display?I would like it changed for the calendar widget, the calendar main page and the calendar schedule. Basically anywhere it would display.
Well, it's not recommended to edit it everywhere, should be better to do it case by case.
That way will take less time to process and will avoid problems between full names and abbreviations, or in post contents.
I know dates are displayed many times along the forum but still I would priorizate that.
It's tricky to do, so you should think how much you really need this. Will be easier if it's only in the calendars, of course.
If you want go on with that, search every part where that should be replaced and provide a link in every case (only the forum's main link for widgets).
I understand you don't want to share your forum link here but you should be able to remove it when this is solved anyway, in case this helps...
It wouldn't help if I provided the forum link anyway. Guests can only see the log in page instead of the forum index and widgets on it. Also, removing the link after its been up there for days or weeks won't do much to keep unwanted guests away.
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
Are you still interested in this? It has been awhile, sorry but I'm busy lately.
Well, this code is a bit crazy but it's all I can do to provide what you are asking here.
This is the format of the code:
text = text.replace(/\bOld\b/gm, "New");
Because you want it also for the other week days and maybe abbreviations of the days, months, etc. all you have to do is copy that line and paste it right under it, and use it again with the new text to be replaced.
You can do that as many times as you want.
If you want it case insensitive, in the same line(s) change /gm to /gmi
As I said I was trying to avoid something like this because it will change the text absolutely everywhere, also in posts if somebody writes "Monday", for example. But I guess it's the only way to solve this in your case.
Well, this code is a bit crazy but it's all I can do to provide what you are asking here.
- Code:
$(function(){
var body = document.querySelector('body'), text = body.innerHTML;
text = text.replace(/\bMonday\b/gm, "MON");
body.innerHTML = text;
});
This is the format of the code:
text = text.replace(/\bOld\b/gm, "New");
Because you want it also for the other week days and maybe abbreviations of the days, months, etc. all you have to do is copy that line and paste it right under it, and use it again with the new text to be replaced.
You can do that as many times as you want.
- Code:
text = text.replace(/\bMonday\b/gm, "MON");
text = text.replace(/\bTuesday\b/gm, "TUES");
text = text.replace(/\bWednesday\b/gm, "WED");
(...)
If you want it case insensitive, in the same line(s) change /gm to /gmi
As I said I was trying to avoid something like this because it will change the text absolutely everywhere, also in posts if somebody writes "Monday", for example. But I guess it's the only way to solve this in your case.
Wecoc- Forumember
- Posts : 144
Reputation : 111
Language : Catalan, Spanish, English
Re: Customizing the calendar?
[quote="Wecoc"]Are you still interested in this? It has been awhile, sorry but I'm busy lately.
Well, this code is a bit crazy but it's all I can do to provide what you are asking here.
[code]$(function(){
var body = document.querySelector('body'), text = body.innerHTML;
text = text.replace(/\bMonday\b/gm, "MON");
body.innerHTML = text;
});[/code]
This is the format of the code:
text = text.replace(/\b[b][color=#006600]Old[/color][/b]\b/gm, "[b][color=#FF9933]New[/color][/b]");
Because you want it also for the other week days and maybe abbreviations of the days, months, etc. all you have to do is copy that line and paste it right under it, and use it again with the new text to be replaced.
You can do that as many times as you want.
[code]text = text.replace(/\bMonday\b/gm, "MON");
text = text.replace(/\bTuesday\b/gm, "TUES");
text = text.replace(/\bWednesday\b/gm, "WED");
(...)[/code]
If you want it case insensitive, in the same line(s) change [color=#FF0000]/gm[/color] to [color=#FF0000]/gmi[/color]
As I said I was trying to avoid something like this because it will change the text absolutely everywhere, also in posts if somebody writes "Monday", for example. But I guess it's the only way to solve this in your case.[/quote]
Thank you. What about Months though? January, February, etc. I've been asking for those the whole time too.
Well, this code is a bit crazy but it's all I can do to provide what you are asking here.
[code]$(function(){
var body = document.querySelector('body'), text = body.innerHTML;
text = text.replace(/\bMonday\b/gm, "MON");
body.innerHTML = text;
});[/code]
This is the format of the code:
text = text.replace(/\b[b][color=#006600]Old[/color][/b]\b/gm, "[b][color=#FF9933]New[/color][/b]");
Because you want it also for the other week days and maybe abbreviations of the days, months, etc. all you have to do is copy that line and paste it right under it, and use it again with the new text to be replaced.
You can do that as many times as you want.
[code]text = text.replace(/\bMonday\b/gm, "MON");
text = text.replace(/\bTuesday\b/gm, "TUES");
text = text.replace(/\bWednesday\b/gm, "WED");
(...)[/code]
If you want it case insensitive, in the same line(s) change [color=#FF0000]/gm[/color] to [color=#FF0000]/gmi[/color]
As I said I was trying to avoid something like this because it will change the text absolutely everywhere, also in posts if somebody writes "Monday", for example. But I guess it's the only way to solve this in your case.[/quote]
Thank you. What about Months though? January, February, etc. I've been asking for those the whole time too.
Zeta- Forumember
- Posts : 211
Reputation : 2
Language : English
Re: Customizing the calendar?
It's exactly the same, under all the day names edits do the same with months, like this:
Hope it works
- Code:
text = text.replace(/\bJanuary\b/gm, "JAN");
text = text.replace(/\bFebruary\b/gm, "FEB");
text = text.replace(/\bMarch\b/gm, "MAR");
Hope it works
Wecoc- Forumember
- Posts : 144
Reputation : 111
Language : Catalan, Spanish, English
Similar topics
» Customizing Topic Posts
» Customizing the search box
» Customizing spoiler
» Customizing the News Widget
» Customizing elements of last post
» Customizing the search box
» Customizing spoiler
» Customizing the News Widget
» Customizing elements of last post
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum