View Single Post
  #572  
Old 07-21-2010, 12:30 PM
CvP's Avatar
CvP CvP is offline
 
Join Date: Aug 2006
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pete_brady View Post
sure is - can you share how you achieved this?
Quote:
Originally Posted by 10 Gauge View Post
+1

I want this!
Here's what you need to do:

first open the helpfulanswers.php in your forum root.
then comment out the lines shown in image. our objective is to always use helpful_answers_roll.

Then go to admincp > style manager > edit template > help templates > helpful_answers_roll

replace all the code in that template with this:

Code:
			
			<vb:if condition="$show['helpfulanswer']">
				<span id="helpfulanswers_box_{vb:raw post.postid}">
				<span class="seperator">&nbsp;</span>
				<vb:if condition="$show['rate_helpfulanswer']">
					<a class="rateuppost" href="./helpfulanswers.php?do=rate&postid={vb:raw post.postid}&rank=1" <vb:if condition="$vboptions[disable_ajax] != 2"> onclick="return helpfulanswers_rate({vb:raw post.postid}, 1);" </vb:if> rel="nofollow" >&nbsp;{vb:raw post.goodrank}</a>
<vb:if condition="$vboptions['helpans_neg']">
					<span class="seperator">&nbsp;</span>
					<a class="ratedownpost" href="./helpfulanswers.php?do=rate&postid={vb:raw post.postid}&rank=0" <vb:if condition="$vboptions[disable_ajax] != 2"> onclick="return helpfulanswers_rate({vb:raw post.postid}, 0);" </vb:if> rel="nofollow" >{vb:raw post.badrank}&nbsp;</a>
</vb:if>
				<vb:else />
					<vb:if condition="!$show[guest]">
						<vb:if condition="$post[yesno]">
					<span class="rateuppost_u">&nbsp;{vb:raw post.goodrank}</span>
<vb:if condition="$vboptions['helpans_neg']">
					<span class="seperator">&nbsp;</span>
					<span class="ratedownpost">&nbsp;{vb:raw post.badrank}</span>
</vb:if>
						<vb:else />
					<span class="rateuppost">&nbsp;{vb:raw post.goodrank}</span>
<vb:if condition="$vboptions['helpans_neg']">
					<span class="seperator">&nbsp;</span>
					<span class="ratedownpost_u">&nbsp;{vb:raw post.badrank}</span>
</vb:if>
						</vb:if>
					</vb:if>
				</vb:if>
				<vb:if condition="$show['guest'] AND $vboptions['helpans_guestshow']">
					<a class="rateuppost" href="./helpfulanswers.php?do=guestrate" rel="nofollow" >&nbsp;{vb:raw post.goodrank}</a>
<vb:if condition="$vboptions['helpans_neg']">
					<span class="seperator">&nbsp;</span>
					<a class="ratedownpost" href="./helpfulanswers.php?do=guestrate" rel="nofollow" >&nbsp;{vb:raw post.badrank}</a>
</vb:if>
				</vb:if>
				</span>
			</vb:if>
then go to admincp > style manager > edit template > postbit templates > postbit legacy
under
Code:
<div class="postfoot">
find
Code:
<a class="multiquote" href="{vb:raw post.replylink}" rel="nofollow" onclick="return false;" id="mq_{vb:raw post.postid}"><img id="mq_image_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase multi_quote_this_message}" />&nbsp;</a> </vb:if>
so after that </vb:if> and before </span>, add
Code:
<vb:if condition="$show['helpfulanswer']">
						{vb:raw helpful_answers}
					</vb:if>
now go to admincp > style manager > edit template > css templates > additional.css
add
Code:
.postbitlegacy .postfoot .textcontrols a.rateuppost, .postbit .postfoot .textcontrols a.rateuppost, .eventbit .eventfoot .textcontrols a.rateupevent {
background:url("images/buttons/arrow_mini_up_gray.png") no-repeat scroll left center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 0 0 20px;
color: #008000;
}
.postbitlegacy .postfoot .textcontrols a.rateuppost:hover, .postbit .postfoot .textcontrols a.rateuppost:hover, .eventbit .eventfoot .textcontrols a.rateupevent:hover {
background:url("images/buttons/arrow_mini_up_hover.png") no-repeat scroll left center transparent;
border:0 none;
padding:0 0 0 20px;
color: #008000;
}

.postbitlegacy .postfoot .textcontrols a.ratedownpost, .postbit .postfoot .textcontrols a.ratedownpost, .eventbit .eventfoot .textcontrols a.ratedownevent {
background:url("images/buttons/arrow_mini_down_gray.png") no-repeat scroll right center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 20px 0 0;
color: #800000;
}
.postbitlegacy .postfoot .textcontrols a.ratedownpost:hover, .postbit .postfoot .textcontrols a.ratedownpost:hover, .eventbit .eventfoot .textcontrols a.ratedownevent:hover {
background:url("images/buttons/arrow_mini_down_hover.png") no-repeat scroll right center transparent;
border:0 none;
padding:0 20px 0 0;
color: #800000;
}

.postbitlegacy .postfoot .textcontrols span.rateuppost, .postbit .postfoot .textcontrols span.rateuppost {
background:url("images/buttons/arrow_mini_up.png") no-repeat scroll left center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 0 0 20px;
color: #008000;
}

.postbitlegacy .postfoot .textcontrols span.ratedownpost, .postbit .postfoot .textcontrols span.ratedownpost {
background:url("images/buttons/arrow_mini_down.png") no-repeat scroll right center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 20px 0 0;
color: #800000;
}
.postbitlegacy .postfoot .textcontrols span.rateuppost_u, .postbit .postfoot .textcontrols span.rateuppost_u {
background:url("images/buttons/arrow_mini_up_hover.png") no-repeat scroll left center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 0 0 20px;
color: #008000;
}

.postbitlegacy .postfoot .textcontrols span.ratedownpost_u, .postbit .postfoot .textcontrols span.ratedownpost_u {
background:url("images/buttons/arrow_mini_down_hover.png") no-repeat scroll right center #E9E9E9;
border:0 solid #A8A8A8;
padding:0 20px 0 0;
color: #800000;
}
Finally, go to admincp > options > helpful options > enable manual placement.

I have only checked it in legacy postbit.
if you make the similar change in regular postbit, it should work.


NOTE: This layout is NOT for "ten-based" rating.

Please remember to backup your database before trying. and I'm not responsible if anything goes wrong.


edit: you need to extract the arrow_mini.zip in /images/buttons directory.
Attached Images
File Type: jpg Capture.jpg (103.9 KB, 0 views)
Attached Files
File Type: zip arrow_mini.zip (18.3 KB, 17 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01206 seconds
  • Memory Usage 1,827KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)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
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete