Status
Not open for further replies.

benFF

Customer
I've set it so the buttons appear in the main postbit, rather than in the bar underneath.

However, that bar appears under every post, even if no thanks/likes/whatever have been given. I see it needs to be there to include the javascript, but if I've got the buttons up top - then I think the JS should go up there and the bar hidden until it has something to fill it.

As it is now, I've just got loads and loads of blank bars!
 
That is not a bug, it's required for the mod to function :)

That bar holds the area where the button clicks go in, and without it I would need to send much more data back with each button click than I currently have to :)
 
It's used for displaying any errors that may have occurred when clicking a button. It cannot be removed without potentially damaging the operation of the mod.
 
That is not a bug, it's required for the mod to function :)

That bar holds the area where the button clicks go in, and without it I would need to send much more data back with each button click than I currently have to :)

Hmm... but it looks terrible, loads and loads of empty boxes.

Why not just put it in a div and set the visibility to hidden, only showing it when a button is clicked (or it has data already in it)? (Like Abe's one does ;))

Without that feature, it kinda defeats the object of putting the buttons up top....
 
Last edited:
We have gotten a lot of feedback on the display method we use and will add new options to it for a future version :)
 
Hi Fillip H.,

Is that likely to be soon, or we looking at weeks / months. I've already had a load of complaints about it, so I'm going to have to get it coded in myself if it's not on the horizon... :)
 
Hi Fillip H.,

Is that likely to be soon, or we looking at weeks / months. I've already had a load of complaints about it, so I'm going to have to get it coded in myself if it's not on the horizon... :)

You'll be looking at weeks/months unfortunately.APTL is pencilled in to be the next core mod to receive a large update though, but the immediate work is finishing the current update cycle (which is ending with vBShop v2.1 later this month), and then doing a new product cycle.

If i was to guesstimate - and it is just that, not a guarantee by any means, i'd say APTL will probably get an update late June/early July if nothing unexpected pops up. It could be a little earlier if space opens up, or later if development time on something is longer than we anticipate.
 
benFF: If you get round to do it yourself, please post the solution here as I am waiting for this to be done for months now and this is the only thing that I do not like about this mod. This bar looks horrible :/
 
Ok, here you go:

Edit template dbtech_thanks_postbit_entries

Under the line:
PHP:
<if condition="$show['dbtech_thanks_area']">

Add the following:
PHP:
<div id="dbtech_thanks_block_{$post[postid]}" <if condition="$entries==false">style="display:none;"</if>>

Now go to the bottom, and ABOVE the line:
PHP:
</if>

Add the following:
PHP:
</div>


Now to edit the javascript - open the file dbtech/thanks/clientscript/thanks.js

ABOVE the line:
PHP:
YAHOO.util.Dom.get('dbtech_thanks_entries_' + this.postid).innerHTML = (entries[0].firstChild ? entries[0].firstChild.nodeValue : '');

Add the following:
PHP:
YAHOO.util.Dom.get('dbtech_thanks_block_' + this.postid).style.display = "block";

All done :)
 
If you really want to streamline it, replace everything in dbtech_thanks_postbit_entries

With:

PHP:
<if condition="$show['dbtech_thanks_area']">
<div id="dbtech_thanks_block_{$post[postid]}" <if condition="$entries==false">style="display:none;"</if>>
<table class="tborder" style="margin-top: 3px;" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">	
	<td class="alt1" id="dbtech_thanks_entries_{$post[postid]}" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">	
		{$entries}
	</td>
	<script type="text/javascript">
	<!-- 
	var Thanks{$post[postid]} = new Thanks_Obj();
	Thanks{$post[postid]}.init('{$post[postid]}');
	// -->
	</script>
</tr>
</table>
</div>
</if>

Or if you prefer to have the boxes joined together:

PHP:
<if condition="$show['dbtech_thanks_area']">
<div id="dbtech_thanks_block_{$post[postid]}" <if condition="$entries==false">style="display:none;"</if>>
<table class="tborder" style="border-top: 0px;" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">	
	<td class="alt1" id="dbtech_thanks_entries_{$post[postid]}" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">	
		{$entries}
	</td>
	<script type="text/javascript">
	<!-- 
	var Thanks{$post[postid]} = new Thanks_Obj();
	Thanks{$post[postid]}.init('{$post[postid]}');
	// -->
	</script>
</tr>
</table>
</div>
</if>

---------- Post added 30th January 2012 at 01:33 ---------- Previous post was 11th May 2011 at 20:12 ----------

The coding for this has changed with version 2.

Template instructions in post 10 are still correct (http://www.dragonbyte-tech.com/f37/post-thanks-like-bar-shown-when-not-needed-3501/#post19908)

So an edit on a default dbtech_thanks_postbit_entries would make it look like this (the bottom actions bit has been removed as it wouldn't be used with this format)

PHP:
<if condition="$show['dbtech_thanks_area']">
<div id="dbtech_thanks_block_{$post[postid]}" <if condition="$entries==false">style="display:none;"</if>>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
	<td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-$stylevar[right]: 0px padding-$stylevar[right]: 6px">
		{$vbphrase[dbtech_thanks_post_thanks_like]}
	</td>
</tr>
<tr valign="top">	
	<td class="alt1" id="dbtech_thanks_entries_{$post[postid]}" style="border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">	
		{$entries}
	</td>
</tr>
</table>
</div>
</if>

But the javascript edit has changed to:

Now to edit the javascript - open the file dbtech/thanks/clientscript/thanks.js

UNDER the line:
PHP:
$('#dbtech_thanks_actions_' + postid).html(data.actions);

ADD the following:
PHP:
$('#dbtech_thanks_block_' + postid).show();
 
Last edited:
This just stops the "X likes this post" box being shown all the time, it will only show up when there is actually something in it.
 
Status
Not open for further replies.

Legacy Advanced Post Thanks / Like

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,033
Customer rating
5.00 star(s) 1 ratings
Back
Top