Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
  #1  
Old 09-08-2011, 08:29 PM
tekmaster tekmaster is offline
 
Join Date: Sep 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default have share buttons (fb/google/etc) next to reply button?

I'm having a difficult time trying to get the share buttons to be directly next to the reply button and have them properly lined up, especially in different browsers. Could anyone help me with this?
Reply With Quote
  #2  
Old 09-08-2011, 08:48 PM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That should not be difficult at all, can you post your code, demo, or a screenshot so we can see what's the problem?
Reply With Quote
  #3  
Old 09-08-2011, 09:23 PM
tekmaster tekmaster is offline
 
Join Date: Sep 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Frosty View Post
That should not be difficult at all, can you post your code, demo, or a screenshot so we can see what's the problem?
sure,

I inserted the code in SHOWTHREAD, and in ff I want to try and line them up better and also in IE some buttons is slightly higher than the other and in all browsers google plus is just way out there lol
Code:
	<div id="above_postlist" class="above_postlist">
		<vb:if condition="$show['largereplybutton']">
			<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" 
class="newcontent_textcontrol"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
			<img style="display:none" id="progress_newreplylink_top" src="{vb:stylevar imgdir_misc}/progress.gif"  alt="" /> 
		</vb:if> <style> 
				   		html .fb_share_button { display: -moz-inline-block; display:inline-block; padding:1px 5px 0px 20px; height:15px; margin: 10px 0px 30px 10px; solid #d8dfea; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top left; font-size:12px; color:#ffffff;} 
						html .fb_share_button:hover { color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top left; text-decoration:none; } 
                        html .fb_like_button { margin: 5px 0px px 0px;} 
                        </style> 
                   <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>

				   
                   <a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" class="fb_share_button" onClick="return fbs_click()" target="_blank" style="text-decoration:none;">分享</a> <script src="http://connect.facebook.net/zh_TW/all.js#xfbml=1"></script>&nbsp;<fb:like href="http://www.domainname.com/{vb:raw relpath}" layout="button_count" show_faces="false" width="450" font=""></fb:like>
<!-- Place this tag where you want the +1 button to render -->
<div class="g-plusone" data-size="medium"></div>

<!-- Place this render call where appropriate -->
<script type="text/javascript">
  window.___gcfg = {lang: 'zh-TW'};

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>
Attached Images
File Type: jpg share-buttons-reply.jpg (24.3 KB, 0 views)
Reply With Quote
  #4  
Old 09-08-2011, 09:36 PM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<div id="above_postlist" class="above_postlist">
<
div style="float:left">
<
vb:if condition="$show['largereplybutton']">
<
div style="padding-right:5px">
<
a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}newreply.php?{vb:raw session.sessionurl}p={vb:raw LASTPOSTID}&amp;noquote=1" 
class="newcontent_textcontrol"><vb:if condition="$show['closethread']"><span>+</span> {vb:rawphrase reply_to_thread}<vb:else />{vb:rawphrase closed_thread}</vb:if></a>
<
img style="display:none" id="progress_newreplylink_top" src="{vb:stylevar imgdir_misc}/progress.gif"  alt="" /> 
</
div>
</
vb:if> 
<
style
html .fb_share_button display: -moz-inline-blockdisplay:inline-blockpadding:1px 5px 0px 20pxheight:15pxmargin10px 0px 30px 10pxsolid #d8dfea; background:url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top left; font-size:12px; color:#ffffff;} 
html .fb_share_button:hover color:#fff; border-color:#295582; background:#3b5998 url(http://static.ak.facebook.com/images/share/facebook_share_icon.gif?6:26981) no-repeat top left; text-decoration:none; } 
html .fb_like_button margin5px 0px px 0px;} 
</
style
<
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>
<
div style="padding-right:5px">
<
a rel="nofollow" href="http://www.facebook.com/share.php?u=<;url>" class="fb_share_button" onClick="return fbs_click()" target="_blank" style="text-decoration:none;">??</a> <script src="http://connect.facebook.net/zh_TW/all.js#xfbml=1"></script>&nbsp;<fb:like href="http://www.domainname.com/{vb:raw relpath}" layout="button_count" show_faces="false" width="450" font=""></fb:like>
</
div>
<
div style="padding-right:5px">
<
div class="g-plusone" data-size="medium"></div>
</
div>
<
script type="text/javascript">
  
window.___gcfg = {lang'zh-TW'};
  (function() {
    var 
po document.createElement('script'); po.type 'text/javascript'po.async true;
    
po.src 'https://apis.google.com/js/plusone.js';
    var 
document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pos);
  })();
</
script>
</
div>
<
div style="clear:left"></div
It probably ain't perfect, but you can try it and let me know how it goes!
Reply With Quote
  #5  
Old 09-08-2011, 09:48 PM
tekmaster tekmaster is offline
 
Join Date: Sep 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hm wasn't successful, it made the 2 other buttons push down and one of them hidden
Reply With Quote
  #6  
Old 09-08-2011, 09:58 PM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, most likely because of the Facebook button, as it has its own style... Will the button work if you change its style attributes? I'm not sure because I don't use social network buttons and stuff.
Reply With Quote
  #7  
Old 09-08-2011, 10:06 PM
tekmaster tekmaster is offline
 
Join Date: Sep 2010
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if the style attributes are modified then yeah, mainly I was just wondering if that is the correct place to insert the code for the buttons, however the google plus button right now is what the bigger issue is. Since it requires a minimum width, it spaces it out and sticks the google plus button in the center of the screen

**Also I just realized I made this thread in the wrong category....
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 05:52 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04036 seconds
  • Memory Usage 2,269KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete