Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    how to add a copyright with dynamic year?

    General Discussion
    2
    12
    1068
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      William Hatanaka last edited by

      How to add a copyright with dynamic year like <?php auto_copyright(); ?> I tried this command but I no have suceess.

      1 Reply Last reply Reply Quote 0
      • sanjay-webkul
        sanjay-webkul last edited by

        Hi there,
        please take a referecne from the example code.

        <?= "Copyright @".date("Y"); ?>
        W 2 Replies Last reply Reply Quote 0
        • W
          William Hatanaka @sanjay-webkul last edited by

          @sanjay-webkul said in how to add a copyright with dynamic year?:

          <?= "Copyright @".date("Y"); ?>

          I am to confirm the place that I need to place this command to show the world "Copyright" and the year dynamically.
          I am using Bagisto Version: v1.4.3

          https://mydomain.com/admin/configuration/general/content
          Footer
          Footer text -> In this item, I add the command that you show me. All right?
          If I leave this item blank it shows a default text on the site: "Powered by Bagisto, A Community Project by Webkul"
          Isn't it?
          But when I fill this item with the command that you show me, Nothing is shown at the footer place on the homepage...
          Apart from saving the new configuration, do I need to do anything else?

          1 Reply Last reply Reply Quote 0
          • W
            William Hatanaka @sanjay-webkul last edited by William Hatanaka

            @sanjay-webkul, I checked how the command to show the copyright with the year dynamically looked on the site and it looked like this:

            <div class="footer-copy-right">
                <span>
                     <!--?= "Copyright @".date("Y"); ?-->
                </span>
            </div>
            
            1 Reply Last reply Reply Quote 0
            • sanjay-webkul
              sanjay-webkul last edited by

              @William-Hatanaka said in how to add a copyright with dynamic year?:

              Powered by Bagisto

              Hi there,
              You need to change Here for the same.

              1 Reply Last reply Reply Quote 0
              • sanjay-webkul
                sanjay-webkul last edited by

                And you can take a regerence from Here

                W 1 Reply Last reply Reply Quote 0
                • W
                  William Hatanaka @sanjay-webkul last edited by

                  @sanjay-webkul, do I need to run any commands after updating the source for the change to take effect?
                  I ran php artisan config:clear, php artisan cache:clear, php artisan config:cache, composer dump-autoload. But nothing took effect.

                  1 Reply Last reply Reply Quote 0
                  • sanjay-webkul
                    sanjay-webkul last edited by

                    php artisan vendor:publish --all --force
                    php artisan optimize:clear
                    ```
                    And do hard refresh your webpage
                    W 1 Reply Last reply Reply Quote 0
                    • W
                      William Hatanaka @sanjay-webkul last edited by

                      @sanjay-webkul ,thank you! I executed the commands, but did not achieve my goal. I don't think I understood your explanation. I am sorry to bother you. I will describe what I understood.

                      1. I update the variable copy-right at /packages/Webkul/Admin/src/Resources/lang/en/app.php#L1449 with command you gave me:
                      'copy-right' => '<?= "Copyright @".date("Y"); ?>'
                      

                      I found it a little strange, but I did it even so.

                      2 . Next I put the phrase I would like in the place you gave me: https://prnt.sc/a-Nbnz7GbVYw
                      3. After making the updates, I executed :

                      php artisan vendor:publish --all --force
                      php artisan optimize:clear
                      

                      and updated the webpage.

                      Well, as it didn't work out, I guess I didn't understand your orientation.
                      Please, could you explain it again?

                      1 Reply Last reply Reply Quote 0
                      • sanjay-webkul
                        sanjay-webkul last edited by

                        Hi there,
                        Please take a reference from Here

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          William Hatanaka @sanjay-webkul last edited by

                          @sanjay-webkul , thank you for your help. But I don't think I can express myself correctly through my level of English.I did what you showed me through the video which must have been a lot of work for you to do, thank you very much. But I wanted the year to update dynamically according to the current date. If you could explain the step by step I would be very grateful?

                          1 Reply Last reply Reply Quote 0
                          • sanjay-webkul
                            sanjay-webkul last edited by

                            Hi @William-Hatanaka
                            Please change here accordingly and related files also.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post