vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   End-User Options - Submit to Twitter, Facebook and Digg (https://vborg.vbsupport.ru/showthread.php?t=217117)

rrudeboy 06-29-2009 03:45 PM

using this code for the menu, it's not showing the words "Submit to Twitter"....

Code:

<!-- social networking menu -->
<div class="vbmenu_popup" id="share_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">Share<a name="goto_share"></a></td>
        </tr>
        <tr>
                <td class="vbmenu_option" title="nohilite"><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a></td>
        </tr>
        <tr>
                <td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="images/misc/twitter.jpg" alt="Submit to Twitter" />
    <script type="text/javascript">
    var twtTitle  = document.title;
    var twtUrl    = location.href;
    var maxLength = 140 - (twtUrl.length + 1);
    if (twtTitle.length > maxLength) {
    twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
    }
    var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
    document.write('<a href="'+twtLink+'" target="_blank"'+'><'+'/a>');
    </script>
    </td>
        </tr>
        </table>
</div>
<!-- / social networking menu -->

what's wrong with my code ?

tks.

(plus where is it getting the image for FaceBook, it's showing images from my forums like avatars :}

ericgtr 06-29-2009 04:00 PM

Quote:

Originally Posted by rrudeboy (Post 1839653)
using this code for the menu, it's not showing the words "Submit to Twitter"....

Code:

<!-- social networking menu -->
<div class="vbmenu_popup" id="share_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">Share<a name="goto_share"></a></td>
        </tr>
        <tr>
                <td class="vbmenu_option" title="nohilite"><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:16px; background:url(http://b.static.ak.fbcdn.net/images/share/facebook_share_icon.gif?8:26981) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link">Share on Facebook</a></td>
        </tr>
        <tr>
                <td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="images/misc/twitter.jpg" alt="Submit to Twitter" />
    <script type="text/javascript">
    var twtTitle  = document.title;
    var twtUrl    = location.href;
    var maxLength = 140 - (twtUrl.length + 1);
    if (twtTitle.length > maxLength) {
    twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
    }
    var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
    document.write('<a href="'+twtLink+'" target="_blank"'+'><'+'/a>');
    </script>
    </td>
        </tr>
        </table>
</div>
<!-- / social networking menu -->

what's wrong with my code ?

tks.

(plus where is it getting the image for FaceBook, it's showing images from my forums like avatars :}

There is more code than just that, please check this post again and make sure you add all of the code as instructed https://vborg.vbsupport.ru/showpost....0&postcount=10

It's grabbing the images from Facebook and Digg directly from their sites, the image for Twitter needs to be uploaded to your forum.

rrudeboy 06-29-2009 04:14 PM

Quote:

Originally Posted by ericgtr (Post 1839661)
There is more code than just that, please check this post again and make sure you add all of the code as instructed https://vborg.vbsupport.ru/showpost....0&postcount=10

It's grabbing the images from Facebook and Digg directly from their sites, the image for Twitter needs to be uploaded to your forum.

i have the other code in there, but 1. see here screen shot, it's not showing the Twitter text and 2. when the Facebook screen opens it takes images out of the thread, see here: screen shot..

ericgtr 06-29-2009 04:45 PM

Quote:

Originally Posted by rrudeboy (Post 1839670)
i have the other code in there, but 1. see here screen shot, it's not showing the Twitter text and 2. when the Facebook screen opens it takes images out of the thread, see here: screen shot..

It looks like you've modified the twitter code a little bit which is causing the text not to display. However, you have the link there so you can probably just manually add the text as you like.

As for Facebook taking images from the thread, it does that by default but you can check no image and it will ignore it.

rrudeboy 06-29-2009 05:38 PM

Quote:

Originally Posted by ericgtr (Post 1839693)
It looks like you've modified the twitter code a little bit which is causing the text not to display. However, you have the link there so you can probably just manually add the text as you like.

As for Facebook taking images from the thread, it does that by default but you can check no image and it will ignore it.

thanks, fixed the Twitter link... re. the image, well i guess it is what it is :}

emailapphost 06-29-2009 05:46 PM

Great mode. Thank you very much - sending good karma your way!

pigsy 07-01-2009 03:27 PM

Can the url automatically be shortened using one of the services that does that - I've seen a mod for wordpress that does that. I'd definitely want to use this then.

ericgtr 07-01-2009 03:45 PM

Are you referring to the Twitter section? It changes the URL automatically upon submission.

For example, when I click the twitter button in this link http://www.politicalgroove.com/news/...es-u-turn.html the it grabs the post title and the URL and looks like this (in the box before you submit):

north korean ship does a u-turn - PoliticalGroove Forums http://www.politicalgroove.com/news/...es-u-turn.html

Then after you submit, it automatically changes the URL to shorten it, like this:

http://bit.ly/OH0tU

pigsy 07-01-2009 03:52 PM

oh nice :)

N-0p3rz 07-01-2009 09:15 PM

Nice mod, using the second one. Scrapped the digg button & kept Facebook & Twitter, works like a charm after some modification to images.

Thanks


All times are GMT. The time now is 05:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01246 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete