Announcement

Collapse
No announcement yet.

Template Edit Question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Template Edit Question

    I am trying to find the spot in the templates where I can add; facebook,twitter, digg icons for sharing purposes. I believe in the 'postbit' template is where I should be looking to add this, maybe after the sig? I tried to add it there but if someone doesn't have a sig, it doesn't appear. Where can I put the code for these icons and links so they appear on each post?

    Thankyou!
    Last edited by nick!; Mon 13th Aug '12, 3:27pm.
    Play Online Texas Holdem Poker? Checkout my Texas Holdem Poker Forums and get Online Poker Bonuses

  • #2
    Alright, I have found a spot where it will appear all the time. What do you guys think?

    Here is a demo: http://www.ffdpokerforum.com/online-...sh-prizes.html

    When the page loads, look for Twitter, Facebook, Send Email to Friend icon, etc.

    This code can be found at: http://www.addthis.com/ for free and it lists all kinds of other ways for users to be able to share articles, you can customize your icons, seems pretty kewl and might be good way to get traffic...Any thoughts?

    If you want to add this to your threads, just go into: admin panel > styles > edit templates > postbit > postbit_legacy

    Search in template for: <tr valign="top">

    After it add:

    <!-- AddThis Button BEGIN -->
    <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
    <a class="addthis_button_preferred_1"></a>
    <a class="addthis_button_preferred_2"></a>
    <a class="addthis_button_preferred_3"></a>
    <a class="addthis_button_preferred_4"></a>
    <a class="addthis_button_compact"></a>
    <a class="addthis_counter addthis_bubble_style"></a>
    </div>
    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4ddda25b46e399b0"></script>
    <!-- AddThis Button END -->
    Last edited by nick!; Wed 25th May '11, 8:20pm.
    Play Online Texas Holdem Poker? Checkout my Texas Holdem Poker Forums and get Online Poker Bonuses

    Comment


    • #3
      I would get confused about which set of icons goes to each post. I would have looked near the bottom of the post for the buttons, not at the top where you put them especially since the padding makes them show closer to the post above them than the post below them which they are supposed to 'belong' to. And, I hate to tell you but your html is invalid. You cannot put something inside a <tr> tag that isn't inside a <td> tag. That is probably why the icons are showing where they are.

      Please don't PM or VM me for support - I only help out in the threads.
      vBulletin Manual & vBulletin 4.0 Code Documentation (API)
      Want help modifying your vbulletin forum? Head on over to vbulletin.org
      If I post CSS and you don't know where it goes, throw it into the additional.css template.

      W3Schools &lt;- awesome site for html/css help

      Comment


      • #4
        It was appearing up there because thats where I originally put it. I just made the adjustment to under '$template_hook[postbit_signature_end]' in the postbit_legacy template, so it appears near the bottom now, is the html valid now? Also, do you think I need to add it to the regular 'postbit' template also? Where would you recommend this go in the posbit_legacy template? Under the sig seems fine to me, you can tell which post the icon sets belong to now.
        Play Online Texas Holdem Poker? Checkout my Texas Holdem Poker Forums and get Online Poker Bonuses

        Comment


        • #5
          One other thing, no matter what you click on, for example: twitter if you want to add it, it still only adds the first original post, even if you use the icons on replies, so I guess my next question should be where can I stick the code so that it will only appear on the first post of the thread near the bottom? Any ideas? Thankyou!
          Play Online Texas Holdem Poker? Checkout my Texas Holdem Poker Forums and get Online Poker Bonuses

          Comment


          • #6
            If you look at the page source, it only links to the thread, not the post in the thread. You could put a condition around the item in the plugin to only show in the first post - if firstpostid is equal to the postid. If you need help with conditions, there is an article on vbulletin.org about them.

            Please don't PM or VM me for support - I only help out in the threads.
            vBulletin Manual & vBulletin 4.0 Code Documentation (API)
            Want help modifying your vbulletin forum? Head on over to vbulletin.org
            If I post CSS and you don't know where it goes, throw it into the additional.css template.

            W3Schools &lt;- awesome site for html/css help

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X