Announcement

Collapse
No announcement yet.

Publishing sites for topics

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

    Publishing sites for topics

    Hello

    how are you ?

    I wanted a way to add publishing sites for topics such as Facebook and Twitter.

    I want to add reddit and other sites. I tried to modify the code and it did not work.​

    Code:
        <vb:if condition="$vboptions['sharing_reddit']">
            <li class="b-sharing-menu__item">
                <vb:comment>
                These are kind of "buttons", but not styled like other buttons. This div is to counter-act
                ".b-comp-menu-dropdown__content-item > a:not(.b-button)" rule without having to style the anchors
                as buttons.
                </vb:comment>
                <div>
                {vb:js js/facebook.js}
                <a class="js-fb-share-dialog b-sharing-menu__item-link b-sharing-menu__item-link--reddit" href="http://reddit.com/submit?url={URL}&amp;title={TITLE}" data-url-not-encoded="{vb:var urlNotEncoded}" target="_blank">
                    <svg class="b-sharing-menu__item-link-img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" color="#ffffff">
                        <path fill="#ffffff" fill-rule="evenodd" d="M8 14H3.667C2.733 13.9 2 13.167 2 12.233V3.667A1.65 1.65 0 0 1 3.667 2h8.666A1.65 1.65 0 0 1 14 3.667v8.566c0 .934-.733 1.667-1.667 1.767H10v-3.967h1.3l.7-2.066h-2V6.933c0-.466.167-.9.867-.9H12v-1.8c.033 0-.933-.266-1.533-.266-1.267 0-2.434.7-2.467 2.133v1.867H6v2.066h2V14z"></path>
                    </svg>
                    {vb:phrase facebook_share}
                </a>
                </div>
            </li>
        </vb:if>
    
    ​

    #2
    glennrocksvb

    Comment


      #3
      Where did you get this code from? The "sharing_reddit" part is supposed to be coming from the Reddit custom vB mod options. Do you have the Reddit mod for vB installed?
      Buy me a coffeePayPal QR Code
      My Amazon Affiliate Link
      Fast vBulletin VPS Host:
      This site is hosted by IONOS

      Comment


        #4
        It seems that you just copied the built-in Facebook Share button code and simply changed to sharing_reddit option and the button link href URL to use reddit.com.

        If you don't have a custom mod with an option named sharing_reddit , then the if-condition will never evaluate to true. Just remove the if-condition and the closing if-tag and that should render the Reddit button. You can also remove the facebook JS and phrase references as obviously they are not needed.
        Buy me a coffeePayPal QR Code
        My Amazon Affiliate Link
        Fast vBulletin VPS Host:
        This site is hosted by IONOS

        Comment


          #5
          Originally posted by glennrocksvb View Post

          #4
          08-15-2024, 11:48 AM



          It seems that you just copied the built-in Facebook Share button code and simply changed to sharing_reddit option and the button link href URL to use reddit.com.

          If you don't have a custom mod with an option named sharing_reddit , then the if-condition will never evaluate to true. Just remove the if-condition and the closing if-tag and that should render the Reddit button. You can also remove the facebook JS and phrase references as obviously they are not needed.


          glennrocksvb

          I did it

          Can you put the code correctly? I tried to modify it and it didn't work.

          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 "|||"