Author Topic: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).  (Read 6609 times)

0 Members and 1 Guest are viewing this topic.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Since the topic is locked, I decided to create a new topic on this subject (even though it has ben obsolete).

I remember, in the past, reading some requests regarding the total number of each boxes within the PMS MOD from the clickstream bar.

Well, the day has come (if it has not been published already ... if so, then point it to me.  :mrgreen:).

// Compatibility

These modifications also works for PM v2. Simply follow trez's instructions below on this topic.

// Step 1

In your includes/page_header.php file,

find :

Quote

$pms_new = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php")."\">".(($result['new']) ? "<blink>".$result['new']."</blink>" : 0)."</a>";


add above :

Code: [Select]

$pms_inbox_count = str_replace("{inbox_count}", "", $pms_inbox);
$pms_outbox_count = str_replace("{outbox_count}", "", $pms_outbox);
$pms_sentbox_count = str_replace("{sentbox_count}", "", $pms_sentbox);


Then, find:

Quote

"pms_popup_header" => $pms_popup_header,


add right below :

Code: [Select]

"inbox_count" => $pms_inbox_count,
"outbox_count" => $pms_outbox_count,
"sentbox_count" => $pms_sentbox_count,


// Step 2

In your templates/<your_template>/pms.html file,

find :

Quote

{lang_inbox}&nbsp;&nbsp;|&nbsp;&nbsp;

{lang_sentbox}&nbsp;&nbsp;|&nbsp;&nbsp;

{lang_outbox}&nbsp;&nbsp;|&nbsp;&nbsp;


replace with :

Code: [Select]

{lang_inbox} ({inbox_count})&nbsp;&nbsp;|&nbsp;&nbsp;

{lang_sentbox} ({sentbox_count})&nbsp;&nbsp;|&nbsp;&nbsp;

{lang_outbox} ({outbox_count})&nbsp;&nbsp;|&nbsp;&nbsp;


Then, visit your PMS's root page and see if you do have 0 or higher. ;)

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #1 on: February 09, 2006, 11:49:14 PM »
does it work 4 pmsV2?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #2 on: February 10, 2006, 12:10:26 AM »
I ... have no idea - never tried it.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #3 on: February 10, 2006, 12:11:26 AM »
I ... have no idea - never tried it.

i'll try it now..

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #4 on: February 10, 2006, 12:17:26 AM »
it works :)

just replace pms with pm, everything works fine for me :) great addon

edit:

Changes for PMSv2:

open page_header.php

find:
Code: [Select]
$pm_new = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".(($pm_new_count) ? "<blink>".$pm_new_count."</blink>" : 0)."</a>";
add above:
Code: [Select]
$pm_inbox_count = str_replace("{inbox_count}", "", $pm_inbox);
$pm_outbox_count = str_replace("{outbox_count}", "", $pm_outbox);
$pm_sentbox_count = str_replace("{sentbox_count}", "", $pm_sentbox);

find:
Code: [Select]
  "pm_popup_header" => $pm_popup_header,
add below:

Code: [Select]
"inbox_count" => $pm_inbox_count,
"outbox_count" => $pm_outbox_count,
"sentbox_count" => $pm_sentbox_count,

done. STEP 2 remains the same ;)






Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #5 on: February 10, 2006, 12:18:31 AM »
Excellent. Thanks for mentionning this. Before you mentionned it, I didn't even know there was a version 2 of this (or perhaps I forgot about it). ;)

Update: I have just updated my first thread.

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #6 on: February 10, 2006, 12:22:49 AM »
sure, dont forget to update your topic as well :)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #7 on: February 10, 2006, 12:26:58 AM »
Quote

sure, dont forget to update your topic as well


Already did before you replied. 8)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD-Addon] - PMS Total Count (obsolete but for those who still has it).
« Reply #8 on: February 10, 2006, 12:39:39 AM »
1) what str_replace is for in step 1? there is nothing to replace in these variables...

2) in v2 this is already build-in:
Code: [Select]
 "pm_inbox_total" => ($pm_inbox) ? $pm_inbox : 0,
  "pm_outbox_total" => ($pm_outbox) ? $pm_outbox : 0,
  "pm_sentbox_total" => ($pm_sentbox) ? $pm_sentbox : 0,
template tags:
{pm_inbox_total}, {pm_sent_total} and {pm_outbox_total}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)