Ignore Topics

Started by vbgamer45, May 19, 2008, 02:35:52 AM

Previous topic - Next topic

Chas Large

Thanks once again Arantor.

* Chas Large wipes sweat from brow
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

goombapatrol

would there be any way to make this compatible with 1.1?
i didn't see any others like it that would work quite the same as this mod.

thanks :)

Arantor

Not without a total rewrite of either piece of code, and since both are complex, not gonna happen any time soon.

Chas Large

It appears there is another bug with this mod. Initially I thought it was a bug in the SMF software but it was pointed out to me, that this mod was the cause. Here is my post in the SMF bug report forum:

Quote from: Chas Large on June 17, 2010, 08:00:26 AM
A couple of my members reported seeing the following error message:

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IFNULL(it.id_topic, 0) = 0
AND t.id_last_msg > 116521
AND IFNULL(lt.id_m' at line 7
File: /home/nas05l/f/fiftyplusforum.co.uk/user/htdocs/forum/Sources/Recent.php
Line: 796

At first I could not replicate this error but now I can.

Any browser

In forum view, click on the NEW indicator for a child board
If no UNREAD topics are found you get the message

No unread topics found since your last visit. Click here to try all unread topics.

If you click the last part of the message "Click here to try all unread topics." you get the error above.

I've optimised the tables, run error check and both appear OK. So think it's a bug somewhere. There are several like it reported in the bug tracker but wasn't sure if this was until it could be replicated elsewhere.

I'm running 2.0 RC3.

If the Ignore Topics mod is disabled, this error does not appear. It is repeatable.

Any ideas?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Chas Large

Quote from: Chas Large on June 29, 2010, 07:50:16 AM
It appears there is another bug with this mod. Initially I thought it was a bug in the SMF software but it was pointed out to me, that this mod was the cause. Here is my post in the SMF bug report forum:

Quote from: Chas Large on June 17, 2010, 08:00:26 AM
A couple of my members reported seeing the following error message:

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IFNULL(it.id_topic, 0) = 0
AND t.id_last_msg > 116521
AND IFNULL(lt.id_m' at line 7
File: /home/nas05l/f/fiftyplusforum.co.uk/user/htdocs/forum/Sources/Recent.php
Line: 796

At first I could not replicate this error but now I can.

Any browser

In forum view, click on the NEW indicator for a child board
If no UNREAD topics are found you get the message

No unread topics found since your last visit. Click here to try all unread topics.

If you click the last part of the message "Click here to try all unread topics." you get the error above.

I've optimised the tables, run error check and both appear OK. So think it's a bug somewhere. There are several like it reported in the bug tracker but wasn't sure if this was until it could be replicated elsewhere.

I'm running 2.0 RC3.

If the Ignore Topics mod is disabled, this error does not appear. It is repeatable.

Any ideas?
Bump
Anyone?
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Nao 尚

There's another Unread Topics mod which I wrote and a beta tester kindly packaged for me. I'll have to publish it at some point... It's a tentative "official" mod that should be integrated into SMF 2.1 if all goes well.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Chas Large

Quote from: Nao on July 12, 2010, 07:43:14 AM
There's another Unread Topics mod which I wrote and a beta tester kindly packaged for me. I'll have to publish it at some point... It's a tentative "official" mod that should be integrated into SMF 2.1 if all goes well.
Sounds good Nao. at the moment, this mod is working well except for this error but not many members click that link so it only shows up rarely. I'd have a go at fixing it myself if I could understand the script but I can't work it out. Too old I guess :)

Look forward to either your mod or 2.1 version.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

Brande

Quote from: Arantor on May 18, 2010, 05:14:15 AM
Bingo, now I can see the problem. The query that finishes on line 1093 is broken.

Here's the product query:
$request = $smcFunc['db_query']('', '
SELECT t.id_topic
FROM {db_prefix}topics_posted_in AS t
LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
'. ($can_ignore ? 'LEFT JOIN {db_prefix}ignore_topics AS it ON (it.id_topic = pi.id_topic AND it.id_member = {int:current_member})' : '') .'
WHERE t.' . $query_this_board . '
AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
'. ($can_ignore ? 'AND IFNULL(it.id_topic, 0) = 0' : '') .'
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
'offset' => $_REQUEST['start'],
'limit' => $context['topics_per_page'],
))
);


And it's saying that it doesn't know pi.id_topic - well, here it doesn't because we never defined pi as a table alias. Should be:

$request = $smcFunc['db_query']('', '
SELECT t.id_topic
FROM {db_prefix}topics_posted_in AS t
LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
'. ($can_ignore ? 'LEFT JOIN {db_prefix}ignore_topics AS it ON (it.id_topic = t.id_topic AND it.id_member = {int:current_member})' : '') .'
WHERE t.' . $query_this_board . '
AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
'. ($can_ignore ? 'AND IFNULL(it.id_topic, 0) = 0' : '') .'
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
'offset' => $_REQUEST['start'],
'limit' => $context['topics_per_page'],
))
);


Thanks a lot! Resolve my problem!
IT Team of Fórum Fusca Brasil
www.forumfuscabrasil.com

b4pjoe

I have installed this mod on SMF 2.0 RC3 and it installs without any errors but I see nothing anywhere that you can mark any topics to ignore. Quick Moderation is enabled and I'm using the Default Theme. Here is a screen shot of where I think the button should be but it is not. Any ideas at all?

Brande

Joe,

You need enable quick moderation in your perfil to see this mod ...



IT Team of Fórum Fusca Brasil
www.forumfuscabrasil.com

b4pjoe

Quote from: Brande on July 28, 2010, 06:24:41 PM
Joe,

You need enable quick moderation in your perfil to see this mod ...

Yes, Quick Moderation is enabled as you can see by the checkboxes in the screen shot I posted.

Brande

Quote from: joec88 on July 28, 2010, 07:02:49 PM
Quote from: Brande on July 28, 2010, 06:24:41 PM
Joe,

You need enable quick moderation in your perfil to see this mod ...

Yes, Quick Moderation is enabled as you can see by the checkboxes in the screen shot I posted.

Joe, all right. I understand now! The button "Ignore Topics" show only in "/index.php?action=unreadreplies"

IT Team of Fórum Fusca Brasil
www.forumfuscabrasil.com

b4pjoe

#52
Quote from: Brande on July 28, 2010, 09:49:27 PM
Quote from: joec88 on July 28, 2010, 07:02:49 PM
Quote from: Brande on July 28, 2010, 06:24:41 PM
Joe,

You need enable quick moderation in your perfil to see this mod ...

Yes, Quick Moderation is enabled as you can see by the checkboxes in the screen shot I posted.

Joe, all right. I understand now! The button "Ignore Topics" show only in "/index.php?action=unreadreplies"



Thanks for the reply. Unfortunately that doesn't work for me either:

(Edited to add...I also did a fresh install of SMF 2.0 RC3, installed the mod and I still get nothing.)

Chas Large

You need to enable the new feature:

Admin >> Forum >> Boards >> Settings and check the box

Enable Ignore-Topics mod
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

b4pjoe

Quote from: Chas Large on July 30, 2010, 03:36:29 PM
You need to enable the new feature:

Admin >> Forum >> Boards >> Settings and check the box

Enable Ignore-Topics mod

Thank you. That was it.

Raffoz

just a question...

but the mod is just usable by single users?
can't i set some "ignored topics" so any user doesn't see it in the list of recents?
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

anidea

Hi all!

So I have this mod installed, and it looks great!  But...

200 members...I want to change their settings to "Display Quick Mod"=1, so that everyone will have the ability.

I can do a query, but I can't seem to find that field in the database?  Is there anyway to globally change their profile to have the ignore feature visible to them?

Chas Large

Quote from: anidea on September 21, 2010, 01:53:16 PM
Hi all!

So I have this mod installed, and it looks great!  But...

200 members...I want to change their settings to "Display Quick Mod"=1, so that everyone will have the ability.

I can do a query, but I can't seem to find that field in the database?  Is there anyway to globally change their profile to have the ignore feature visible to them?
If you're running SMF 2.0 then this can be done via:
Admin >> Configuration >> Themes and Layout >> Member Options >>
Select the Theme then click Change current options for all members using this theme
Select Change on the Show quick-moderation as line and select Checkboxes. Finally click Save.
Repeat for all themes in use.
My Modifications :)  My Forum

Please DO NOT PM me with support requests. Post the problem in the appropriate Support Board so everyone can benefit from the advice given.

anidea

Quote from: Chas Large on September 21, 2010, 02:41:01 PM
Quote from: anidea on September 21, 2010, 01:53:16 PM
Hi all!

So I have this mod installed, and it looks great!  But...

200 members...I want to change their settings to "Display Quick Mod"=1, so that everyone will have the ability.

I can do a query, but I can't seem to find that field in the database?  Is there anyway to globally change their profile to have the ignore feature visible to them?
If you're running SMF 2.0 then this can be done via:
Admin >> Configuration >> Themes and Layout >> Member Options >>
Select the Theme then click Change current options for all members using this theme
Select Change on the Show quick-moderation as line and select Checkboxes. Finally click Save.
Repeat for all themes in use.

Perfect!  Thanks :)

rhack382

#59
Quote from: Brande on July 18, 2010, 11:00:30 AM
Quote from: Arantor on May 18, 2010, 05:14:15 AM
Bingo, now I can see the problem. The query that finishes on line 1093 is broken.

Here's the product query:
$request = $smcFunc['db_query']('', '
SELECT t.id_topic
FROM {db_prefix}topics_posted_in AS t
LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
'. ($can_ignore ? 'LEFT JOIN {db_prefix}ignore_topics AS it ON (it.id_topic = pi.id_topic AND it.id_member = {int:current_member})' : '') .'
WHERE t.' . $query_this_board . '
AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
'. ($can_ignore ? 'AND IFNULL(it.id_topic, 0) = 0' : '') .'
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
'offset' => $_REQUEST['start'],
'limit' => $context['topics_per_page'],
))
);


And it's saying that it doesn't know pi.id_topic - well, here it doesn't because we never defined pi as a table alias. Should be:

$request = $smcFunc['db_query']('', '
SELECT t.id_topic
FROM {db_prefix}topics_posted_in AS t
LEFT JOIN {db_prefix}log_topics_posted_in AS lt ON (lt.id_topic = t.id_topic)
'. ($can_ignore ? 'LEFT JOIN {db_prefix}ignore_topics AS it ON (it.id_topic = t.id_topic AND it.id_member = {int:current_member})' : '') .'
WHERE t.' . $query_this_board . '
AND IFNULL(lt.id_msg, t.id_msg) < t.id_last_msg
'. ($can_ignore ? 'AND IFNULL(it.id_topic, 0) = 0' : '') .'
ORDER BY {raw:order}
LIMIT {int:offset}, {int:limit}',
array_merge($query_parameters, array(
'current_member' => $user_info['id'],
'order' => (in_array($_REQUEST['sort'], array('t.id_last_msg', 't.id_topic')) ? $_REQUEST['sort'] : 't.sort_key') . ($ascending ? '' : ' DESC'),
'offset' => $_REQUEST['start'],
'limit' => $context['topics_per_page'],
))
);


Thanks a lot! Resolve my problem!

What file doe this get inserted into?  Time to cut and paste.... [;D oh yes.. Recent.php... ?]

Advertisement: