News:

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

Main Menu

Curve2 Color Changer

Started by SMF Customization Team, April 16, 2019, 06:00:27 PM

Previous topic - Next topic

pocttopus

This is amazing.
It works on 2.1RC4.
Please share your combination of colors.  ;)

peter_mein

Hello
Is it possible to change the colour for board icons ?
and i see the different between read article and unread article ?
Better i can selecet another colour for read and unread article.


Diego Andrés

No, board icons are images so it's not possible.
Although you could, using FA Board Icons mod

SMF Tricks - Free & Premium Responsive Themes for SMF.

Antechinus

Quote from: peter_mein on September 05, 2021, 05:56:20 AMHello
Is it possible to change the colour for board icons ?
Not with this mod, but you can with custom CSS. ;)

/* -------------------------------- */
/* @todo - With optional animation. */
.board_on {
    filter: saturate(.8) sepia(.5);
    animation: BoardOnPulse 3s infinite;
}
.board_on2 {
    filter: sepia(.5) brightness(.7);
    animation: BoardOnPulse 3s infinite;
}
@keyframes BoardOnPulse{
    0% {
        opacity: .8;
    }
    30% {
        opacity: .8;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: .8;
    }
}
/* -------------------------------- */
/* @todo - Icon tweaks. */
.board_off {
    filter: brightness(.5);
}
.board_redirect {
    filter: brightness(.7);
}

meccep45

if you turn them off, they will multiply. if you enable it, two errors will occur.
Hook call: function "outputCss" in file /share/nginx/html could not be called.
The callable outputCss could not be called.
You cannot view this attachment.
 

Diego Andrés

I think that could be an SMF issue

SMF Tricks - Free & Premium Responsive Themes for SMF.

Shades.

I have installed this multiple times on fresh 2.1RC4 and get the same errors after install and reset colors to default. I get 68 errors each time of the same two below. No errors changing colors manually this just happens after install.

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: cc_remove_shadows
File
/home2/*****/public_html/Sources/Class-ColorChanger.php
Line
404
URL of page causing the error
https://*****.com/index.php?action=admin;area=theme;sa=list;th=1

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 404
#1: buildCss()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 226
#2: outputCss()
Called from /home2/*****/public_html/Sources/Subs.php on line 5380
#3: call_integration_hook()
Called from /home2/*****/public_html/Sources/Subs.php on line 4465
#4: template_css()
Called from /home2/*****/public_html/Themes/default/index.template.php on line 119
#5: template_html_above()
Called from /home2/*****/public_html/Sources/Load.php on line 2677
#6: loadSubTemplate()
Called from /home2/*****/public_html/Sources/Subs.php on line 4187
#7: template_header()
Called from /home2/*****/public_html/Sources/Subs.php on line 3794
#8: obExit()
Called from /home2/*****/public_html/index.php on line 190

QuoteError
Type of error
Undefined_vars
Error message
8: Undefined index: cc_special_titles_color
File
/home2/*****/public_html/Sources/Class-ColorChanger.php
Line
417
URL of page causing the error
https://*****.com/index.php?action=admin;area=theme;sa=list;th=1

Backtrace information
#0: smf_error_handler()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 417
#1: buildCss()
Called from /home2/*****/public_html/Sources/Class-ColorChanger.php on line 226
#2: outputCss()
Called from /home2/*****/public_html/Sources/Subs.php on line 5380
#3: call_integration_hook()
Called from /home2/*****/public_html/Sources/Subs.php on line 4465
#4: template_css()
Called from /home2/*****/public_html/Themes/default/index.template.php on line 119
#5: template_html_above()
Called from /home2/*****/public_html/Sources/Load.php on line 2677
#6: loadSubTemplate()
Called from /home2/*****/public_html/Sources/Subs.php on line 4187
#7: template_header()
Called from /home2/*****/public_html/Sources/Subs.php on line 3794
#8: obExit()
Called from /home2/*****/public_html/index.php on line 190
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Diego Andrés

Sorry I forgot about this issue.
It has been resolved with the new update

Version 1.2.1 - 10 October 2021
- Insert default settings if not set

SMF Tricks - Free & Premium Responsive Themes for SMF.

Mick.

@Diego Andrés  It installed but I got this pesky error in case you forgot something lol

Sources/Class-ColorChanger.php (Line 569)
2: Invalid argument supplied for foreach()

and this one...

Sources/Class-ColorChanger.php (Line 569)
8: Trying to access array offset on value of type null


First line.
foreach ($palettes['default'] as $color_setting => $color)
{
if (!isset($settings['cc_' . $color_setting]))
$default_settings['cc_' . $color_setting] = $color;
}

Diego Andrés

Fixed

Version 1.2.2 - 27 October 2021
- Check if there are any default settings first

SMF Tricks - Free & Premium Responsive Themes for SMF.

Mick.

#50
This error is out of my custom theme. Do I need another file?

Sources/Class-ColorChanger.php (Line 404)
8: Undefined index: primary_color

Sources/Class-ColorChanger.php (Line 404)
8: Undefined index: gradient_start

and this one..
Sources/Class-ColorChanger.php (Line 394)
8: Trying to access array offset on value of type null

My setup:
    // Color Switcher
    $settings['color_changes'] = array(
    'primary_color' => array(
        array(
            'elements' => '.amt, .dropmenu li a.active, #top_info li a.active, #top_info > li > a:hover, #top_info > li:hover > a, #top_info > li > a.open, .dropmenu li a:hover, .dropmenu li:hover a, .dropmenu li a:focus, .button.active, .button.active:hover, .news2, .row-album, .project .overlay, .title_bar, .go-top, .menu li a:hover, .menu li:hover > a, .menu ul li a:hover, .menu ul li:hover > a, .hero-button',
            'properties' => array('background', 'border-color')
        ),
        array(
            'elements' => 'a, .bbc_link, .code, .top_links a:hover, .footer_article ul li a:hover, #footer a:hover, .current_page, .news3 h2, .page_number, blockquote cite::before, .forumtitle i',
            'properties' => array('color')
        ),
        array(
            'elements' => 'a:hover, .bbc_link:hover',
            'properties' => array('color' => '#fff')
        ),
        array(
            'elements' => '.hero-button:hover',
            'properties' => array('background', 'border-color')
        ),
    ),
    'gradient_start' => array(
        array(
            'elements' => '.news2, .news3, .title_bar',
            'properties' => array('background-image' => 'linear-gradient(to right, transparent 0%, {color} 70%)')
        )
    ),
);

index.template, Right before
    // Allow css/js files to be disabled for this specific theme.

Diego Andrés

I believe that's because you need to define the palettes/default colors for your theme.
I've fixed it just in case theme author doesn't add the palettes, will post the update soon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Version 1.3 - 27 October 2021
- Check against theme authors having defined color palette/s for their theme
- Fixed problems with default colors

SMF Tricks - Free & Premium Responsive Themes for SMF.

Mick.

Quote from: Diego Andrés on October 27, 2021, 10:27:13 PMI believe that's because you need to define the palettes/default colors for your theme.
I've fixed it just in case theme author doesn't add the palettes, will post the update soon.
Awesome thank you. Maybe that's why [Reset all to default] doesn't reset.

Mick.

Yup. You got it. Errors are gone and [Reset all to default] is gone as well. Much better.

Thanx Diego.

Mick.

I think some sort of tick is needed. What if the admin does not want to use the color changer? I don't see an option....maybe bring back reset to default?

Diego Andrés

That's where the default palette is needed so it always has "default colors".
Unfortunately the html color input is quite ******ty at the moment so it defaults to black (not to mention only hex colors)

SMF Tricks - Free & Premium Responsive Themes for SMF.

Mick.

What if we add color_changes tick setting in theme options? On/Off Would that work?

Diego Andrés

Well you also must remember that the admin would install this mod because already decided to use the color changer.
I still think offering palettes is a solid option for presets and default values.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Mick.

Quote from: Diego Andrés on October 27, 2021, 11:56:30 PMWell you also must remember that the admin would install this mod because already decided to use the color changer.
I still think offering palettes is a solid option for presets and default values.
Ya I think so too

Advertisement: