Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Mar 2013, 09:00
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Question Facebook like button in first post

Hi, I would like to put the facebook like button on top of the first posting, so beneath the title or at the end of the first post instead of having it on top of the whole thread. How can I do that?
__________________
Verkackeiert...
Reply With Quote
  #2  
Old 02 Mar 2013, 22:15
ROTPAR ROTPAR is offline
 
Join Date: May 2004
nobody?
__________________
Verkackeiert...
Reply With Quote
  #3  
Old 05 Mar 2013, 22:41
ROTPAR ROTPAR is offline
 
Join Date: May 2004
ok, last try....can nobody hlep me out with this?
__________________
Verkackeiert...
Reply With Quote
  #4  
Old 06 Mar 2013, 01:42
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Hi ROTPAR - looks like a template edit to me. In SHOWTHREAD, find:


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

And put it in postbit. You'll probably need a conditional for post # in thread == 1, otherwise it'll show in/under every post
Reply With Quote
  #5  
Old 06 Mar 2013, 10:10
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Hi there, thank you What do you mean with the condition? What do I have to write? Thanks a lot
__________________
Verkackeiert...
Reply With Quote
  #6  
Old 06 Mar 2013, 11:49
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Hmm, this may sort of be like the blind leading the blind, but let me give it a shot

Try this in postbit_legacy and let me know how it works:


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

Within postbit_legacy, just search around for a good spot (like maybe after the infractions link?) Or maybe after this part:


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

By the way, there is another conditional called <vb:if condition="$post['isfirstshown']">, but I think that's going to repeat for each page, so try the first one and let me know if that works okay
Reply With Quote
  #7  
Old 07 Mar 2013, 14:40
ROTPAR ROTPAR is offline
 
Join Date: May 2004
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

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

</vb:if>
THX After placing this code in postbit_legacy vbulletin tells me that the code is not ok... can'T translate it. Any ideas?
__________________
Verkackeiert...
Reply With Quote
  #8  
Old 07 Mar 2013, 14:53
findingpeace's Avatar
findingpeace findingpeace is offline
 
Join Date: Nov 2011
Hmm, can you try this instead:


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

This will show on the first post of each page, but I'm sure we can figure out a way to ensure only page 1 I just want to make sure it's the conditional breaking, not anything else. So let me know if that works!

If it doesn't, we may need to register fblikebutton to postbit_legacy, in which case you're going to want the help of someone who understands hooks
Reply With Quote
  #9  
Old 07 Mar 2013, 15:16
ROTPAR ROTPAR is offline
 
Join Date: May 2004
To get it on the first port, I tried this:
http://www.vbulletin.com/forum/forum...b-like-button?

but placing the likebutton code in there, shows just nothing

--------------- Added 07 Mar 2013 at 15:43 ---------------

the problem seems to be this code:

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

This code does not work in postbit_legacy....how could I get it to work there?
__________________
Verkackeiert...
Reply With Quote
  #10  
Old 07 Mar 2013, 16:32
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Unless you write a plugin to register the variable $fblikebutton to the template postbit_legacy, it isn't going to spit anything out.

Cellarius wrote a really good article that you may be interested in - [vB4] Rendering templates and registering variables - a short guide
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #11  
Old 08 Mar 2013, 07:05
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Thank you Lynne, the problem is, that I am not that good in programming, I can copy and paste some stuff but that's it. Is there anybody who could explain how to register this variable?
__________________
Verkackeiert...
Reply With Quote
  #12  
Old 08 Mar 2013, 18:49
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
He tells you the line right at the end of the article.


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

__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #13  
Old 08 Mar 2013, 19:11
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Thank you for your help Lynne and please don't mind but I just don'T understand where I have to put this code, I am not a coder Sorry for bothering.
__________________
Verkackeiert...
Reply With Quote
  #14  
Old 09 Mar 2013, 20:00
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You would need to put it in a plugin - one that is right after the variable is defined - perhaps the showthread_complete hook location would work.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #15  
Old 11 Mar 2013, 15:13
ROTPAR ROTPAR is offline
 
Join Date: May 2004
Hmmm, can anybody tell me step by step what I have to put where please?
__________________
Verkackeiert...
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:44.

Layout Options | Width: Wide Color: