vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Private Messages Enhancements - User PM Search (https://vborg.vbsupport.ru/showthread.php?t=149609)

thaki 10-03-2007 03:13 AM

It's work but when I install it the error happen in main search for threads and post

Quote:

Parse error: parse error, unexpected ',' in /home/abaunet/public_html/vb/search.php(1958) : eval()'d code on line 1
???

Silviu 10-12-2007 08:23 AM

Installed the mod and love it, but some of our users recently started reporting that both Search functions are inoperable. If they try to use them, they get the following errors:

Search by Username:

Quote:

Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT pm.*, pmtext.*
, icon.title AS icontitle, icon.iconpath
FROM pm AS pm
LEFT JOIN pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
LEFT JOIN icon AS icon ON(icon.iconid = pmtext.iconid)
WHERE pm.userid=4877
AND pm.folderid= AND fromuserid IN (618, 17103, 17921, 29550, 31022, 31200, 37237, 43083, 56188, 59939, 61094, 64280, 73683, 87463, 95220)
ORDER BY pmtext.dateline DESC;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND fromuserid IN (618, 17103, 17921, 29550, 31022, 31200, 37237, 43083, 56188, ' at line 7
Error Number : 1064
Date : Friday, October 12th 2007 @ 12:19:38 PM
Script : http://forum.computergames.ro/private.php?folderid=0
Referrer : http://forum.computergames.ro/private.php
IP Address : 193.111.120.28
Username : Bossman
Classname : vB_Database_MySQLi

Normal search:

Quote:

Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT pm.*, pmtext.*
, icon.title AS icontitle, icon.iconpath
FROM pm AS pm
LEFT JOIN pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
LEFT JOIN icon AS icon ON(icon.iconid = pmtext.iconid)
WHERE pm.userid=4877
AND pm.folderid= AND MATCH(pmtext.title, pmtext.message) AGAINST ('+moderator' IN BOOLEAN MODE)
ORDER BY pmtext.dateline DESC;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND MATCH(pmtext.title, pmtext.message) AGAINST ('+moderator' IN BOOLEAN MODE)
' at line 7
Error Number : 1064
Date : Friday, October 12th 2007 @ 12:22:57 PM
Script : http://forum.computergames.ro/private.php?folderid=0
Referrer : http://forum.computergames.ro/private.php
IP Address : 193.111.120.28
Username : Bossman
Classname : vB_Database_MySQLi

Any ideas why this is happening?

From what I can tell, there seems to be a problem with the pm.folderid= bit in the query :eek:

Thaliada 10-12-2007 10:43 AM

That is indeed the problem, actually
Code:

if(!isset($_GET['folderid']) || trim($_GET['folderid']) == '') $_GET['folderid'] = 0;
should take care of this problem, but as i see now, i forgott to change
Code:

AND pm.folderid=" . mysql_real_escape_string($_GET['folderid']) . " ";
it in the query later on...

Sry just change
Code:

AND pm.folderid=" . mysql_real_escape_string($_GET['folderid']) . " ";
with
Code:

AND pm.folderid=" . mysql_real_escape_string($search_folderid) . " ";
That should fix this problem.

Silviu 10-12-2007 01:20 PM

I assume these changes need to be done in the XML before importing it, right?

AWJunkies 10-13-2007 02:39 AM

This should be in VB as default VERY GOOD MOD!

Illustrious 10-13-2007 04:29 AM

This is a great mod. I wonder how much resources this uses on the server. Also, can you add usergroup permissions for this?

/me installs and nominates.

Silviu 10-14-2007 07:45 AM

Quote:

Originally Posted by Thaliada (Post 1358164)
Sry just change
Code:

AND pm.folderid=" . mysql_real_escape_string($_GET['folderid']) . " ";
with
Code:

AND pm.folderid=" . mysql_real_escape_string($search_folderid) . " ";
That should fix this problem.

Well, I applied this fix to the xml, re-imported it with Overwrite on, but the error still persists :(

trackpads 10-16-2007 12:08 AM

Nice Hack!

I have one problem, I am using the show avatars in PM list mod and the search results breaks the rows as show in the screenie. Here is my pmbitlsit template. Any ideas?

Thanks!

-Jason


Code:


<tr>
        <td class="alt1"><img src="$stylevar[imgdir_statusicon]/pm_$pm[statusicon].gif" alt="" border="0" /></td>
        <td class="alt2"><img src="$vboptions[bburl]/image.php?u=$userid" width="50" height="50"></td>
        <td class="alt1Active" id="m$pm[pmid]" width="100%">
                <div>
                        <span style="float:$stylevar[right]" class="smallfont">$pm[senddate]</span>
<if condition="$pm['attach']"><img class="inlineimg" src="$stylevar[imgdir_misc]/paperclip.gif" alt="<phrase 1="$pm[attach]">$vbphrase[x_attachments]</phrase>" /></if>
                        <a href="private.php?$session[sessionurl]do=showpm&amp;pmid=$pm[pmid]"><if condition="$show['unread']"><strong>$pm[title]</strong><else />$pm[title]</if></a>
                </div>
                <div class="smallfont">
                        <span style="float:$stylevar[right]" class="time">$pm[sendtime]</span>
                        <if condition="$show['unread']"><strong>$userbit</strong><else />$userbit</if>
                </div>
       
        </td>
        <if condition="$show['pmcheckbox']"><td class="alt2" align="center" style="padding:0px"><input type="checkbox" name="pm[$pmid]" value="$groupid" /></td></if>
</tr>


Acedeal 10-20-2007 10:11 PM

Get's an error what installed
Code:

Database error in vBulletin 3.6.7:

Invalid SQL:

                        SELECT pm.*, pmtext.*
                                , icon.title AS icontitle, icon.iconpath
                        FROM vb3_pm AS pm
                        LEFT JOIN vb3_pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
                        LEFT JOIN vb3_icon AS icon ON(icon.iconid = pmtext.iconid)
                        WHERE pm.userid=94
                        AND pm.folderid=0  AND MATCH(pmtext.title, pmtext.message) AGAINST ('+scuba' IN BOOLEAN MODE)
                        ORDER BY pmtext.dateline DESC;

MySQL Error  : The used table type doesn't support FULLTEXT indexes
Error Number : 1214
Date        : Saturday, October 20th 2007 @ 06:02:52 PM
Script      : http://forum.xxxxx.com/private.php?folderid=0
Referrer    : http://forum.xxxxx.com/private.php
IP Address  : 68.xx.xx.xx
Username    : nxx
Classname    : vB_Database


the Sandman 10-24-2007 10:32 PM

It took me a while, but I figured out how to get this to work with MySQLi. It will also still work with MySQL, so it probably should be substituted into the plug-in for all users.

Find:
PHP Code:

AND pm.folderid=" . mysql_real_escape_string($_GET['folderid']) . " "; 

or, if you've already made the change mentioned in Post #103:
PHP Code:

AND pm.folderid=" . mysql_real_escape_string($search_folderid) . " "; 

And replace it with:
PHP Code:

AND pm.folderid=" . $db->escape_string($search_folderid) . " "; 



All times are GMT. The time now is 06:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01401 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete