[MODDB] View or Mark Unread Posts for PHPBB3

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Suggested Hosts
User avatar
MHobbit
Former Team Member
Posts: 4761
Joined: Thu Mar 18, 2004 5:32 pm
Location: There and Back Again

Re: ALPHA View or Mark Unread Posts for PHPBB3

Post by MHobbit »

Just a quick nitpick... you have the correct topic prefix, but please put brackets around it, so that it will now be [ALPHA]. Thanks.
Former phpBB MOD Team member
No private support is offered.
"There’s too many things to get done, and I’m running out of days..."
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by saaiberke »

Alan,

Strange but suddenly I get these notices in the header of my board pages when I click on the link to the unread postings:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 235: Undefined index: SEARCH_UNREAD
And this one when I mark a topic as unread:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 215: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 219: Undefined variable: phpbb_root_path
(These dissapear after 1 or 2 seconds)

I installed a few other mods, but I uninstalled them. Then I uninstalled the whole view or mark unread post and reinstalled it from scratch.

Do you have any idea where to search for this undefined index and the phpbb_root_path errors pls?

Grtz,

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

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

saaiberke wrote:Alan,

Strange but suddenly I get these notices in the header of my board pages when I click on the link to the unread postings:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 235: Undefined index: SEARCH_UNREAD
And this one when I mark a topic as unread:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 215: Undefined variable: phpbb_root_path
[phpBB Debug] PHP Notice: in file /includes/functions_view_or_mark_unread_posts.php on line 219: Undefined variable: phpbb_root_path
(These dissapear after 1 or 2 seconds)

I installed a few other mods, but I uninstalled them. Then I uninstalled the whole view or mark unread post and reinstalled it from scratch.

Do you have any idea where to search for this undefined index and the phpbb_root_path errors pls?

Grtz,

Nic
I am using a test board with nothing in it except a clean phpbb3 RC1 set of files with this mod installed, and I am not getting those errors.

It seems like for some reason your search and viewtopic pages are not recognizing {$phpbb_root_path}, but I have no idea why that would be since that is the normal way that phpbb3 usually references the root path. Are you sure you are starting from a brand new phpbb3 RC1 set of files?

As a kludge, try changing each occurrence of {$phpbb_root_path} to instead read the actual path to your root (e.g. http://[domain]/ or maybe http://[domain/phpBB3/ or whatever the actual path to your board is) and let's see if that helps (but that doesn't explain why {$phpbb_root_path} isn't working properly).
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by saaiberke »

A few days ago I changed in config.php:

Code: Select all

@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
into

Code: Select all

@define('PHPBB_INSTALLED', true);
@define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
to have the query info on the bottom of index page.

I rechanged it and now it works again. As it where only notices and no errors I think the problem is solved.

I forgot to mention that the functions to search unread topic or to mark topics unread worked despite the notices.

Grtz,

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

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

saaiberke wrote:I rechanged it and now it works again. As it where only notices and no errors I think the problem is solved. I forgot to mention that the functions to search unread topic or to mark topics unread worked despite the notices.
Even though it's just notices and not errors (and even though you don't see it unless you use the debug function) it's still strange to me that you ever got those notices (and I wasn't getting any notices in my regular phpo error log). I'll try using the debug feature tonight and see if I can replicate and see what's going on. Were you getting any other unrelated notices?
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

Ok, I do see a few little errors which I think account for those notices. I haven't tried this yet but it should work, so if you want to experiment you can try this:

Code: Select all

OPEN
includes/functions_view_or_mark_unread_posts.php

FIND
	global $db, $user, $auth, $phpEx;

REPLACE WITH
	global $db, $user, $auth, $phpbb_root_path, $phpEx;

FIND
	$l_search_title = $user->lang['SEARCH_UNREAD'];

REPLACE WITH
	$l_search_title = $user->lang['VIEW_UNREADS'];
That should get rid of those notices...if you try it, let me know what happens.
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by saaiberke »

I tried it and it seems to work, no more notices. :)

Thank you!

Grtz,

Nic
Last edited by saaiberke on Tue Jun 12, 2007 9:54 pm, edited 1 time in total.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [ALPHA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

saaiberke wrote:I tried it and it weems to work, no more notices. :)
Thanks for letting me know. I just uploaded a new version (version 0.0.3) that implements that change, and I updated the link in the first post in this topic to now point to the new version.

saaiberke, have you used this enough on your live board that it might make sense for me to change the designation of this mod from alpha to beta?
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

BETA version 0.0.3...

Post by asinshesq »

I think this mod has been tested long enough to move it to 'BETA', so I just changed 'alpha' to 'beta' in the title.
henningl
Registered User
Posts: 78
Joined: Tue Aug 17, 2004 7:19 pm

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by henningl »

I'm using the mod on a live board with 50-100 users online any given time.. Works like a charm, except the searchpage title fixed with the changes a few posts up.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

henningl wrote:I'm using the mod on a live board with 50-100 users online any given time.. Works like a charm, except the searchpage title fixed with the changes a few posts up.
Thanks. Good to hear it's working on another live board (I've only got a test phpbb3 board myself).

But are you saying that now that you made that searchpage title change everything is working? Or are you instead saying that the searchpage title change did not work for you (and if it didn't work, what did you see it doing that told you it didn't work)?
henningl
Registered User
Posts: 78
Joined: Tue Aug 17, 2004 7:19 pm

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by henningl »

Hehe, sorry for being unclear..

The mod has worked fine since it was installed 2 days ago.
The searchpage title was missing until your latest fix.
asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by asinshesq »

I just uploaded a new version. Here's the changelog:

Code: Select all

##  2007-07-04	- Version 0.0.4
##		deleted a RC1 bugfix change that has now been fixed in RC2
Seems to work fine in RC2.
Amezis
Registered User
Posts: 116
Joined: Sun Jul 24, 2005 9:10 am
Location: Oslo, Norway

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by Amezis »

Great mod! I've just installed it and it works like a breeze! My members really missed that feature, and they're all happy now ;) Nice to also include a feature to mark posts as unread, that was a really good idea! :)

Again, thanks a lot, I really needed this mod :D
Amezis

Wise men talk because they have something to say; fools, because they have to say something. -Plato
User avatar
Dr.Death
Registered User
Posts: 400
Joined: Fri Apr 25, 2003 10:04 am
Location: Germany

Re: [BETA] View or Mark Unread Posts for PHPBB3

Post by Dr.Death »

~Applaus !

Works great on my "live" forum !

Maybe you put the language vars in a separated lang file in language/en/mods ....

Here the "german" part:

Code: Select all

	// start mod view or mark unread posts
	'MARK_POST_UNREAD'			=> 'Beitrag als ungelesen markieren',
	'NO_UNREADS'				=> 'Keine ungelesenen Beiträge',
	'POST_MARKED_UNREAD'		=> 'Beitrag wurde als ungelesen markiert',
	'VIEW_UNREADS'				=> 'Ungelesene Beiträge',
	// end mod view or mark unread posts
Doc.

Return to “[3.0.x] MODs in Development”