vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=281444

Pinterest Sharing System by BOP5 for VB 3.8 & VB 4.x! (Pinterest Pin Button Mod)
by BirdOPrey5
12 Apr 2012 02:01

5 Attachment(s)
Brought to you by BirdOPrey5
www.Qapla.com


A BIG Thank You to all for voting this May 2012 Mod of the Month!

Version 1.04 - Added showpost compatibility
Version 1.01 - Compatibility fix for dbtech Advanced Thanks/Like mod
Version 1.0 - Initial (Non-Beta) Release

This mod is compatible with all VB 3.8 and 4.x versions released to date. It has been tested on VB 3.8.7, VB 4.1.11, and VB 4.2.0 and should work on older and newer versions as well.

Live Demos:
VB4 Demo: Pinterest Share Demo at Qapla.com
VB3 Demo: Pinterest Share Demo Thread - JUOT - Joe's Ultimate Off Topic

Pinterest is the next big thing in Social Media. It offers a very intuitive and friendly interface for users to share the things they like, use, and appreciate.

Unlike with Facebook or Twitter Pinterest absolutely requires some sort of visual representation of what you are sharing- this takes the form of a thumbnail image of a larger image or a thumbnail of a video.

Previously even if you could incorporate the Pinterest Pin button code into vBulletin there was no way to associate a unique image with every post.

This mod will search east post for any of the following. Priority is given to higher ranked items. The first instance of the first item type found will become the thumbnail sent to Pinterest. Each item can be enabled or disabled from the mod settings.

1) First it will look for YouTube videos. (Either embedded with [VIDEO] BBCode OR regular YouTube links OR YouTube videos embedded with the AME mod.

2) If no YouTube video is found it will next look for links to any external images. These are images that use the [IMG] BBCode.

3) If no external images are found it will look for any inline attachments. In the settings you can specify whether it should share the full sized attached image or only the thumbnail. Guests must have permission to download attachments or to see thumbnails for this option to work.

4) If none of the above find anything the mod can use this option will use avatar of the poster as the thumbnail sent to Pinterest.

5) If the user has no avatar as a last resort you can specify a link to a default forum image (perhaps the forum logo?) that will be submitted as the thumbnail.

Pinterest will not accept any Pins that do not contain a valid, guest accessible, image thumbnail.

You can choose the default description text. You can take text from the post itself, the thread title, or the forum META description. In any case the user always has the option to edit the description before submitting it to Pinterest.

The mod also contains a number of settings that allow you to choose how you want the Pinterest button to look, where you want it, and other basics such as what forums, styles, or usergroups to disable but button for or in.

The mod uses auto template edits for basic use however power-users will want to opt for the manual template edits (explained below) for even better customization and positioning of the Pinterest Pin Button.

Known Issues:
Using the recommended locations and settings the mod is working well on VB 3.8 and VB 4.x as you can see in the demo links above. However adding the Pinterest button causes some visual changes in some browsers.

For example in VB 4 with Chrome browser if you quick-edit a post with the Pinterest button the editor toolbar is pushed down lower than normal. Everything works it's just different than you are used to. In Firefox however the editor toolbar looks fine.

In VB 3 in the post message area location the "numbers" from the pin button are outside the border of the main table. This is somewhat on purpose- I think having the count outside the box draws more attention to them. Unfortunately if you don't like that all I can suggest is to disable the count completely because I am not a style expert. You are free however to do the manual template edit including in the instructions (and below) to find the perfect spot for your Pin button on your style(s).

Please Mark as Installed if you use this. :)
Donations Always Appreciated. :up:

BirdOPrey5 12 Apr 2012 02:03

Manual Template Edits

If you have a customized style and the auto edits don't work, or you simply want more control over where the button is and how it looks make one of the manual edits below.

If you are using VB 4.x:

Edit the template postbit or postbit_legacy depending on which one you use on your forum.

Find the code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Directly before (or above) that code paste in:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will show the Pinterest button in the default VB4 location. Feel free to move the template_hook code anywhere in the postbit template for your own custom solutions.

Edit the template postbit_pinterest_vb4 to further customize the button.


If you are using VB 3.x:

Edit the template postbit or postbit_legacy depending on which one you use on your forum.

Find the code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE that code with this code:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This will show the Pinterest button in the default VB3 "message Area" location. Feel free to move the template_hook code anywhere in the postbit template for your own custom solutions.

Edit the template postbit_pinterest_vb3 to further customize the button.

datoneer 12 Apr 2012 02:21

Doesn't work cannot see anything

BirdOPrey5 12 Apr 2012 02:40

1) Did you enable the mod and choose the settings (button location and enabled searches(video/image/attachment/etc..)) ?

2) If you did and you have a heavily customized style (like the forum in your sig) you may need to do a manual template edit-
Search your postbit_legacy template and see if you have this line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you don't or it's not exactly that you will need to do a manual edit.

3) I forgot to mention this mod likely will not find images or attachments if you use the DbTech Advanced Post Thanks/Like mod. Not sure if that applies.

Also please give me a link to a post that actually has an image or video in it- I browsed a few threads on your forum and couldn't find any such content.

Hornstar 12 Apr 2012 03:55

Shame it does not work with the thanks mod from dbtech

BirdOPrey5 12 Apr 2012 11:35

Quote:

Originally Posted by Hornstar (Post 2319280)
Shame it does not work with the thanks mod from dbtech

It would still find videos and it would still allow avatar or forum logo sharing- just external images and attachments won't work.

I downloaded the dbtech mod to see if I could figure out a way to make them compatible but I can't make heads or tails of dbtech code.

If dbtech could fix their mod so they don't parse the $post['pagetext'] value- or even if they copied $post['pagetext'] to something like $post['noparse'] before parsing I could easily add code to detect if their mod is installed and if so use the alternate $post['noparse'] value when searching for images and attachments.

Those with a coding background may ask why don't I just search the parsed text for images <img> instead of [IMG]. The answer is because if I search parsed text for images and the first image is simply a smiley then the smiley would be the "thumbnail" which isn't going to work well for sharing on Pinterest.

Let me try and contact them and see if they have a solution.

BirdOPrey5 12 Apr 2012 12:40

A big thanks to dbtech for getting back to me quickly with a fix for the conflict.

Version 1.01 released which should work fine the the Advanced Thanks/Like mod. :up:

larrydude 12 Apr 2012 15:22

It Works!!!! You are awesome!!!!!!!!!!!!!!!!!!!!!!!!

faisaly.com 12 Apr 2012 16:15

Where does this pin the info to, google? not sure I get this... nothing mentioned really what this does... only that it grabs pics and videos from post unlike twitter and facebook, but where do they get posted...

BirdOPrey5 12 Apr 2012 16:28

They get posted to the social networking site "Pinterest" - http://pinterest.com

It's a relatively new fast growing social media site. I think it's currently ranked the 4th largest behind Facebook, Twitter, and YouTube.

faisaly.com 12 Apr 2012 16:33

K thanks never heard of them but I know facebook has this app free to use... so if you posted to facebook you could then use the app to post to pinterest but it would be xtra steps so i can see where your mod makes it easier....

Gemma 12 Apr 2012 17:05

Thanks for this. Works really well :)

Hornstar 13 Apr 2012 01:27

You must 'Like' someone else's post before liking any more by BirdOPrey5.

:)

Thanks.

stl7997 13 Apr 2012 09:28

Works great! Thanks for this. Nominated for MOTM.

BirdOPrey5 13 Apr 2012 10:04

Quote:

Originally Posted by stl7997 (Post 2319658)
Works great! Thanks for this. Nominated for MOTM.

Thanks! :D

wacnstac 13 Apr 2012 15:07

I love the hack, have installed the plugin on 3.8 and have done the manual template edit on postbit, but don't see anything. Maybe the $template_hook[postbit_bop_pinterest] is not working as when I view my source I do see the min-height:60px but nothing after that close div.

wacnstac 13 Apr 2012 15:16

Should the manual template edit really be $template_hook[postbit_pinterest_vb3]
instead of $template_hook[postbit_bop_pinterest]?????

wacnstac 13 Apr 2012 15:37

Nevermind. It is working now. It appears that Pinterest had some lagging issues this morning.

BirdOPrey5 13 Apr 2012 16:13

Glad it is working. :up:

Yes Pinterest is growing so fast they tend to be down sometimes. Twitter had the same growing pains in their early days. Still do to a point.

juliannova 14 Apr 2012 16:26

Great mod. What about the albums how can put the code so people can pin photos

BirdOPrey5 14 Apr 2012 16:38

Albums, blogs, and the like will be addressed in future versions.

juliannova 14 Apr 2012 18:35

thanks

Taurus1 15 Apr 2012 12:35

1 Attachment(s)
Hey Joe, for some reason with some posts the 'pin it' image is not completely aligned to the right. Can you perhaps help with that? Thanks.

Attachment 137785

BirdOPrey5 15 Apr 2012 12:44

Can I get a link to that post?

Taurus1 15 Apr 2012 13:58

Quote:

Originally Posted by BirdOPrey5 (Post 2320293)
Can I get a link to that post?

Here you go: http://creativx.net/forums/windows-7...tml#post520938

BirdOPrey5 15 Apr 2012 14:32

1 Attachment(s)
Quote:

Originally Posted by Taurus1 (Post 2320312)

That's weird... What browser are you using?

I just checked with IE9, Firefox, and Chrome and they all looked right to me:

http://www.vbulletin.org/forum/attac...1&d=1334500308

BirdOPrey5 15 Apr 2012 14:39

Oh wait, i registered on your site, I see what it is...

There is a google "ad" to the right of that pinterest button in that post. For some reason the ad is blank, but if the ad wasn't blank it would be in the right place.

Either fix the ad or remove the ad and the pinterest button will look/work right.

Taurus1 15 Apr 2012 14:45

Thanks Joe....but...ehhh....how to fix that man? But OK, not your mod then, so thank you so much for the best support always. I really appreciate it!

BirdOPrey5 15 Apr 2012 15:21

Check your ad location templates in your styles or your ad manager in admincp - I'm guessing it is "last post shown" location that has the ad because it only happens on the last post of a page.

tpearl5 15 Apr 2012 17:46

Can this be used within the facebook_likebutton template to display once per thread next to the facebook like button? Will it also display in blogs and articles if that is the case?

Edit - I guess not since it's made to put in postbit

BirdOPrey5 15 Apr 2012 18:01

No it won't work once per thread because Pinterest is designed for sharing media and that is usually specific to posts.

If you wanted to show it only on the first post though you could edit the "Pin button in Posts" plugin and find the code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and change it to:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


tpearl5 15 Apr 2012 19:59

It just seems like making a call x number of threads to pinterest would add a lot of calls to every thread page load.

Thanks Joe!

BirdOPrey5 15 Apr 2012 20:12

Actually the javascript loads only once per page. The "calls to pinterest" are just images and once an image is downloaded once the browser doesn't re-download it again anyway. They design it so you can use multiple buttons on one page. :up:

pete_brady 15 Apr 2012 20:33

any easy way to move the button down to beside the quote / multiquote links?

tpearl5 15 Apr 2012 20:40

Quote:

Originally Posted by BirdOPrey5 (Post 2320422)
Actually the javascript loads only once per page. The "calls to pinterest" are just images and once an image is downloaded once the browser doesn't re-download it again anyway. They design it so you can use multiple buttons on one page. :up:

Right, I meant the call to get the pin count, which isn't a very large file anyway (0.4kb)

Any idea on how to move the button up next to the post title?

tpearl5 15 Apr 2012 20:58

fyi, you should consider moving the default location anyway since quotes can hide it. For example:
http://nikonites.com/photo-critique/...html#post12524

tpearl5 15 Apr 2012 21:31

nevermind, I moved it by adding position:relative; top:-35px; to the div to make it:

<div style="position:relative; top:-35px; float: {vb:raw boppin.lorr}; padding-{vb:raw boppin.rorl}: 2px;">"

BirdOPrey5 15 Apr 2012 23:37

Quote:

Originally Posted by pete_brady (Post 2320430)
any easy way to move the button down to beside the quote / multiquote links?

Quote:

Originally Posted by tpearl5 (Post 2320443)
nevermind, I moved it by adding position:relative; top:-35px; to the div to make it:

<div style="position:relative; top:-35px; float: {vb:raw boppin.lorr}; padding-{vb:raw boppin.rorl}: 2px;">"

That is a cool location, thanks for sharing.

I'm sorry I don't have any better ideas on where to position the button- playing with CSS frustrates me.

Hopefully more people will be kind enough to release the edits they made to better position the button like tpearl5 did. :up:

I'm using the VB4 default built in position myself until I can find something better.

deverill2010 16 Apr 2012 14:11

Nominated :)

BlessedFWI 17 Apr 2012 20:23

Love it! Thank you!

Nominated!!!

pete_brady 17 Apr 2012 20:42

Quote:

Originally Posted by BirdOPrey5 (Post 2320462)
That is a cool location, thanks for sharing.

I'm sorry I don't have any better ideas on where to position the button- playing with CSS frustrates me.

Hopefully more people will be kind enough to release the edits they made to better position the button like tpearl5 did. :up:

I'm using the VB4 default built in position myself until I can find something better.

is there a hook that can be used to display it in the postbit footer?

BirdOPrey5 17 Apr 2012 21:56

Quote:

Originally Posted by BlessedLAF (Post 2321015)
Love it! Thank you!

Nominated!!!

Thanks!

Quote:

Originally Posted by pete_brady (Post 2321019)
is there a hook that can be used to display it in the postbit footer?

I don't know what you mean by a postbit footer? There is where the edit/reply/quote buttons are- that is called posbit_controls. And yes there is a template hook there (I have an option to use it in the VB3 version) but you will see if you use it for VB4 the button will be terribly out of place. This is because VB4 requires some sort of additional css to make the button fit properly into the postbit controls area and I don't like messing with CSS.

If you manually edit the postbit or postbit_legacy template you can put the template hook *anywhere* you want.

pete_brady 17 Apr 2012 23:26

Quote:

Originally Posted by BirdOPrey5 (Post 2321033)
Thanks!



I don't know what you mean by a postbit footer? There is where the edit/reply/quote buttons are- that is called posbit_controls. And yes there is a template hook there (I have an option to use it in the VB3 version) but you will see if you use it for VB4 the button will be terribly out of place. This is because VB4 requires some sort of additional css to make the button fit properly into the postbit controls area and I don't like messing with CSS.

If you manually edit the postbit or postbit_legacy template you can put the template hook *anywhere* you want.

postbit controls - that's the one.

sooo.... how to manually edit the postbit template to put the hook there? (yes, i am an idiot)

BirdOPrey5 17 Apr 2012 23:54

Go to Admin CP - > Styles & Templates -> Style Manager -> [Choose your style] -> Choose "Edit Templates" from the drop down menu -> Postbit Templates (double click to expand this group.)

Now find either [B]postbit[/B ]or postbit_legacy depending on the one you use and double click on it to open it in the template editor.


Paste in this code wherever you want the Pinterest button to appear:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

finally, save the template...

Now check how it looks. It will probably need some adjusting. You will also need to edit the template postbit_pinterest_vb4 to make additional adjustments as needed.

Sorry but that is as much detail as I'm willing to go into making these edits. Quite frankly I don't suggest people try these if they don't already know what they are doing.

juliannova 19 Apr 2012 16:44

so I can't use this hook or code for the album by manual putting it in....it won't work?

BirdOPrey5 19 Apr 2012 17:04

There is no easy way of just dropping this code into a different hook, no.

keng 19 Apr 2012 21:48

1 Attachment(s)
We would like to support multiple languages.

Thank you

BirdOPrey5 19 Apr 2012 22:51

I will see what I can do about the description issue. I'm thinking I can't do much except offer a "blank" description option so the user has to type out their own.

brandon515 20 Apr 2012 19:33

If a user pins a post that has an image, but that image is linked from another site...will a user be directed to your forum or the site that the image is actually hosted on if they click on it in Pinterest?

Thanks,
Brandon

BirdOPrey5 20 Apr 2012 20:38

It will always redirect to your forum.

brandon515 20 Apr 2012 22:15

Awesome, thx. Installed.

Also installed Facebook mod.

jdougher 21 Apr 2012 12:55

Nice mod. But why doesn't the Pin image show up when images are attached to a thread rather than posted via the IMG tag? I've enabled viewing and downloading of attached images for guests, as explained in the installation file, but still there's no Pin image.

BirdOPrey5 21 Apr 2012 14:29

Are they inline attachments?

This version only looks for inline attachments. I am working on an update to take a any image attachment.

doctorsexy 22 Apr 2012 18:26

Works great..thanks

Dwarden 25 Apr 2012 03:28

would be possible to monitor custom BB codes with the PinInterest plugin ?
e.g. add text field for variable into Admin CP options of the plugin where these can be set

let say i have SoundCloud BB codes [sc] , so i would define it to be pin-able :)

Dwarden 25 Apr 2012 05:30

another suggestion , would be possible to offer ability to enable / disable for user in his user profile settings ? and if enabled then he could set if allow / not allow javascript variant?

yesfans 25 Apr 2012 13:57

I am confused on one point. If a post has an Avatar, a pic posted, a pic in the sig line, and maybe a video, how do you choose which one to PIN.

yesfans 25 Apr 2012 13:59

None the less, MOTM. I think it is a good one and is a little ahead of the curve with the growing interest in that pinterest stuff. My wife plays with that site all the time.
So when it is pinned the pinned item is linked back to my site? If so that is great. MORE EXPOSURE!

BirdOPrey5 25 Apr 2012 14:10

Quote:

Originally Posted by Dwarden (Post 2323252)
would be possible to monitor custom BB codes with the PinInterest plugin ?
e.g. add text field for variable into Admin CP options of the plugin where these can be set

let say i have SoundCloud BB codes [sc] , so i would define it to be pin-able :)

Monitoring custom bbcodes may be possible but the thing is they need an IMAGE to be pinned. YouTube is very popular so I manually programmed in a way to pull the thumbnail provided by youtube from the video URL. I could make an option to add [sc] to the list of bbcodes but if it doesn't link to an image the pin will fail. So really the only custom bbcodes would be useful is if they were variants of [img]. So if people had custom IMG bbcodes for aligned images or such they could add their bbcodes to a list.

It is a good idea I will try to implement but I'm afraid it may not work on soundcloud.

Quote:

Originally Posted by Dwarden (Post 2323279)
another suggestion , would be possible to offer ability to enable / disable for user in his user profile settings ? and if enabled then he could set if allow / not allow javascript variant?

What I could do is add an option for it to work with a Custom User Profile Field you define. It will work basically the same way but the admin will need to setup the profile field. It would be too much work to make a separate profile field generated by this mod- it means database changes and template edits that were otherwise unnecessary.

Quote:

Originally Posted by yesfans (Post 2323367)
I am confused on one point. If a post has an Avatar, a pic posted, a pic in the sig line, and maybe a video, how do you choose which one to PIN.

The mod gives priority to any youtube video it finds in the post.
If no video is found it looks for the first external image in the post.
If no external image is found it looks for an inline image attachment in the post...
If none of the above it looks for an avatar
If no avatar it looks to see if you defined a fallback image in settings (like a logo.)

It doesn't look in signatures at all.

Quote:

Originally Posted by yesfans (Post 2323369)
None the less, MOTM. I think it is a good one and is a little ahead of the curve with the growing interest in that pinterest stuff. My wife plays with that site all the time.
So when it is pinned the pinned item is linked back to my site? If so that is great. MORE EXPOSURE!

THANKS! Yes it links back to your site.

yesfans 25 Apr 2012 14:41

So one can not choose which thing to PIN if there are multi things in a post?

BirdOPrey5 26 Apr 2012 12:27

That is correct, it only pulls the first found element.

I am experimenting with code to choose an image via javascript but it is nowhere near ready, not sure it ever will be. I can't get it to work with the counts... So far it is only working with the static image button.

CharlieDelta 26 Apr 2012 18:48

The button is showing on every post even with no images or videos. I suspect this should not be the case. What would cause this?

BirdOPrey5 26 Apr 2012 18:53

If you enabled the option to use avatars or you specified a logo URL those would both cause the Pin button to show on every post.

CharlieDelta 26 Apr 2012 19:03

Quote:

Originally Posted by BirdOPrey5 (Post 2323806)
If you enabled the option to use avatars or you specified a logo URL those would both cause the Pin button to show on every post.

Thank you for shedding some light. I enabled the URL. :o

BirdOPrey5 26 Apr 2012 23:06

The URL is there only if the Admin wants to allow sharing of EVERY post, even if there is no image. It's up to you.

larrydude 01 May 2012 16:18

Yay. Voted for MOTM. I hope you win! The mod is just what I needed!

woffie 02 May 2012 10:57

Great mod thanks!

carsafety 02 May 2012 20:03

Thank you for making it vB3.8 compatible! I had some minor formatting issues from some members when using the Postbit placement, but it works great in the post controls area. Voted for MOTM.

Gemma 04 May 2012 08:14

Voted. Pinterest is a cracking wee tool and so is this mod :)

BlessedFWI 05 May 2012 01:22

Voted for MOTM! This is one of my favs. Thank you for taking the time to create such awesome mods.

RichieBoy67 08 May 2012 00:17

I love this but have been unsuccessful trying to get an invite. Can anyone send me an invite please?

Thanks,
Rich

datoneer 08 May 2012 10:52

Works great on 4.1.10. Thanks BOP5. Another awesome mod

CaneInsider 19 May 2012 20:57

I cannot get the mod to show on my threads. Tried the manual template fix and the default instal with nothing showing. Manually tried puting the script in bot the POSTBIT and POSTBIT_LEGACY templates and nothing happens. Do you think this mod is compatiable with the Sidebar Everywhere plugin?

www.caneinsider.com/forum

BirdOPrey5 19 May 2012 21:10

I'd imagine it should be... Please put everything back to normal first, I can't troubleshoot if you've "put the script in the POSBIT" - I don't even know what you mean by that to be honest.

Then give me a ink to a post with an image or video in it so I can see what is going on.

CaneInsider 20 May 2012 13:01

Quote:

Originally Posted by BirdOPrey5 (Post 2330798)
I'd imagine it should be... Please put everything back to normal first, I can't troubleshoot if you've "put the script in the POSBIT" - I don't even know what you mean by that to be honest.

Then give me a ink to a post with an image or video in it so I can see what is going on.

Ok, got it working.

Is there a way to move this into the post bit area under the avatar?

With the sidebar everywhere plugin installed it prevents videos from being shown all the way.

Thanks for all the help and great mods!

BirdOPrey5 20 May 2012 15:02

Please "Mark as Installed" now that it is working. :)

As for moving it to under the avatar should be possible but I'm not really a style person.

At a minimum you would need to go mod settings -> Button Locations in Posts -> to None.

Then manually add the template hook to the postbit(_legacy) template where you want it to appear.

In postbit_legacy you probably want to add the code directly above:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then you may need to edit the postbit_pinterest_vb4 template as well to get it to display properly.

juliannova 22 May 2012 02:50

has the album version been included yet? in version 1.01

BirdOPrey5 22 May 2012 14:05

no.

tpearl5 22 May 2012 15:51

Anyone have any ideas on having a member option to exclude the pin button from their posts?

tpearl5 22 May 2012 19:05

Quote:

Originally Posted by tpearl5 (Post 2331578)
Anyone have any ideas on having a member option to exclude the pin button from their posts?

Actually, I figured this one out as well.

I added a new radio button user field called "Pinterest" with the description "Allow users to pin your photos on Pinterest", make sure it is not private, and put Yes No in for the selection

Since I manually added {vb:raw template_hook.postbit_bop_pinterest} to postbit, I added a conditional around it:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change X to the number of your custom field. Mine is 15 so it looks like this: $post['field15']

BirdOPrey5 22 May 2012 21:07

tpearl5 is right on, that is a good way.

Glenn_E 26 May 2012 16:13

Not sure I get how this will work for the entire vb site. Some forums require registration, while others are guest viewable. Does this mod allow admins to select which forums will allow the pin it button?

BirdOPrey5 26 May 2012 16:18

Yes, the admin can set a list in the settings on what forums should not have the pin button.

Glenn_E 26 May 2012 16:31

Excellent!
At my site, WestCoastGearHeads.com we post tons of automotive type photos within threads... especially from events that we cover. We share on facebook / twitter, but I'm really interested in trying pinterst. Thanks for the mod, I'll download and test when I get back from today's events :)

BirdOPrey5 01 Jun 2012 12:14

Thank You All for your votes!

Official Winner of the May 2012 Mod of the Month!

Overall there were some great mods last month, more than usual- it was a tough choice, even for me. ;)

Sunka 02 Jun 2012 00:35

Hi BOP5

I have problem with this Mod and Thanks Mod (Dragonbyte Tech).
With newest version of they mod, when user click on button to give like/thanks for post, if pinterest icon are in that post, after click on like/thanks button Pinterest icon disappear.

I ask for help on they forum, and solution is that you integrate Pinterest mod with showpost.php

Could you please do that?

djbaxter 02 Jun 2012 01:11

Quote:

Originally Posted by Sunka (Post 2335628)
Hi BOP5

I have problem with this Mod and Thanks Mod (Dragonbyte Tech).
With newest version of they mod, when user click on button to give like/thanks for post, if pinterest icon are in that post, after click on like/thanks button Pinterest icon disappear.

I ask for help on they forum, and solution is that you integrate Pinterest mod with showpost.php

Could you please do that?

It works fine with Abe's Thanks mod. :)

BirdOPrey5 02 Jun 2012 02:28

Quote:

Originally Posted by Sunka (Post 2335628)
Hi BOP5

I have problem with this Mod and Thanks Mod (Dragonbyte Tech).
With newest version of they mod, when user click on button to give like/thanks for post, if pinterest icon are in that post, after click on like/thanks button Pinterest icon disappear.

I ask for help on they forum, and solution is that you integrate Pinterest mod with showpost.php

Could you please do that?

That might be a simple fix. I don't have their mod though so I can't easily test it.

Could you please go to the Admin CP -> Plugins & Products -> Plugin Manager

Open/Edit the Plugin from the Pinterest mod called Auto Postbit Edit on the parse_templates hook.

Edit the first two lines from:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and change them to:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And Save the Plugin and try again.

Does that add anything to the post after you "like' it? If I'm right it should add maybe just a button without a count- just interested if it does anything at all.

Sunka 02 Jun 2012 22:52

I change plugin code like you said.

It is half fix now.

When I click on button Like/Thanks/... Pinterest icon do not disappear like before. It just change to icon without number, like you say it would. Little problem is when you click on that icon, it is open in new tab it is not then anymore in same window like popup.

BirdOPrey5 03 Jun 2012 03:00

Quote:

Originally Posted by Sunka (Post 2335953)
I change plugin code like you said.

It is half fix now.

When I click on button Like/Thanks/... Pinterest icon do not disappear like before. It just change to icon without number, like you say it would. Little problem is when you click on that icon, it is open in new tab it is not then anymore in same window like popup.

Good, it let me know I was on the right track. Just released 1.04 with showpost compatibility.

Let me know if it works as expected now.

Sunka 03 Jun 2012 03:38

Thanks BOP5, but no, it is not working totally OK.
Before you click on Like/thanks button, Pinterest icon with number shows in post. When i put mouse pointer, it shows that link is javascript:void(0) and on click popup shows like it should be.

After click on thanks/like button, post refresh and Pinterest icon is change to icon without number. Click on icon open new tab, and when you put mouse pointer, I see that now is not javascript like before, but link:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


BirdOPrey5 03 Jun 2012 12:25

Yeah, I was afraid of that... The Ajax call dbech's mod is using loads the new post, but the javascript of the showthread page was already loaded. I added the javascript code to showpost (it works fine in showpost on VB 3.8) but since it's not using the showpost as the full page the javascript isn't being loaded again.

I'm afraid I don't know how I could change this mod any further to force the javascript to reload on the AJAX call by the dbtech mod. It seems like something that would need to be initiated by their mod.

Have you tried using a different location for the Pin button? It seems very weird the whole post needs to reload on a "Like."

Sunka 03 Jun 2012 20:43

I tried all possible options in ACP, but result is same.
Maybe solution is to move pinterest icon in post track (where is Like button here on vBorg)?

DragonByte Tech 03 Jun 2012 21:03

Quote:

Originally Posted by BirdOPrey5 (Post 2336092)
Yeah, I was afraid of that... The Ajax call dbech's mod is using loads the new post, but the javascript of the showthread page was already loaded. I added the javascript code to showpost (it works fine in showpost on VB 3.8) but since it's not using the showpost as the full page the javascript isn't being loaded again.

I'm afraid I don't know how I could change this mod any further to force the javascript to reload on the AJAX call by the dbtech mod. It seems like something that would need to be initiated by their mod.

Have you tried using a different location for the Pin button? It seems very weird the whole post needs to reload on a "Like."

The reason why the whole post reloads is the fact that the whole - or part of - the post can be hidden, as well as attachments.

It ended up being too much grief to try to manually re-insert those elements into the post on button click, when the showpost.php could do it all with less hassle.

I don't know what JS code you want to load, but if you're using jQuery and its .live() or .on() functions, it works when new elements are inserted into the DOM.


Fillip

BirdOPrey5 04 Jun 2012 13:38

Thanks for the explanation Fillip.

I'm not using jquery or anything really- the Pinterest Pin button requires a block of javascript code to run to turn their static image into their button with counter. This code must run after all the static images have loaded.

I'm not even sure running it a second time will work but I hope it would.

The Pinterest JavaScript that needs to be called is this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


DragonByte Tech 04 Jun 2012 16:54

In that case I don't know if these mods will work together period D:

Does your mod work if someone uses Quick Edit on a post? I think that also refreshes the post.

What about if someone expands a deleted post?



Fillip

BirdOPrey5 05 Jun 2012 17:52

No it doesn't work after a quick edit, it needs to be reloaded... Hmmm.

Wakey 23 Jun 2012 23:40

When I click the pintrest button I get the popup to post it but when I click Pin It it just reloads the popup with a black image and no description. Nothing gets posted to my pintrest account Where as on the test sites it tells you it was successful and offers you the chance to tweet it.

Any idea whats wrong?

BirdOPrey5 24 Jun 2012 16:06

Not off hand, link to a thread?

Wakey 24 Jun 2012 23:05

Does it on all of them but here's one

http://forum.rcflightline.com/showth...?p=859#post859


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

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.