vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - More Share Options TNG by BOP5 (Facebook, Twitter, Google +1, AddThis) Share Buttons (https://vborg.vbsupport.ru/showthread.php?t=266159)

BirdOPrey5 07-01-2011 10:00 PM

More Share Options TNG by BOP5 (Facebook, Twitter, Google +1, AddThis) Share Buttons
 
1 Attachment(s)
Brought to you by BirdOPrey5
www.Qapla.com


Current Version: 3.2

More Share Options The Next Generation (v 3.0) is a complete rewrite of my "More Share Options" mod. If you are looking for the old version I am keeping it attached (More Share Options for VB4 by BOP5v261.zip) but it will no longer be updated or supported.

The purpose of the mod is to add additional share "buttons" (Besides Facebook Like) to vBulletin.

Demo: Practically every page of Qapla.com has the "Gold" version enabled.

There is GOLD Version with additional features available at:
http://www.qapla.com/mods/showthread...4-by-BOP5-GOLD

The FREE Version allows sharing to the following sites:
  • Facebook (Like OR Recommend with Send Button Option, and with old style "Share" option, Dark Option, Show Faces Option)
  • Twitter (Specify "Via" Username, Related Account, default hash tags, and language- With or without counts)
  • Google +1 (With or without count, option to use built in Facebook language or specify custom language)
  • Add This (Option to input publisher ID for analytics tracking, enable/disable printing, disable duplicate sites option)

The FREE Version also has the following Style Vars for basic styling:
  • Height of Share Bar (in Pixels)
  • Padding
  • Margins

The GOLD Version has all of the above PLUS the following additional share options:
  • Pinterest (With or without count, option to specify pinned image, better Pin It sharing button in Beta available for testing)
  • Digg (With count or icon only)
  • Linked In (With or without count)
  • StumbleUpon (Several options with/without counts)
  • Reddit (Several options with/without "points")
  • Custom Buttons (Add as many additional custom buttons as you want!)

The GOLD Version also has additional Style Vars for complete control of Share Bar Styling:
  • Background
  • Border

(Both FREE and GOLD can be completely customized by CSS as well if you prefer not to use Style Vars.)

Some of the major differences between More Share Options TNG and the Original Version:
  • Share Buttons now show on ALL pages, including pages by 3rd party applications like Arcades and Media Galleries.
  • Twitter Count Now WORKS
  • Table-less design (All formatting done via CSS/Style Vars)
  • Additional built-in Facebook and Twitter options
  • New options to disable by Usergroup and/or THIS_SCRIPT value (as well as by Forum and by Style)
  • Pinterest Now Integrated (Gold version only)


As with the prior version, fast loading Asynchronous JavaScript is used everywhere possible.

IMPORTANT UPGRADE NOTICE!

If you are "upgrading" from an old version (any version less than 3.0) be aware this version (TNG) has been coded as a completely new and separate mod. It will NOT upgrade an old version.

I suggest if you run an old version of "More Share Options" you disable it via Product Manager in Admin CP.

Install and configure this new mod and make sure it works and you like it.

If you do like it then you can uninstall the old mod from Product Manager.

IMPORTANT - Some users have reported the new mod will not run until the old mod is uninstalled. If you have installed 3.0 and it is not running, please try uninstalling the old mod first.

VBSEO Compatibility:

UPDATE: It has been reported working with VBSEO!

Basically I have no idea how compatible this may be with VBSEO as I don't have access to a VBSEO enabled forum. If you use VBSEO be sure it works as designed (you can share pages.)

Test share 3 pages: The Forum Home, a Thread (showthread), and a Forum (forumdisplay) - if all 3 shares work I am confident the mod will work completely for you. I suggest you use Twitter or Facebook for your testing.

If you do run into VBSEO issues please post here and I will do my best to fix.

General Compatibility:
This has been tested as far back a VB 4.0.8 and as recent as VB 4.2.0. It is expected to work on all VB 4.x.x versions however if you have a very old version of VB please try the FREE version before purchasing the Gold to ensure compatibility. This is not compatible with VB 3.x.

As of version 3.2.0 there is a recommended manual file edit for those running VB 4.1.9 or below.

Admin CP Full Screen Shot: http://www.qapla.com/mods/ss/msotng_admincp_free.jpg

VB 3.8 Version Here.

Please Mark as Installed if you use this. :)
Donations always appreciated. :up:

To be clear the New (TNG) Version is: More Share Options TNG FREE (v 3.2) by BOP5.zip

------------------------------------------------------

Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)

BirdOPrey5 07-02-2011 11:08 AM

1 Attachment(s)
Reserved.

The following text is not relevant to Version 3.0 or above.

Quote:

This post will contain useful hints and options for the Share Buttons that are outside the scope of the mod itself.


Condition to show Share Button(s) Only on Specific / Guest Viewable Forusm

This is a useful conditional if you want to hide the Facebook Like button (and all of the share buttons) in forums that aren't open to the public. If someone "Likes" a thread in a private forum people will be greeted with a no-permission "have to register" message which usually people will just get annoyed at rather than register. In fact if it's a private forum they may not even have access even after registering.

To use this conditional edit the SHOWTHREAD template... find the code:
Code:

<vb:if condition="$show['fb_likebutton']">
and change it too:
Code:

<vb:if condition="$show['fb_likebutton'] AND !in_array($threadinfo['forumid'], array(3,4,5))">
Where 3,4,5 are forum id's of the forums you want to hide the button in. You can add or remove more numbers as needed so long as they are separated by commas.


Alternate location for Share Buttons

This location has been used by VB 3.x forms and was recently suggested by someone (forget who, sorry) as a good location for the Facebook button on VB 4.x.

To do this edit the SHOWTHREAD template.

Find the code:
Code:

<vb:if condition="$show['fb_likebutton']">
                        {vb:raw fblikebutton}
                </vb:if>

DELETE IT.

Now find the code:
Code:

        <div id="thread_controls" class="thread_controls toolsmenu">
                <div>

And right below it add:
Code:

<vb:if condition="$show['fb_likebutton']">
                        <span style="margin-left:0px; position:absolute; left:60px;
margin-top:3px;">{vb:raw fblikebutton}</span>
                </vb:if>

This is for the default vBulletin 4 style. You may have to play with the style settings to get it to look right on a custom style.

This looks good on Chrome, IE9, and Firefox. The height alignments are a little off on Opera browsers but nothing too bad.

Screenshot Attached.

Ricsca 07-02-2011 11:45 AM

In my site (vbulletin + vbseo) dont work...

BirdOPrey5 07-02-2011 11:47 AM

Quote:

Originally Posted by Ricsca (Post 2215836)
In my site (vbulletin + vbseo) dont work...

Please give me some more info- how is it not working?

What version of vBulletin?

Do you see anything at all?

Do you have the regular Facebook Like button enabled?

Link to your site?

BirdOPrey5 07-02-2011 12:02 PM

I just updated to version 1.01 - Found an error on 4.1.2, maybe other version as well. Please update.

reasoner 07-02-2011 12:31 PM

Quote:

Originally Posted by Ricsca (Post 2215836)
In my site (vbulletin + vbseo) dont work...

The same to me. (4.1.4) I don`t see anything in the frontend!? (I can give you no link, because i installed it in my test-VB

singh9211 07-02-2011 12:35 PM

can please provide the download link to whole zip file as u have mentioned, currently only product xml file is available for download.........

BirdOPrey5 07-02-2011 12:41 PM

Quote:

Originally Posted by reasoner (Post 2215846)
The same to me. (4.1.4) I don`t see anything in the frontend!? (I can give you no link, because i installed it in my test-VB

Very sorry about that. Yes I have uploaded the zip file now instead of just the xml.

Quote:

Originally Posted by singh9211 (Post 2215849)
can please provide the download link to whole zip file as u have mentioned, currently only product xml file is available for download.........

I have no way of testing this with VBSEO installed. My only guess if maybe VBSEO overrides the default Like Button as well for some reason.

I have installed this on the following forums:

VB 4.1.4 Suite
VB 4.1.2 Forum Only
VB 4.0.8 Forum Only

It worked on all of them on different servers, but none of them have VBSEO installed.

Just to double check make sure you have Enabled the mod and enabled the extra share buttons- everything is disabled by default.

singh9211 07-02-2011 12:52 PM

hi BirdOPrey5,

thanks for providing the download zip file.

I request you to please check my website http://www.geekworld.co.in, as i have installed the mod and its showing properly but none of the facebook, tweeter, and google +1 buttons are working.

You can check right now.

BirdOPrey5 07-02-2011 01:28 PM

I was just able to Like and Google +1 this thread which I picked at random just fine:
http://www.geekworld.co.in/showthread.php?2103-apps-gt

Make sure you are testing it with a thread in a public accessible (guest accessible) forum. They might not work in hidden/secret forums.

Twitter is working fine too.

What browser are you using?

I am unliking the page now so it won't show but the +1 will.

singh9211 07-02-2011 01:47 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2215863)
I was just able to Like and Google +1 this thread which I picked at random just fine:
http://www.geekworld.co.in/showthread.php?2103-apps-gt

Make sure you are testing it with a thread in a public accessible (guest accessible) forum. They might not work in hidden/secret forums.

Twitter is working fine too.

What browser are you using?

I am unliking the page now so it won't show but the +1 will.

Ya u r correct its working, the problem comes only in firefox browser, while it working fine in google chrome.

So want you to please check it under the firefox browser.

BirdOPrey5 07-02-2011 03:07 PM

I just "Liked" and Google +1 this page: http://www.geekworld.co.in/showthread.php?277-books

Using Firefox 3.6.17 without any problem.

Maybe you are running NoScript on Firefox? That would block any of these from working since they are all javascript based.

Also, what version of vBulletin are you running?

sweetpotato 07-02-2011 03:53 PM

Love this nice mod, thanks!

BirdOPrey5 07-02-2011 04:03 PM

Quote:

Originally Posted by sweetpotato (Post 2215901)
I have this error when try to install it

Please try downloading it again. If the error persists try downloading with a different web browser.

I just downloaded it myself and it imported fine.

The error you got is usually the result of a corrupt download.

EDIT- I guess you got it working. ;)

zelnik 07-02-2011 04:15 PM

The twitter button doesn't work with VBSEO install as it tries to post the nonvbseo url to twitter.

Oddly it works on your previous twitter button integration just fine.

The twitter button also has all your custom @JUOTnet stuff in it also.

sweetpotato 07-02-2011 04:26 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2215904)
Please try downloading it again. If the error persists try downloading with a different web browser.

I just downloaded it myself and it imported fine.

The error you got is usually the result of a corrupt download.

EDIT- I guess you got it working. ;)

Yes, Thank you! The error showed because I took instruction text file to install :D. Now it works like a charm and I love it.

lodos0677 07-02-2011 04:27 PM

No working vb4 suite :(

sweetpotato 07-02-2011 04:31 PM

Quote:

Originally Posted by lodos0677 (Post 2215919)
No working vb4 suite :(

It works for me Vb4.1.4 suite

BirdOPrey5 07-02-2011 04:42 PM

Quote:

Originally Posted by zelnik (Post 2215910)
The twitter button doesn't work with VBSEO install as it tries to post the nonvbseo url to twitter.

Oddly it works on your previous twitter button integration just fine.

The twitter button also has all your custom @JUOTnet stuff in it also.

Oh jeeze! Whoops... Will FIX ASAP.

BirdOPrey5 07-02-2011 05:02 PM

Quote:

Originally Posted by zelnik (Post 2215910)
The twitter button doesn't work with VBSEO install as it tries to post the nonvbseo url to twitter.

Oddly it works on your previous twitter button integration just fine.

The twitter button also has all your custom @JUOTnet stuff in it also.

Uploaded new version 1.02 to fix the twitter username issue- sorry.

I don't understand why with VBSEO the original (vBulletin created) URL won't work at the same time as the VBSEO generated URL. That seems like something basic that should be part of VBSEO.

Honestly I don't have VBSEO so I have no way of test this with it. I have however explicitly set the URL for every share option, not just twitter- so if twitter isn't working with VBSEO my guess is none of them will work with VBSEO.

If you're willing to experiment edit the plugin and find and remove all instances of:
Code:

'.$href.'
There's a lot of them. That should cause Twitter and all other share options to use the current URL in the web browser as the link to the thread- this will work but it's not ideal since people may visit the same thread via numerous URLs- but the shares should work with VBSEO in this setup- counts might not be true though.

Quote:

Originally Posted by lodos0677 (Post 2215919)
No working vb4 suite :(

You need to give me some information if you expect help. Some of the basics would be:

What isn't working exactly? Is there an error message? Did it import OK? What version of vBulletin are you using? What browser are you using?

There's not much I can do with "no working vb4 suite :(" - I designed this on a VB 4 suite so it should be working.

Quote:

Originally Posted by sweetpotato (Post 2215921)
It works for me Vb4.1.4 suite

Glad it's working for someone! :up:

puertoblack2003 07-03-2011 04:27 AM

works good with vbseo..nice job

OlijO 07-03-2011 06:31 AM

On my side : vBSuite 4.1.4
Google+ work without problem.
Twitter work but the count of tweet stay to zero, perhaps the action is not instantaneous ?

zelnik 07-03-2011 08:37 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2215931)
Uploaded new version 1.02 to fix the twitter username issue- sorry.

I don't understand why with VBSEO the original (vBulletin created) URL won't work at the same time as the VBSEO generated URL. That seems like something basic that should be part of VBSEO.

Honestly I don't have VBSEO so I have no way of test this with it. I have however explicitly set the URL for every share option, not just twitter- so if twitter isn't working with VBSEO my guess is none of them will work with VBSEO.

If you're willing to experiment edit the plugin and find and remove all instances of:
Code:

'.$href.'
There's a lot of them. That should cause Twitter and all other share options to use the current URL in the web browser as the link to the thread- this will work but it's not ideal since people may visit the same thread via numerous URLs- but the shares should work with VBSEO in this setup- counts might not be true though.



You need to give me some information if you expect help. Some of the basics would be:

What isn't working exactly? Is there an error message? Did it import OK? What version of vBulletin are you using? What browser are you using?

There's not much I can do with "no working vb4 suite :(" - I designed this on a VB 4 suite so it should be working.



Glad it's working for someone! :up:

Thanks, I think once the hardcoded twitter stuff was removed then vbseo stuff worked with twitter! :)

oBEAVISo 07-03-2011 09:32 AM

Seems to work ok for me too on 4.1.4 with vbseo installed . One thing i notice , Once tweeted, the tweet carries the full url address and not the shortened url . Any ideas ?

troyuncucom 07-03-2011 09:43 AM

can i use 3.8.x?

Sage Knight 07-03-2011 10:07 AM

Good day sir.

You have just made my day, I needed the exact samething. Cheers!

Edit; Nominated :)

lodos0677 07-03-2011 03:38 PM

İt ıs facebook connect open.
Later installed. Thank you.

BirdOPrey5 07-03-2011 03:52 PM

First, you're welcome to everyone who has said "thank you." :)

Quote:

Originally Posted by OlijO (Post 2216126)
On my side : vBSuite 4.1.4
Google+ work without problem.
Twitter work but the count of tweet stay to zero, perhaps the action is not instantaneous ?

No it's a conflict with the twitter button and VB4- well known. I noted this 3 times. (In the first post, in the mod instructions, and in the mod setting itself. In all 3 places I said there is a known issue and the count will probably not work with twitter. I recommend disabling the count box for twitter. I included the option to turn it on only in the event t gets fixed by either vBulletin or twitter.)

Quote:

Originally Posted by zelnik (Post 2216145)
Thanks, I think once the hardcoded twitter stuff was removed then vbseo stuff worked with twitter! :)

Glad to hear... I will try to program in a VBSEO Installed Yes/No option in the next version so it works either way out of the box without custom edits.

Quote:

Originally Posted by oBEAVISo (Post 2216151)
Seems to work ok for me too on 4.1.4 with vbseo installed . One thing i notice , Once tweeted, the tweet carries the full url address and not the shortened url . Any ideas ?


I believe that is something twitter is deciding to do on their own. If you mouse-over the link you will see it indeed has the link to the url shortener address.

stationar 07-03-2011 04:55 PM

Installed. Like it very much. Two questions:
1. How can I add this to other pages, like downloads.php?
2. How can I edit "tweet" to include URL with title?

BirdOPrey5 07-03-2011 06:00 PM

1) This should show anywhere the standard vBulletin Facebook Like button would normally show. I'd imagine to add it to a downloads page would require custom coding a plugin to make the facebook_likebutton template available to that page.

2) the title and a link to the page is already included on each tweet.

stationar 07-03-2011 10:50 PM

It includes title, Site name, but not the link.

BirdOPrey5 07-04-2011 12:50 AM

Quote:

Originally Posted by troyuncucom (Post 2216154)
can i use 3.8.x?

No, as VB 3.8x does not have a built in Facebook Like button this mod will not work on 3.8. I plan to release a separate mod similar to this for 3.8 but I don't have an estimate yet when that will be.

Quote:

Originally Posted by stationar (Post 2216403)
It includes title, Site name, but not the link.

Please upgrade to the new version, 1.03. I have added a new option: Clean Twitter URL?- You and anyone else with a non-English forum must enable this option for Twitter Links to be created.

oBEAVISo 07-04-2011 05:36 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2216264)
I believe that is something twitter is deciding to do on their own. If you mouse-over the link you will see it indeed has the link to the url shortener address.

Apologies, I did not notice that at all. Thankyou for the mod and thank you for the reply . nominated and installed. All buttons working as they should with tweet count turned off.

zelnik 07-04-2011 07:04 AM

Hi BOP5,

Just to clear things up with the vBSEO being compatible with this modification.

It's doesn't really work, per se. Both Twitter and G+1 display the non vbseo urls but if the end user clicks on those then vbSEO will handle that url and convert it to the SEO URL structure.

This isn't a huge problem for Twitter (even though your original Twitter integration worked fine) but for G+1 I assume this is going to be a big problem as Google will obviously only have the VBSEO urls stored on their search engine.

I'm going to try your suggest about removing the href (if memory serves me correct) but could you tell me where to look for it? in the main XML and then reinstall?

Of perhaps you could do it and post it here and we can check to see if it works?

Thanks mate.

zelnik 07-04-2011 07:31 AM

Hi BOP5,

Just to update, I've figured out how to remove the href tags from Twitter and G+1 and I can confirm they now work perfectly with VBSEO.

I've not attempted the FB stuff as it looks beyond my ability to remove those successfully.

So if you could do a vBSEO option in the next release it would be GREATLY appreciated by us users. Thanks :)

BirdOPrey5 07-04-2011 12:27 PM

Thanks for the update zelnik.

With Facebook, Twitter, and Digg it really doesn't matter what URL gets sent as long as the URL works- which they do.

I see what you are saying about the Google +1 though- you would want your VBSEO URL sent.

Here is the issue though...

When you first click on a post you go to a URL that looks like /showthread.php?t=1001.

But when you return to a URL via the "First unread post" link you get a URL that looks like /showthread.php?p=2001#post2001.

Plus add page numbers to the mix and you could have many different URLs for the very same page.

By forcing the "href" into the code it normalizes all of these possible URLs to just 1 consistent URL. This is essential to keep the "counts" correct and also will be sure to send someone who follows a link to the top of the page of the thread rather than some post further down the page.

I know VBSEO has nicer looking URLs than in my example above, but the issue is still the same- multiple URLs for the very same page.

I can add the VBSEO fix to the next version of this but it will be near impossible to keep the counts correct. Still it's better than nothing I guess.

stationar 07-04-2011 02:52 PM

Quote:

Please upgrade to the new version, 1.03
Thanks. Fix works.

zelnik 07-04-2011 09:15 PM

1 Attachment(s)
Quote:

Originally Posted by BirdOPrey5 (Post 2216605)
By forcing the "href" into the code it normalizes all of these possible URLs to just 1 consistent URL. This is essential to keep the "counts" correct and also will be sure to send someone who follows a link to the top of the page of the thread rather than some post further down the page.

I know VBSEO has nicer looking URLs than in my example above, but the issue is still the same- multiple URLs for the very same page.

I can add the VBSEO fix to the next version of this but it will be near impossible to keep the counts correct. Still it's better than nothing I guess.

Removing the href for twitter sprung the counter into life!

I've clicked on G+1 and I get a counter for that too..

BirdOPrey5 07-04-2011 11:25 PM

Excellent news.

BirdOPrey5 07-05-2011 12:20 AM

Released version 1.05. The new option "Force Standard URL?" should be turned off for VBSEO users. This is the equivalent of doing the manual plugin edit I mentioned earlier about removing "$href" from the code.

You should probably experiment with this option whether or not you use VBSEO. It is a function of the type of friendly URL you use as well as if your forum is English language or not. Each share option has its own quirks.


All times are GMT. The time now is 02:24 AM.

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.02932 seconds
  • Memory Usage 1,875KB
  • 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
  • (7)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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