Teammitglieder online
Support-Box
Neue Beiträge seit dem letzten Besuch.
Textbausteine des MODERATIONSTOOL
AB > PFAD > GENERATOR
FORUM > PFAD > GENERATOR
Unterstützung Lösungs-Probleme
Auffällige
User
Der Runde
Tisch
HÄUFIG GESTELLTE FRAGEN
Regeln und nützliche Hinweise
Neueste Themen
» [Klassische Version]  Gründer/Admin Passwort vergessen / Forum löschen
von Joost Sa 31 Aug 2024 - 21:49

» Eigene Bildergalerie entfernen
von Joost Mi 28 Aug 2024 - 11:22

» Neu: Grid layout-Design für AwesomeBB und ModernBB
von Joost Fr 16 Aug 2024 - 7:44

» [Invision] Profil Drop Down verschoben
von Skouliki Sa 20 Jul 2024 - 17:01

» [Invision] Erklärung PWA Aktivierung + Mobile Version Problem
von Skouliki Do 18 Jul 2024 - 23:47

» [Invision] Beschreibung der Kategore einfügen
von Joost Mi 17 Jul 2024 - 8:52

» [Invision] Gefällt mir Button erscheint nicht
von Joost Mo 15 Jul 2024 - 18:14

» Goldhauch´s Plauderforum
von Joost Fr 12 Jul 2024 - 19:34

» [Invision] User Style Änderung - Code geht nicht
von Skouliki Do 11 Jul 2024 - 23:03

» [PunBB] Forum aufsplitten/teilen - ist das möglich?
von Joost Mi 10 Jul 2024 - 17:46

» Technische Wartung in der Zentrale: Montag 1 Juli, und Montag 8 Juli
von Joost Mo 24 Jun 2024 - 17:20

» [phpBB2] Mystic - new beginning RPG
von Raine Kamiya Fr 21 Jun 2024 - 20:52

» Neue Mitarbeiter gesucht
von Joost Fr 21 Jun 2024 - 20:26

» Lange Ladezeiten
von Skouliki Mi 19 Jun 2024 - 19:35

» Gründer E-Mailadresse ändern
von Skouliki Fr 7 Jun 2024 - 12:49

» Nach Wartung Datenbankfehler
von Joost Mo 3 Jun 2024 - 12:34

» Wartung geplant Montag, 3. Juni 2024
von Joost So 2 Jun 2024 - 8:04

» Anti-Spam-Prüfung bei Mitgliedern
von Skouliki So 12 Mai 2024 - 18:10

Beiträge mit den meisten Reaktionen des Monats
» Beitrag von Joost in Neu: Grid layout-Design für AwesomeBB und ModernBB
( 1 )


» Beitrag von Trueman in Eigene Bildergalerie entfernen
( 1 )


» Beitrag von Trueman in Eigene Bildergalerie entfernen
( 1 )


» Beitrag von Silicon9 in [Klassische Version]  Gründer/Admin Passwort vergessen / Forum löschen
( 1 )


[Invision] User Style Änderung - Code geht nicht

3 verfasser

Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach unten

Erledigt [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Do 4 Jul 2024 - 14:58

URL-Adresse des Forums:https://www.fantasy-schreibforum.com/
Rang/Funktion im Forum:Admin
Forenversion:Invision
Browser:Firefox
Persönliches CSS(Ja/Nein):Ja
Templateänderungen(Ja/Nein):ja

Hallo liebes Support-Team,

in diesem Thema habe ich schon etwas zu Style-Änderungen durch User lesen können:https://hilfe.forumieren.com/t45008-user-style-selber-andern

Wie in dem Thema dort genannt, bin ich auf den Link hier gegangen und habe den CSS Code in mein Forum kopiert:
https://fmdesign.forumotion.com/t530-simple-theme-changer?highlight=change

Leider gibt mir nach Eingabe des Codes das Forum diese Meldung:
Festgestellter Fehler
Wir haben eine ungerade Anzahl von Anführungszeichen festgestellt. Dies weist darauf hin, dass eine Codekette nicht geschlossen wurde und könnte bedeuten, dass Ihr Code ungültig ist und nicht richtig in Ihrem Forum angezeigt werden kann.

Bitte überprüfen Sie Ihren Code.

Eine Überprüfung via eines CSS Validators zeigt mir, dass mehrere Stellen im Code fehlerhaft zu sein scheinen.
Könnten Sie den Code einmal überprüfen und mir sagen wo ich noch Modifikationen durchführen muss, damit es funktioniert?

Allerdings habe auch ich generell die Frage, wie der User den Style anpassen könnte.
Dabei meine ich jetzt nicht nur die Farbe.
Sondern z.B. wie der User von meinem persönlichen Invision Style auf AwesomeBB Green wechseln kann durch eine Auswahl z.B. im Profil.
Oder ist das nicht möglich und nur die Farbe in meinem Invision Layout könnte vom User geändert werden?

Vielen Dank für eine Rückmeldung.


Zuletzt von Alastor am Do 11 Jul 2024 - 20:50 bearbeitet; insgesamt 1-mal bearbeitet
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Joost mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Joost Fr 5 Jul 2024 - 19:08

Hallo @Alastor ,

1. Welchen CSS-Code haben Sie hinzugefügt?

2. Mitglieder können den Stil nicht ändern, nur Administratoren können den Standardstil für alle ändern, indem sie das Skript von Ange Tuteur verwenden. Wenn Sie die Edge-Version installiert haben, können Sie die Farben ändern.
Sie können dieser Anleitung folgen, müssen aber zuerst einige Beispielstile auf Hitskin.com hinzufügen und dann die Links mit dem Skript verknüpfen.

Grüße, Joost
Joost
Joost
Administrator
Administrator

Männlich Beiträge : 1057
Anmeldedatum : 29.12.12
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome phpBB3

Alastor mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Fr 5 Jul 2024 - 22:04

Hallo @Joost,

danke für deine Rückmeldung dazu Smile

Ich hab den in meinem Link genannten CSS Code versucht, so wie es dem User hier im November 2023 geraten wurde:
https://hilfe.forumieren.com/t45008-user-style-selber-andern

Dort wird auf den Link verwiesen:
https://fmdesign.forumotion.com/t530-simple-theme-changer?highlight=change

Der CSS code ist dann der hier:
Code:
        (function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 1; // forum version
        
          window.fa_theme_color = {
            version : version,
        
            delay : 500, // delay between rainbow colors ( 500 = 0.5s )
            transition : 1000, // transition between colors ( 1000 = 1s )
            transition_all : false, // set to true if you want all themes to utilize the transitions
        
            // elements the selector is attached to
            attachTo : [
              '.bodyline > table:first-child', // phpbb2
              '#page-header', // phpbb3
              '#pun-head', // punbb
              '#submenu' // invision
            ][version],
        
            selected : my_getcookie('fa_theme_color') || 'Select a theme', // selected theme
        
            // color palettes
            palette : {
              'Select a theme' : '',
                'Random theme' : [],
                      'Rainbow' : '',
                      'Silver' : ['#DDD', '#CCC', '#BBB', '#999', '#555'], // hue 000
                  'Dusty Gray' : ['#AAA', '#999', '#888', '#666', '#444'], // hue 000
                    'Dove Gray' : ['#777', '#666', '#555', '#333', '#333'], // hue 000
                  'Mine Shaft' : ['#444', '#333', '#222', '#000', '#222'], // hue 000
                  'Persian Red' : ['#D44', '#C33', '#B22', '#900', '#522'], // hue 000
                'Christmas Red' : ['#C33', '#B22', '#A11', '#800', '#522'], // hue 000
                    'Coral Red' : ['#F55', '#F44', '#E33', '#C11', '#622'], // hue 000
                'Chestnut Rose' : ['#D77', '#C66', '#B55', '#933', '#533'], // hue 000
                        'Eunry' : ['#DAA', '#C99', '#B88', '#966', '#544'], // hue 000
                  'Brandy Rose' : ['#C99', '#B88', '#A77', '#855', '#544'], // hue 000
                      'Bazaar' : ['#A88', '#977', '#866', '#644', '#433'], // hue 000
                    'Cinnabar' : ['#F54', '#E43', '#D32', '#B10', '#622'], // hue 005
                        'Crail' : ['#A65', '#B54', '#A43', '#821', '#532'], // hue 008
                    'Flamingo' : ['#F64', '#E53', '#D42', '#B20', '#632'], // hue 010
                  'Red Damask' : ['#E75', '#D64', '#C53', '#A31', '#532'], // hue 013
                      'Tabasco' : ['#A42', '#931', '#820', '#300', '#421'], // hue 015
                        'Paarl' : ['#B64', '#A53', '#942', '#720', '#432'], // hue 017
                'Cape Palliser' : ['#B75', '#A64', '#953', '#731', '#432'], // hue 020
                      'Tuscany' : ['#D64', '#C63', '#B52', '#930', '#532'], // hue 020
                'Hot Cinnamon' : ['#E73', '#D62', '#C51', '#A30', '#532'], // hue 021
                'Blaze Orange' : ['#F71', '#F60', '#E50', '#C30', '#630'], // hue 024
                      'Pumpkin' : ['#F82', '#F71', '#E60', '#C40', '#631'], // hue 025
                'Antique Brass' : ['#DA7', '#C96', '#B85', '#963', '#543'], // hue 029
                  'Raw Sienna' : ['#D95', '#C84', '#B73', '#951', '#542'], // hue 029
                    'Earthtone' : ['#753', '#642', '#531', '#310', '#321'], // hue 029
                    'Americano' : ['#987', '#876', '#765', '#543', '#433'], // hue 030
                      'Coffee' : ['#876', '#765', '#654', '#432', '#432'], // hue 030
                    'Cinnamon' : ['#950', '#840', '#730', '#510', '#420'], // hue 030
                        'Brown' : ['#A61', '#950', '#840', '#620', '#420'], // hue 033
                    'Sandy Tan' : ['#EC9', '#DB8', '#CA7', '#A85', '#554'], // hue 035
                  'Hokey Pokey' : ['#DA4', '#C93', '#B82', '#960', '#542'], // hue 039
                      'Sienna' : ['#764', '#653', '#542', '#320', '#332'], // hue 039
                      'Shadow' : ['#986', '#875', '#764', '#542', '#433'], // hue 040
                    'Buttercup' : ['#FB2', '#EA1', '#D90', '#B70', '#641'], // hue 041
                  'Tulip Tree' : ['#FC4', '#EB3', '#DA2', '#B80', '#652'], // hue 043
                'Golden Grass' : ['#EB3', '#DA2', '#C91', '#A70', '#542'], // hue 043
                        'Pizza' : ['#DA2', '#C91', '#B80', '#960', '#541'], // hue 043
                    'Reef Gold' : ['#B93', '#A82', '#971', '#750', '#442'], // hue 045
                        'Olive' : ['#990', '#880', '#770', '#550', '#440'], // hue 060
                  'Camouflage' : ['#552', '#441', '#330', '#110', '#221'], // hue 060
                      'Avocado' : ['#997', '#886', '#775', '#553', '#443'], // hue 060
                  'Earls Green' : ['#DD4', '#CC3', '#BB2', '#990', '#552'], // hue 060
                        'Laser' : ['#DD7', '#CC6', '#BB5', '#993', '#553'], // hue 060
                  'Pine Glade' : ['#DDA', '#CC9', '#BB8', '#996', '#554'], // hue 060
                    'Pea Green' : ['#8A3', '#792', '#681', '#460', '#341'], // hue 077
                      'Celery' : ['#AD4', '#9C3', '#8B2', '#690', '#452'], // hue 080
                  'Chartreuse' : ['#9E1', '#8D0', '#7C0', '#5A0', '#450'], // hue 083
            'Forumactif Green' : ['#9D4', '#8C3', '#7B2', '#590', '#452'], // hue 086
                  'Dollar Bill' : ['#9C6', '#8B5', '#7A4', '#582', '#453'], // hue 090
                  'Wild Willow' : ['#AD7', '#9C6', '#8B5', '#693', '#453'], // hue 090
                    'Asparagus' : ['#8B6', '#7A5', '#694', '#472', '#343'], // hue 095
                    'Atlantis' : ['#7D4', '#6C3', '#5B2', '#390', '#352'], // hue 100
                'Forest Green' : ['#393', '#282', '#171', '#050', '#242'], // hue 120
              'Christmas Green' : ['#171', '#060', '#050', '#030', '#030'], // hue 120
                        'Apple' : ['#4D4', '#3C3', '#2B2', '#090', '#252'], // hue 120
                      'Mantis' : ['#7D7', '#6C6', '#5B5', '#393', '#353'], // hue 120
                      'De York' : ['#ADA', '#9C9', '#8B8', '#696', '#454'], // hue 120
                        'Envy' : ['#9B9', '#8A8', '#797', '#575', '#454'], // hue 120
                      'Spruce' : ['#7D8', '#6C7', '#5B6', '#394', '#353'], // hue 130
                'Bottle Green' : ['#2B4', '#1A3', '#092', '#070', '#142'], // hue 133
                  'Aqua Forest' : ['#7B8', '#6A7', '#596', '#374', '#343'], // hue 135
              'Mountain Meadow' : ['#4D7', '#3C6', '#2B5', '#093', '#253'], // hue 140
                      'Meadow' : ['#3B6', '#2A5', '#194', '#072', '#243'], // hue 142
                    'Sea Green' : ['#496', '#385', '#274', '#052', '#243'], // hue 144
                      'Amazon' : ['#486', '#375', '#264', '#042', '#233'], // hue 150
                      'Emerald' : ['#7DA', '#6C9', '#5B8', '#396', '#354'], // hue 150
                    'Shamrock' : ['#4DA', '#3C9', '#2B8', '#096', '#254'], // hue 160
                  'Blue Lagoon' : ['#5CB', '#4BA', '#3A9', '#187', '#254'], // hue 171
                    'Turquoise' : ['#4DD', '#3CC', '#2BB', '#099', '#255'], // hue 180
                        'Downy' : ['#7DD', '#6CC', '#5BB', '#399', '#355'], // hue 180
                      'Sinbad' : ['#ADD', '#9CC', '#8BB', '#699', '#455'], // hue 180
                        'Teal' : ['#199', '#088', '#077', '#055', '#044'], // hue 180
                  'Blue Chill' : ['#29A', '#189', '#078', '#056', '#144'], // hue 187
                    'Cerulean' : ['#1BE', '#0AD', '#09C', '#07A', '#045'], // hue 193
                'Deep Cerulean' : ['#18B', '#07A', '#069', '#047', '#034'], // hue 198
                'Curious Blue' : ['#4AD', '#39C', '#28B', '#069', '#245'], // hue 200
                  'Slate Gray' : ['#89A', '#789', '#678', '#456', '#344'], // hue 210
                      'Danube' : ['#7AD', '#69C', '#58B', '#369', '#345'], // hue 210
              'Azure Radiance' : ['#18F', '#07F', '#06E', '#04C', '#036'], // hue 212
                      'Mariner' : ['#47D', '#36C', '#25B', '#039', '#235'], // hue 220
                        'Azure' : ['#46B', '#35A', '#249', '#027', '#234'], // hue 222
                'Governor Bay' : ['#44D', '#33C', '#22B', '#009', '#225'], // hue 240
              'Blue Marguerite' : ['#77D', '#66C', '#55B', '#339', '#335'], // hue 240
                    'Blue Bell' : ['#AAD', '#99C', '#88B', '#669', '#445'], // hue 240
                        'Comet' : ['#668', '#557', '#446', '#224', '#334'], // hue 240
                'Purple Heart' : ['#74D', '#63C', '#52B', '#309', '#325'], // hue 260
                    'Amethyst' : ['#A7D', '#96C', '#85B', '#639', '#435'], // hue 270
              'Amethyst Smoke' : ['#BAC', '#A9B', '#98A', '#768', '#445'], // hue 270
                        'Mauve' : ['#EBF', '#DAF', '#C9E', '#A79', '#546'], // hue 276
                      'Affair' : ['#85A', '#749', '#638', '#416', '#324'], // hue 276
                      'Purple' : ['#A4D', '#93C', '#82B', '#609', '#425'], // hue 279
                    'Lavendar' : ['#C8E', '#B7D', '#A6C', '#84A', '#535'], // hue 279
                      'Cerise' : ['#D4D', '#C3C', '#B2B', '#909', '#525'], // hue 300
                'Fuchsia Pink' : ['#D7D', '#C6C', '#B5B', '#939', '#535'], // hue 300
                        'Lilac' : ['#DAD', '#C9C', '#B8B', '#969', '#545'], // hue 300
                  'Red Violet' : ['#D4A', '#C39', '#B28', '#906', '#524'], // hue 321
                        'Disco' : ['#926', '#815', '#704', '#501', '#413'], // hue 326
              'Carnation Pink' : ['#FAD', '#F9C', '#E8B', '#C69', '#645'], // hue 330
                      'Hopbush' : ['#D7A', '#C69', '#B58', '#936', '#534'], // hue 331
                  'French Rose' : ['#F59', '#E48', '#D37', '#B15', '#624'], // hue 337
                    'Hibiscus' : ['#D47', '#C36', '#B25', '#903', '#523'], // hue 340
                      'Claret' : ['#824', '#713', '#602', '#400', '#312'], // hue 340
                    'Bordeaux' : ['#713', '#602', '#501', '#300', '#301'], // hue 340
              'Tickle Me Pink' : ['#F9B', '#F8A', '#E79', '#C57', '#645'], // hue 343
                    'Burgundy' : ['#913', '#802', '#701', '#500', '#401'], // hue 345
                        'Blush' : ['#E68', '#D57', '#C46', '#A24', '#534'], // hue 345
              'Wild Watermelon' : ['#F68', '#F57', '#E46', '#C24', '#634'], // hue 348
                    'Amaranth' : ['#F46', '#E35', '#D24', '#B02', '#623'], // hue 350
                    'Mauvelous' : ['#FAB', '#F9A', '#E89', '#967', '#645'], // hue 351
            'Alizarin Crimson' : ['#F34', '#E23', '#D12', '#B00', '#622'] // hue 355
            },
        
            // change the current theme
            change : function(color, select) {
              var head = $('head'),
                  style = document.getElementById('fa_theme_style');
        
              my_setcookie('fa_theme_color', color, true); // update selected theme
        
              // remove old styles
              if (style) {
                head[0].removeChild(style);
              }
        
              fa_theme_color.selector.firstChild.innerHTML = 'Default theme'; // change select a theme texts
        
              // Random / Normal Themes
              if (!/Select a theme|Rainbow/.test(color) && fa_theme_color.palette[color]) {
                fa_theme_color.selected = color == 'Random theme' ? fa_theme_color.palette['Random theme'][Math.floor(Math.random() * fa_theme_color.palette['Random theme'].length)] : color;
                fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
                fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
        
                head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
        
              } else if (color == 'Rainbow') { // Rainbow theme
                if (fa_theme_color.stop) {
                  fa_theme_color.selected = color;
                  fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[select][1];
                  fa_theme_color.selector.style.borderColor = fa_theme_color.palette[select][2];
        
                  head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css(select) + '</style>');
                } else {
                  fa_theme_color.rainbow();
                }
              } else { // No theme
                fa_theme_color.selector.style.backgroundColor = '#999';
                fa_theme_color.selector.style.borderColor = '#888';
                fa_theme_color.selector.firstChild.innerHTML = 'Select a theme';
              }
        
              // delete rainbow assets if it's not selected
              if (color != 'Rainbow' && fa_theme_color.stop) {
                if (!fa_theme_color.transition_all) {
                  head[0].removeChild(document.getElementById('fa_rainbow_smoothness'));
                }
        
                window.clearInterval(fa_theme_color.interval);
                delete fa_theme_color.index;
                delete fa_theme_color.stop;
              }
            },
        
            // get and return the theme CSS per version
            css : function(select) {
              var palette = fa_theme_color.palette[select || fa_theme_color.selected],
                  all = '::-webkit-scrollbar { width:17px !important; height:17px !important; }'+
                        '::-webkit-scrollbar-track { background:#DDD !important; }'+
                        '::-webkit-scrollbar-thumb { border:2px solid #DDD !important; }'+
                        '::-webkit-scrollbar-button { background:url(https://i.servimg.com/u/f86/18/21/41/30/webkit10.gif) no-repeat 0 0 !important; height:17px !important; width:17px !important; }'+
                        '::-webkit-scrollbar-button:vertical:increment { background-position:-17px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:decrement { background-position:-34px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:increment { background-position:-51px 0 !important }'+
                        '::selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-moz-selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button { background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:hover { background-color:' + palette[2] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color:' + palette[3] + ' !important; }';
        
              switch (fa_theme_color.version) {
        
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited { color:' + palette[3] + '; }'+
                        'a:hover, a.forumlink:hover, a.topictitle:hover { color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides { background:' + palette[1] + '!important; }'+
                        '.forumline { border-color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .cattitle, h1.pagetitle, .module-title, .catHead .genmed, .secondarytitle h2, .catBottom a, .catLeft .genmed { color:#FFF !important; }'+
                        all;
        
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color:' + palette[3] + '; }'+
                        'a:hover, a.forumtitle:hover, a.topictitle:hover, .postprofile a:hover, .postprofile dt.author a:hover { color:' + palette[1] + '; }'+
                        'h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, .content h1, .content h2, .panel h1, .panel h2, #cp-main h1 { color:' + palette[3] + '; border-color:' + palette[3] + '; }'+
                        '.headerbar, .forabg, .forumbg { background:' + palette[1] + '!important; }'+
                        all;
        
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited { color:' + palette[3] + '; }'+
                        'a:hover, .pun a:hover { color:' + palette[1] + '; }'+
                        '#pun-intro, .main .main-foot, .main .main-head, #tabs ul li.activetab a { background:' + palette[1] + '!important; }'+
                        '#tabs ul li.activetab a { border-color:' + palette[1] + '!important; }'+
                        '#pun-navlinks { background:' + palette[4] + '!important; }'+
                        '#pun-navlinks a.mainmenu, .main .main-foot, .main .main-head, #tabs ul li.activetab a, #tabs ul li.activetab a * { color:#FFF!important; }'+
                        '#pun-intro { border:none; }'+
                        all;
        
                case 3 : // invision
                  return 'a, a:link, a:visited { color:' + palette[3] + '; }'+
                        'a:hover { color:' + palette[1] + '; }'+
                        'div#logostrip, div.maintitle, ul.privmsg li { background:' + palette[1] + '!important; }'+
                        '.box-content { border-bottom-color:' + palette[4] + '!important; }'+
                        '#submenu, table.ipbtable tfoot td, #gfooter { background:' + palette[4] + '!important; }'+
                        '#submenu ul li a:hover { background:' + palette[3] + '!important; }'+
                        'div.maintitle, #submenu, #submenu a.mainmenu, table.ipbtable tfoot td, #gfooter, #gfooter a { color:#FFF!important; }'+
                        all;
        
                default : // unknown
                  return ''+
                        all;
        
              }
            },
        
            // get and return the transition CSS per version
            // helps make the transition in colors smooth
            applyTransitionRules : function() {
              switch (fa_theme_color.version) {
        
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited, th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .forumline { transition:' + fa_theme_color.transition + 'ms; }';
        
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a,.headerbar, .forabg, .forumbg, a.button2, body:last-child a.button1, button.button2, input.button1, input.button2, .button, input[type="button"], input[type="submit"], h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, select, input, textarea, .inputbox { transition:' + fa_theme_color.transition + 'ms; }';
        
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited, #pun-intro, .main .main-foot, .main .main-head, #pun-navlinks { transition:' + fa_theme_color.transition + 'ms; }';
        
                case 3 : // invision
                  return 'a, a:link, a:visited, div#logostrip, div.maintitle, .box-content, #submenu, table.ipbtable tfoot td, #gfooter, #submenu ul li a, ul.privmsg li { transition:' + fa_theme_color.transition + 'ms; }';
        
                default : // unknown
                  return '';
        
              }
            },
        
            // setup the rainbow assets
            rainbow : function() {
              if (!fa_theme_color.transition_all) {
                $('head').append('<style type="text/css" id="fa_rainbow_smoothness">' + fa_theme_color.applyTransitionRules() + '</style>');
              }
        
              fa_theme_color.index = 0;
              fa_theme_color.stop = fa_theme_color.palette['Random theme'].length;
              fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
        
              fa_theme_color.interval = window.setInterval(function() {
                if (++fa_theme_color.index >= fa_theme_color.stop) {
                  fa_theme_color.index = 0;
                }
        
                fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
              }, fa_theme_color.transition + fa_theme_color.delay);
            }
          };
        
          var htmlStr = '', i;
        
          // put together the theme options and random array
          for (i in fa_theme_color.palette) {
            if (typeof fa_theme_color.palette[i] != 'undefined') {
              if (!/Random theme|Select a theme|Rainbow/.test(i)) {
                fa_theme_color.palette['Random theme'][fa_theme_color.palette['Random theme'].length] = i;
              }
        
              htmlStr += '<option value="' + i + '" ' + ( fa_theme_color.selected == i ? 'selected="true"' : '' ) + ' style="background-color:' + (/Random theme|Select a theme|Rainbow/.test(i) ? '#FFF;color:#000;' : fa_theme_color.palette[i][2]) + '">' + i + '</option>';
            }
          }
        
          // create the theme selector
          fa_theme_color.selector = $('<select id="fa_theme_selector" />').html(htmlStr).change(function() {
            fa_theme_color.change(this.value);
          })[0];
        
          fa_theme_color.change(fa_theme_color.selected); // apply the selected theme
        
          // add the theme selector to the document
          $(function() {
            $(fa_theme_color.attachTo).after([fa_theme_color.selector, $('<div class="clear" />')[0]]);
          });
        
          // basic styles for the theme selector
          document.write('<style type="text/css">#fa_theme_selector {color:#FFF;float:right;cursor:pointer;padding:3px 6px;margin:3px;}' + ( fa_theme_color.transition_all ? fa_theme_color.applyTransitionRules() : '' ) + '</style>');
        }());

Ganz am Anfang habe ich natürlich die 1 durch die 3 für Invison ersetzt:
Code:
      (function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 3;

Bei Punkt 5 bin ich mir nicht ganz sicher, ob ich die anderen Varianten löschen und nur das für Invision stehen lassen darf oder ob das egal ist, weil sich der Code das passende sucht und findet.
5. Placement
The attachTo variable contains an array of selectors -- 1 for each version -- that the theme changer will be placed after. Feel free to change these selectors if you want to change the placement of the theme changer.
Code:
  // elements the selector is attached to
    attachTo : [
      '.bodyline > table:first-child', // phpbb2
      '#page-header', // phpbb3
      '#pun-head', // punbb
      '#submenu' // invision
    ][version],


So oder so beschwert sich aber mein CSS Tool bei dem Code darüber, dass die Anführungszeichen nicht in korrekter Anzahl vorhanden ist.
Eine Überprüfung des CSS Codes über ein Tool zeigte diverse andere Unstimmigkeiten an, da ich aber kein Programmierer bin, kann ich nicht beurteilen, ob die wirklich ein Problem darstellen oder nicht.

Den Punkt hier habe ich grundsätzlich nicht verstanden, also was genau man damit machen kann.

6. Selected
The selected variable contains the user's chosen theme as well as a default theme. The default theme taken is a string. By default, this string is "Select a theme", change this string to one of the other themes names -- 'Random theme' for example -- if you want it to be the default theme enabled on the theme changer.
[/quote]


Ihr zweiter genannter Weg ist eigentlich eine gute Idee und erfüllt tatsächlich genau das, was ich suche!
Es waren dort auch 3-4 für unser Forenkonzept geeignete Themes verfügbar, 2 waren davon allerdings nicht für Invision und waren daher in der Optik völlig desolat, die anderen zwei hab ich extra für Invison rausgesucht, aber auch die waren am Ende etwas in sich verschoben und damit nicht brauchbar. Ich habe den Code im Java Skript erstmal wieder auskommentiert.
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Joost mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Joost Sa 6 Jul 2024 - 8:50

Sie müssen diesen Code als Javascript und nicht als CSS-Code hinzufügen. Smile
Administrations-Bereich > Module > HTML und JAVASCRIPT > Verwaltung von Javascript-Codes

Code:
        (function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 1; // forum version
       
          window.fa_theme_color = {
            version : version,
       
            delay : 500, // delay between rainbow colors ( 500 = 0.5s )
            transition : 1000, // transition between colors ( 1000 = 1s )
            transition_all : false, // set to true if you want all themes to utilize the transitions
       
            // elements the selector is attached to
            attachTo : [
              '.bodyline > table:first-child', // phpbb2
              '#page-header', // phpbb3
              '#pun-head', // punbb
              '#submenu' // invision
            ][version],
       
            selected : my_getcookie('fa_theme_color') || 'Select a theme', // selected theme
       
            // color palettes
            palette : {
              'Select a theme' : '',
                'Random theme' : [],
                      'Rainbow' : '',
                      'Silver' : ['#DDD', '#CCC', '#BBB', '#999', '#555'], // hue 000
                  'Dusty Gray' : ['#AAA', '#999', '#888', '#666', '#444'], // hue 000
                    'Dove Gray' : ['#777', '#666', '#555', '#333', '#333'], // hue 000
                  'Mine Shaft' : ['#444', '#333', '#222', '#000', '#222'], // hue 000
                  'Persian Red' : ['#D44', '#C33', '#B22', '#900', '#522'], // hue 000
                'Christmas Red' : ['#C33', '#B22', '#A11', '#800', '#522'], // hue 000
                    'Coral Red' : ['#F55', '#F44', '#E33', '#C11', '#622'], // hue 000
                'Chestnut Rose' : ['#D77', '#C66', '#B55', '#933', '#533'], // hue 000
                        'Eunry' : ['#DAA', '#C99', '#B88', '#966', '#544'], // hue 000
                  'Brandy Rose' : ['#C99', '#B88', '#A77', '#855', '#544'], // hue 000
                      'Bazaar' : ['#A88', '#977', '#866', '#644', '#433'], // hue 000
                    'Cinnabar' : ['#F54', '#E43', '#D32', '#B10', '#622'], // hue 005
                        'Crail' : ['#A65', '#B54', '#A43', '#821', '#532'], // hue 008
                    'Flamingo' : ['#F64', '#E53', '#D42', '#B20', '#632'], // hue 010
                  'Red Damask' : ['#E75', '#D64', '#C53', '#A31', '#532'], // hue 013
                      'Tabasco' : ['#A42', '#931', '#820', '#300', '#421'], // hue 015
                        'Paarl' : ['#B64', '#A53', '#942', '#720', '#432'], // hue 017
                'Cape Palliser' : ['#B75', '#A64', '#953', '#731', '#432'], // hue 020
                      'Tuscany' : ['#D64', '#C63', '#B52', '#930', '#532'], // hue 020
                'Hot Cinnamon' : ['#E73', '#D62', '#C51', '#A30', '#532'], // hue 021
                'Blaze Orange' : ['#F71', '#F60', '#E50', '#C30', '#630'], // hue 024
                      'Pumpkin' : ['#F82', '#F71', '#E60', '#C40', '#631'], // hue 025
                'Antique Brass' : ['#DA7', '#C96', '#B85', '#963', '#543'], // hue 029
                  'Raw Sienna' : ['#D95', '#C84', '#B73', '#951', '#542'], // hue 029
                    'Earthtone' : ['#753', '#642', '#531', '#310', '#321'], // hue 029
                    'Americano' : ['#987', '#876', '#765', '#543', '#433'], // hue 030
                      'Coffee' : ['#876', '#765', '#654', '#432', '#432'], // hue 030
                    'Cinnamon' : ['#950', '#840', '#730', '#510', '#420'], // hue 030
                        'Brown' : ['#A61', '#950', '#840', '#620', '#420'], // hue 033
                    'Sandy Tan' : ['#EC9', '#DB8', '#CA7', '#A85', '#554'], // hue 035
                  'Hokey Pokey' : ['#DA4', '#C93', '#B82', '#960', '#542'], // hue 039
                      'Sienna' : ['#764', '#653', '#542', '#320', '#332'], // hue 039
                      'Shadow' : ['#986', '#875', '#764', '#542', '#433'], // hue 040
                    'Buttercup' : ['#FB2', '#EA1', '#D90', '#B70', '#641'], // hue 041
                  'Tulip Tree' : ['#FC4', '#EB3', '#DA2', '#B80', '#652'], // hue 043
                'Golden Grass' : ['#EB3', '#DA2', '#C91', '#A70', '#542'], // hue 043
                        'Pizza' : ['#DA2', '#C91', '#B80', '#960', '#541'], // hue 043
                    'Reef Gold' : ['#B93', '#A82', '#971', '#750', '#442'], // hue 045
                        'Olive' : ['#990', '#880', '#770', '#550', '#440'], // hue 060
                  'Camouflage' : ['#552', '#441', '#330', '#110', '#221'], // hue 060
                      'Avocado' : ['#997', '#886', '#775', '#553', '#443'], // hue 060
                  'Earls Green' : ['#DD4', '#CC3', '#BB2', '#990', '#552'], // hue 060
                        'Laser' : ['#DD7', '#CC6', '#BB5', '#993', '#553'], // hue 060
                  'Pine Glade' : ['#DDA', '#CC9', '#BB8', '#996', '#554'], // hue 060
                    'Pea Green' : ['#8A3', '#792', '#681', '#460', '#341'], // hue 077
                      'Celery' : ['#AD4', '#9C3', '#8B2', '#690', '#452'], // hue 080
                  'Chartreuse' : ['#9E1', '#8D0', '#7C0', '#5A0', '#450'], // hue 083
            'Forumactif Green' : ['#9D4', '#8C3', '#7B2', '#590', '#452'], // hue 086
                  'Dollar Bill' : ['#9C6', '#8B5', '#7A4', '#582', '#453'], // hue 090
                  'Wild Willow' : ['#AD7', '#9C6', '#8B5', '#693', '#453'], // hue 090
                    'Asparagus' : ['#8B6', '#7A5', '#694', '#472', '#343'], // hue 095
                    'Atlantis' : ['#7D4', '#6C3', '#5B2', '#390', '#352'], // hue 100
                'Forest Green' : ['#393', '#282', '#171', '#050', '#242'], // hue 120
              'Christmas Green' : ['#171', '#060', '#050', '#030', '#030'], // hue 120
                        'Apple' : ['#4D4', '#3C3', '#2B2', '#090', '#252'], // hue 120
                      'Mantis' : ['#7D7', '#6C6', '#5B5', '#393', '#353'], // hue 120
                      'De York' : ['#ADA', '#9C9', '#8B8', '#696', '#454'], // hue 120
                        'Envy' : ['#9B9', '#8A8', '#797', '#575', '#454'], // hue 120
                      'Spruce' : ['#7D8', '#6C7', '#5B6', '#394', '#353'], // hue 130
                'Bottle Green' : ['#2B4', '#1A3', '#092', '#070', '#142'], // hue 133
                  'Aqua Forest' : ['#7B8', '#6A7', '#596', '#374', '#343'], // hue 135
              'Mountain Meadow' : ['#4D7', '#3C6', '#2B5', '#093', '#253'], // hue 140
                      'Meadow' : ['#3B6', '#2A5', '#194', '#072', '#243'], // hue 142
                    'Sea Green' : ['#496', '#385', '#274', '#052', '#243'], // hue 144
                      'Amazon' : ['#486', '#375', '#264', '#042', '#233'], // hue 150
                      'Emerald' : ['#7DA', '#6C9', '#5B8', '#396', '#354'], // hue 150
                    'Shamrock' : ['#4DA', '#3C9', '#2B8', '#096', '#254'], // hue 160
                  'Blue Lagoon' : ['#5CB', '#4BA', '#3A9', '#187', '#254'], // hue 171
                    'Turquoise' : ['#4DD', '#3CC', '#2BB', '#099', '#255'], // hue 180
                        'Downy' : ['#7DD', '#6CC', '#5BB', '#399', '#355'], // hue 180
                      'Sinbad' : ['#ADD', '#9CC', '#8BB', '#699', '#455'], // hue 180
                        'Teal' : ['#199', '#088', '#077', '#055', '#044'], // hue 180
                  'Blue Chill' : ['#29A', '#189', '#078', '#056', '#144'], // hue 187
                    'Cerulean' : ['#1BE', '#0AD', '#09C', '#07A', '#045'], // hue 193
                'Deep Cerulean' : ['#18B', '#07A', '#069', '#047', '#034'], // hue 198
                'Curious Blue' : ['#4AD', '#39C', '#28B', '#069', '#245'], // hue 200
                  'Slate Gray' : ['#89A', '#789', '#678', '#456', '#344'], // hue 210
                      'Danube' : ['#7AD', '#69C', '#58B', '#369', '#345'], // hue 210
              'Azure Radiance' : ['#18F', '#07F', '#06E', '#04C', '#036'], // hue 212
                      'Mariner' : ['#47D', '#36C', '#25B', '#039', '#235'], // hue 220
                        'Azure' : ['#46B', '#35A', '#249', '#027', '#234'], // hue 222
                'Governor Bay' : ['#44D', '#33C', '#22B', '#009', '#225'], // hue 240
              'Blue Marguerite' : ['#77D', '#66C', '#55B', '#339', '#335'], // hue 240
                    'Blue Bell' : ['#AAD', '#99C', '#88B', '#669', '#445'], // hue 240
                        'Comet' : ['#668', '#557', '#446', '#224', '#334'], // hue 240
                'Purple Heart' : ['#74D', '#63C', '#52B', '#309', '#325'], // hue 260
                    'Amethyst' : ['#A7D', '#96C', '#85B', '#639', '#435'], // hue 270
              'Amethyst Smoke' : ['#BAC', '#A9B', '#98A', '#768', '#445'], // hue 270
                        'Mauve' : ['#EBF', '#DAF', '#C9E', '#A79', '#546'], // hue 276
                      'Affair' : ['#85A', '#749', '#638', '#416', '#324'], // hue 276
                      'Purple' : ['#A4D', '#93C', '#82B', '#609', '#425'], // hue 279
                    'Lavendar' : ['#C8E', '#B7D', '#A6C', '#84A', '#535'], // hue 279
                      'Cerise' : ['#D4D', '#C3C', '#B2B', '#909', '#525'], // hue 300
                'Fuchsia Pink' : ['#D7D', '#C6C', '#B5B', '#939', '#535'], // hue 300
                        'Lilac' : ['#DAD', '#C9C', '#B8B', '#969', '#545'], // hue 300
                  'Red Violet' : ['#D4A', '#C39', '#B28', '#906', '#524'], // hue 321
                        'Disco' : ['#926', '#815', '#704', '#501', '#413'], // hue 326
              'Carnation Pink' : ['#FAD', '#F9C', '#E8B', '#C69', '#645'], // hue 330
                      'Hopbush' : ['#D7A', '#C69', '#B58', '#936', '#534'], // hue 331
                  'French Rose' : ['#F59', '#E48', '#D37', '#B15', '#624'], // hue 337
                    'Hibiscus' : ['#D47', '#C36', '#B25', '#903', '#523'], // hue 340
                      'Claret' : ['#824', '#713', '#602', '#400', '#312'], // hue 340
                    'Bordeaux' : ['#713', '#602', '#501', '#300', '#301'], // hue 340
              'Tickle Me Pink' : ['#F9B', '#F8A', '#E79', '#C57', '#645'], // hue 343
                    'Burgundy' : ['#913', '#802', '#701', '#500', '#401'], // hue 345
                        'Blush' : ['#E68', '#D57', '#C46', '#A24', '#534'], // hue 345
              'Wild Watermelon' : ['#F68', '#F57', '#E46', '#C24', '#634'], // hue 348
                    'Amaranth' : ['#F46', '#E35', '#D24', '#B02', '#623'], // hue 350
                    'Mauvelous' : ['#FAB', '#F9A', '#E89', '#967', '#645'], // hue 351
            'Alizarin Crimson' : ['#F34', '#E23', '#D12', '#B00', '#622'] // hue 355
            },
       
            // change the current theme
            change : function(color, select) {
              var head = $('head'),
                  style = document.getElementById('fa_theme_style');
       
              my_setcookie('fa_theme_color', color, true); // update selected theme
       
              // remove old styles
              if (style) {
                head[0].removeChild(style);
              }
       
              fa_theme_color.selector.firstChild.innerHTML = 'Default theme'; // change select a theme texts
       
              // Random / Normal Themes
              if (!/Select a theme|Rainbow/.test(color) && fa_theme_color.palette[color]) {
                fa_theme_color.selected = color == 'Random theme' ? fa_theme_color.palette['Random theme'][Math.floor(Math.random() * fa_theme_color.palette['Random theme'].length)] : color;
                fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
                fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
       
                head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
       
              } else if (color == 'Rainbow') { // Rainbow theme
                if (fa_theme_color.stop) {
                  fa_theme_color.selected = color;
                  fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[select][1];
                  fa_theme_color.selector.style.borderColor = fa_theme_color.palette[select][2];
       
                  head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css(select) + '</style>');
                } else {
                  fa_theme_color.rainbow();
                }
              } else { // No theme
                fa_theme_color.selector.style.backgroundColor = '#999';
                fa_theme_color.selector.style.borderColor = '#888';
                fa_theme_color.selector.firstChild.innerHTML = 'Select a theme';
              }
       
              // delete rainbow assets if it's not selected
              if (color != 'Rainbow' && fa_theme_color.stop) {
                if (!fa_theme_color.transition_all) {
                  head[0].removeChild(document.getElementById('fa_rainbow_smoothness'));
                }
       
                window.clearInterval(fa_theme_color.interval);
                delete fa_theme_color.index;
                delete fa_theme_color.stop;
              }
            },
       
            // get and return the theme CSS per version
            css : function(select) {
              var palette = fa_theme_color.palette[select || fa_theme_color.selected],
                  all = '::-webkit-scrollbar { width:17px !important; height:17px !important; }'+
                        '::-webkit-scrollbar-track { background:#DDD !important; }'+
                        '::-webkit-scrollbar-thumb { border:2px solid #DDD !important; }'+
                        '::-webkit-scrollbar-button { background:url(https://i.servimg.com/u/f86/18/21/41/30/webkit10.gif) no-repeat 0 0 !important; height:17px !important; width:17px !important; }'+
                        '::-webkit-scrollbar-button:vertical:increment { background-position:-17px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:decrement { background-position:-34px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:increment { background-position:-51px 0 !important }'+
                        '::selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-moz-selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button { background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:hover { background-color:' + palette[2] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color:' + palette[3] + ' !important; }';
       
              switch (fa_theme_color.version) {
       
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited { color:' + palette[3] + '; }'+
                        'a:hover, a.forumlink:hover, a.topictitle:hover { color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides { background:' + palette[1] + '!important; }'+
                        '.forumline { border-color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .cattitle, h1.pagetitle, .module-title, .catHead .genmed, .secondarytitle h2, .catBottom a, .catLeft .genmed { color:#FFF !important; }'+
                        all;
       
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color:' + palette[3] + '; }'+
                        'a:hover, a.forumtitle:hover, a.topictitle:hover, .postprofile a:hover, .postprofile dt.author a:hover { color:' + palette[1] + '; }'+
                        'h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, .content h1, .content h2, .panel h1, .panel h2, #cp-main h1 { color:' + palette[3] + '; border-color:' + palette[3] + '; }'+
                        '.headerbar, .forabg, .forumbg { background:' + palette[1] + '!important; }'+
                        all;
       
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited { color:' + palette[3] + '; }'+
                        'a:hover, .pun a:hover { color:' + palette[1] + '; }'+
                        '#pun-intro, .main .main-foot, .main .main-head, #tabs ul li.activetab a { background:' + palette[1] + '!important; }'+
                        '#tabs ul li.activetab a { border-color:' + palette[1] + '!important; }'+
                        '#pun-navlinks { background:' + palette[4] + '!important; }'+
                        '#pun-navlinks a.mainmenu, .main .main-foot, .main .main-head, #tabs ul li.activetab a, #tabs ul li.activetab a * { color:#FFF!important; }'+
                        '#pun-intro { border:none; }'+
                        all;
       
                case 3 : // invision
                  return 'a, a:link, a:visited { color:' + palette[3] + '; }'+
                        'a:hover { color:' + palette[1] + '; }'+
                        'div#logostrip, div.maintitle, ul.privmsg li { background:' + palette[1] + '!important; }'+
                        '.box-content { border-bottom-color:' + palette[4] + '!important; }'+
                        '#submenu, table.ipbtable tfoot td, #gfooter { background:' + palette[4] + '!important; }'+
                        '#submenu ul li a:hover { background:' + palette[3] + '!important; }'+
                        'div.maintitle, #submenu, #submenu a.mainmenu, table.ipbtable tfoot td, #gfooter, #gfooter a { color:#FFF!important; }'+
                        all;
       
                default : // unknown
                  return ''+
                        all;
       
              }
            },
       
            // get and return the transition CSS per version
            // helps make the transition in colors smooth
            applyTransitionRules : function() {
              switch (fa_theme_color.version) {
       
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited, th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .forumline { transition:' + fa_theme_color.transition + 'ms; }';
       
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a,.headerbar, .forabg, .forumbg, a.button2, body:last-child a.button1, button.button2, input.button1, input.button2, .button, input[type="button"], input[type="submit"], h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, select, input, textarea, .inputbox { transition:' + fa_theme_color.transition + 'ms; }';
       
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited, #pun-intro, .main .main-foot, .main .main-head, #pun-navlinks { transition:' + fa_theme_color.transition + 'ms; }';
       
                case 3 : // invision
                  return 'a, a:link, a:visited, div#logostrip, div.maintitle, .box-content, #submenu, table.ipbtable tfoot td, #gfooter, #submenu ul li a, ul.privmsg li { transition:' + fa_theme_color.transition + 'ms; }';
       
                default : // unknown
                  return '';
       
              }
            },
       
            // setup the rainbow assets
            rainbow : function() {
              if (!fa_theme_color.transition_all) {
                $('head').append('<style type="text/css" id="fa_rainbow_smoothness">' + fa_theme_color.applyTransitionRules() + '</style>');
              }
       
              fa_theme_color.index = 0;
              fa_theme_color.stop = fa_theme_color.palette['Random theme'].length;
              fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
       
              fa_theme_color.interval = window.setInterval(function() {
                if (++fa_theme_color.index >= fa_theme_color.stop) {
                  fa_theme_color.index = 0;
                }
       
                fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
              }, fa_theme_color.transition + fa_theme_color.delay);
            }
          };
       
          var htmlStr = '', i;
       
          // put together the theme options and random array
          for (i in fa_theme_color.palette) {
            if (typeof fa_theme_color.palette[i] != 'undefined') {
              if (!/Random theme|Select a theme|Rainbow/.test(i)) {
                fa_theme_color.palette['Random theme'][fa_theme_color.palette['Random theme'].length] = i;
              }
       
              htmlStr += '<option value="' + i + '" ' + ( fa_theme_color.selected == i ? 'selected="true"' : '' ) + ' style="background-color:' + (/Random theme|Select a theme|Rainbow/.test(i) ? '#FFF;color:#000;' : fa_theme_color.palette[i][2]) + '">' + i + '</option>';
            }
          }
       
          // create the theme selector
          fa_theme_color.selector = $('<select id="fa_theme_selector" />').html(htmlStr).change(function() {
            fa_theme_color.change(this.value);
          })[0];
       
          fa_theme_color.change(fa_theme_color.selected); // apply the selected theme
       
          // add the theme selector to the document
          $(function() {
            $(fa_theme_color.attachTo).after([fa_theme_color.selector, $('<div class="clear" />')[0]]);
          });
       
          // basic styles for the theme selector
          document.write('<style type="text/css">#fa_theme_selector {color:#FFF;float:right;cursor:pointer;padding:3px 6px;margin:3px;}' + ( fa_theme_color.transition_all ? fa_theme_color.applyTransitionRules() : '' ) + '</style>');
        }());
Joost
Joost
Administrator
Administrator

Männlich Beiträge : 1057
Anmeldedatum : 29.12.12
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome phpBB3

Alastor mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Sa 6 Jul 2024 - 11:18

Ok, wer lesen kann ich klar im Vorteil! Danke für den Hinweis mit dem Zaunpfahl. Keine Ahnung wieso ich es in dem Fall übersehen habe, deine Vorgehensweise unter Punkt 2 hatte ich in unter Java eingefügt.

Soo, habe das jetzt in Java brav eingefügt und gespeichert, es wurde auch vom System angenommen, aber: Es ist leider in meinem Forum nicht sichtbar.
Einmal der Beweis, dass es jetzt in Java steht Very Happy Very Happy Very Happy
[Invision] User Style Änderung - Code geht nicht Screen13

Ich habe mir mein Forum in Firefox und Edge angeschaut, bekomme aber dieses Auswahlfenster nicht für die Farbenänderung.

Bei der Themeänderung hatte das funktioniert, dort tauchte das Auswahlmenü dann im Footer auf.

https://www.fantasy-schreibforum.com/forum
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Joost So 7 Jul 2024 - 8:49

Ich habe es kurz getestet, aber in meinem Testforum funktioniert es. Versuchen Sie, dieses Skript durch Ihr Skript zu ersetzen? Vielleicht haben Sie darin einen Fehler gemacht, weshalb es jetzt nicht funktioniert.

Code:
(function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 3; // forum version
     
          window.fa_theme_color = {
            version : version,
     
            delay : 500, // delay between rainbow colors ( 500 = 0.5s )
            transition : 1000, // transition between colors ( 1000 = 1s )
            transition_all : false, // set to true if you want all themes to utilize the transitions
     
            // elements the selector is attached to
            attachTo : [
              '.bodyline > table:first-child', // phpbb2
              '#page-header', // phpbb3
              '#pun-head', // punbb
              '#submenu' // invision
            ][version],
     
            selected : my_getcookie('fa_theme_color') || 'Select a theme', // selected theme
     
            // color palettes
            palette : {
              'Select a theme' : '',
                'Random theme' : [],
                      'Rainbow' : '',
                      'Silver' : ['#DDD', '#CCC', '#BBB', '#999', '#555'], // hue 000
                  'Dusty Gray' : ['#AAA', '#999', '#888', '#666', '#444'], // hue 000
                    'Dove Gray' : ['#777', '#666', '#555', '#333', '#333'], // hue 000
                  'Mine Shaft' : ['#444', '#333', '#222', '#000', '#222'], // hue 000
                  'Persian Red' : ['#D44', '#C33', '#B22', '#900', '#522'], // hue 000
                'Christmas Red' : ['#C33', '#B22', '#A11', '#800', '#522'], // hue 000
                    'Coral Red' : ['#F55', '#F44', '#E33', '#C11', '#622'], // hue 000
                'Chestnut Rose' : ['#D77', '#C66', '#B55', '#933', '#533'], // hue 000
                        'Eunry' : ['#DAA', '#C99', '#B88', '#966', '#544'], // hue 000
                  'Brandy Rose' : ['#C99', '#B88', '#A77', '#855', '#544'], // hue 000
                      'Bazaar' : ['#A88', '#977', '#866', '#644', '#433'], // hue 000
                    'Cinnabar' : ['#F54', '#E43', '#D32', '#B10', '#622'], // hue 005
                        'Crail' : ['#A65', '#B54', '#A43', '#821', '#532'], // hue 008
                    'Flamingo' : ['#F64', '#E53', '#D42', '#B20', '#632'], // hue 010
                  'Red Damask' : ['#E75', '#D64', '#C53', '#A31', '#532'], // hue 013
                      'Tabasco' : ['#A42', '#931', '#820', '#300', '#421'], // hue 015
                        'Paarl' : ['#B64', '#A53', '#942', '#720', '#432'], // hue 017
                'Cape Palliser' : ['#B75', '#A64', '#953', '#731', '#432'], // hue 020
                      'Tuscany' : ['#D64', '#C63', '#B52', '#930', '#532'], // hue 020
                'Hot Cinnamon' : ['#E73', '#D62', '#C51', '#A30', '#532'], // hue 021
                'Blaze Orange' : ['#F71', '#F60', '#E50', '#C30', '#630'], // hue 024
                      'Pumpkin' : ['#F82', '#F71', '#E60', '#C40', '#631'], // hue 025
                'Antique Brass' : ['#DA7', '#C96', '#B85', '#963', '#543'], // hue 029
                  'Raw Sienna' : ['#D95', '#C84', '#B73', '#951', '#542'], // hue 029
                    'Earthtone' : ['#753', '#642', '#531', '#310', '#321'], // hue 029
                    'Americano' : ['#987', '#876', '#765', '#543', '#433'], // hue 030
                      'Coffee' : ['#876', '#765', '#654', '#432', '#432'], // hue 030
                    'Cinnamon' : ['#950', '#840', '#730', '#510', '#420'], // hue 030
                        'Brown' : ['#A61', '#950', '#840', '#620', '#420'], // hue 033
                    'Sandy Tan' : ['#EC9', '#DB8', '#CA7', '#A85', '#554'], // hue 035
                  'Hokey Pokey' : ['#DA4', '#C93', '#B82', '#960', '#542'], // hue 039
                      'Sienna' : ['#764', '#653', '#542', '#320', '#332'], // hue 039
                      'Shadow' : ['#986', '#875', '#764', '#542', '#433'], // hue 040
                    'Buttercup' : ['#FB2', '#EA1', '#D90', '#B70', '#641'], // hue 041
                  'Tulip Tree' : ['#FC4', '#EB3', '#DA2', '#B80', '#652'], // hue 043
                'Golden Grass' : ['#EB3', '#DA2', '#C91', '#A70', '#542'], // hue 043
                        'Pizza' : ['#DA2', '#C91', '#B80', '#960', '#541'], // hue 043
                    'Reef Gold' : ['#B93', '#A82', '#971', '#750', '#442'], // hue 045
                        'Olive' : ['#990', '#880', '#770', '#550', '#440'], // hue 060
                  'Camouflage' : ['#552', '#441', '#330', '#110', '#221'], // hue 060
                      'Avocado' : ['#997', '#886', '#775', '#553', '#443'], // hue 060
                  'Earls Green' : ['#DD4', '#CC3', '#BB2', '#990', '#552'], // hue 060
                        'Laser' : ['#DD7', '#CC6', '#BB5', '#993', '#553'], // hue 060
                  'Pine Glade' : ['#DDA', '#CC9', '#BB8', '#996', '#554'], // hue 060
                    'Pea Green' : ['#8A3', '#792', '#681', '#460', '#341'], // hue 077
                      'Celery' : ['#AD4', '#9C3', '#8B2', '#690', '#452'], // hue 080
                  'Chartreuse' : ['#9E1', '#8D0', '#7C0', '#5A0', '#450'], // hue 083
            'Forumactif Green' : ['#9D4', '#8C3', '#7B2', '#590', '#452'], // hue 086
                  'Dollar Bill' : ['#9C6', '#8B5', '#7A4', '#582', '#453'], // hue 090
                  'Wild Willow' : ['#AD7', '#9C6', '#8B5', '#693', '#453'], // hue 090
                    'Asparagus' : ['#8B6', '#7A5', '#694', '#472', '#343'], // hue 095
                    'Atlantis' : ['#7D4', '#6C3', '#5B2', '#390', '#352'], // hue 100
                'Forest Green' : ['#393', '#282', '#171', '#050', '#242'], // hue 120
              'Christmas Green' : ['#171', '#060', '#050', '#030', '#030'], // hue 120
                        'Apple' : ['#4D4', '#3C3', '#2B2', '#090', '#252'], // hue 120
                      'Mantis' : ['#7D7', '#6C6', '#5B5', '#393', '#353'], // hue 120
                      'De York' : ['#ADA', '#9C9', '#8B8', '#696', '#454'], // hue 120
                        'Envy' : ['#9B9', '#8A8', '#797', '#575', '#454'], // hue 120
                      'Spruce' : ['#7D8', '#6C7', '#5B6', '#394', '#353'], // hue 130
                'Bottle Green' : ['#2B4', '#1A3', '#092', '#070', '#142'], // hue 133
                  'Aqua Forest' : ['#7B8', '#6A7', '#596', '#374', '#343'], // hue 135
              'Mountain Meadow' : ['#4D7', '#3C6', '#2B5', '#093', '#253'], // hue 140
                      'Meadow' : ['#3B6', '#2A5', '#194', '#072', '#243'], // hue 142
                    'Sea Green' : ['#496', '#385', '#274', '#052', '#243'], // hue 144
                      'Amazon' : ['#486', '#375', '#264', '#042', '#233'], // hue 150
                      'Emerald' : ['#7DA', '#6C9', '#5B8', '#396', '#354'], // hue 150
                    'Shamrock' : ['#4DA', '#3C9', '#2B8', '#096', '#254'], // hue 160
                  'Blue Lagoon' : ['#5CB', '#4BA', '#3A9', '#187', '#254'], // hue 171
                    'Turquoise' : ['#4DD', '#3CC', '#2BB', '#099', '#255'], // hue 180
                        'Downy' : ['#7DD', '#6CC', '#5BB', '#399', '#355'], // hue 180
                      'Sinbad' : ['#ADD', '#9CC', '#8BB', '#699', '#455'], // hue 180
                        'Teal' : ['#199', '#088', '#077', '#055', '#044'], // hue 180
                  'Blue Chill' : ['#29A', '#189', '#078', '#056', '#144'], // hue 187
                    'Cerulean' : ['#1BE', '#0AD', '#09C', '#07A', '#045'], // hue 193
                'Deep Cerulean' : ['#18B', '#07A', '#069', '#047', '#034'], // hue 198
                'Curious Blue' : ['#4AD', '#39C', '#28B', '#069', '#245'], // hue 200
                  'Slate Gray' : ['#89A', '#789', '#678', '#456', '#344'], // hue 210
                      'Danube' : ['#7AD', '#69C', '#58B', '#369', '#345'], // hue 210
              'Azure Radiance' : ['#18F', '#07F', '#06E', '#04C', '#036'], // hue 212
                      'Mariner' : ['#47D', '#36C', '#25B', '#039', '#235'], // hue 220
                        'Azure' : ['#46B', '#35A', '#249', '#027', '#234'], // hue 222
                'Governor Bay' : ['#44D', '#33C', '#22B', '#009', '#225'], // hue 240
              'Blue Marguerite' : ['#77D', '#66C', '#55B', '#339', '#335'], // hue 240
                    'Blue Bell' : ['#AAD', '#99C', '#88B', '#669', '#445'], // hue 240
                        'Comet' : ['#668', '#557', '#446', '#224', '#334'], // hue 240
                'Purple Heart' : ['#74D', '#63C', '#52B', '#309', '#325'], // hue 260
                    'Amethyst' : ['#A7D', '#96C', '#85B', '#639', '#435'], // hue 270
              'Amethyst Smoke' : ['#BAC', '#A9B', '#98A', '#768', '#445'], // hue 270
                        'Mauve' : ['#EBF', '#DAF', '#C9E', '#A79', '#546'], // hue 276
                      'Affair' : ['#85A', '#749', '#638', '#416', '#324'], // hue 276
                      'Purple' : ['#A4D', '#93C', '#82B', '#609', '#425'], // hue 279
                    'Lavendar' : ['#C8E', '#B7D', '#A6C', '#84A', '#535'], // hue 279
                      'Cerise' : ['#D4D', '#C3C', '#B2B', '#909', '#525'], // hue 300
                'Fuchsia Pink' : ['#D7D', '#C6C', '#B5B', '#939', '#535'], // hue 300
                        'Lilac' : ['#DAD', '#C9C', '#B8B', '#969', '#545'], // hue 300
                  'Red Violet' : ['#D4A', '#C39', '#B28', '#906', '#524'], // hue 321
                        'Disco' : ['#926', '#815', '#704', '#501', '#413'], // hue 326
              'Carnation Pink' : ['#FAD', '#F9C', '#E8B', '#C69', '#645'], // hue 330
                      'Hopbush' : ['#D7A', '#C69', '#B58', '#936', '#534'], // hue 331
                  'French Rose' : ['#F59', '#E48', '#D37', '#B15', '#624'], // hue 337
                    'Hibiscus' : ['#D47', '#C36', '#B25', '#903', '#523'], // hue 340
                      'Claret' : ['#824', '#713', '#602', '#400', '#312'], // hue 340
                    'Bordeaux' : ['#713', '#602', '#501', '#300', '#301'], // hue 340
              'Tickle Me Pink' : ['#F9B', '#F8A', '#E79', '#C57', '#645'], // hue 343
                    'Burgundy' : ['#913', '#802', '#701', '#500', '#401'], // hue 345
                        'Blush' : ['#E68', '#D57', '#C46', '#A24', '#534'], // hue 345
              'Wild Watermelon' : ['#F68', '#F57', '#E46', '#C24', '#634'], // hue 348
                    'Amaranth' : ['#F46', '#E35', '#D24', '#B02', '#623'], // hue 350
                    'Mauvelous' : ['#FAB', '#F9A', '#E89', '#967', '#645'], // hue 351
            'Alizarin Crimson' : ['#F34', '#E23', '#D12', '#B00', '#622'] // hue 355
            },
     
            // change the current theme
            change : function(color, select) {
              var head = $('head'),
                  style = document.getElementById('fa_theme_style');
     
              my_setcookie('fa_theme_color', color, true); // update selected theme
     
              // remove old styles
              if (style) {
                head[0].removeChild(style);
              }
     
              fa_theme_color.selector.firstChild.innerHTML = 'Default theme'; // change select a theme texts
     
              // Random / Normal Themes
              if (!/Select a theme|Rainbow/.test(color) && fa_theme_color.palette[color]) {
                fa_theme_color.selected = color == 'Random theme' ? fa_theme_color.palette['Random theme'][Math.floor(Math.random() * fa_theme_color.palette['Random theme'].length)] : color;
                fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
                fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
     
                head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
     
              } else if (color == 'Rainbow') { // Rainbow theme
                if (fa_theme_color.stop) {
                  fa_theme_color.selected = color;
                  fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[select][1];
                  fa_theme_color.selector.style.borderColor = fa_theme_color.palette[select][2];
     
                  head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css(select) + '</style>');
                } else {
                  fa_theme_color.rainbow();
                }
              } else { // No theme
                fa_theme_color.selector.style.backgroundColor = '#999';
                fa_theme_color.selector.style.borderColor = '#888';
                fa_theme_color.selector.firstChild.innerHTML = 'Select a theme';
              }
     
              // delete rainbow assets if it's not selected
              if (color != 'Rainbow' && fa_theme_color.stop) {
                if (!fa_theme_color.transition_all) {
                  head[0].removeChild(document.getElementById('fa_rainbow_smoothness'));
                }
     
                window.clearInterval(fa_theme_color.interval);
                delete fa_theme_color.index;
                delete fa_theme_color.stop;
              }
            },
     
            // get and return the theme CSS per version
            css : function(select) {
              var palette = fa_theme_color.palette[select || fa_theme_color.selected],
                  all = '::-webkit-scrollbar { width:17px !important; height:17px !important; }'+
                        '::-webkit-scrollbar-track { background:#DDD !important; }'+
                        '::-webkit-scrollbar-thumb { border:2px solid #DDD !important; }'+
                        '::-webkit-scrollbar-button { background:url(https://i.servimg.com/u/f86/18/21/41/30/webkit10.gif) no-repeat 0 0 !important; height:17px !important; width:17px !important; }'+
                        '::-webkit-scrollbar-button:vertical:increment { background-position:-17px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:decrement { background-position:-34px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:increment { background-position:-51px 0 !important }'+
                        '::selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-moz-selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button { background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:hover { background-color:' + palette[2] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color:' + palette[3] + ' !important; }';
     
              switch (fa_theme_color.version) {
     
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited { color:' + palette[3] + '; }'+
                        'a:hover, a.forumlink:hover, a.topictitle:hover { color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides { background:' + palette[1] + '!important; }'+
                        '.forumline { border-color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .cattitle, h1.pagetitle, .module-title, .catHead .genmed, .secondarytitle h2, .catBottom a, .catLeft .genmed { color:#FFF !important; }'+
                        all;
     
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color:' + palette[3] + '; }'+
                        'a:hover, a.forumtitle:hover, a.topictitle:hover, .postprofile a:hover, .postprofile dt.author a:hover { color:' + palette[1] + '; }'+
                        'h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, .content h1, .content h2, .panel h1, .panel h2, #cp-main h1 { color:' + palette[3] + '; border-color:' + palette[3] + '; }'+
                        '.headerbar, .forabg, .forumbg { background:' + palette[1] + '!important; }'+
                        all;
     
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited { color:' + palette[3] + '; }'+
                        'a:hover, .pun a:hover { color:' + palette[1] + '; }'+
                        '#pun-intro, .main .main-foot, .main .main-head, #tabs ul li.activetab a { background:' + palette[1] + '!important; }'+
                        '#tabs ul li.activetab a { border-color:' + palette[1] + '!important; }'+
                        '#pun-navlinks { background:' + palette[4] + '!important; }'+
                        '#pun-navlinks a.mainmenu, .main .main-foot, .main .main-head, #tabs ul li.activetab a, #tabs ul li.activetab a * { color:#FFF!important; }'+
                        '#pun-intro { border:none; }'+
                        all;
     
                case 3 : // invision
                  return 'a, a:link, a:visited { color:' + palette[3] + '; }'+
                        'a:hover { color:' + palette[1] + '; }'+
                        'div#logostrip, div.maintitle, ul.privmsg li { background:' + palette[1] + '!important; }'+
                        '.box-content { border-bottom-color:' + palette[4] + '!important; }'+
                        '#submenu, table.ipbtable tfoot td, #gfooter { background:' + palette[4] + '!important; }'+
                        '#submenu ul li a:hover { background:' + palette[3] + '!important; }'+
                        'div.maintitle, #submenu, #submenu a.mainmenu, table.ipbtable tfoot td, #gfooter, #gfooter a { color:#FFF!important; }'+
                        all;
     
                default : // unknown
                  return ''+
                        all;
     
              }
            },
     
            // get and return the transition CSS per version
            // helps make the transition in colors smooth
            applyTransitionRules : function() {
              switch (fa_theme_color.version) {
     
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited, th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .forumline { transition:' + fa_theme_color.transition + 'ms; }';
     
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a,.headerbar, .forabg, .forumbg, a.button2, body:last-child a.button1, button.button2, input.button1, input.button2, .button, input[type="button"], input[type="submit"], h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, select, input, textarea, .inputbox { transition:' + fa_theme_color.transition + 'ms; }';
     
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited, #pun-intro, .main .main-foot, .main .main-head, #pun-navlinks { transition:' + fa_theme_color.transition + 'ms; }';
     
                case 3 : // invision
                  return 'a, a:link, a:visited, div#logostrip, div.maintitle, .box-content, #submenu, table.ipbtable tfoot td, #gfooter, #submenu ul li a, ul.privmsg li { transition:' + fa_theme_color.transition + 'ms; }';
     
                default : // unknown
                  return '';
     
              }
            },
     
            // setup the rainbow assets
            rainbow : function() {
              if (!fa_theme_color.transition_all) {
                $('head').append('<style type="text/css" id="fa_rainbow_smoothness">' + fa_theme_color.applyTransitionRules() + '</style>');
              }
     
              fa_theme_color.index = 0;
              fa_theme_color.stop = fa_theme_color.palette['Random theme'].length;
              fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
     
              fa_theme_color.interval = window.setInterval(function() {
                if (++fa_theme_color.index >= fa_theme_color.stop) {
                  fa_theme_color.index = 0;
                }
     
                fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
              }, fa_theme_color.transition + fa_theme_color.delay);
            }
          };
     
          var htmlStr = '', i;
     
          // put together the theme options and random array
          for (i in fa_theme_color.palette) {
            if (typeof fa_theme_color.palette[i] != 'undefined') {
              if (!/Random theme|Select a theme|Rainbow/.test(i)) {
                fa_theme_color.palette['Random theme'][fa_theme_color.palette['Random theme'].length] = i;
              }
     
              htmlStr += '<option value="' + i + '" ' + ( fa_theme_color.selected == i ? 'selected="true"' : '' ) + ' style="background-color:' + (/Random theme|Select a theme|Rainbow/.test(i) ? '#FFF;color:#000;' : fa_theme_color.palette[i][2]) + '">' + i + '</option>';
            }
          }
     
          // create the theme selector
          fa_theme_color.selector = $('<select id="fa_theme_selector" />').html(htmlStr).change(function() {
            fa_theme_color.change(this.value);
          })[0];
     
          fa_theme_color.change(fa_theme_color.selected); // apply the selected theme
     
          // add the theme selector to the document
          $(function() {
            $(fa_theme_color.attachTo).after([fa_theme_color.selector, $('<div class="clear" />')[0]]);
          });
     
          // basic styles for the theme selector
          document.write('<style type="text/css">#fa_theme_selector {color:#FFF;float:right;cursor:pointer;padding:3px 6px;margin:3px;}' + ( fa_theme_color.transition_all ? fa_theme_color.applyTransitionRules() : '' ) + '</style>');
        }());

Editiert, Sie haben diese Option auf Ja gesetzt, richtig? Smile
[Invision] User Style Änderung - Code geht nicht Scr160
Joost
Joost
Administrator
Administrator

Männlich Beiträge : 1057
Anmeldedatum : 29.12.12
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome phpBB3

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor So 7 Jul 2024 - 22:07

Hi,

habe den Code von dir auch noch einmal eingefügt, es ist leider nichts sichtbar.
Die Tickbox aus dem Screenshot von dir ist auf "Ja".

Das Template Picker JavaScript (mit den templates von Hitskin.com) hatte ja auch funktioniert (die optischen Probleme der Template Darstellungen machen es jedoch nicht brauchbar für mich).

Ich habe die Vermutung, dass eventuell die Änderungen, die mal am Header vorgenommen werden mussten für eine saubere Optik (ich weiß aber nicht mehr warum, hatte eventuell auch etwas mit der korrekten Zentrierung des Logos zu tun... ist 11 Jahre her, wo ich das Forum eingerichtet habe), eventuell dazu führen, dass das Drop Down Menü nicht auftaucht.
[Invision] User Style Änderung - Code geht nicht Screen14

Besteht die Möglichkeit das DropDown Menü wie beim "Theme Picker" auf den Footer zu schieben? Da das andere dort funktioniert hatte, müsste das dann eigentlich auch gehen. Im oberen Bereich ist zwar schöner, aber man kann manchmal nicht alles haben^^

Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Joost mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Joost Mo 8 Jul 2024 - 18:06

Ich werde einen Kollegen fragen, und sobald ich eine Antwort habe, lasse ich es Sie wissen. Smile
Joost
Joost
Administrator
Administrator

Männlich Beiträge : 1057
Anmeldedatum : 29.12.12
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome phpBB3

Alastor und Skouliki mögen diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Skouliki Mo 8 Jul 2024 - 18:24

Hallo
Ich habe den Code getestet und er funktioniert in der Invision-Version einwandfrei
Versuchen Sie daher zunächst, Ihre anderen Skripte zu deaktivieren, um festzustellen, ob ein Konflikt mit einem anderen Skript vorliegt
Wenn dies nicht der Fall ist und Ihre Vorlagen geändert wurden, legen Sie die Standardvorlagen fest, um zu überprüfen, ob mit Ihren Vorlagen etwas nicht stimmt
Skouliki
Skouliki
Moderatorin
Moderatorin

Weiblich Beiträge : 870
Anmeldedatum : 16.04.19
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome PunBB

Joost mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Mo 8 Jul 2024 - 22:04

@Joost: Danke schon mal im Voraus für die Footer Prüfung!

@Skouliki: Danke für deine Rückmeldung. Da ich leider nicht mehr weiß welche genauen Änderungen im Code erstellt wurden und das Forum optisch einwandfrei ist, möchte ich an den Grundcodes nicht herumspielen. Ich kann sicher irgendwie auf Grundeinstellung zurücksetzen und den Code vorher abspeichern und danach wieder einfügen, aber ich spiele grundsätzlich nicht gern an Dingen herum, die ich nicht richtig verstehe. Da ich nicht genau weiß wo diese grün markierten "Header" und "Body" einen Einfluss drauf haben, werde ich diese nicht zurücksetzen Smile
Wenn der Template Changer Javascript Code bei mir einfach nicht funktionieren sollte (wohl wegen diesen Änderungen, da ihr ja getestet habt, dass das Skript funktioniert, woran ich auch keinen Zweifel habe!), dann ist es eben so Smile Soll nur eine Spielerei für die User sein, aber die saubere Grundoptik ist mir dann am Ende wichtiger.
Daher bin ich mal gespannt ob die Footer Option ginge.
Danke euch beiden aber nochmal für die Mühe und schnelle Hilfestellung (von Zaunpfahl-Reichung, Testungen, Erklärungen bis zu Überprüfungen der Optionen) ! top
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Skouliki Di 9 Jul 2024 - 18:15

Sie können die Standardvorlagen ganz einfach aktivieren oder deaktivieren
Es ist nur ein Klick
[Invision] User Style Änderung - Code geht nicht Scre2928

Hier ist mein Test. Sie können sehen, wie der Code in der rechten oberen Ecke funktioniert https://test4test.forumotion.com/

Wenn Sie möchten, können Sie mir per PN Ihre gesamte Header-Vorlage zusenden, die ich auf Ihrem Screenshot sehe und die geändert wurde, damit ich sie mir ansehen kann


------------------------
Um den Code in die Fußzeile einzufügen, wie Sie auf meinem Foto sehen können, fügen Sie stattdessen diesen Code hinzu
[Invision] User Style Änderung - Code geht nicht Scre2929

Code:

(function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 3; // forum version
   
          window.fa_theme_color = {
            version : version,
   
            delay : 500, // delay between rainbow colors ( 500 = 0.5s )
            transition : 1000, // transition between colors ( 1000 = 1s )
            transition_all : false, // set to true if you want all themes to utilize the transitions
   
            // elements the selector is attached to
            attachTo : [
              '.bodyline > table:first-child', // phpbb2
              '#page-header', // phpbb3
              '#pun-head', // punbb
              '#gfooter' // invision
            ][version],
   
            selected : my_getcookie('fa_theme_color') || 'Select a theme', // selected theme
   
            // color palettes
            palette : {
              'Select a theme' : '',
                'Random theme' : [],
                      'Rainbow' : '',
                      'Silver' : ['#DDD', '#CCC', '#BBB', '#999', '#555'], // hue 000
                  'Dusty Gray' : ['#AAA', '#999', '#888', '#666', '#444'], // hue 000
                    'Dove Gray' : ['#777', '#666', '#555', '#333', '#333'], // hue 000
                  'Mine Shaft' : ['#444', '#333', '#222', '#000', '#222'], // hue 000
                  'Persian Red' : ['#D44', '#C33', '#B22', '#900', '#522'], // hue 000
                'Christmas Red' : ['#C33', '#B22', '#A11', '#800', '#522'], // hue 000
                    'Coral Red' : ['#F55', '#F44', '#E33', '#C11', '#622'], // hue 000
                'Chestnut Rose' : ['#D77', '#C66', '#B55', '#933', '#533'], // hue 000
                        'Eunry' : ['#DAA', '#C99', '#B88', '#966', '#544'], // hue 000
                  'Brandy Rose' : ['#C99', '#B88', '#A77', '#855', '#544'], // hue 000
                      'Bazaar' : ['#A88', '#977', '#866', '#644', '#433'], // hue 000
                    'Cinnabar' : ['#F54', '#E43', '#D32', '#B10', '#622'], // hue 005
                        'Crail' : ['#A65', '#B54', '#A43', '#821', '#532'], // hue 008
                    'Flamingo' : ['#F64', '#E53', '#D42', '#B20', '#632'], // hue 010
                  'Red Damask' : ['#E75', '#D64', '#C53', '#A31', '#532'], // hue 013
                      'Tabasco' : ['#A42', '#931', '#820', '#300', '#421'], // hue 015
                        'Paarl' : ['#B64', '#A53', '#942', '#720', '#432'], // hue 017
                'Cape Palliser' : ['#B75', '#A64', '#953', '#731', '#432'], // hue 020
                      'Tuscany' : ['#D64', '#C63', '#B52', '#930', '#532'], // hue 020
                'Hot Cinnamon' : ['#E73', '#D62', '#C51', '#A30', '#532'], // hue 021
                'Blaze Orange' : ['#F71', '#F60', '#E50', '#C30', '#630'], // hue 024
                      'Pumpkin' : ['#F82', '#F71', '#E60', '#C40', '#631'], // hue 025
                'Antique Brass' : ['#DA7', '#C96', '#B85', '#963', '#543'], // hue 029
                  'Raw Sienna' : ['#D95', '#C84', '#B73', '#951', '#542'], // hue 029
                    'Earthtone' : ['#753', '#642', '#531', '#310', '#321'], // hue 029
                    'Americano' : ['#987', '#876', '#765', '#543', '#433'], // hue 030
                      'Coffee' : ['#876', '#765', '#654', '#432', '#432'], // hue 030
                    'Cinnamon' : ['#950', '#840', '#730', '#510', '#420'], // hue 030
                        'Brown' : ['#A61', '#950', '#840', '#620', '#420'], // hue 033
                    'Sandy Tan' : ['#EC9', '#DB8', '#CA7', '#A85', '#554'], // hue 035
                  'Hokey Pokey' : ['#DA4', '#C93', '#B82', '#960', '#542'], // hue 039
                      'Sienna' : ['#764', '#653', '#542', '#320', '#332'], // hue 039
                      'Shadow' : ['#986', '#875', '#764', '#542', '#433'], // hue 040
                    'Buttercup' : ['#FB2', '#EA1', '#D90', '#B70', '#641'], // hue 041
                  'Tulip Tree' : ['#FC4', '#EB3', '#DA2', '#B80', '#652'], // hue 043
                'Golden Grass' : ['#EB3', '#DA2', '#C91', '#A70', '#542'], // hue 043
                        'Pizza' : ['#DA2', '#C91', '#B80', '#960', '#541'], // hue 043
                    'Reef Gold' : ['#B93', '#A82', '#971', '#750', '#442'], // hue 045
                        'Olive' : ['#990', '#880', '#770', '#550', '#440'], // hue 060
                  'Camouflage' : ['#552', '#441', '#330', '#110', '#221'], // hue 060
                      'Avocado' : ['#997', '#886', '#775', '#553', '#443'], // hue 060
                  'Earls Green' : ['#DD4', '#CC3', '#BB2', '#990', '#552'], // hue 060
                        'Laser' : ['#DD7', '#CC6', '#BB5', '#993', '#553'], // hue 060
                  'Pine Glade' : ['#DDA', '#CC9', '#BB8', '#996', '#554'], // hue 060
                    'Pea Green' : ['#8A3', '#792', '#681', '#460', '#341'], // hue 077
                      'Celery' : ['#AD4', '#9C3', '#8B2', '#690', '#452'], // hue 080
                  'Chartreuse' : ['#9E1', '#8D0', '#7C0', '#5A0', '#450'], // hue 083
            'Forumactif Green' : ['#9D4', '#8C3', '#7B2', '#590', '#452'], // hue 086
                  'Dollar Bill' : ['#9C6', '#8B5', '#7A4', '#582', '#453'], // hue 090
                  'Wild Willow' : ['#AD7', '#9C6', '#8B5', '#693', '#453'], // hue 090
                    'Asparagus' : ['#8B6', '#7A5', '#694', '#472', '#343'], // hue 095
                    'Atlantis' : ['#7D4', '#6C3', '#5B2', '#390', '#352'], // hue 100
                'Forest Green' : ['#393', '#282', '#171', '#050', '#242'], // hue 120
              'Christmas Green' : ['#171', '#060', '#050', '#030', '#030'], // hue 120
                        'Apple' : ['#4D4', '#3C3', '#2B2', '#090', '#252'], // hue 120
                      'Mantis' : ['#7D7', '#6C6', '#5B5', '#393', '#353'], // hue 120
                      'De York' : ['#ADA', '#9C9', '#8B8', '#696', '#454'], // hue 120
                        'Envy' : ['#9B9', '#8A8', '#797', '#575', '#454'], // hue 120
                      'Spruce' : ['#7D8', '#6C7', '#5B6', '#394', '#353'], // hue 130
                'Bottle Green' : ['#2B4', '#1A3', '#092', '#070', '#142'], // hue 133
                  'Aqua Forest' : ['#7B8', '#6A7', '#596', '#374', '#343'], // hue 135
              'Mountain Meadow' : ['#4D7', '#3C6', '#2B5', '#093', '#253'], // hue 140
                      'Meadow' : ['#3B6', '#2A5', '#194', '#072', '#243'], // hue 142
                    'Sea Green' : ['#496', '#385', '#274', '#052', '#243'], // hue 144
                      'Amazon' : ['#486', '#375', '#264', '#042', '#233'], // hue 150
                      'Emerald' : ['#7DA', '#6C9', '#5B8', '#396', '#354'], // hue 150
                    'Shamrock' : ['#4DA', '#3C9', '#2B8', '#096', '#254'], // hue 160
                  'Blue Lagoon' : ['#5CB', '#4BA', '#3A9', '#187', '#254'], // hue 171
                    'Turquoise' : ['#4DD', '#3CC', '#2BB', '#099', '#255'], // hue 180
                        'Downy' : ['#7DD', '#6CC', '#5BB', '#399', '#355'], // hue 180
                      'Sinbad' : ['#ADD', '#9CC', '#8BB', '#699', '#455'], // hue 180
                        'Teal' : ['#199', '#088', '#077', '#055', '#044'], // hue 180
                  'Blue Chill' : ['#29A', '#189', '#078', '#056', '#144'], // hue 187
                    'Cerulean' : ['#1BE', '#0AD', '#09C', '#07A', '#045'], // hue 193
                'Deep Cerulean' : ['#18B', '#07A', '#069', '#047', '#034'], // hue 198
                'Curious Blue' : ['#4AD', '#39C', '#28B', '#069', '#245'], // hue 200
                  'Slate Gray' : ['#89A', '#789', '#678', '#456', '#344'], // hue 210
                      'Danube' : ['#7AD', '#69C', '#58B', '#369', '#345'], // hue 210
              'Azure Radiance' : ['#18F', '#07F', '#06E', '#04C', '#036'], // hue 212
                      'Mariner' : ['#47D', '#36C', '#25B', '#039', '#235'], // hue 220
                        'Azure' : ['#46B', '#35A', '#249', '#027', '#234'], // hue 222
                'Governor Bay' : ['#44D', '#33C', '#22B', '#009', '#225'], // hue 240
              'Blue Marguerite' : ['#77D', '#66C', '#55B', '#339', '#335'], // hue 240
                    'Blue Bell' : ['#AAD', '#99C', '#88B', '#669', '#445'], // hue 240
                        'Comet' : ['#668', '#557', '#446', '#224', '#334'], // hue 240
                'Purple Heart' : ['#74D', '#63C', '#52B', '#309', '#325'], // hue 260
                    'Amethyst' : ['#A7D', '#96C', '#85B', '#639', '#435'], // hue 270
              'Amethyst Smoke' : ['#BAC', '#A9B', '#98A', '#768', '#445'], // hue 270
                        'Mauve' : ['#EBF', '#DAF', '#C9E', '#A79', '#546'], // hue 276
                      'Affair' : ['#85A', '#749', '#638', '#416', '#324'], // hue 276
                      'Purple' : ['#A4D', '#93C', '#82B', '#609', '#425'], // hue 279
                    'Lavendar' : ['#C8E', '#B7D', '#A6C', '#84A', '#535'], // hue 279
                      'Cerise' : ['#D4D', '#C3C', '#B2B', '#909', '#525'], // hue 300
                'Fuchsia Pink' : ['#D7D', '#C6C', '#B5B', '#939', '#535'], // hue 300
                        'Lilac' : ['#DAD', '#C9C', '#B8B', '#969', '#545'], // hue 300
                  'Red Violet' : ['#D4A', '#C39', '#B28', '#906', '#524'], // hue 321
                        'Disco' : ['#926', '#815', '#704', '#501', '#413'], // hue 326
              'Carnation Pink' : ['#FAD', '#F9C', '#E8B', '#C69', '#645'], // hue 330
                      'Hopbush' : ['#D7A', '#C69', '#B58', '#936', '#534'], // hue 331
                  'French Rose' : ['#F59', '#E48', '#D37', '#B15', '#624'], // hue 337
                    'Hibiscus' : ['#D47', '#C36', '#B25', '#903', '#523'], // hue 340
                      'Claret' : ['#824', '#713', '#602', '#400', '#312'], // hue 340
                    'Bordeaux' : ['#713', '#602', '#501', '#300', '#301'], // hue 340
              'Tickle Me Pink' : ['#F9B', '#F8A', '#E79', '#C57', '#645'], // hue 343
                    'Burgundy' : ['#913', '#802', '#701', '#500', '#401'], // hue 345
                        'Blush' : ['#E68', '#D57', '#C46', '#A24', '#534'], // hue 345
              'Wild Watermelon' : ['#F68', '#F57', '#E46', '#C24', '#634'], // hue 348
                    'Amaranth' : ['#F46', '#E35', '#D24', '#B02', '#623'], // hue 350
                    'Mauvelous' : ['#FAB', '#F9A', '#E89', '#967', '#645'], // hue 351
            'Alizarin Crimson' : ['#F34', '#E23', '#D12', '#B00', '#622'] // hue 355
            },
   
            // change the current theme
            change : function(color, select) {
              var head = $('head'),
                  style = document.getElementById('fa_theme_style');
   
              my_setcookie('fa_theme_color', color, true); // update selected theme
   
              // remove old styles
              if (style) {
                head[0].removeChild(style);
              }
   
              fa_theme_color.selector.firstChild.innerHTML = 'Default theme'; // change select a theme texts
   
              // Random / Normal Themes
              if (!/Select a theme|Rainbow/.test(color) && fa_theme_color.palette[color]) {
                fa_theme_color.selected = color == 'Random theme' ? fa_theme_color.palette['Random theme'][Math.floor(Math.random() * fa_theme_color.palette['Random theme'].length)] : color;
                fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
                fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
   
                head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
   
              } else if (color == 'Rainbow') { // Rainbow theme
                if (fa_theme_color.stop) {
                  fa_theme_color.selected = color;
                  fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[select][1];
                  fa_theme_color.selector.style.borderColor = fa_theme_color.palette[select][2];
   
                  head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css(select) + '</style>');
                } else {
                  fa_theme_color.rainbow();
                }
              } else { // No theme
                fa_theme_color.selector.style.backgroundColor = '#999';
                fa_theme_color.selector.style.borderColor = '#888';
                fa_theme_color.selector.firstChild.innerHTML = 'Select a theme';
              }
   
              // delete rainbow assets if it's not selected
              if (color != 'Rainbow' && fa_theme_color.stop) {
                if (!fa_theme_color.transition_all) {
                  head[0].removeChild(document.getElementById('fa_rainbow_smoothness'));
                }
   
                window.clearInterval(fa_theme_color.interval);
                delete fa_theme_color.index;
                delete fa_theme_color.stop;
              }
            },
   
            // get and return the theme CSS per version
            css : function(select) {
              var palette = fa_theme_color.palette[select || fa_theme_color.selected],
                  all = '::-webkit-scrollbar { width:17px !important; height:17px !important; }'+
                        '::-webkit-scrollbar-track { background:#DDD !important; }'+
                        '::-webkit-scrollbar-thumb { border:2px solid #DDD !important; }'+
                        '::-webkit-scrollbar-button { background:url(https://i.servimg.com/u/f86/18/21/41/30/webkit10.gif) no-repeat 0 0 !important; height:17px !important; width:17px !important; }'+
                        '::-webkit-scrollbar-button:vertical:increment { background-position:-17px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:decrement { background-position:-34px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:increment { background-position:-51px 0 !important }'+
                        '::selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-moz-selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button { background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:hover { background-color:' + palette[2] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color:' + palette[3] + ' !important; }';
   
              switch (fa_theme_color.version) {
   
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited { color:' + palette[3] + '; }'+
                        'a:hover, a.forumlink:hover, a.topictitle:hover { color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides { background:' + palette[1] + '!important; }'+
                        '.forumline { border-color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .cattitle, h1.pagetitle, .module-title, .catHead .genmed, .secondarytitle h2, .catBottom a, .catLeft .genmed { color:#FFF !important; }'+
                        all;
   
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color:' + palette[3] + '; }'+
                        'a:hover, a.forumtitle:hover, a.topictitle:hover, .postprofile a:hover, .postprofile dt.author a:hover { color:' + palette[1] + '; }'+
                        'h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, .content h1, .content h2, .panel h1, .panel h2, #cp-main h1 { color:' + palette[3] + '; border-color:' + palette[3] + '; }'+
                        '.headerbar, .forabg, .forumbg { background:' + palette[1] + '!important; }'+
                        all;
   
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited { color:' + palette[3] + '; }'+
                        'a:hover, .pun a:hover { color:' + palette[1] + '; }'+
                        '#pun-intro, .main .main-foot, .main .main-head, #tabs ul li.activetab a { background:' + palette[1] + '!important; }'+
                        '#tabs ul li.activetab a { border-color:' + palette[1] + '!important; }'+
                        '#pun-navlinks { background:' + palette[4] + '!important; }'+
                        '#pun-navlinks a.mainmenu, .main .main-foot, .main .main-head, #tabs ul li.activetab a, #tabs ul li.activetab a * { color:#FFF!important; }'+
                        '#pun-intro { border:none; }'+
                        all;
   
                case 3 : // invision
                  return 'a, a:link, a:visited { color:' + palette[3] + '; }'+
                        'a:hover { color:' + palette[1] + '; }'+
                        'div#logostrip, div.maintitle, ul.privmsg li { background:' + palette[1] + '!important; }'+
                        '.box-content { border-bottom-color:' + palette[4] + '!important; }'+
                        '#submenu, table.ipbtable tfoot td, #gfooter { background:' + palette[4] + '!important; }'+
                        '#submenu ul li a:hover { background:' + palette[3] + '!important; }'+
                        'div.maintitle, #submenu, #submenu a.mainmenu, table.ipbtable tfoot td, #gfooter, #gfooter a { color:#FFF!important; }'+
                        all;
   
                default : // unknown
                  return ''+
                        all;
   
              }
            },
   
            // get and return the transition CSS per version
            // helps make the transition in colors smooth
            applyTransitionRules : function() {
              switch (fa_theme_color.version) {
   
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited, th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .forumline { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a,.headerbar, .forabg, .forumbg, a.button2, body:last-child a.button1, button.button2, input.button1, input.button2, .button, input[type="button"], input[type="submit"], h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, select, input, textarea, .inputbox { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited, #pun-intro, .main .main-foot, .main .main-head, #pun-navlinks { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 3 : // invision
                  return 'a, a:link, a:visited, div#logostrip, div.maintitle, .box-content, #submenu, table.ipbtable tfoot td, #gfooter, #submenu ul li a, ul.privmsg li { transition:' + fa_theme_color.transition + 'ms; }';
   
                default : // unknown
                  return '';
   
              }
            },
   
            // setup the rainbow assets
            rainbow : function() {
              if (!fa_theme_color.transition_all) {
                $('head').append('<style type="text/css" id="fa_rainbow_smoothness">' + fa_theme_color.applyTransitionRules() + '</style>');
              }
   
              fa_theme_color.index = 0;
              fa_theme_color.stop = fa_theme_color.palette['Random theme'].length;
              fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
   
              fa_theme_color.interval = window.setInterval(function() {
                if (++fa_theme_color.index >= fa_theme_color.stop) {
                  fa_theme_color.index = 0;
                }
   
                fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
              }, fa_theme_color.transition + fa_theme_color.delay);
            }
          };
   
          var htmlStr = '', i;
   
          // put together the theme options and random array
          for (i in fa_theme_color.palette) {
            if (typeof fa_theme_color.palette[i] != 'undefined') {
              if (!/Random theme|Select a theme|Rainbow/.test(i)) {
                fa_theme_color.palette['Random theme'][fa_theme_color.palette['Random theme'].length] = i;
              }
   
              htmlStr += '<option value="' + i + '" ' + ( fa_theme_color.selected == i ? 'selected="true"' : '' ) + ' style="background-color:' + (/Random theme|Select a theme|Rainbow/.test(i) ? '#FFF;color:#000;' : fa_theme_color.palette[i][2]) + '">' + i + '</option>';
            }
          }
   
          // create the theme selector
          fa_theme_color.selector = $('<select id="fa_theme_selector" />').html(htmlStr).change(function() {
            fa_theme_color.change(this.value);
          })[0];
   
          fa_theme_color.change(fa_theme_color.selected); // apply the selected theme
   
          // add the theme selector to the document
          $(function() {
            $(fa_theme_color.attachTo).after([fa_theme_color.selector, $('<div class="clear" />')[0]]);
          });
   
          // basic styles for the theme selector
          document.write('<style type="text/css">#fa_theme_selector {color:#FFF;float:right;cursor:pointer;padding:3px 6px;margin:3px;}' + ( fa_theme_color.transition_all ? fa_theme_color.applyTransitionRules() : '' ) + '</style>');
        }());


Skouliki
Skouliki
Moderatorin
Moderatorin

Weiblich Beiträge : 870
Anmeldedatum : 16.04.19
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome PunBB

Alastor mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Di 9 Jul 2024 - 20:36

Ah, der Code mit dem Footer hat jetzt funktioniert! Vielen Dank für die Adaption!

Wenn ich mir das Testforum im Vergleich anschaue und wo das Drop-Down Menü erscheint, dann denke ich, dass das bei meinem Forum überdeckt wird:
[Invision] User Style Änderung - Code geht nicht Screen15
Das "Unbeantwortete Beiträge" sollte auf jeden Fall nicht viel verschoben werden (z.B. nach mittig....ganz links ginge noch denk ich), am besten nur leicht nach links rücken, gerade so weit, dass das Drop Down menü ganz rechts rein passt.
Allerdings wäre das jetzt nur meine Idealvorstellung, nicht etwas was unbedingt sein muss Smile

Wenn Sie möchten, können Sie mir per PN Ihre gesamte Header-Vorlage zusenden, die ich auf Ihrem Screenshot sehe und die geändert wurde, damit ich sie mir ansehen kann
Danke für das Angebot!
Ich denke das wäre keine so schlechte Idee es nochmal zu wissen. Ich finde nicht mehr was genau da adaptiert wurde und ob meine "Idealvorstellung" damit kombinierbar wäre oder nicht.

Soll ich das Thema dann schon mal als erledigt markieren und den Rest per PN?
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Skouliki Di 9 Jul 2024 - 23:32

Deine Vorlage ist in Ordnung
Wir müssen lediglich die Position im Skript ändern, um es an einer Stelle zu platzieren, an der es nicht von anderen Elementen überlappt wird
Wie wäre es mit diesem Ort?
schau doch mal wieder in meinem Forum vorbei
https://test4test.forumotion.com/
Skouliki
Skouliki
Moderatorin
Moderatorin

Weiblich Beiträge : 870
Anmeldedatum : 16.04.19
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome PunBB

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Mi 10 Jul 2024 - 18:33

Hi Skouliki,

die Stelle fände ich sehr gut! top
Da stört es nicht, ist schnell sichtbar und wirkt nicht aufdringlich.
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Skouliki Do 11 Jul 2024 - 7:50


Ersetzen Sie Ihren Code durch diesen

Code:

(function() {
          // 0 = phpbb2
          // 1 = phpbb3
          // 2 = punbb
          // 3 = invision
          var version = 3; // forum version
   
          window.fa_theme_color = {
            version : version,
   
            delay : 500, // delay between rainbow colors ( 500 = 0.5s )
            transition : 1000, // transition between colors ( 1000 = 1s )
            transition_all : false, // set to true if you want all themes to utilize the transitions
   
            // elements the selector is attached to
            attachTo : [
              '.bodyline > table:first-child', // phpbb2
              '#page-header', // phpbb3
              '#pun-head', // punbb
              '#navstrip' // invision
            ][version],
   
            selected : my_getcookie('fa_theme_color') || 'Select a theme', // selected theme
   
            // color palettes
            palette : {
              'Select a theme' : '',
                'Random theme' : [],
                      'Rainbow' : '',
                      'Silver' : ['#DDD', '#CCC', '#BBB', '#999', '#555'], // hue 000
                  'Dusty Gray' : ['#AAA', '#999', '#888', '#666', '#444'], // hue 000
                    'Dove Gray' : ['#777', '#666', '#555', '#333', '#333'], // hue 000
                  'Mine Shaft' : ['#444', '#333', '#222', '#000', '#222'], // hue 000
                  'Persian Red' : ['#D44', '#C33', '#B22', '#900', '#522'], // hue 000
                'Christmas Red' : ['#C33', '#B22', '#A11', '#800', '#522'], // hue 000
                    'Coral Red' : ['#F55', '#F44', '#E33', '#C11', '#622'], // hue 000
                'Chestnut Rose' : ['#D77', '#C66', '#B55', '#933', '#533'], // hue 000
                        'Eunry' : ['#DAA', '#C99', '#B88', '#966', '#544'], // hue 000
                  'Brandy Rose' : ['#C99', '#B88', '#A77', '#855', '#544'], // hue 000
                      'Bazaar' : ['#A88', '#977', '#866', '#644', '#433'], // hue 000
                    'Cinnabar' : ['#F54', '#E43', '#D32', '#B10', '#622'], // hue 005
                        'Crail' : ['#A65', '#B54', '#A43', '#821', '#532'], // hue 008
                    'Flamingo' : ['#F64', '#E53', '#D42', '#B20', '#632'], // hue 010
                  'Red Damask' : ['#E75', '#D64', '#C53', '#A31', '#532'], // hue 013
                      'Tabasco' : ['#A42', '#931', '#820', '#300', '#421'], // hue 015
                        'Paarl' : ['#B64', '#A53', '#942', '#720', '#432'], // hue 017
                'Cape Palliser' : ['#B75', '#A64', '#953', '#731', '#432'], // hue 020
                      'Tuscany' : ['#D64', '#C63', '#B52', '#930', '#532'], // hue 020
                'Hot Cinnamon' : ['#E73', '#D62', '#C51', '#A30', '#532'], // hue 021
                'Blaze Orange' : ['#F71', '#F60', '#E50', '#C30', '#630'], // hue 024
                      'Pumpkin' : ['#F82', '#F71', '#E60', '#C40', '#631'], // hue 025
                'Antique Brass' : ['#DA7', '#C96', '#B85', '#963', '#543'], // hue 029
                  'Raw Sienna' : ['#D95', '#C84', '#B73', '#951', '#542'], // hue 029
                    'Earthtone' : ['#753', '#642', '#531', '#310', '#321'], // hue 029
                    'Americano' : ['#987', '#876', '#765', '#543', '#433'], // hue 030
                      'Coffee' : ['#876', '#765', '#654', '#432', '#432'], // hue 030
                    'Cinnamon' : ['#950', '#840', '#730', '#510', '#420'], // hue 030
                        'Brown' : ['#A61', '#950', '#840', '#620', '#420'], // hue 033
                    'Sandy Tan' : ['#EC9', '#DB8', '#CA7', '#A85', '#554'], // hue 035
                  'Hokey Pokey' : ['#DA4', '#C93', '#B82', '#960', '#542'], // hue 039
                      'Sienna' : ['#764', '#653', '#542', '#320', '#332'], // hue 039
                      'Shadow' : ['#986', '#875', '#764', '#542', '#433'], // hue 040
                    'Buttercup' : ['#FB2', '#EA1', '#D90', '#B70', '#641'], // hue 041
                  'Tulip Tree' : ['#FC4', '#EB3', '#DA2', '#B80', '#652'], // hue 043
                'Golden Grass' : ['#EB3', '#DA2', '#C91', '#A70', '#542'], // hue 043
                        'Pizza' : ['#DA2', '#C91', '#B80', '#960', '#541'], // hue 043
                    'Reef Gold' : ['#B93', '#A82', '#971', '#750', '#442'], // hue 045
                        'Olive' : ['#990', '#880', '#770', '#550', '#440'], // hue 060
                  'Camouflage' : ['#552', '#441', '#330', '#110', '#221'], // hue 060
                      'Avocado' : ['#997', '#886', '#775', '#553', '#443'], // hue 060
                  'Earls Green' : ['#DD4', '#CC3', '#BB2', '#990', '#552'], // hue 060
                        'Laser' : ['#DD7', '#CC6', '#BB5', '#993', '#553'], // hue 060
                  'Pine Glade' : ['#DDA', '#CC9', '#BB8', '#996', '#554'], // hue 060
                    'Pea Green' : ['#8A3', '#792', '#681', '#460', '#341'], // hue 077
                      'Celery' : ['#AD4', '#9C3', '#8B2', '#690', '#452'], // hue 080
                  'Chartreuse' : ['#9E1', '#8D0', '#7C0', '#5A0', '#450'], // hue 083
            'Forumactif Green' : ['#9D4', '#8C3', '#7B2', '#590', '#452'], // hue 086
                  'Dollar Bill' : ['#9C6', '#8B5', '#7A4', '#582', '#453'], // hue 090
                  'Wild Willow' : ['#AD7', '#9C6', '#8B5', '#693', '#453'], // hue 090
                    'Asparagus' : ['#8B6', '#7A5', '#694', '#472', '#343'], // hue 095
                    'Atlantis' : ['#7D4', '#6C3', '#5B2', '#390', '#352'], // hue 100
                'Forest Green' : ['#393', '#282', '#171', '#050', '#242'], // hue 120
              'Christmas Green' : ['#171', '#060', '#050', '#030', '#030'], // hue 120
                        'Apple' : ['#4D4', '#3C3', '#2B2', '#090', '#252'], // hue 120
                      'Mantis' : ['#7D7', '#6C6', '#5B5', '#393', '#353'], // hue 120
                      'De York' : ['#ADA', '#9C9', '#8B8', '#696', '#454'], // hue 120
                        'Envy' : ['#9B9', '#8A8', '#797', '#575', '#454'], // hue 120
                      'Spruce' : ['#7D8', '#6C7', '#5B6', '#394', '#353'], // hue 130
                'Bottle Green' : ['#2B4', '#1A3', '#092', '#070', '#142'], // hue 133
                  'Aqua Forest' : ['#7B8', '#6A7', '#596', '#374', '#343'], // hue 135
              'Mountain Meadow' : ['#4D7', '#3C6', '#2B5', '#093', '#253'], // hue 140
                      'Meadow' : ['#3B6', '#2A5', '#194', '#072', '#243'], // hue 142
                    'Sea Green' : ['#496', '#385', '#274', '#052', '#243'], // hue 144
                      'Amazon' : ['#486', '#375', '#264', '#042', '#233'], // hue 150
                      'Emerald' : ['#7DA', '#6C9', '#5B8', '#396', '#354'], // hue 150
                    'Shamrock' : ['#4DA', '#3C9', '#2B8', '#096', '#254'], // hue 160
                  'Blue Lagoon' : ['#5CB', '#4BA', '#3A9', '#187', '#254'], // hue 171
                    'Turquoise' : ['#4DD', '#3CC', '#2BB', '#099', '#255'], // hue 180
                        'Downy' : ['#7DD', '#6CC', '#5BB', '#399', '#355'], // hue 180
                      'Sinbad' : ['#ADD', '#9CC', '#8BB', '#699', '#455'], // hue 180
                        'Teal' : ['#199', '#088', '#077', '#055', '#044'], // hue 180
                  'Blue Chill' : ['#29A', '#189', '#078', '#056', '#144'], // hue 187
                    'Cerulean' : ['#1BE', '#0AD', '#09C', '#07A', '#045'], // hue 193
                'Deep Cerulean' : ['#18B', '#07A', '#069', '#047', '#034'], // hue 198
                'Curious Blue' : ['#4AD', '#39C', '#28B', '#069', '#245'], // hue 200
                  'Slate Gray' : ['#89A', '#789', '#678', '#456', '#344'], // hue 210
                      'Danube' : ['#7AD', '#69C', '#58B', '#369', '#345'], // hue 210
              'Azure Radiance' : ['#18F', '#07F', '#06E', '#04C', '#036'], // hue 212
                      'Mariner' : ['#47D', '#36C', '#25B', '#039', '#235'], // hue 220
                        'Azure' : ['#46B', '#35A', '#249', '#027', '#234'], // hue 222
                'Governor Bay' : ['#44D', '#33C', '#22B', '#009', '#225'], // hue 240
              'Blue Marguerite' : ['#77D', '#66C', '#55B', '#339', '#335'], // hue 240
                    'Blue Bell' : ['#AAD', '#99C', '#88B', '#669', '#445'], // hue 240
                        'Comet' : ['#668', '#557', '#446', '#224', '#334'], // hue 240
                'Purple Heart' : ['#74D', '#63C', '#52B', '#309', '#325'], // hue 260
                    'Amethyst' : ['#A7D', '#96C', '#85B', '#639', '#435'], // hue 270
              'Amethyst Smoke' : ['#BAC', '#A9B', '#98A', '#768', '#445'], // hue 270
                        'Mauve' : ['#EBF', '#DAF', '#C9E', '#A79', '#546'], // hue 276
                      'Affair' : ['#85A', '#749', '#638', '#416', '#324'], // hue 276
                      'Purple' : ['#A4D', '#93C', '#82B', '#609', '#425'], // hue 279
                    'Lavendar' : ['#C8E', '#B7D', '#A6C', '#84A', '#535'], // hue 279
                      'Cerise' : ['#D4D', '#C3C', '#B2B', '#909', '#525'], // hue 300
                'Fuchsia Pink' : ['#D7D', '#C6C', '#B5B', '#939', '#535'], // hue 300
                        'Lilac' : ['#DAD', '#C9C', '#B8B', '#969', '#545'], // hue 300
                  'Red Violet' : ['#D4A', '#C39', '#B28', '#906', '#524'], // hue 321
                        'Disco' : ['#926', '#815', '#704', '#501', '#413'], // hue 326
              'Carnation Pink' : ['#FAD', '#F9C', '#E8B', '#C69', '#645'], // hue 330
                      'Hopbush' : ['#D7A', '#C69', '#B58', '#936', '#534'], // hue 331
                  'French Rose' : ['#F59', '#E48', '#D37', '#B15', '#624'], // hue 337
                    'Hibiscus' : ['#D47', '#C36', '#B25', '#903', '#523'], // hue 340
                      'Claret' : ['#824', '#713', '#602', '#400', '#312'], // hue 340
                    'Bordeaux' : ['#713', '#602', '#501', '#300', '#301'], // hue 340
              'Tickle Me Pink' : ['#F9B', '#F8A', '#E79', '#C57', '#645'], // hue 343
                    'Burgundy' : ['#913', '#802', '#701', '#500', '#401'], // hue 345
                        'Blush' : ['#E68', '#D57', '#C46', '#A24', '#534'], // hue 345
              'Wild Watermelon' : ['#F68', '#F57', '#E46', '#C24', '#634'], // hue 348
                    'Amaranth' : ['#F46', '#E35', '#D24', '#B02', '#623'], // hue 350
                    'Mauvelous' : ['#FAB', '#F9A', '#E89', '#967', '#645'], // hue 351
            'Alizarin Crimson' : ['#F34', '#E23', '#D12', '#B00', '#622'] // hue 355
            },
   
            // change the current theme
            change : function(color, select) {
              var head = $('head'),
                  style = document.getElementById('fa_theme_style');
   
              my_setcookie('fa_theme_color', color, true); // update selected theme
   
              // remove old styles
              if (style) {
                head[0].removeChild(style);
              }
   
              fa_theme_color.selector.firstChild.innerHTML = 'Default theme'; // change select a theme texts
   
              // Random / Normal Themes
              if (!/Select a theme|Rainbow/.test(color) && fa_theme_color.palette[color]) {
                fa_theme_color.selected = color == 'Random theme' ? fa_theme_color.palette['Random theme'][Math.floor(Math.random() * fa_theme_color.palette['Random theme'].length)] : color;
                fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[fa_theme_color.selected][1];
                fa_theme_color.selector.style.borderColor = fa_theme_color.palette[fa_theme_color.selected][2];
   
                head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css() + '</style>');
   
              } else if (color == 'Rainbow') { // Rainbow theme
                if (fa_theme_color.stop) {
                  fa_theme_color.selected = color;
                  fa_theme_color.selector.style.backgroundColor = fa_theme_color.palette[select][1];
                  fa_theme_color.selector.style.borderColor = fa_theme_color.palette[select][2];
   
                  head.append('<style type="text/css" id="fa_theme_style">' + fa_theme_color.css(select) + '</style>');
                } else {
                  fa_theme_color.rainbow();
                }
              } else { // No theme
                fa_theme_color.selector.style.backgroundColor = '#999';
                fa_theme_color.selector.style.borderColor = '#888';
                fa_theme_color.selector.firstChild.innerHTML = 'Select a theme';
              }
   
              // delete rainbow assets if it's not selected
              if (color != 'Rainbow' && fa_theme_color.stop) {
                if (!fa_theme_color.transition_all) {
                  head[0].removeChild(document.getElementById('fa_rainbow_smoothness'));
                }
   
                window.clearInterval(fa_theme_color.interval);
                delete fa_theme_color.index;
                delete fa_theme_color.stop;
              }
            },
   
            // get and return the theme CSS per version
            css : function(select) {
              var palette = fa_theme_color.palette[select || fa_theme_color.selected],
                  all = '::-webkit-scrollbar { width:17px !important; height:17px !important; }'+
                        '::-webkit-scrollbar-track { background:#DDD !important; }'+
                        '::-webkit-scrollbar-thumb { border:2px solid #DDD !important; }'+
                        '::-webkit-scrollbar-button { background:url(https://i.servimg.com/u/f86/18/21/41/30/webkit10.gif) no-repeat 0 0 !important; height:17px !important; width:17px !important; }'+
                        '::-webkit-scrollbar-button:vertical:increment { background-position:-17px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:decrement { background-position:-34px 0 !important }'+
                        '::-webkit-scrollbar-button:horizontal:increment { background-position:-51px 0 !important }'+
                        '::selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-moz-selection { color:#FFF; background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb, ::-webkit-scrollbar-button { background-color:' + palette[1] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-button:hover { background-color:' + palette[2] + ' !important; }'+
                        '::-webkit-scrollbar-thumb:active, ::-webkit-scrollbar-button:active { background-color:' + palette[3] + ' !important; }';
   
              switch (fa_theme_color.version) {
   
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited { color:' + palette[3] + '; }'+
                        'a:hover, a.forumlink:hover, a.topictitle:hover { color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides { background:' + palette[1] + '!important; }'+
                        '.forumline { border-color:' + palette[1] + '; }'+
                        'th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .cattitle, h1.pagetitle, .module-title, .catHead .genmed, .secondarytitle h2, .catBottom a, .catLeft .genmed { color:#FFF !important; }'+
                        all;
   
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a { color:' + palette[3] + '; }'+
                        'a:hover, a.forumtitle:hover, a.topictitle:hover, .postprofile a:hover, .postprofile dt.author a:hover { color:' + palette[1] + '; }'+
                        'h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, .content h1, .content h2, .panel h1, .panel h2, #cp-main h1 { color:' + palette[3] + '; border-color:' + palette[3] + '; }'+
                        '.headerbar, .forabg, .forumbg { background:' + palette[1] + '!important; }'+
                        all;
   
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited { color:' + palette[3] + '; }'+
                        'a:hover, .pun a:hover { color:' + palette[1] + '; }'+
                        '#pun-intro, .main .main-foot, .main .main-head, #tabs ul li.activetab a { background:' + palette[1] + '!important; }'+
                        '#tabs ul li.activetab a { border-color:' + palette[1] + '!important; }'+
                        '#pun-navlinks { background:' + palette[4] + '!important; }'+
                        '#pun-navlinks a.mainmenu, .main .main-foot, .main .main-head, #tabs ul li.activetab a, #tabs ul li.activetab a * { color:#FFF!important; }'+
                        '#pun-intro { border:none; }'+
                        all;
   
                case 3 : // invision
                  return 'a, a:link, a:visited { color:' + palette[3] + '; }'+
                        'a:hover { color:' + palette[1] + '; }'+
                        'div#logostrip, div.maintitle, ul.privmsg li { background:' + palette[1] + '!important; }'+
                        '.box-content { border-bottom-color:' + palette[4] + '!important; }'+
                        '#submenu, table.ipbtable tfoot td, #gfooter { background:' + palette[4] + '!important; }'+
                        '#submenu ul li a:hover { background:' + palette[3] + '!important; }'+
                        'div.maintitle, #submenu, #submenu a.mainmenu, table.ipbtable tfoot td, #gfooter, #gfooter a { color:#FFF!important; }'+
                        all;
   
                default : // unknown
                  return ''+
                        all;
   
              }
            },
   
            // get and return the transition CSS per version
            // helps make the transition in colors smooth
            applyTransitionRules : function() {
              switch (fa_theme_color.version) {
   
                case 0 : // phpbb2
                  return 'a, a:link, a:visited, a.forumlink, a.forumlink:link, a.forumlink:visited, a.topictitle, a.topictitle:link, a.topictitle:visited, th, td.cat, td.catBottom, td.catHead, td.catLeft, td.catRight, td.catSides, .forumline { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 1 : // phpbb3
                  return 'a, a:link, a.forumtitle, a.topictitle, a:visited, .postprofile a:active, .postprofile a:link, .postprofile a:visited, .postprofile dt.author a,.headerbar, .forabg, .forumbg, a.button2, body:last-child a.button1, button.button2, input.button1, input.button2, .button, input[type="button"], input[type="submit"], h1, h2, h3, h4, h5, h6, .h3, h2.h3, h1.page-title, hr, hr.dashed, select, input, textarea, .inputbox { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 2 : // punbb
                  return 'a, a:link, a:visited, .pun a:link, .pun a:visited, #pun-intro, .main .main-foot, .main .main-head, #pun-navlinks { transition:' + fa_theme_color.transition + 'ms; }';
   
                case 3 : // invision
                  return 'a, a:link, a:visited, div#logostrip, div.maintitle, .box-content, #submenu, table.ipbtable tfoot td, #gfooter, #submenu ul li a, ul.privmsg li { transition:' + fa_theme_color.transition + 'ms; }';
   
                default : // unknown
                  return '';
   
              }
            },
   
            // setup the rainbow assets
            rainbow : function() {
              if (!fa_theme_color.transition_all) {
                $('head').append('<style type="text/css" id="fa_rainbow_smoothness">' + fa_theme_color.applyTransitionRules() + '</style>');
              }
   
              fa_theme_color.index = 0;
              fa_theme_color.stop = fa_theme_color.palette['Random theme'].length;
              fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
   
              fa_theme_color.interval = window.setInterval(function() {
                if (++fa_theme_color.index >= fa_theme_color.stop) {
                  fa_theme_color.index = 0;
                }
   
                fa_theme_color.change('Rainbow', fa_theme_color.palette['Random theme'][fa_theme_color.index]);
              }, fa_theme_color.transition + fa_theme_color.delay);
            }
          };
   
          var htmlStr = '', i;
   
          // put together the theme options and random array
          for (i in fa_theme_color.palette) {
            if (typeof fa_theme_color.palette[i] != 'undefined') {
              if (!/Random theme|Select a theme|Rainbow/.test(i)) {
                fa_theme_color.palette['Random theme'][fa_theme_color.palette['Random theme'].length] = i;
              }
   
              htmlStr += '<option value="' + i + '" ' + ( fa_theme_color.selected == i ? 'selected="true"' : '' ) + ' style="background-color:' + (/Random theme|Select a theme|Rainbow/.test(i) ? '#FFF;color:#000;' : fa_theme_color.palette[i][2]) + '">' + i + '</option>';
            }
          }
   
          // create the theme selector
          fa_theme_color.selector = $('<select id="fa_theme_selector" />').html(htmlStr).change(function() {
            fa_theme_color.change(this.value);
          })[0];
   
          fa_theme_color.change(fa_theme_color.selected); // apply the selected theme
   
          // add the theme selector to the document
          $(function() {
            $(fa_theme_color.attachTo).after([fa_theme_color.selector, $('<div class="clear" />')[0]]);
          });
   
          // basic styles for the theme selector
          document.write('<style type="text/css">#fa_theme_selector {color:#FFF;float:right;cursor:pointer;padding:3px 6px;margin:3px;}' + ( fa_theme_color.transition_all ? fa_theme_color.applyTransitionRules() : '' ) + '</style>');
        }());
Skouliki
Skouliki
Moderatorin
Moderatorin

Weiblich Beiträge : 870
Anmeldedatum : 16.04.19
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome PunBB

Alastor mag diesen Beitrag

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Alastor Do 11 Jul 2024 - 20:49

Guten Abend,

habe den Code eingefügt und es funktioniert einwandfrei.
Dort ist er wirklich optimal, vielen Dank für deine Mühe die beste Stelle für mein Forum zu finden! top
Alastor
Alastor
Meister
Meister

Beiträge : 153
Anmeldedatum : 14.04.13
keine
Mozilla Firefox Invision

Nach oben Nach unten

Erledigt Re: [Invision] User Style Änderung - Code geht nicht

Beitrag von Skouliki Do 11 Jul 2024 - 23:03

Gern geschehen

Thema ist erledigt und wurde ins Archiv verschoben.
Regeln des Forums der Foren
Skouliki
Skouliki
Moderatorin
Moderatorin

Weiblich Beiträge : 870
Anmeldedatum : 16.04.19
[Invision] User Style Änderung - Code geht nicht Empty
Google Chrome PunBB

Nach oben Nach unten

Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach oben

- Ähnliche Themen

 
Befugnisse in diesem Forum
Sie können in diesem Forum nicht antworten