keep unread flags

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
72
75%
Very Good
16
17%
Good
4
4%
Fair
0
No votes
Poor
4
4%
 
Total votes: 96

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

Re: keep unread flags

Post by asinshesq »

Dogs and things wrote:Hmm,

I haven´t tried the viewforum one yet but the search.php modification doesn´t change the topic title, clicking topic title still takes me to the first post in the topic whereas the unread_icon takes me to the first unread post in the topic. :cry:
That's correct behavior for the regular search function...my change only does that for the list of unread topics you get when you click 'view your unread posts'. I wouldn't want that behavior for a regular search. Does it work for the list of unread posts?
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: keep unread flags

Post by Dogs and things »

No,

It doesn´t work for the unread post search.
For phpBB2 support visit phpBB2refugees.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: keep unread flags

Post by asinshesq »

Dogs and things wrote:Hmm,

I haven´t tried the viewforum one yet but the search.php modification doesn´t change the topic title, clicking topic title still takes me to the first post in the topic whereas the unread_icon takes me to the first unread post in the topic. :cry:
I'm going to go out on a limb and guess that you never uploaded the change to your actual server. How aoubt pm'ing me your search.php file and I'll take a look.

Meanwhile, does the change to viewforum work?
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: keep unread flags

Post by Dogs and things »

Just PM-ed you.

I just noticed that with your change in search.php viewing the unread topic doesn´t mark it as read, I view the topic, return to index, click view_unread_posts link and the viewed topic still shows up in that list.

I´m off to bed now, I´ll check the viewforum modification tomorrow,

Goodnight. ;)
For phpBB2 support visit phpBB2refugees.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: keep unread flags

Post by asinshesq »

DOgs and things, I forgot another change in search that you need to make to make that code work. I've corrected my prior post to fix that.

Let me know if that and the viewforum fix I gave you work.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: keep unread flags

Post by Dogs and things »

Hello,

Good news and bad news: :P

With your correction search is working exactly as it should. Topic title takes me to first unread post of the thread and viewing the unread post marks it as read.

However, viewforum edit doesn´t work as expected, clicking topic title still takes me to the first post of the thread. Viewing the first post marks the unread posts of that thread as read.
For phpBB2 support visit phpBB2refugees.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: keep unread flags

Post by Dogs and things »

Okay,

Now it´s working fine in viewforum too. :)

Instead of the line you told me to be commented out I had to comment out this one,

Code: Select all

$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&fid=$forum_id");
The one you wanted commented out only appears in the new code you give for viewforum.php, so I searched for another line beginning with

Code: Select all

$view_topic_url =
and the only other line starting with

Code: Select all

$view_topic_url =
is the one I commented out.

Thanks a lot for your support, this is much nicer than what I asked you for, instead of adding more icons we now have the topic titles taking us to the first unread posts.

One final question: Why is it that when I click unread_icons or unread_titles the www. is taken out of the topic-url and when I click a not unread topic www. stays where it's supposed to be?
For phpBB2 support visit phpBB2refugees.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: keep unread flags

Post by asinshesq »

Glad you've got it working now. :D
Dogs and things wrote:Instead of the line you told me to be commented out I had to comment out this one,

Code: Select all

$view_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&fid=$forum_id");
That's because your board has a mod in it...that stuff in there about fid=$forum_id is not in a regular phpbb2.0.23 board. So for other people wanting to make this change, please use the code I posted earlier.
Dogs and things wrote:One final question: Why is it that when I click unread_icons or unread_titles the www. is taken out of the topic-url and when I click a not unread topic www. stays where it's supposed to be?
If you promise it's really the final one ;) (just kidding).

Anyway, all my links go to http://domain.com rather than http://www.domain.com so I don't have the issue. But if it bothers you then try this (I haven't tested it):

[deleted...unneccessary, as per merlin's post below]
Last edited by asinshesq on Fri Mar 07, 2008 7:49 pm, edited 1 time in total.
Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: keep unread flags

Post by Merlin Sythove »

asinshesq wrote:[edit: out of curiousity's sake, how did you get your regular forum to go to http://www.domain.com rather than http://domain.com?]
Isn't that just the domain entry in your config page? Eenter http://www.domain.com instead of domain.com?
Need custom work done? Pimp My Forum!
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: keep unread flags

Post by asinshesq »

Merlin Sythove wrote:
asinshesq wrote:[edit: out of curiousity's sake, how did you get your regular forum to go to http://www.domain.com rather than http://domain.com?]
Isn't that just the domain entry in your config page? Eenter http://www.domain.com instead of domain.com?
Merlin is right, as usual. The original code works fine, but when phpbb2 does a redirect it will redirect to whatever the domain name is in the config page, so if it is redirecting without the www that probably measn your domain name on the config page has no http://www in it. Try this, Dogs and Things: go to the site and post and wait for it to redirect you without clicking a link to shorten the process. Does it redirect you without the www?
Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Re: keep unread flags

Post by Merlin Sythove »

Please note that this phpBB software prepends http:// before w w w, I meant to type without spaces w w w . domain.com
Need custom work done? Pimp My Forum!
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: keep unread flags

Post by Dogs and things »

Uhm,

You´re right Merlyn, putting www. before my domain name solves the problem of the redirects to domain.com, now they all go to http://www.domain.com.

Good thinkings, thanks again. ;)
For phpBB2 support visit phpBB2refugees.
Lusch
Registered User
Posts: 10
Joined: Thu Mar 06, 2008 8:14 pm

Re: keep unread flags

Post by Lusch »

This may be discussed before in this topic, but looking in so much pages is pretty much impossible.

I implemented this mod with the additions in this code:
http://www.phpbb.com/community/viewtopi ... 3#p1938793

However, this produces an SQL Error in `functions_category_hierarchy` at line 724, because if the `$new_unreads` array is empty, the SQL is constructed into somehting like `WHERE ( OR ...` which is off course false.

I changed this line:

Code: Select all

$sql_unreads = empty($list_unreads) ? "" : "p.topic_id IN (" . $list_unreads . ")";
to

Code: Select all

$sql_unreads = empty($list_unreads) ? "1" : "p.topic_id IN (" . $list_unreads . ")";
I cannot see how this ever worked in the first place...
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: keep unread flags

Post by asinshesq »

Lusch wrote:However, this produces an SQL Error in `functions_category_hierarchy` at line 724, because if the `$new_unreads` array is empty, the SQL is constructed into somehting like `WHERE ( OR ...` which is off course false.
This mod is not written for category hierarchy, and in fact modern versions of CH already have a sophisticated keep unread function built in. Are you really using a CH version that is a number of years out of date?
Lusch
Registered User
Posts: 10
Joined: Thu Mar 06, 2008 8:14 pm

Re: keep unread flags

Post by Lusch »

asinshesq wrote:
Lusch wrote:However, this produces an SQL Error in `functions_category_hierarchy` at line 724, because if the `$new_unreads` array is empty, the SQL is constructed into somehting like `WHERE ( OR ...` which is off course false.
This mod is not written for category hierarchy, and in fact modern versions of CH already have a sophisticated keep unread function built in. Are you really using a CH version that is a number of years out of date?
Yes, I'm using 2.04. That's why I decided to install this mod. In the instructions for this mod there is a reference to this code I posted a link to!
Post Reply

Return to “[2.0.x] MOD Database Releases”