Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-06-2012, 02:12 PM
RyanFabbro's Avatar
RyanFabbro RyanFabbro is offline
 
Join Date: Aug 2012
Location: MI, USA
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default post thanks 7.7 button problom very detailed

ok so i have a very custom skin im working on, and my buttons dont use images i use css. i have my buttons exactally how i like them but when i install post thanks they mess up i came up with a fix for this issue by removing
Code:
$template_hook[postbit_controls]
from the postbit and hardcoding the button in, but the problom is with this way the thanks button still displays weather the post thanks is set to first post only, off ect ect..

i cant figure out the proper if statements to place around the button, i searched
Code:
includes/functions_post_thanks.php
and i know thats the right place, i found all of them there the only problom is i dont know how to convert those type of if statements into vB.

so unless anyone could help me come up with the proper if statements to place around the button heres the other thing i did, i left
Code:
]$template_hook[postbit_controls]
in the postbit and just edited the
Code:
Post Thank You Hack Templates>post_thanks_button
and made that the css button, but when i do these it creates a space in btween the buttons and doesnt look right.


the thing with my buttons are theyre cant be any spaces ie the code has to be all one line with every button together or else they all have spaces here is my postbit buttons code:
Code:
<!-- controls -->
		<if condition="$post['editlink']"><img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" /><a rel="nofollow" class="left pill button" href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><span class="edit icon"></span>Edit</a></if>$template_hook[postbit_controls]<if condition="$post['forwardlink']"><a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a></if><if condition="$post['replylink']"><a class="middle pill button" href="$post[replylink]" rel="nofollow"><span class="quote icon"></span>Quote</a></if><!--<if condition="$show['multiquote_post']"><a href="$post[replylink]" rel="nofollow" onclick="return false"><img src="$stylevar[imgdir_button]/multiquote_<if condition="$show['multiquote_selected']">on<else />off</if>.gif" alt="$vbphrase[multi_quote_this_message]" border="0" id="mq_$post[postid]" /></a></if>--><if condition="$show['quickreply'] AND !$show['threadedmode']"><a class="right pill button" href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><span class="kr_reply icon"></span>reply</a></if><if condition="$show['moderated']"><img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" /></if><if condition="$show['spam']"><img src="$stylevar[imgdir_misc]/spam_detected.png" alt="$vbphrase[spam_post]" border="0" /></if><if condition="$show['deletedpost']"><if condition="$show['managepost']"><a href="postings.php?$session[sessionurl]do=managepost&amp;p=$post[postid]"><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[manage]" border="0" /></a><else /><img src="$stylevar[imgdir_misc]/trashcan.gif" alt="$vbphrase[deleted_post]" border="0" /></if></if><if condition="$show['redcard']"><a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/redcard.gif" alt="$vbphrase[received_infraction]" border="0" /></a><else /><if condition="$show['yellowcard']"><a href="infraction.php?$session[sessionurl]do=view&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/yellowcard.gif" alt="$vbphrase[received_warning]" border="0" /></a></if></if>
		<!-- / controls -->
notice how compact it is, thats how i had to do it to prevent spaces like the image.
note
Code:
$template_hook[postbit_controls]
is were the thanks button will appear and that too i have squeezed into the code tight, but still it creates a space as the image shows.

here is my thanks button code
Code:
<a class="middle pill button" href="post_thanks.php?$session[sessionurl]do=post_thanks_add&amp;p=$post[postid]&amp;securitytoken=$bbuserinfo[securitytoken]" id="post_thanks_button_$post[postid]"<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_thanks_give($post[postid], <if condition="$vboptions[post_groan_integrate]">true<else />false</if>);"</if> <if condition="$display_thanks_image == 'none'">style="display:none"</if> rel="nofollow"><span class="post_thanks icon"></span>Thanks</a>
again i kept it all very tight, but i cant seem to get rid of that darn space for anything, unless i hardcode it into the postbit but i already explained the probloms with that.

sorry if this was too much i just figured the more details i could provide the better/faster responces i would get

excuse the spelling im a fast typer and dont like to look back
Attached Images
File Type: png 9-6-2012 11-05-36 AM.png (10.0 KB, 0 views)
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 06:38 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.03384 seconds
  • Memory Usage 2,237KB
  • Queries Executed 12 (?)
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
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete