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)

TheMilkCarton 07-28-2007 05:02 PM

I'm sorry.. I had other code elsewhere in the plugin. :o

Code:

if($vbulletin->options['pm_preview'] AND $vbulletin->userinfo['pmpreview'])
{
    $prvmessage = htmlspecialchars_uni($pm['message']);
    if($vbulletin->options['pm_preview_strip_quotes'])
    {
        $prvmessage = strip_quotes($prvmessage);
    }
    $prvmessage = strip_bbcode($prvmessage);
   
    if(strlen($prvmessage) > $vbulletin->options['pm_preview'] AND $vbulletin->options['pm_preview'] != -1)
    {
        $prvmessage = fetch_trimmed_title($prvmessage, $vbulletin->options['pm_preview']);
    }
    $prvmessage = fetch_censored_text($prvmessage);
   
    eval('$pmpreview = "' . fetch_template('pm_preview') . '";');
}

Copy that above the same location I said in my first post.

I updated my original post to prevent any further confusion.

I apologize.. I was in the middle of simplifying the code, as I don't want my users having the option to turn the preview on/off. So I had disabled all the PM Preview plugins but two (cache_templates and private_messagelist_messagebit) and was using different code. :)

Dannyloski 07-28-2007 05:40 PM

Ahhh I see, thank you :) :up: Now it works with the new code ...

COBRAws 08-10-2007 06:25 PM

Quote:

Originally Posted by SirFlash (Post 1289405)
Thaliada, yes, the first line of the php code plugin does indeed start with that code.

The other pm plugins i have installed are:
Calculate Percentage of PM Quota Used

I don't think this will be useful, but i also had installed at one point Private Message Attachments v1.53 but then i uninstalled it completely because it wasn't compatible. I tried uninstalling and re-installing PM search after this but i still get the same SQL error.

I also installed vbAnonymyzer, version 2.5, which basically works to change URL's, but i disabled this plugin and tried getting PM Search to work, and same prob again. I didn't update to vbanon 2.7 yet but i don't think that would fix the problem.

Any ideas what the conflict may be?


I have the same problem as you have, but non of the other installd hacks you say.

I'll wait until someone can fix this. Maybe its just an execution order to be edited in a plugin.

MrZeropage 08-12-2007 08:56 PM

really good thing, but I think it should get an extra-page in the userCP and a new option "search PMs" in the leftside menu to make the inbox less confusing :)

Alfa1 08-13-2007 10:06 AM

Is there a template modification system XML for this add on? This would reduce the install time to 30 seconds and prevent errors in the template modifications.

COBRAws 08-23-2007 04:26 PM

Still no fixes? :(

formunda 08-25-2007 03:12 PM

Thanks this is great :D

Ekka 08-26-2007 04:45 AM

I skimmed through this and didn't find the answer to a question I have.

I have 3.6.8 and in the default VB board inbox PM's can be put into folders but you cannot do that with SENT PM's. Bit weird I know, have posted such over at Vb.

http://www.vbulletin.com/forum/showthread.php?t=239961

Does this hack allow me to set up folders or put PM's in a folder if they are SENT PM's?

Thanks

Carlos2 09-03-2007 06:36 AM

Great product!!

Thaliada 09-03-2007 09:48 AM

Quote:

Originally Posted by COBRAws (Post 1324096)
Still no fixes? :(

I'm sry, but i can't reproduce this bug on my board :/

htrshgytrs 09-05-2007 12:28 AM

just brilliant, thanks alot!

Alfa1 09-05-2007 12:30 PM

Works well. Thanks!
How about a function to find all PM's to and from a user, no matter in which folder the PM's reside? So you can find all conversations with someone.

BadgerDog 09-05-2007 01:25 PM

Quote:

Originally Posted by stwilson (Post 1304008)
Is it just me or is the Read Me on this MOD all jumbled up?


I have the same issue.... :confused:

Is there something in it that's important, or can one just import the XML file?

Regards,
Badger

Alfa1 09-05-2007 07:16 PM

Open the file with wordpad and then you can read it well.

JadedSouls 09-19-2007 11:08 PM

Love it! :)

gobears20 09-20-2007 10:53 AM

Is there any way to limit this to certain user groups?

mmmender 09-26-2007 06:20 AM

Installed and working on 3.6.5.

(I too had problems trying to view the README file, but it looks fine when opened with WordPad.)

pipin 09-30-2007 09:00 AM

Quote:

Originally Posted by Thaliada (Post 1331285)
I'm sry, but i can't reproduce this bug on my board :/

got the same error with vB 3.6.8 as reported by others.

in addition it throws out this messages:

Quote:

mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'apache'@'localhost' (using password: NO) in /private.php(206) : eval()'d code (Zeile 316)
only pm related other hack: Super Private Message and no change, when i disable that one.

pipin 10-02-2007 02:55 PM

the probems that some of you face can result from using mysqli instead of mysql.

Stas 10-02-2007 05:41 PM

work fine!!!

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) . " "; 


COBRAws 10-30-2007 03:22 PM

Quote:

Originally Posted by the Sandman (Post 1367875)
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) . " "; 


Thanks! Now it works :)

Head Roller 10-31-2007 03:04 AM

Fantastic mod. I cant tell you how many times i have actually gone to the database to run a query because i couldnt find a PM in my mailbox!!!

THANK YOU!

Thaliada 11-01-2007 01:06 PM

Version 2.0 released. Rewrote some parts and added all(?) requested features.
Updating is recommended.

the Sandman 11-01-2007 01:45 PM

Upgraded to 2.0 as instructed and the PM Search box shows up but searching yields no visible results. :confused:

Thaliada 11-01-2007 02:02 PM

Hello the Sandman,

I registered at the admin zone forums. Could you please put me into a user group that is allowed to search their pms. Also the old search field is still in place. Have you completely removed the old version?

the Sandman 11-01-2007 02:22 PM

Ahh - I forgot that the v1 template change had been done manually, and I removed it. :o

I also figured out why it wasn't working for me - it doesn't seem to obey the permissions of a user's additonal groups - only the primary group. Is this intended behavior? Or perhaps due to "Allow Users to have Member Groups" to 'No' in my primary usergroup?

Do you have a query to enable PM Search for all usergroups?

Thaliada 11-01-2007 02:40 PM

Quote:

Originally Posted by the Sandman (Post 1373472)
Or perhaps due to "Allow Users to have Member Groups" to 'No' in my primary usergroup?

I guess thats the reason.

Code:

UPDATE usergroup SET pm_search = 1;
If you use table prefixes, add the prefix before "usergroup"

Acedeal 11-02-2007 10:23 AM

Applied the update, and it still does not support mysql with full text searches enabled

Any ideas on how to get this to work with mysql and full text ??
MySQL Error : The used table type doesn't support FULLTEXT indexes

Code:

Database error in vBulletin :

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 MATCH(pmtext.title, pmtext.message) AGAINST ('+Larry' IN BOOLEAN MODE)
                        ORDER BY pmtext.dateline DESC;

MySQL Error  : The used table type doesn't support FULLTEXT indexes
Error Number : 1214
Date        : Friday, November 2nd 2007 @ 06:13:13 AM
Script      : http://forum.xxxx.com/private.php?pmsearch=1
Referrer    : http://forum.xxxx.com/private.php?pmsearch=1
IP Address  : 97.100.1.1
Username    : ntbxxx
Classname    : vB_Database

thanks!.. Looks like a great mod, just can not get it to work when forums uses fulltext instead of the default vb search.

Thaliada 11-02-2007 11:51 AM

You have to use MyISAM as your MySQL storage engine. It's the only one that supports full text search.

Acedeal 11-02-2007 12:49 PM

Quote:

Originally Posted by Thaliada (Post 1374130)
You have to use MyISAM as your MySQL storage engine. It's the only one that supports full text search.

Ahh, I changed the table storage type and it works great!! thanks!


All times are GMT. The time now is 02:15 PM.

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.01631 seconds
  • Memory Usage 1,857KB
  • 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
  • (11)bbcode_code_printable
  • (6)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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