Announcement

Collapse
No announcement yet.

Changing default coulurs

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changing default coulurs

    Hello glennrocksvb

    Can I change the automatic appearing colours? and choose what I want to be automatic shown in box?

    Click image for larger version

Name:	fetch?id=4470682&d=1652992242.jpg
Views:	1962
Size:	25.8 KB
ID:	24876

    #2
    You have to edit js/ckeditor-rollup-xxx.js file on the server where xxx is the vB version you're running (e.g. ckeditor-rollup-567.js for vB 5.6.7)

    Find the following JS variable:
    Code:
    CKEDITOR.config.colorButton_colors
    This is the default value of this variable:
    Code:
    CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000";
    This variable contains a string that consists a list of HEX colors (without the # in front). These colors are used to display the color swatch dropdown in the CKEditor. Edit the list to remove and/or re-arrange the colors and save the changes.

    Then go back to your forum and then do a hard reload (CTRL+F5) to get the latest ckeditor-rollup JS file. If you are using Cloudflare or similar, you may need to purge the JS file in order for it to serve the latest file to all users.

    Since this is a JS hack, you will need to re-apply this change every time you upgrade the forum.
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment


      #3
      I think there's also a way to do this without editing ckeditor-rollup JS by implementing it as a template hook mod. I have an idea on how to implement it but I haven't done it yet.
      Buy me a coffeePayPal QR Code
      My Amazon Affiliate Link
      Fast vBulletin VPS Host:
      This site is hosted by IONOS

      Comment


        #4
        Originally posted by glennrocksvb View Post
        You have to edit js/ckeditor-rollup-xxx.js file on the server where xxx is the vB version you're running (e.g. ckeditor-rollup-567.js for vB 5.6.7)

        Find the following JS variable:
        Code:
        CKEDITOR.config.colorButton_colors
        This is the default value of this variable:
        Code:
        CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000";
        This variable contains a string that consists a list of HEX colors (without the # in front). These colors are used to display the color swatch dropdown in the CKEditor. Edit the list to remove and/or re-arrange the colors and save the changes.

        Then go back to your forum and then do a hard reload (CTRL+F5) to get the latest ckeditor-rollup JS file. If you are using Cloudflare or similar, you may need to purge the JS file in order for it to serve the latest file to all users.

        Since this is a JS hack, you will need to re-apply this change every time you upgrade the forum.
        Thank y ou so much, Glenn
        It worked as charm
        I hope you will continue your great worrk as before, and won't hide from your fans with busy life (F)

        Comment


          #5
          Originally posted by glennrocksvb View Post
          I think there's also a way to do this without editing ckeditor-rollup JS by implementing it as a template hook mod. I have an idea on how to implement it but I haven't done it yet.
          At your convenience, if you can provide us with that, It will be so kind of you.

          Comment


            #6
            Hello Glenn,

            This Js solution is no longer valid, no change at all happens, with all ways of deleting cache and new browsers and incognito try.

            Would it be a new added functionality that control this beyond that js?

            Thank You

            Comment


              #7
              Are you editing the correct js file for the vB version you are running?
              Buy me a coffeePayPal QR Code
              My Amazon Affiliate Link
              Fast vBulletin VPS Host:
              This site is hosted by IONOS

              Comment


                #8
                Originally posted by glennrocksvb View Post
                Are you editing the correct js file for the vB version you are running?
                Yes, I am pretty sure, and have confirmed it again now, using version 6.04 and this is the js: ckeditor-rollup-604.js

                These are the colors I want:

                Code:
                ff3300,FF6500,cc0000,0000aa,0033ff,16A085,3366ff,003366,2c4e80,0066ff,ff33cc,6c0345,000066,C0392B,A0153E,6633cc,27AE60,1E824C,AA8A0A,DDD,008000,000,999,FFF
                ​
                And this is what it is
                Click image for larger version

Name:	image.png
Views:	135
Size:	4.0 KB
ID:	29795

                Comment


                  #9
                  When you open the ckeditor js file in the browser using the below link format, do you see the changes you made?

                  <forum-base-url>/js/ckeditor-rollup-604.js
                  Buy me a coffeePayPal QR Code
                  My Amazon Affiliate Link
                  Fast vBulletin VPS Host:
                  This site is hosted by IONOS

                  Comment


                    #10
                    Originally posted by glennrocksvb View Post
                    When you open the ckeditor js file in the browser using the below link format, do you see the changes you made?

                    <forum-base-url>/js/ckeditor-rollup-604.js
                    Yes, the changes are there

                    Comment


                      #11
                      Originally posted by Blackhorse View Post
                      Yes, the changes are there




                      I tried it in a test vB6 installation and it still works. Maybe you didn't edit the file correctly. Can you send me the link to the JS file so I can inspect the changes?
                      Buy me a coffeePayPal QR Code
                      My Amazon Affiliate Link
                      Fast vBulletin VPS Host:
                      This site is hosted by IONOS

                      Comment


                        #12
                        Originally posted by glennrocksvb View Post
                        I tried it in a test vB6 installation and it still works. Maybe you didn't edit the file correctly. Can you send me the link to the JS file so I can inspect the changes?
                        Here is the link to js

                        Comment


                          #13
                          When I view a topic on your forum and view the HTML source, it's odd that I don't see the script js/ckeditor-rollup-604.js or any rollup JS files being used. This is what I see at the bottom of a topic page in your forum:

                          HTML Code:
                          <script type="text/javascript" src="js/blueimp/jquery.fileupload.min.js?v=604"></script>
                          <script type="text/javascript" src="js/fileupload.js?v=604"></script>
                          <script type="text/javascript" src="js/admin-sbpanel-style.js?v=604"></script>
                          <script type="text/javascript" src="js/config-site.js?v=604"></script>
                          <script type="text/javascript" src="js/vbscroller.js?v=604"></script>
                          <script type="text/javascript" src="js/jquery/jquery.condense.custom.min.js?v=604"></script>
                          <script type="text/javascript" src="js/notice.js?v=604"></script>
                          <script type="text/javascript" src="js/infraction.js?v=604"></script>
                          <script type="text/javascript" src="js/conversation.js?v=604"></script>
                          <script type="text/javascript" src="js/subscribe.js?v=604"></script>
                          <script type="text/javascript" src="js/tag-editor.js?v=604"></script>
                          <script type="text/javascript" src="js/inlinemod.js?v=604"></script>
                          <script type="text/javascript" src="js/facebook.js?v=604"></script>
                          <script type="text/javascript" src="js/flatpickr/flatpickr.min.js?v=604"></script>
                          <script type="text/javascript" src="js/flatpickr.js?v=604"></script>
                          <script type="text/javascript" src="js/content_entry_box.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeditor/ckeditor.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeplugins/vblink/plugin.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeplugins/vbwrapbuttons/plugin.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeplugins/vbsource/plugin.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeplugins/videotag/plugin.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeplugins/autosave/plugin.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeditor/adapters/jquery.js?v=604"></script>
                          <script type="text/javascript" src="js/ckeditor.js?v=604"></script>
                          This is the expected scripts where all the rollup JS files are used:

                          HTML Code:
                          <script type="text/javascript" src="js/file-upload-rollup-604.js"></script>
                          <script type="text/javascript" src="js/config-site.js?v=604"></script>
                          <script type="text/javascript" src="js/vbscroller.js?v=604"></script>
                          <script type="text/javascript" src="js/notice-rollup-604.js"></script>
                          <script type="text/javascript" src="js/conversation-rollup-604.js"></script>
                          <script type="text/javascript" src="js/inlinemod.js?v=604"></script>
                          <script type="text/javascript" src="js/facebook.js?v=604"></script>
                          <script type="text/javascript" src="js/tag-editor.js?v=604"></script>
                          <script type="text/javascript" src="js/content-entry-rollup-604.js"></script>
                          <script type="text/javascript" src="js/ckeditor-rollup-604.js"></script>
                          Did you make any changes to the footer template?
                          Buy me a coffeePayPal QR Code
                          My Amazon Affiliate Link
                          Fast vBulletin VPS Host:
                          This site is hosted by IONOS

                          Comment


                            #14
                            Did you set the no_js_bundles setting in the root config file to true like this?

                            PHP Code:
                            // This setting should never be used on a live site
                            $config['no_js_bundles'] = true;
                            It's recommended to set it to false which is the default setting. Setting it to false bundles multiple JS files into 1 rollup file. The less files to include on a page, the better for performance.
                            Buy me a coffeePayPal QR Code
                            My Amazon Affiliate Link
                            Fast vBulletin VPS Host:
                            This site is hosted by IONOS

                            Comment


                              #15
                              But if you want to keep it not using JS bundles/rollups, then the JS file you need to edit is the /js/ckeditor/ckeditor.js and not /js/ckeditor-rollup-604.js.
                              Buy me a coffeePayPal QR Code
                              My Amazon Affiliate Link
                              Fast vBulletin VPS Host:
                              This site is hosted by IONOS

                              Comment

                              Latest Posts

                              Collapse

                              Working...
                              X
                              Searching...Please wait.
                              An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                              Please push the back button and reload the previous window.'
                              An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                              Please push the back button and reload the previous window.'
                              An internal error has occurred and the module cannot be displayed.
                              There are no results that meet this criteria.
                              Search Result for "|||"