Latest topics
» help me about Latest topic
by Haytam Today at 12:47

» Display a preview of the user profile on hover
by Haytam Today at 12:39

» Starred Forums
by Ange Tuteur Today at 12:27

» Chit Chat Thread
by Ange Tuteur Today at 12:11

» Colored Bar Navigation
by Valoish Yesterday at 23:03

» FM Themes
by SLGray Thu 25 May 2017, 22:39

» User - Made Creations
by SLGray Thu 25 May 2017, 22:37

» Classified Ads
by SLGray Thu 25 May 2017, 19:23

» Categories as tabs on Edge!
by STBW Thu 25 May 2017, 04:11

» [GAME] What are you thinking right now?
by Ange Tuteur Wed 24 May 2017, 15:10

» [GAME] Countdown from 200,000
by Ange Tuteur Wed 24 May 2017, 15:09

» [GAME] Post a random picture
by Ange Tuteur Wed 24 May 2017, 15:08

» [GAME] What are you doing right now?
by Ange Tuteur Wed 24 May 2017, 15:06

» [GAME] Count to 30 - Ange Edition
by Ange Tuteur Wed 24 May 2017, 15:05

» [GAME] Count to One Million!
by Ange Tuteur Wed 24 May 2017, 15:05

Recent Tutorials
Who is online?
In total there are 11 users online :: 3 Registered, 0 Hidden and 8 Guests :: 1 Bot

Haytam, JerriLeah7, Luffy

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

[Suggestion] Holiday Feature/Option

View previous topic View next topic Go down

avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2296
Points : 4413
Reputation : 275
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Tue 13 Sep 2016, 23:04

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.
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 14 Sep 2016, 13:52

@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. Surprised
avatar
SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 44
Posts : 2296
Points : 4413
Reputation : 275
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Wed 14 Sep 2016, 20:05

Thanks for considering my suggestion.
avatar
Valoish
Graphic Designer
Title :
Gender : Female
Age : 20
Posts : 3589
Points : 4512
Reputation : 332
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Opera Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://www.canvasforums.com https://twitter.com/https://twitter.com/Valoishx3

PostValoish on Wed 14 Sep 2016, 20:07

>u>
<u<
This is a cute idea.
If you need help with decorations, lemme know :B

--------

"I was afraid. And my own insecurity crushed him." - Youku x Boku SS
avatar
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2091
Points : 2699
Reputation : 78
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Thu 15 Sep 2016, 17:39

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 Wink

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 Razz

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. Rose
avatar
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4544
Points : 9370
Reputation : 2294
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Fri 16 Sep 2016, 13:32

@SLGray wrote:Thanks for considering my suggestion.
No problem. Smile

@Valoish wrote:>u>
<u<
This is a cute idea.
If you need help with decorations, lemme know :B
Sure thing, thanks ! ^^

@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 Wink

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 Razz

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. Rose
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 :

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 is an example using objects btw, you can use an easier and faster method for months by utilizing arrays instead. Wink

This'll add a class to the body depending on the month. Since we're currently in September, the class would be
Code:
.month-september
, so you can style by the month. loove
avatar
Ace 1
Valued Member
Title :
God of Creation
Gender : Male
Age : 17
Posts : 2091
Points : 2699
Reputation : 78
Location : druid hill Park
Language : Eng, Fr, Loud
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile http://fmdesign.forumotion.com/u190

PostAce 1 on Fri 16 Sep 2016, 16:56

Oh, well that makes sense for multiple holidays.

Intuitive

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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