Bug Bookmark post doesn't work unless Bookmark Thread is also enabled.

Status
Not open for further replies.
Website
https://pistol-forum.com
Product version
1.1.3
Forum version
vBulletin 4.2.x
#1
I wanted to have Can Bookmark Threads set to No and Can Bookmark Posts set to Yes, but when doing so, despite the bookmark icon/button showing on posts, it doesn't do anything when clicked. If I set Can Bookmark Threads back to Yes then the bookmark post icon/button does work.

My skin is essentially the default skin with stylevar changes to alter the appearance; however, the same behavior is seen when using the unaltered default style.

Is this expected behavior or a bug?
 
#3
Thank you!

This probably isn't the best way to do it, but a patch like this applied to upload/dbtech/bookmark/hooks/showthread_complete.php appears to fix the issue:

Code:
--- dbt/showthread_complete.php	2017-03-05 09:56:43.000000000 -0700
+++ thj/showthread_complete.php	2017-03-05 10:00:58.000000000 -0700
@@ -1,19 +1,26 @@
 <?php
-if ($vbulletin->userinfo['userid'] AND ($vbulletin->userinfo['permissions']['dbtech_bookmarkpermissions'] & $vbulletin->bf_ugp_dbtech_bookmarkpermissions['canbookmarkthread']))
+if ($vbulletin->userinfo['userid'] AND
+		(
+			($vbulletin->userinfo['permissions']['dbtech_bookmarkpermissions'] & $vbulletin->bf_ugp_dbtech_bookmarkpermissions['canbookmarkthread']) OR
+			($vbulletin->userinfo['permissions']['dbtech_bookmarkpermissions'] & $vbulletin->bf_ugp_dbtech_bookmarkpermissions['canbookmarkpost'])
+		)
+	)
 {
+	if ($vbulletin->userinfo['permissions']['dbtech_bookmarkpermissions'] & $vbulletin->bf_ugp_dbtech_bookmarkpermissions['canbookmarkthread'])
+	{
 	$templater = vB_Template::create('dbtech_bookmark_thread');
 		$templater->register('threadid', $thread['threadid']);
 		$templater->register('hasBookmarked', (int)is_array($db->query_first_slave("
 			SELECT userid
 			FROM " . TABLE_PREFIX . "dbtech_bookmark_entry
 			WHERE contenttype = 'thread'
 				AND contentid = '" . intval($thread['threadid']) . "'
 				AND userid = '" . intval($vbulletin->userinfo['userid']) . "'
 		")));
 	$template_hook['showthread_above_posts'] .= $templater->render();
-
+	}
 
 	// Begin list of JS phrases
 	$jsphrases = array(
 		'dbtech_bookmark_bookmark_thread'	=> $vbphrase['dbtech_bookmark_bookmark_thread'],
 		'dbtech_bookmark_unbookmark_thread'	=> $vbphrase['dbtech_bookmark_unbookmark_thread'],
 

Belazor

Staff member
Owner
Developer
Customer
#4
I had problems applying the .patch file but I manually integrated the changes for you in the current release. Thank you :)
 

DragonByte Technologies

Company Information
Staff member
Company Info
#5
Hello thj,

This ticket has now been closed with the status Fixed.

We hope your issue or question has been addressed to your satisfaction. If not, please feel free to re-open it by clicking this link.

If you have any further issues or questions, please feel free to start a new support ticket via the button at the top of every page.

Thank you!
 
Status
Not open for further replies.

Thread / Post Bookmarking

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
6
Customer rating
0.00 star(s) 0 ratings
Top