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)
-   -   Integration with vBulletin - Pinterest Sharing System by BOP5 for VB 3.8 & VB 4.x! (Pinterest Pin Button Mod) (https://vborg.vbsupport.ru/showthread.php?t=281444)

pete_brady 04-17-2012 07:42 PM

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 04-17-2012 08:56 PM

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 04-17-2012 10:26 PM

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 04-17-2012 10:54 PM

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:

Code:

{vb:raw template_hook.postbit_bop_pinterest}
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 04-19-2012 03:44 PM

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

BirdOPrey5 04-19-2012 04:04 PM

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

keng 04-19-2012 08:48 PM

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

Thank you

BirdOPrey5 04-19-2012 09:51 PM

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 04-20-2012 06:33 PM

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 04-20-2012 07:38 PM

It will always redirect to your forum.

brandon515 04-20-2012 09:15 PM

Awesome, thx. Installed.

Also installed Facebook mod.

jdougher 04-21-2012 11:55 AM

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 04-21-2012 01:29 PM

Are they inline attachments?

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

doctorsexy 04-22-2012 05:26 PM

Works great..thanks

Dwarden 04-25-2012 02:28 AM

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 04-25-2012 04:30 AM

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 04-25-2012 12:57 PM

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 04-25-2012 12:59 PM

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 04-25-2012 01:10 PM

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 04-25-2012 01:41 PM

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

BirdOPrey5 04-26-2012 11:27 AM

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 04-26-2012 05:48 PM

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 04-26-2012 05:53 PM

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 04-26-2012 06:03 PM

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 04-26-2012 10:06 PM

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 05-01-2012 03:18 PM

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

woffie 05-02-2012 09:57 AM

Great mod thanks!

carsafety 05-02-2012 07:03 PM

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 05-04-2012 07:14 AM

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

BlessedFWI 05-05-2012 12:22 AM

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

RichieBoy67 05-07-2012 11:17 PM

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

Thanks,
Rich

datoneer 05-08-2012 09:52 AM

Works great on 4.1.10. Thanks BOP5. Another awesome mod

CaneInsider 05-19-2012 07:57 PM

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 05-19-2012 08:10 PM

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 05-20-2012 12:01 PM

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 05-20-2012 02:02 PM

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:
Code:

{vb:raw template_hook.postbit_userinfo_right}
Then you may need to edit the postbit_pinterest_vb4 template as well to get it to display properly.

juliannova 05-22-2012 01:50 AM

has the album version been included yet? in version 1.01

BirdOPrey5 05-22-2012 01:05 PM

no.

tpearl5 05-22-2012 02:51 PM

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

tpearl5 05-22-2012 06:05 PM

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:
HTML Code:

<vb:if condition="$post['fieldX'] != 'No'">{vb:raw template_hook.postbit_bop_pinterest}</vb:if>
Change X to the number of your custom field. Mine is 15 so it looks like this: $post['field15']


All times are GMT. The time now is 02:27 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.01375 seconds
  • Memory Usage 1,831KB
  • 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
  • (1)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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