Status
Not open for further replies.

Trekkan

Customer
At the bottom of each post where the buttons are listed, there is the template for showing how many thanks/likes a post has.

I have a forum where I only want two buttons listed, those buttons show fine, but the above section looks like this:

Post Thanks / Like - 0 Thanks, 0 Likes, 0 Dislikes, 0 Approvals, 0 Denials

But only Approvals and Denials are buttons that are available
 
I'm not sure what you mean by Thread Display, if you mean showthread.php then I'm unable to replicate this issue.

The code snippet that controls that text is
PHP:
	$extrainfo = array();
	if ($this->registry->options['dbtech_thanks_displayextrainfo'])
	{
		foreach ((array)THANKS::$cache['button'] as $button)
		{
			if (!$button['active'])
			{
				// Skip this button
				continue;
			}
			
			// Store buttons by varname
			$extrainfo[] = intval(THANKS::$entrycache['count'][$contentid][$button['varname']]) . ' ' . $button['title'];
		}
	}
in /dbtech/thanks/hooks/postbit_display_complete.php - around line 217.

If yours doesn't have that, you should try re-uploading the files :)
 
Ok, I have that code starting on line 246, however I do have the problem still.

If you visit this page: GuildWars 2 Application: SoupFlies

You might be able to see the issue. I say might, because you probably won't have the usergroup to see the buttons (there should be an approve and a deny button if you do). BUt it still might show the display I'm talking about.

Currently it says "Post Thanks / Like - 0 Thanks, 0 Likes, 0 Dislikes, 1 Approvals, 0 Denials"

But I think it should look like: "Post Thanks / Like - 1 Approvals, 0 Denials".

I could have something not set right, but I haven't figured out what that might be.
 
Yep, here's a SS

aptl_bug.webp

Like I said, the buttons do not display, just the one line with the click counts, includes them.
 
No, that's not what I meant, the code snippet only excludes buttons that are fully disabled.
 
Update: Try changing the above snippet to
PHP:
	$extrainfo = array();
	if ($this->registry->options['dbtech_thanks_displayextrainfo'])
	{
		foreach ((array)THANKS::$cache['button'] as $button)
		{
			if (!$button['active'])
			{
				// Skip this button
				continue;
			}

			if ((int)$this->registry->forumcache[$noticeforum]['dbtech_thanks_disabledbuttons'] & (int)$button['bitfield'])
			{
				// Button was disabled for this forum
				continue;
			}
							
			if (((int)$this->registry->forumcache[$noticeforum]['dbtech_thanks_firstpostonly'] & (int)$button['bitfield']) AND 
				$thread['firstpostid'] != $this->post['postid']
			)
			{
				// First Post Only
				continue;
			}			
	
			// Store buttons by varname
			$extrainfo[] = intval(THANKS::$entrycache['count'][$contentid][$button['varname']]) . ' ' . $button['title'];
		}
	}
and see if that works and doesn't cause any other issues.
 
Status
Not open for further replies.

Similar threads

Legacy Advanced Post Thanks / Like

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