miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

$resetReadLink requirement for Unread Messages

 
 
Page  Page 1 of 2:  1  2  Next »

Author Steve Shaw
Partaker
#1 | Posted: 31 Jul 2013 14:58 
I'm just adding this plug-in now, but I can't work-out the '$resetReadLink' requirement...

I've checked with the compiler, and the demo forum, but no help there.

What am I missing in my understanding of the instructions to add the HTML code???

:o(

Author Paul
Lead Developer 
#2 | Posted: 31 Jul 2013 15:08 
$resetReadLink is located in bb_plugins.php code. You may adjust it's HTML to the way you're seeing it (if you need to change it).

Author Steve Shaw
Partaker
#3 | Posted: 31 Jul 2013 15:16 
That's the bit I don't understand... change what?
I can't see 'Mark All Messages Read' anywhere after installing the plug-in.

What an I missing?

Author Paul
Lead Developer 
#4 | Posted: 31 Jul 2013 17:23 
Steve Shaw:
I can't see 'Mark All Messages Read' anywhere after installing the plug-in.
In which template did you paste {$resetReadLink} ?

Steve Shaw:
That's the bit I don't understand... change what?
I should give this question to you. I don't understand (again) what are you trying to achieve.

Author Steve Shaw
Partaker
#5 | Posted: 31 Jul 2013 17:44 
Ah - that's the bit I was missing!!!

Pasting the {$resetReadLink} into a template!
That just wasn't obvious to me - as I am an idiot!!!

:o)

Author Steve Shaw
Partaker
#6 | Posted: 31 Jul 2013 19:21 
Pk - got that working now...

But, I am now getting the following error message:

Warning: substr() expects parameter 2 to be long, string given in /home/digitalp/public_html/7-dna.com/forums/bb_plugins.php on line 592

Line 592 in bb_plugins.php is:

if(substr($_COOKIE[$cookiename.'_tread'], '_')==0) {

From within the code block:

if(!isset($_COOKIE[$cookiename.'_mslv'])) $mslvPoint=0;
else $mslvPoint=(int)$_COOKIE[$cookiename.'_mslv'];

if($action=='vthread' and $topicData[9]>$mslvPoint){

$currtopics=array();

if(!isset($_COOKIE[$cookiename.'_tread'])){
$treadVal=$topic.'-'.$topicData[9];
}
elseif(preg_match("#[0-9_-]
+#", $_COOKIE[$cookiename.'_tread'])){
if(substr($_COOKIE[$cookiename.'_tread'], '_')==0) {
$q=explode('-', $_COOKIE[$cookiename.'_tread']);
$currtopics[$q[0]]=$q[1];
}
else {
$ct=explode('_', $_COOKIE[$cookiename.'_tread']);
foreach($ct as $cc){
$q=explode('-', $cc);
$currtopics[$q[0]]=$q[1];
}
So, I guess it's a cookie issue???
(But with this I really am dumb, and have no idea!!!)

:o(

Author Steve Shaw
Partaker
#7 | Posted: 1 Aug 2013 01:44 
I've been working on this all evening, and getting nowhere...

;o(

Is this a problem of my own making, or something different???
All info I can find regarding the error message suggests a code issue, but I am really none the wiser.

Author Steve Shaw
Partaker
#8 | Posted: 1 Aug 2013 10:09 
If it helps, the 'warning' only shows when looking at actual discussion threads, not on any other forum pages.

And when on a discussion page with the warning showing, clicking on 'Mark All Discussions/Post Read', (so clearing the cookies?) removes the warning...

:o(

Author Paul
Lead Developer 
#9 | Posted: 1 Aug 2013 10:55 
Let's not forget you're dealing with open source program, which comes with 0% warranty...
It seems you have found a bug in this add-on, congratulations :)

Try to replace this string of code:

if(substr($_COOKIE[$cookiename.'_tread'], '_')==0) {
with this:

if(substr_count($_COOKIE[$cookiename.'_tread'], '_')==0) {
Let me know if it helped... thanks.

Author Steve Shaw
Partaker
#10 | Posted: 1 Aug 2013 11:25 
Ah!!!!

And there I was assuming it was me being an idiot - yet again!!!

;o)

Thanks for the code suggestion.. I am trying now!
Will let you know the results.

Author Paul
Lead Developer 
#11 | Posted: 1 Aug 2013 13:22 
Steve Shaw:
And there I was assuming it was me being an idiot - yet again!!!
Don't be too critical to yourself ;-)
Every day I'm getting a chance to be caught by the same assuming, too.
But this is just a life's process. Learning never stops :-)

Author Steve Shaw
Partaker
#12 | Posted: 1 Aug 2013 13:24 
And the fix is working!

Thanks ;o)

Author Paul
Lead Developer 
#13 | Posted: 1 Aug 2013 13:36 
Great! I've fixed this in the default add-on now.
Thank you, for discovering.

Author Steve Shaw
Partaker
#14 | Posted: 2 Aug 2013 12:02 
Paul, another question regarding this plug-in...

Can we add the 'Unread Message' icon (the green circle) to main forum list, to indicate there are new post within a specific forum?

See: http://www.7-dna.com/forums/index.php
It would be great to know if there are new discussion in 'Chatting', or 'Spannering' etc...

;o)

Author Paul
Lead Developer 
#15 | Posted: 2 Aug 2013 14:18 
I think it could be possible, but unfortunately, I don't have time for a free work these days.
There is no easy way for this, the add-on needs to be heavily extended...

Page  Page 1 of 2:  1  2  Next » 
Specific miniBB Support Forums / Specific /
 $resetReadLink requirement for Unread Messages
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑