Announcement

Collapse
No announcement yet.

Post footer modification

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

    #16
    Based on my research, to whitelist a script in Usercentric, you can add data-uc-allowed="true" attribute to the <script> tag.

    Try editing the hook_uncollapse_postfooter template and update the <script> tag to this:

    HTML Code:
    <script data-uc-allowed="true">
    ​​
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment


    • glennrocksvb
      commented
      Editing a comment
      Editing a template is not recommended but try it if it works. Then I'll add a mod option to allow adding an attribute to the <script> tag.

    #17
    Thank you very much for the tip, but it does not solve the problem.

    Changing the <script> tag makes no difference.

    Comment


    • glennrocksvb
      commented
      Editing a comment
      Did you already revert this change? Could you put it back and I'll check it.

    • flohse
      commented
      Editing a comment
      The stage is yours.

    #18
    Thanks for giving me access. I see what's going on.

    The Autoblocker script by Usercentrics temporarily blocks all <script> tags on the page by setting them with type="plain/text" until user consent is granted. It excludes those script tags that have data-uc-allowed="true" attribute (the mod script in your case) but the mod is still not working because it is dependent on jQuery which is blocked by Autoblocker at that point. Try whitelisting the domain where jQUery is loaded from, which is https://ajax.googleapis.com/
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment


    #19
    How did you whitelist that domain. Could you post a screenshot?
    Buy me a coffeePayPal QR Code
    My Amazon Affiliate Link
    Fast vBulletin VPS Host:
    This site is hosted by IONOS

    Comment


      #20
      I asked ChatGPT and it said you must configure it in the Usercentrics Admin Interface as a service / domain rule.

      Click image for larger version

Name:	image.png
Views:	22
Size:	124.6 KB
ID:	34042
      Buy me a coffeePayPal QR Code
      My Amazon Affiliate Link
      Fast vBulletin VPS Host:
      This site is hosted by IONOS

      Comment


        #21
        The address is whitelisted.

        Click image for larger version

Name:	image.png
Views:	24
Size:	7.9 KB
ID:	34044

        Comment


        • glennrocksvb
          commented
          Editing a comment
          Try just the domain name ajax.googleapis.com without https://

        • glennrocksvb
          commented
          Editing a comment
          Do you also have to publish and not just save?

        #22
        domain changed

        Click image for larger version  Name:	image.png Views:	0 Size:	7.5 KB ID:	34048

        configuration has been published.

        I can not find the settings ChatGPT mentioned.

        Comment


          #23
          I tried Gemini and this is its suggestion. Option 1 requires editing existing vBulletin template (the same thing we did to the mod script) which is not recommended. So I prefer to do Option 2 or 3.

          Click image for larger version

Name:	image.png
Views:	33
Size:	304.6 KB
ID:	34050
          Buy me a coffeePayPal QR Code
          My Amazon Affiliate Link
          Fast vBulletin VPS Host:
          This site is hosted by IONOS

          Comment


          • flohse
            commented
            Editing a comment
            Google Tag Manager has been added. Let's do a break for now. I need to get up early tomorrow. Thanks for your support so far.

          #24
          It seems no Usercentrics settings are taking effect.

          Okay, let's just try Option 1. You have 2 ways to do this:

          Solution 1:

          Edit page_footer template. Replace this line: (Repeat this for every active styles/themes)

          HTML Code:
          <script type="text/javascript" src="{vb:raw jqueryurl}"></script>
          with:

          HTML Code:
          <script type="text/javascript" src="{vb:raw jqueryurl}" data-uc-allowed="true"></script>
          Advantage: More efficient than Solution 2. Since the change is static, there's no overhead of dynamic replacement.
          Disadvantage: May cause a template merge conflict whenever you upgrade the forum. But it wouldn't be that hard to resolve.

          Solution 2:
          1. Go to AdminCP > Style > Replacement Variable Manager.
          2. Click [Add New Replacement Variable] link for the target style/theme.
          3. Enter this in the Search for Text field:
            Code:
            <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/
          4. Enter this in the Replace with Text field:
            Code:
            <script type="text/javascript" data-uc-allowed="true" src="https://ajax.googleapis.com/ajax/libs/jquery/
          5. Click Save button.
          6. Do the same for all active styles/themes on your forum.
          Advantage: This will never cause a template merge conflict.
          Disavantage: Less efficient since this replacement will be executed on every page load. May be slow on a busy forum.
          Last edited by glennrocksvb; 04-20-2026, 02:18 PM.
          Buy me a coffeePayPal QR Code
          My Amazon Affiliate Link
          Fast vBulletin VPS Host:
          This site is hosted by IONOS

          Comment


          • flohse
            commented
            Editing a comment
            I will go with solution 1. Enjoy your coffee!

            I have already modified the page_footer template.

          #25
          Thanks for the coffee! 🍵

          Coffee Working GIF by David Altizer
          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 "|||"