Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 17 users online :: 0 Registered, 0 Hidden and 17 Guests :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
[Suggestion] Holiday Feature/Option
Page 1 of 1 • Share
I do not know if this is possible, or if you want to do it, but how about adding an option to decorate the forum for the holidays.
Example:
Halloween
Theme's color changes to a shade of orange.
Maybe a Halloween image and text (Happy Halloween!) in the header of the forum.
This will all be automatically, and you can turn it off or on.
Example:
Halloween
Theme's color changes to a shade of orange.
Maybe a Halloween image and text (Happy Halloween!) in the header of the forum.
This will all be automatically, and you can turn it off or on.
@SLGray hmm... I like it. It should be possible to detect the day using JavaScript and apply decorations on that specific day. I'll add it to my notes.
I saw this and thought I could do it, but @Ange Tuteur, for some reason, your scrollbar buttons don't change when I mess with them ._.
The code works finely however. I even matched the color with the color of your "view newest post" pictures and I used your little formula
http://help.forumotion.com/t147986p30-forumactif-edge-a-free-modern-and-responsive-forum-theme#1023873
And it still works when a user changes the theme from an already selected theme to the default
Hope this helps a little bit.
The code works finely however. I even matched the color with the color of your "view newest post" pictures and I used your little formula
http://help.forumotion.com/t147986p30-forumactif-edge-a-free-modern-and-responsive-forum-theme#1023873
And it still works when a user changes the theme from an already selected theme to the default
- Code:
$(function() {
var halloween = {
month: 8,
day: 31
},
now = new Date(),
styles =
'<style id="halloween">' +
'.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .fmd_awards td, #fmd_achievement_list .award, #achievement_progress div, #logo-desc { background-color: #F70; color: #000; }' +
'::-webkit-scrollbar-thumb { background-color: #F70; }' +
'#fa_theme_selector { background-color: #000; }' +
'#navbar, #tabs { background-color: #630; }' +
'#navbar .mainmenu:hover, #tabs a:hover, .mainmenu.fa_navactif, #tabs .activetab, #fa_theme_selector:hover, #fa_theme_selector:focus { color: #F70 !important; }' +
'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar { border-color: #F70 !important; }' +
'.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover, form.search-form, ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:hover { background-color: #E60; color: #FFF !important; }' +
'.forum-status[style*="state=new"] { background-color: #F81 !important; }' +
'form.search-form input.search-keywords, input.search-button { border-color: #F81 !important; }' +
'.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus, ::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color: #C40; }' +
'#fa_toolbar, #fa_toolbar_hidden { border-color: #C40 !important; }' +
'a:not([style^="color"]), .forumline tbody .catHead a, .h3 a, .h3 span, .table1 thead th a, .title a, h2.u a { color: #000 !important; }' +
'a:not([style^="color"]):not([class^="button"]):hover { color: #666 !important; }' +
'.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color: #650; }' +
'#page-footer a, #footer_end, #footer_end a { color: #FFF !important; }' +
'#page-footer a:hover, #footer_end a:hover { color: #AAA !important; }' +
'::selection { background-color: #F70 !important; }' +
'</style>';
if ( now.getMonth() == halloween.month && now.getDate() == halloween.date && $('#fa_theme_selector').val() == 'Select a theme' ) {
// Adds styles to <head> tag if default theme is loaded
$('head').append(styles);
}
$('#fa_theme_selector').change(function() {
// Checks if the default theme is chosen and sets theme accordingly
$(this).val() != 'Select a theme'
?
$('#halloween').remove()
:(
$('head').append(styles),
$('#fa_theme_selector').css('background-color', 'black')
);
});
});
Hope this helps a little bit.
No problem.SLGray wrote:Thanks for considering my suggestion.
Sure thing, thanks ! ^^Valoish wrote:>u>
<u<
This is a cute idea.
If you need help with decorations, lemme know :B
You have the right idea going on, the only thing is that it's not edit-friendly ; the user would need to know how to define objects, edit the style string, and setup conditions for their custom holidays. This isn't bad if you're making a preset list of holidays, which is most likely what we'll be doing, but I do want to add some flexibility in so that people can add holidays which aren't available. I was thinking something along these lines :Ace 1 wrote:I saw this and thought I could do it, but @Ange Tuteur, for some reason, your scrollbar buttons don't change when I mess with them ._.
The code works finely however. I even matched the color with the color of your "view newest post" pictures and I used your little formula
http://help.forumotion.com/t147986p30-forumactif-edge-a-free-modern-and-responsive-forum-theme#1023873
And it still works when a user changes the theme from an already selected theme to the default
- Code:
$(function() {
var halloween = {
month: 8,
day: 31
},
now = new Date(),
styles =
'<style id="halloween">' +
'.color-primary, .title, h2.u, .h3, .inner h1.page-title, .mainmenu:after, .forumline tbody .catHead, form.search-form input.search-keywords, input.search-button, .pagination span a, a.button1, a.button2, button.button2, input.button1, input.button2, input.button, #profile-advanced-add a, img[src*="?poll"], .fa_pseudo_radio:after, #tabs, body div.sceditor-dropdown .button, .codebox dt, blockquote cite, .sceditor-container .sceditor-toolbar, body #fa_toolbar, body #fa_toolbar_hidden, body #fa_toolbar #fa_right #notif_list li.see_all, #fae_sticky_nav_panel a:after, img[src*="color=primary"], .table1 thead th, .breadcrumbs, input[type="button"], input[type="submit"], input[type="reset"], input[type="file"], .fmd_awards td, #fmd_achievement_list .award, #achievement_progress div, #logo-desc { background-color: #F70; color: #000; }' +
'::-webkit-scrollbar-thumb { background-color: #F70; }' +
'#fa_theme_selector { background-color: #000; }' +
'#navbar, #tabs { background-color: #630; }' +
'#navbar .mainmenu:hover, #tabs a:hover, .mainmenu.fa_navactif, #tabs .activetab, #fa_theme_selector:hover, #fa_theme_selector:focus { color: #F70 !important; }' +
'input[type="text"]:hover, input.post:hover, input.inputbox:hover, textarea:hover, select:hover, input[type="text"]:focus, input.post:focus, input.inputbox:focus, textarea:focus, select:focus, body div.sceditor-dropdown input:focus, body div.sceditor-dropdown textarea:focus, .fa_pseudo_checkbox:hover, .fa_pseudo_radio:hover, .sceditor-container, h2.post-content, h3.post-content, h4.post-content, .lastpost-avatar, #wio_new_avatar, .avatar-mini img, .avatar { border-color: #F70 !important; }' +
'.pagination span a:hover, a.button1:hover, a.button2:hover, button.button2:hover, input.button1:hover, input.button2:hover, input.button:hover, #profile-advanced-add a:hover, input.search-button:hover, body div.sceditor-dropdown .button:hover, img[src*="color=primary"]:hover, input[type="button"]:hover, input[type="submit"]:hover, input[type="reset"]:hover, input[type="file"]:hover, form.search-form, ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:hover { background-color: #E60; color: #FFF !important; }' +
'.forum-status[style*="state=new"] { background-color: #F81 !important; }' +
'form.search-form input.search-keywords, input.search-button { border-color: #F81 !important; }' +
'.pagination span a:active, .pagination span a:focus, .pagination span strong, a.button1:active, a.button2:active, button.button2:active, input.button1:active, input.button2:active, input.button:active, input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active, a.button1:focus, a.button2:focus, button.button2:focus, input.button1:focus, input.button2:focus, input.button:focus, input.search-button:focus, #tabs a:after, body div.sceditor-dropdown .button:active, body div.sceditor-dropdown .button:focus, body #fa_search #fa_textarea, body #fa_search #fa_magnifier, img[src*="color=primary"]:active, input[type="button"]:focus, input[type="submit"]:focus, input[type="reset"]:focus, input[type="file"]:focus, ::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color: #C40; }' +
'#fa_toolbar, #fa_toolbar_hidden { border-color: #C40 !important; }' +
'a:not([style^="color"]), .forumline tbody .catHead a, .h3 a, .h3 span, .table1 thead th a, .title a, h2.u a { color: #000 !important; }' +
'a:not([style^="color"]):not([class^="button"]):hover { color: #666 !important; }' +
'.color-secondary, .forum-status[style*="locked=true"], img[src*="color=secondary"] { background-color: #650; }' +
'#page-footer a, #footer_end, #footer_end a { color: #FFF !important; }' +
'#page-footer a:hover, #footer_end a:hover { color: #AAA !important; }' +
'::selection { background-color: #F70 !important; }' +
'</style>';
if ( now.getMonth() == halloween.month && now.getDate() == halloween.date && $('#fa_theme_selector').val() == 'Select a theme' ) {
// Adds styles to <head> tag if default theme is loaded
$('head').append(styles);
}
$('#fa_theme_selector').change(function() {
// Checks if the default theme is chosen and sets theme accordingly
$(this).val() != 'Select a theme'
?
$('#halloween').remove()
:(
$('head').append(styles),
$('#fa_theme_selector').css('background-color', 'black')
);
});
});
Hope this helps a little bit.
1. User defines the holiday names and dates in a "holidays" object.
2. We loop over the object to check if today is any of the holidays.
3. If we get a hit, we'll add a class name to the body for that holiday.
I think including preset CSS for the holiday will be perfect, but it'll be optional in case the admin wants to make their own styles for that holiday. This is an example of what I mean :
- Code:
$(function() {
var month = {
'January' : 1,
'February' : 2,
'March' : 3,
'April' : 4,
'May' : 5,
'June' : 6,
'July' : 7,
'August' : 8,
'September' : 9,
'October' : 10,
'November' : 11,
'December' : 12
},
thisMonth = new Date().getMonth(),
i;
for (i in month) {
if (month[i] - 1 == thisMonth) {
document.body.className += ' month-' + i.toLowerCase();
break;
}
}
});
This'll add a class to the body depending on the month. Since we're currently in September, the class would be
|
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum