# of new messages = # unread

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Fri Apr 09, 2004 11:13 am

warmweer wrote: ...And now I'm going to check the feature requests for 2.2 and submit a request for this (if it hasn't been done before)


Great idea. And when you say 'this', I suppose there are really a few distinct ideas that you can mention:

1. Lump together unread pms and new pms so that they all comprise 'unerad pms' (and change the text to read 'you have __ unread pms'). (And I suppose if they want ot get fancy that could give the admin the option to display only new messages as per the old way, or only unread plus new messages as per this thread, or actually make the text really long and say 'you have ___ new messages and ___ old but unread messages -- I hate that but I suppose someone might like it.)

Note that the whole concept of lumping together new pms and old but unread pms is completely identical to the concept behind the keep unread mod that assures that any topic you have not yet actually read will continue to show up as flagged for reading (which IMO is one of hte most important mods around).

2. flashing gif tied to the existence of any new OR unread pms.

3. Make the unread message text larger, bold, underlined and different color when you have new or unread messages.

By the way, how will 2.2 upgrading work...do we know yet? Specifically, will anyone who wants to upgrade to 2.2 have to ditch all their mods, or is there a chance that someone with a heavily modded board can do a step by step mod upgrade the way they could do in going from 2.0.x to 2.0.8a? If you can't do that, I have a very hard time believing that upgarding to 2.2 will be worht it (since my board is so heavily customized).

User avatar
warmweer
Registered User
Posts: 2812
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Fri Apr 09, 2004 3:05 pm

Before you replied I already submitted the request. I kept it short assuming the Team will understand the request without going into detail too much.
asinshesq wrote: By the way, how will 2.2 upgrading work...do we know yet? Specifically, will anyone who wants to upgrade to 2.2 have to ditch all their mods, or is there a chance that someone with a heavily modded board can do a step by step mod upgrade the way they could do in going from 2.0.x to 2.0.8a? If you can't do that, I have a very hard time believing that upgarding to 2.2 will be worht it (since my board is so heavily customized).

If you have few mods, I wouldn't hesitate to upgrade to 2.2 (and accept the loss of a few mods, chances are those mods will be standard feature anyway).
If you have many, take your time and study the CVSs to figure out what can be kept (mind you, some tweaking here and there will be necessary) and what would have to be rewritten from scratch.

My experience with upgrading from 2.0.4 tot 2.0.8a is that there is always something small which gets broken but by comparing the (vanilla) files of the different versions, it's not so difficult to find out where and how things have changed and to apply the changes directly to the modded board.

Play around with 2.1.2 and by the time 2.2 is out (by the end of this week the rumour goes 8) ) you'll be able to figure out how to keep most of your mods.

flash: I was joking about the end of this week - there is no release date publicised whatsoever, the general impression is that 2004 is a reasonable guestimate :wink:
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Mon Apr 12, 2004 1:17 am

warmweer wrote: ...My experience with upgrading from 2.0.4 tot 2.0.8a is that there is always something small which gets broken but by comparing the (vanilla) files of the different versions, it's not so difficult to find out where and how things have changed and to apply the changes directly to the modded board....


Is it likely that someone will give a step by step manual upgarde mod (like acydburn did for 2.06 to 2.07)? Or will the changes be too complex for that?

User avatar
warmweer
Registered User
Posts: 2812
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Thu Jun 03, 2004 6:16 pm

asinshesq wrote: Is it likely that someone will give a step by step manual upgarde mod (like acydburn did for 2.06 to 2.07)? Or will the changes be too complex for that?

A late reply:
Concerning upgrades to mods: some authors will probably write upgrade scripts, some won't. My guess is that many mods would have to be rewritten from scratch anyway, so they won't really be upgrades.
Concerning the board itself: I doubt a manual upgrade would be useful as the changes will be drastic. (doubt was an understatement). Database changes will have to be done through an upgrade script anyway, the whole theme (style/template system) has changed, current php files will be replaced by others or changed so heavily that manually upgrading will be too cumbersome (and best left to experts), and there will be many new files (ok, copying is also manual upgrading ;) ).

From what I've experienced, it's possible to rewrite the 2.0.x mods that I've developed myself but somebody else's is too much trouble and probably advisable with my (lack of) expertise.

I'll go for a simple upgrade to 2.2 using the upgrade script, losing all my mods in the process (but the new features are sufficient compensation), but I'll probably have rewritten some for myself as 2.2 develops (and other more compitent authors will have done the same with their mods.)
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Thu Jun 03, 2004 6:38 pm

warmweer wrote: ...I'll go for a simple upgrade to 2.2 using the upgrade script, losing all my mods in the process (but the new features are sufficient compensation), but I'll probably have rewritten some for myself as 2.2 develops (and other more compitent authors will have done the same with their mods.)


What's the best software that might allow you in batch to run some kind of comparerite of 2.0.8a clean versus a current modded board so that it would be a bit easier to install 2.2 clean and then add the zillion mods I've done that I haven't documented to fine tune the board so it looks and acts exactly the way I want?

User avatar
warmweer
Registered User
Posts: 2812
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Thu Jun 03, 2004 6:46 pm

The best? I have no best but I do have preferences.

For a quick and simple compare I just use Total Commander.
For a file comparison allowing me to edit the files at the same time I use ExamDiff Pro (which allows saving Unix or HTML diff reports).

As for running a batch to compare a set of files I wouldn't know but I vaguely recall reading something about this possibility on this board itself.
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

User avatar
warmweer
Registered User
Posts: 2812
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Post by warmweer » Wed Jun 16, 2004 6:53 pm

To get back on topic: I just found Animated New Message Mod which seems to be something similar (not 100% the same).
The year is 2192. The British Prime Minister visits Brussels to ask for an extension of the Brexit deadline. No one remembers where this tradition originated, but every year it attracts many tourists from all over the world.

Pagemakers Design
Registered User
Posts: 285
Joined: Fri Jan 10, 2003 12:10 am
Location: Manchester UK

Post by Pagemakers Design » Mon Jul 05, 2004 10:22 pm

asinshesq wrote: This is pretty easy to mod. If you want to change the header on every page in the forum so that it tells the user how many pms are either 'new' OR 'unread' and refers to them all as 'unread' (which is in my view more logical), all you need to do is:

1. Open up templates/overall_header.tpl and change inline{PRIVATE_MESSAGE_INFO} to {PRIVATE_MESSAGE_INFO_UNREAD}

2. Open up includes/page_header.php and:

Code: Select all

FIND
	if ( $userdata['user_unread_privmsg'] )
	{
		$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
		$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
	}
	else
	{
		$l_privmsgs_text_unread = $lang['No_unread_pm'];
	}

Change to

	if ( $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg'] > 0 )
	{
		$l_message_unread = ( $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
		$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg']);
	}
	else
	{
		$l_privmsgs_text_unread = $lang['No_unread_pm'];
	}


I've done this and it works fine but there is one problem. If I log out, the old "You have no new messages" link used to change to "Log in to check your private messages". After this mod there is no text next to the PM icon at all.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Mon Jul 05, 2004 11:04 pm

Pagemakers Design wrote: ....I've done this and it works fine but there is one problem. If I log out, the old "You have no new messages" link used to change to "Log in to check your private messages". After this mod there is no text next to the PM icon at all.


My board doesn't do that and that code doesn't touch the part of the file that displays login to get pms, so you must have done something wrong. Did you modify something else in the file?

[edit: I just made these changes on a brand new set of 2.0.8a files and the resulting board still properly had the login for your private messges link, so something you did beyond these changes is causing your problem.]

Pagemakers Design
Registered User
Posts: 285
Joined: Fri Jan 10, 2003 12:10 am
Location: Manchester UK

Post by Pagemakers Design » Tue Jul 06, 2004 9:43 am

Hi I just installed a new test phpbb board as well and it still does it.

This is what I did.

Open templates/overall_header.tpl

Change: alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}

To: alt="{PRIVATE_MESSAGE_INFO_UNREAD}" hspace="3" />{PRIVATE_MESSAGE_INFO_UNREAD}

Open includes/page_header.php

Change: if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}

To:if ( $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg'] > 0 )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg'] + $userdata['user_new_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}

*****************************

When I log out there is nothing next to the PM icon.

If I am logged in it works fine.

If I only change only one "PRIVATE_MESSAGE_INFO" like this alt="{PRIVATE_MESSAGE_INFO_UNREAD}" hspace="3" />{PRIVATE_MESSAGE_INFO} then there is a PM login link when I log out, but the "You have xx unread messages" stops working correctly when I log back in again.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Tue Jul 06, 2004 11:01 am

Pagemakers Design wrote: ...This is what I did.

Open templates/overall_header.tpl

Change: alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}

To: alt="{PRIVATE_MESSAGE_INFO_UNREAD}" hspace="3" />{PRIVATE_MESSAGE_INFO_UNREAD}...


Why did you touch overall_header at all? I only said to touch that if you were adding my code for making hte pm link big and red when there are unread messages. If you restore that file to its original version it should work fine.

Pagemakers Design
Registered User
Posts: 285
Joined: Fri Jan 10, 2003 12:10 am
Location: Manchester UK

Post by Pagemakers Design » Tue Jul 06, 2004 11:21 am

I did not see where you said not to change overall_header.tpl You said....."This is pretty easy to mod. If you want to change the header on every page in the forum so that it tells the user how many pms are either 'new' OR 'unread' and refers to them all as 'unread' (which is in my view more logical), all you need to do is:

1. Open up templates/overall_header.tpl and change inline{PRIVATE_MESSAGE_INFO} to {PRIVATE_MESSAGE_INFO_UNREAD}

2. Open up includes/page_header.php and:"

I have restored that file back to normal and yes, I get the "Log in to check your private messages" link when I am logged out.

However, say I have a new PM in my inbox, I log in and it correctly says "you have 1 undread PM". If I then go to my inbox, but don't read the PM it then incorrectly says "you have no new messages" and not as it should be "you have 1 undred PM". Clicking the link reveals 1 unread PM!

What's up now?

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Tue Jul 06, 2004 2:21 pm

Pagemakers Design wrote: I did not see where you said not to change overall_header.tpl You said....."This is pretty easy to mod. If you want to change the header on every page in the forum so that it tells the user how many pms are either 'new' OR 'unread' and refers to them all as 'unread' (which is in my view more logical), all you need to do is:

1. Open up templates/overall_header.tpl and change inline{PRIVATE_MESSAGE_INFO} to {PRIVATE_MESSAGE_INFO_UNREAD}

2. Open up includes/page_header.php and:"


Sorry, you are absolutely correct. You need to find the following line in page_header.php:

Code: Select all

	$l_privmsgs_text_unread = '';
This is the line that tell the template what text to use for the 'Login to get your messages' link when you are not already logged in. Note that it currently tells the template that when you are not logged in the variable $l_privmsgs_text_unread (which gets assigned to {PRIVATE_MESSAGE_INFO_UNREAD}) should just be an empty " ". If you change that line to read:

Code: Select all

	$l_privmsgs_text_unread = $lang['Login_check_pm'];
that should fix it. (I've got this working on my board but I just forgot to include that step when I posted about it in the preceding page of this thread.) Let us know.

[By the way, I edited my original post on the prior page to pick up the omission]

Pagemakers Design
Registered User
Posts: 285
Joined: Fri Jan 10, 2003 12:10 am
Location: Manchester UK

Post by Pagemakers Design » Wed Jul 07, 2004 9:25 am

Works perfectly now thanks.

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Post by asinshesq » Wed Jul 07, 2004 12:38 pm

Pagemakers Design wrote: Works perfectly now thanks.


Glad it worked out for you.

Post Reply

Return to “[2.0.x] MOD Requests”