Advertisement:

Author Topic: Search Sent Personal Messages (PMs)  (Read 7197 times)

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 270
  • Gender: Female
Re: Search Sent Personal Messages (PMs)
« Reply #20 on: November 11, 2017, 12:20:05 AM »
Uploaded v2.3 - October 9th, 2017
o Added missing string, as noted by GL700Wing in this post.



@GL700Wing:  Thank you for reporting the missing string!  I've got in this update!
I've just installed v2.3 but it does not contain the fixes I suggested on 1 October for the issues I found in ./Sources/PersonalMessage.php and ./Themes/default/PersonalMessage.template.php.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #21 on: November 13, 2017, 11:22:25 AM »
Uploaded v2.4 - November 13th, 2017
o Made code corrections suggested by GL700Wing several posts back...



@GL700Wing:  Sorry!  I really don't know how I managed to miss the posts you made on October 1st.  The changes you suggested are included in this version!  Thank you!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #22 on: November 19, 2017, 10:34:52 PM »
Hi Doug,
I've been looking into installing some of these mods (Search Sent, Separate Unread PMs, and also Edit Unread) to replace the older Enhanced PM System mod. Unfortunately, some things haven't been going so well.

Search Sent and Separate each generate errors when attempting to install when the other one is already installed; Edit Unread also chokes when attempting to install after Search (I haven't seen whether it installs with Separate). It also gives me a "Modification parse error" when testing whether it can modify the language_english_20x.xml file.

Also, all of them pretty universally report a multitude of errors with the Core theme's template file.
Okay, I need to address the part of the "complaint" (for lack of a better phrase ATM) addressed in bold, since I haven't addressed it (yet) earlier in this thread.  All the code changes for the Core theme are present in each of the mod installers, so you don't have to tick the box to install any of these mods on the Core theme.  It'll be done automatically, since the Code theme is quite different from the Curve theme at some points.

Unfortunately, as advanced as SMF's 2.0.x's Package Manager is, it ain't perfect, in that it still misses the fact that the Core theme has it's own set of changes....  ATM, I haven't been able to test to see if the same issue exists in SMF 2.0 Beta 3...

I haven't done a lot of testing to see how well they work with the PM Attachments mod. I mean to look into that sometime soon, though.
I'm aware of only one incompatibility, that being with the Edit Unsent PMs mod.  PM Attachments should be installed before the Edit Unsent PMs mod.  They all should play nicely together....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,211
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Search Sent Personal Messages (PMs)
« Reply #23 on: November 19, 2017, 11:00:23 PM »
As always here doing some spam :P ... I hope I can be active again soon translating into Spanish 8) and many things to enjoy your good works!


Regards!

PD: I leave you the normal Latin Spanish versión and utf8 ;D
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #24 on: November 19, 2017, 11:14:16 PM »
Uploaded v2.5 - November 19th, 2017
o SMF 2.0.x: Fixed installation error for PersonalMessage.template.php.
o Added Spanish Latin translation, courtsey of Rock Lee!



@Rock Lee:  Thank you for the translation!!  It's been included in this version!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline Kinsman

  • Semi-Newbie
  • *
  • Posts: 17
Re: Search Sent Personal Messages (PMs)
« Reply #25 on: November 25, 2017, 06:18:05 PM »
Just a note that this mod is preventing a find/replace in the 2.0.1.5 update. In Sources/personalmessage.php.

Find

Code: [Select]
// Who matches those criteria?
// !!! This doesn't support sent item searching.
$request = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE real_name LIKE {raw:real_name_implode}',
array(
'real_name_implode' => '\'' . implode('\' OR real_name LIKE \'', $possible_users) . '\'',
)
);
// Simply do nothing if there're too many members matching the criteria.
if ($smcFunc['db_num_rows']($request) > $maxMembersToSearch)
$userQuery = '';
elseif ($smcFunc['db_num_rows']($request) == 0)
{
$userQuery = 'AND pm.id_member_from = 0 AND (pm.from_name LIKE {raw:guest_user_name_implode})';
$searchq_parameters['guest_user_name_implode'] = '\'' . implode('\' OR pm.from_name LIKE \'', $possible_users) . '\'';
}
else
{
$memberlist = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$memberlist[] = $row['id_member'];
$userQuery = 'AND (pm.id_member_from IN ({array_int:member_list}) OR (pm.id_member_from = 0 AND (pm.from_name LIKE {raw:guest_user_name_implode})))';
$searchq_parameters['guest_user_name_implode'] = '\'' . implode('\' OR pm.from_name LIKE \'', $possible_users) . '\'';
$searchq_parameters['member_list'] = $memberlist;
}
$smcFunc['db_free_result']($request);

Replace

Code: [Select]
if (!empty($possible_users))
{
// We need to bring this into the query and do it nice and cleanly.
$where_params = array();
$where_clause = array();
foreach ($possible_users as $k => $v)
{
$where_params['name_' . $k] = $v;
$where_clause[] = '{raw:real_name} LIKE {string:name_' . $k . '}';
if (!isset($where_params['real_name']))
$where_params['real_name'] = $smcFunc['db_case_sensitive'] ? 'LOWER(real_name)' : 'real_name';
}

// Who matches those criteria?
// !!! This doesn't support sent item searching.
$request = $smcFunc['db_query']('', '
SELECT id_member
FROM {db_prefix}members
WHERE ' . implode(' OR ', $where_clause),
$where_params
);

// Simply do nothing if there're too many members matching the criteria.
if ($smcFunc['db_num_rows']($request) > $maxMembersToSearch)
$userQuery = '';
elseif ($smcFunc['db_num_rows']($request) == 0)
{
$where_params['real_name'] = 'pm.from_name';
$searchq_parameters = array_merge($searchq_parameters, $where_params);
$userQuery = 'AND pm.id_member_from = 0 AND (' . implode(' OR ', $where_clause) . ')';
}
else
{
$memberlist = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$memberlist[] = $row['id_member'];

$where_params['real_name'] = 'pm.from_name';
$searchq_parameters = array_merge($searchq_parameters, $where_params);
$searchq_parameters['member_list'] = $memberlist;
$userQuery = 'AND (pm.id_member_from IN ({array_int:member_list}) OR (pm.id_member_from = 0 AND (' . implode(' OR ', $where_clause) . ')))';
}
$smcFunc['db_free_result']($request);
}
else
$userQuery = '';


Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #26 on: November 27, 2017, 11:25:46 AM »
@Kinsman:  I know that this mod installs just fine after the SMF 2.0.15 upgrade mod.  I would suggest uninstalling this mod first (and any other conflicting mods), then installing the SMF 2.0.15 upgrade mod.  Only then should you reinstall any mods you uninstalled to get the 2.0.15 update to install....

Yup, it is a pain in the butt, but what do ya do?  :-[
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #27 on: December 08, 2017, 11:23:25 PM »
@Kinsman:  Evidentally, my locahost forum was a little damaged by an incorrectly uninstalled mod.  Your bug report is reproducible on my end....  I will fix it as soon as I can....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,437
    • XPtsp.com Community
Re: Search Sent Personal Messages (PMs)
« Reply #28 on: December 08, 2017, 11:33:39 PM »
Uploaded v2.6 - December 8th, 2017
o Added new installer to deal with SMF 2.0.15 and up.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com and Simple Machines Customization Site!
My mods are being uploaded and are available at GitHub as well!