The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm having an issue with sphinx search when finding posts by a user. I have a thread that was marked as a soft delete (thread.visible = 2) but the posts inside that thread were not soft deleted (post.visible = 1). The problem I'm seeing is that if I then run a find post by user search those soft deleted posts don't show up in the output even though in the DB I can see that that postid is set to visible = 1. So I'm not really seeing ALL the posts for that user. Anybody experienced something like this?
Danny |
|
#2
|
|||
|
|||
|
I think i found the solution to my problem. Seemed like for super mod, mod and admin account types soft deletes would still display using vbsearch when doing find post/thread by users but since sphinx does not index soft deletes they'd never show up on the output when converted to sphinx search. To remedy that I modified search_sphinx.php with the following:
near the top after Code:
// admin only mode
#if ($vbulletin->userinfo['userid'] != 1) die('Search not available at the moment.');
// finduser
if ($_REQUEST['do'] == 'finduser')
{
Code:
// My code *******************************************************
// Don't do sphinx search for admins, mods and super mods
if ($vbulletin->userinfo['usergroupid'] == 5 || $vbulletin->userinfo['usergroupid'] == 6 || $vbulletin->userinfo['usergroupid'] == 7) {
return true;
}
// Checking to see if user is member of admin, mod, super mods
$ccGroupList = explode(",", $vbulletin->userinfo['membergroupids']);
foreach($ccGroupList as $ccGroupID) {
if ($ccGroupID == 5 || $ccGroupID == 6 || $ccGroupID == 7) {
return true;
}
}
// End of my code ***************************************************
// search timer
$searchstart = microtime();
Danny |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|