Advertisement:

Author Topic: All unread topics -> nothing shown  (Read 18803 times)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #20 on: January 13, 2007, 12:55:04 AM »
You are welcome.

Give this file a try and see if it works. I found the variable I think is coming up blank and made a check to set it if it was.

Edit..
Had a Small Typo needed fixed in the File.
« Last Edit: January 13, 2007, 01:05:25 AM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

3nd3r

  • Guest
Re: All unread topics -> nothing shown
« Reply #21 on: January 13, 2007, 06:59:59 AM »
IT WORKS!!!!!  :D :D :D :) :) :)

Thank you very very much!!!

[I've deleted some code shown here to prevent security issues]
« Last Edit: January 13, 2007, 07:11:17 AM by 3nd3r »

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #22 on: January 13, 2007, 12:26:20 PM »
I've the same problem with your new Recent.php... but I don't get the error messages I got with the original version of Recent.php... :-(

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #23 on: January 13, 2007, 12:32:41 PM »
MacDo,

Try this..
Open up Settings.php

In your database section add this:
Code: [Select]
$db_show_debug = true;
Try that page again. a bigger error message should occur.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #24 on: January 13, 2007, 01:05:09 PM »
Yes, I tried, but I cannot find any error message in the error log. The only things I see is in the bottom of each forum page. And these informations does not contain any error message...
Excuse me for this stupid question but... where should I find this "bigger error message" ?

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #25 on: January 13, 2007, 01:51:34 PM »
When you are at the Recent.php.
It should provide a bigger error message if any.
Make sure you are using the Default Recent.php before trying my edited one.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #26 on: January 13, 2007, 02:29:00 PM »
The only things I can see are
Code: (when accessing recent messages list or any forum page) [Select]
Templates: 2: index (mytemplate), Recent (default).
Sub templates: 4: init, main_above, unread, main_below.
Language files: 2: index.french-utf8 (mytemplate), Modifications.french-utf8 (mytemplate).
Files included: 10 - 401KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/Recent.php, ./Themes/mytemplate/topmenu.php, /home/mydomain/domains/mydomain.tld/public_html/scripts/misc.php)
Queries used: 9.
[show queries]
And I was using the original SMF source file...

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #27 on: January 13, 2007, 02:53:01 PM »
No error means everything went though correctly. You may just not have any new posts to read since your last visit to the forum.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #28 on: January 14, 2007, 08:05:46 AM »
Yes, I have... When I log as a test user, the icons at the left column of the index board shows that there is unread messages in three different boards. But when I click on "Show all unread messages", it displays only one unread message, and forgets in his list many unread messages... which are shown separatedly if I click on the icons at the left column of the index board...

Of course, the test with "$db_show_debug = true;" has been done as this user (and not as admin), since it's problematic...

Thank you for your help...

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #29 on: January 14, 2007, 01:52:18 PM »
Can you click the queries used link at bottom and past them here.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #30 on: January 15, 2007, 04:47:06 PM »
Here you are, sir :-) Thank you once more !
Code: [Select]
  SET NAMES utf8
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Load.php line 150, which took 0.00015903 seconds.
SELECT variable, value
FROM smf_settings
which took 0.00054502 seconds.
SELECT data
FROM smf_sessions
WHERE session_id = '578223564ab58ba9929939e5c7304b89'
LIMIT 1
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Load.php line 1984, which took 0.00050902 seconds.
SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
FROM smf_members AS mem
   LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 1)
WHERE mem.ID_MEMBER = 1
LIMIT 1
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Load.php line 390, which took 0.00042915 seconds.
SELECT variable, value, ID_MEMBER, ID_THEME
FROM smf_themes
WHERE ID_MEMBER IN (-1, 0, 1)
   AND ID_THEME IN (4, 1)
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Load.php line 1163, which took 0.00024986 seconds.
DELETE FROM smf_log_online
WHERE logTime < NOW() - INTERVAL 900 SECOND
   AND session != '578223564ab58ba9929939e5c7304b89'
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Subs.php line 2513, which took 0.00046301 seconds.
UPDATE smf_log_online
SET logTime = NOW(), ip = IFNULL(INET_ATON('83.182.25.30'), 0), url = 'a:4:{s:6:\"action\";s:6:\"unread\";s:3:\"all\";s:0:\"\";s:5:\"start\";s:1:\"0\";s:10:\"USER_AGENT\";s:102:\"Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.2pre) Gecko/20061023 SUSE/2.0.0.1-0.1 Firefox/2.0.0.2pre\";}'
WHERE session = '578223564ab58ba9929939e5c7304b89'
LIMIT 1
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Subs.php line 2521, which took 0.00059009 seconds.
SELECT b.ID_BOARD
FROM smf_boards AS b
WHERE 1
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Recent.php line 513, which took 0.00018787 seconds.
SELECT MIN(lmr.ID_MSG)
FROM smf_boards AS b
   LEFT JOIN smf_log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = 1)
WHERE 1
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Recent.php line 629, which took 0.00056911 seconds.
SELECT COUNT(*), MIN(t.ID_LAST_MSG)
FROM smf_topics AS t
   LEFT JOIN smf_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 1)
   LEFT JOIN smf_log_mark_read AS lmr ON (lmr.ID_BOARD = t.ID_BOARD AND lmr.ID_MEMBER = 1)
WHERE t.ID_BOARD IN (1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13)
   AND t.ID_LAST_MSG > 145
   AND IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) < t.ID_LAST_MSG
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Recent.php line 758, which took 0.00017715 seconds.
SELECT code, filename, description
FROM smf_smileys
in /home/myname/domains/mydomain.tld/public_html/forum/Sources/Subs.php line 2403, which took 0.00019193 seconds.

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,283
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: All unread topics -> nothing shown
« Reply #31 on: January 15, 2007, 05:54:15 PM »
There is nothing wrong with the MySQL commands. They are being done correctly.
The only reason for not seeing them is if you already read them.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:
GitHub

Offline Tan

  • Semi-Newbie
  • *
  • Posts: 51
Re: All unread topics -> nothing shown
« Reply #32 on: January 15, 2007, 07:17:09 PM »
Found this on another thread from 2005

Re: Show unread topics since last visit
« Reply #11 on: March 23, 2005, 08:26:53 AM » Quote 

--------------------------------------------------------------------------------

Anyway, we've worked out the problem. The people who were having trouble with the 'show unread posts since last visit' link were all those who chose the 'forever' option when signing in. Those who have  been signing in 'forever' never got any unread posts showing from that link. Is there anyway to change the default from 'forever' to '1 hour' in the admin panel, or do I have to edit the code to do that?


Poss could be the reason?

Offline Major Truth

  • Jr. Member
  • **
  • Posts: 122
Re: All unread topics -> nothing shown
« Reply #33 on: January 15, 2007, 08:59:25 PM »
So there is no way that feature will work for those always logged in ??

I would rather not change the "forever" option to something else, as people prefer this due to not having to log in every time they come to the site.

Offline MacDo

  • Jr. Member
  • **
  • Posts: 194
  • Gender: Male
Re: All unread topics -> nothing shown
« Reply #34 on: January 16, 2007, 05:34:01 AM »
There is nothing wrong with the MySQL commands. They are being done correctly.
The only reason for not seeing them is if you already read them.
Well, No, I'm really sorry... I've already explained that the test user logged in did not read some messages but those messages doesn't appear in the "unread posts" list. Sorry...

But, yes, when I logged as test user, I used the "forever" option. I tried to log in as the test user with the option 'one hour' but the problem is exactly the same...

If you want, I could give you login+pwd of the test user by private mail so that you could check the problem... You'll see by yourself that there is three boards containing unread messages but none of them are shown when I load the page "forum/index.php?action=unread;all;start=0"...

Thank you once more for your interest in this problem.

ps. Oh, there is maybe something you need to know... I'm using SSI in my website. But the SSI include (<?php require("forum/SSI.php"); ?>) is correctly placed, on the very top of the file, before any other line. Sorry if it is very important... I don't know  ::)

Offline Tan

  • Semi-Newbie
  • *
  • Posts: 51
Re: All unread topics -> nothing shown
« Reply #35 on: January 16, 2007, 03:07:56 PM »
Same for my users Major, They want to not have to log in every time but also want a list of al the unread posts so they don't have to go through each board looking for them.

If each board shows the new posts you haven't read even with forever logon, wouldn't it be possible to have a list of those posts?

Offline Tan

  • Semi-Newbie
  • *
  • Posts: 51
Re: All unread topics -> nothing shown
« Reply #36 on: January 16, 2007, 06:41:21 PM »
Does the unread posts script work with Cookies if you are forever logged on?

Is it possible to change this to all unread posts (leaving out the since last visit) so members can have a list of all the posts they haven't read. My forum is still young so would like to do this if poss. What would i need to change in the script?

Thanks for all the help.

Offline Tan

  • Semi-Newbie
  • *
  • Posts: 51
Re: All unread topics -> nothing shown
« Reply #37 on: January 17, 2007, 09:26:36 AM »
Been havin a scout at an old version of SMF 1.0.9 still on one of my closed sites. In that forum the "show all post since last visit" link has an "all unread topics" link at the top which leads to Index. php action = unread;all
When i go into this i get 7 pages of all my unread topics since the forum started (only 8 weeks ago). So this is what i would like in the updated 1.1.1 version.

When i click on the "all unread topics" at the bottom of the "Show all post since last visit "link in the 1.1.1 version it leads to Index.php action = unread; all; start = 0. I only get 2 pages from today!!
It is the same database used for both forums but we transfered it to a new server.


The difference is this start = 0

How do i change the recent php file to take out this start = 0 and make it the same as the SMF version 1.0.9?

Thanks
« Last Edit: January 17, 2007, 09:31:32 AM by Tan »

Offline Grudge

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,742
  • Gender: Male
  • Unofficial nuisance
Re: All unread topics -> nothing shown
« Reply #38 on: January 21, 2007, 05:08:16 PM »
Is everyone here using SSI on the same page as the forum in some form?

Not sure why this would cause a problem but what happens if in Load.php you find:
Code: [Select]
$username = $user_settings['memberName'];

And add before it:
Code: [Select]
elseif (empty($_SESSION['ID_MSG_LAST_VISIT']))
$_SESSION['ID_MSG_LAST_VISIT'] = $user_settings['ID_MSG_LAST_VISIT'];
I'm only a half geek really...

Offline Major Truth

  • Jr. Member
  • **
  • Posts: 122
Re: All unread topics -> nothing shown
« Reply #39 on: January 23, 2007, 10:14:03 AM »
Thanks for that line of code.  :)

We are testing it now.

I will let you know what happens.....