Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on August 28, 2008, 05:43:20 PM

Title: Force Topic Read on Login
Post by: SMFHacks.com Team on August 28, 2008, 05:43:20 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=1364)

Force Topic Read On Login v2.1





Current Version: 2.1
Compatibility: SMF 1.1.x, SMF 2.0 RC2
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1364) | Comments (http://www.simplemachines.org/community/index.php?topic=258354.0) | Donate (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W43RKPPZ2KGYE)                          

Homepage: SMFHacks (http://www.smfhacks.com)
Type: New Feature (http://custom.simplemachines.org/mods/index.php?action=search;type=1)

Languages: (https://www.simplemachines.org/site_images/lang/english.gif) (https://www.simplemachines.org/site_images/lang/english_british.gif)




Features
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fdev.smfchat.com%2Fimg%2Fadd.png&hash=ff3fb47169155a9abc72a0b14176dd49abc5d0c6) Force new users to read a topic on first login.

Disclaimer: I give no guarantee that your users will actually read and comprehend the information you direct them to. In fact, I can't even guarantee that they'll look at the topic. The word 'read' in my mod refers to SMF's definition, that is, to view the page. Apart from that, this mod cannot and will not do anything further to ensure that your users actually know anything about what you redirect them to.




Installation
To upgrade, simply install the new package and the upgrade script will run. Once done, remove the old package.

If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if your using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

Useful Links
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)




Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)




Changelog
Legend:
! = Bugfix
- = Removed
+ = New Feature
o = Update
> = New Language
^ = Initial/New Release

7/29/09 - v2.1
! Fixed a small bug that threw a DB error on SMF 2.0 RC1.2

7/28/09 - v2.0
o Added support for SMF 2.0 RC1.2

8/27/08 - v1.0
^ Initial release.
Title: Re: Force Topic Read on Login
Post by: SgtMic on August 28, 2008, 06:06:22 PM
Just installed. Haven't tested it yet. :)

Is it possible to also make this for a Board?
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 28, 2008, 06:20:46 PM
Awsome mod..  I actually wanted something as such to redirect the users to read the rules as they login. Thanks alot..!! WOuld inform you about bugs or problems if i have any. Rock on...

EDIT:-
Tested and all working great. Just a question.

What if I want the user to see this message ID ?

http://yoursite.com/index.php/topic,9.msg9.html#msg9

I mean just direct to the message and like skipping up the header or anything above the message ?

Can be done ?
Title: Re: Force Topic Read on Login
Post by: jossanaijr on August 28, 2008, 06:30:23 PM
Great.  I will test it.
Title: Re: Force Topic Read on Login
Post by: ccbtimewiz on August 28, 2008, 06:38:22 PM
Congrats on the mod, Eliana.  :)
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on August 28, 2008, 06:42:47 PM
Great mod Eliana. Good luck with it.

SgtMic:

Have a look at this tip:

http://www.simplemachines.org/community/index.php?topic=257308.0

F.L.A.M.E.R:

No, you can redirect to the topic only.

Maybe Eliana will include these two features in the further releases.
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 28, 2008, 06:58:30 PM
hmm ok.. try it if you can... its actually a very useful mod... Thank you Eliana for this wonderful mod.
Title: Re: Force Topic Read on Login
Post by: Kimmie on August 28, 2008, 08:15:45 PM
Once the topic has been read by someone, will they keep getting redirected to it every time they log in? If so, maybe it can be incorporated to make it to where once someone has "replied" to the topic they will no longer have to be redirected to it - such as a Rules topic. 

And does this exclude staff?


Edit: I saw the note on the features and options page where it indicates "if they haven't read it before" so that answered my above questions - However - I installed this, set it up for a specific topic, logged in with a test account that has not read that topic yet, and it did not redirect me. It went straight to the Main page (which is TP). I tried adding the ".0" at the end thinking that was the problem, however when I saved the setting, it just reverted back the topic # without the .0.

Is there some place else it has to be turned on?
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 28, 2008, 08:20:33 PM
Hey just one more addition in this if possbile. Can you keep some setting that the users should be redirect or have a popup page (flash Message which owner wants) to be displayed for the 1st some days... (like 3-7) would be a kool thing to do...
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 28, 2008, 08:30:54 PM
Wow, lots of comments.

@SgtMic
Will keep that in mind for a future version. Until then, you can use [SiNaN]'s trick.

@F.L.A.M.E.R
To a specific message: No it doesn't. I could do that in the future, possibly.
Repeated redirect: I think that would probably get annoying. It's probably possible, but once they've read it, why do they need to read it again?

@Kimmie
Nope, it will check if the person has read it and only redirect if they have not yet read it. It also checks if a user has access to the topic, so users won't get redirected to a topic they can't see.
Title: Re: Force Topic Read on Login
Post by: jossanaijr on August 28, 2008, 08:32:52 PM
Did not install it yet but does it consider permissions?  I mean if I enter a topic in a restricted board only members that have permissions to this board will be redirected or all members will be redirected and those members without permission will have an error message?
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 28, 2008, 08:43:07 PM
you know there are some diff types of people in the world who donot read the message for once ? A better idea for that maybe, if any user doesnt stay on the page for more than 1 minute time, they should be free from redirection, and if the user goes to some other page before the limit of 1 minute then he should be brought back to that page during next login... thats probably a better idea i think...


also if you can add something as in permissions that the staff members can make some annoying users read rules every time they login and just have a page in there which shows the list and a remove option with it in there which would allow user to be free from redirection....

these type of features would probably be good for continues rule brackers which we probably ban them but its better to annoy them like this....
Title: Re: Force Topic Read on Login
Post by: Kimmie on August 28, 2008, 08:46:41 PM
Quote from: Eliana Tamerin on August 28, 2008, 08:30:54 PM

@Kimmie
Nope, it will check if the person has read it and only redirect if they have not yet read it. It also checks if a user has access to the topic, so users won't get redirected to a topic they can't see.

Thats why I tested it with a new test account I made (specifically for testing out this mod). This account has not yet read the topic and they are able to see it.

The redirection didnt work.

Edit I just tried to test it out on 2 other topics and the redirect wouldnt work with either of them.
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on August 28, 2008, 09:17:14 PM
Are you sure about the topic IDs?
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 28, 2008, 09:18:32 PM
@FLAMER
Quote from: First post of topic, also in readmeDisclaimer: I give no guarantee that your users will actually read and comprehend the information you direct them to. In fact, I can't even guarantee that they'll look at the topic. The word 'read' in my mod refers to SMF's definition, that is, to view the page. Apart from that, this mod cannot and will not do anything further to ensure that your users actually know anything about what you redirect them to.

That's just not what this mod was intended to do. It'll redirect them once, but I don't want it to be an admin spamming tool.

@Kimmie
Did you have the mod enabled?

@jossanaijr
I just answered that in the above post. It will account for permissions, so that users aren't redirected to topics they can't see.
Title: Re: Force Topic Read on Login
Post by: Nathaniel on August 29, 2008, 02:43:47 AM
Very nice mod Eliana! :D

Waiting for a SMF 2 version. ;)
Title: Re: Force Topic Read on Login
Post by: DirtRider on August 29, 2008, 07:22:10 AM
Well done Eliana very nice mod I have been looking for something like this. It now gives my new members a bit of direction when they first login taking them to a thread with a few pointers  :D

Title: Re: Force Topic Read on Login
Post by: jossanaijr on August 29, 2008, 07:35:01 AM
OK, thanks.
Can I setup one topic for each membergroup?
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 29, 2008, 07:51:06 AM
Quote from: jossanaijr on August 29, 2008, 07:35:01 AM
OK, thanks.
Can I setup one topic for each membergroup?

Added to future feature list.
Title: Re: Force Topic Read on Login
Post by: L.G.S on August 29, 2008, 07:54:48 AM
This mod looks SO GOOD.

But its not for 2.0 :(
Title: Re: Force Topic Read on Login
Post by: jossanaijr on August 29, 2008, 09:29:20 AM
Quote from: Eliana Tamerin on August 29, 2008, 07:51:06 AM
Added to future feature list.
WOW. Great!
Title: Re: Force Topic Read on Login
Post by: DonGiovanni on August 29, 2008, 12:57:13 PM
It will be great if the new version will have a welcome message like "We think that this topic is important to you" and then redirect. Because it's confusing for members who login and suddenly come into some topic that was not his choice :D

But mod is really great. Nice job.
Title: Re: Force Topic Read on Login
Post by: JW21 on August 29, 2008, 01:49:20 PM
Hmmmm, this mod doesn't work for me. I don't get any errors or anything so it seems like it should work. I even went through the manual installation instructions to make sure everything was there. It's all there where it should be but it doesn't redirect or anything. I am using a forum that is 1.1.5. I do have it enabled. I did copy the numbers from the post I wanted to redirect to.

Is there anything else I could try to see what went wrong?
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 29, 2008, 02:56:52 PM
How can i direct the users to the announcements ?
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 29, 2008, 04:05:06 PM
Quote from: DonGiovanni on August 29, 2008, 12:57:13 PM
It will be great if the new version will have a welcome message like "We think that this topic is important to you" and then redirect. Because it's confusing for members who login and suddenly come into some topic that was not his choice :D

But mod is really great. Nice job.

I'll add that to the features list.

Quote from: JW21 on August 29, 2008, 01:49:20 PM
Hmmmm, this mod doesn't work for me. I don't get any errors or anything so it seems like it should work. I even went through the manual installation instructions to make sure everything was there. It's all there where it should be but it doesn't redirect or anything. I am using a forum that is 1.1.5. I do have it enabled. I did copy the numbers from the post I wanted to redirect to.

Is there anything else I could try to see what went wrong?

Are you testing on non-admin users? Admins don't get redirected.

Quote from: F.L.A.M.E.R on August 29, 2008, 02:56:52 PM
How can i direct the users to the announcements ?

What announcements? SMF doesn't have an announcements feature. Are you talking about a specific board where you post announcements? Because this mod doesn't redirect to a specific board yet.
Title: Re: Force Topic Read on Login
Post by: Adish - (F.L.A.M.E.R) on August 29, 2008, 04:45:06 PM
nah.. the global announcements mod is there in smf.... can you do something to merge up with that ? i mean the announcements are kind of more important where the users are normally to be redirected.. you can have a look over the global announcements mod here:- http://custom.simplemachines.org/mods/index.php?mod=419

Possible ?
Title: Re: Force Topic Read on Login
Post by: Kimmie on August 29, 2008, 05:29:35 PM
Quote from: [SiNaN] on August 28, 2008, 09:17:14 PM
Are you sure about the topic IDs?

Yes - however, even if I put in an incorrect number, whatever topic that that number is accociated with, it "should" redirect this account because this is a new account I just made for the specific purpose of testing out this mod. I tried a total of 5 different topic numbers now and this account doesnt get redirected to any of them.

Quote from: Eliana Tamerin on August 28, 2008, 09:18:32 PM
@Kimmie
Did you have the mod enabled?

and - yes

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi36.tinypic.com%2F2yy3zpx.png&hash=d3f04797eabe2974195e9b9af126c6a9d8cb19df)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi35.tinypic.com%2Fwafy4l.png&hash=2e91aa8a16e67acb8cb8ea4662a86dcb5ff11656)


and just to elaborate:

1. This test account is NOT in a staff group. They are in the regular member group. Even so, there is no setting to exclude any specific groups so even if this member was in a staff group, if that topic is unread to them, it should redirect them as well - right?
2. This topic is accessible to that group. Its the Rules topic - its available to "everyone"

It just simply does not work. The only thing I can figure is that since the first thing folks see when they log in is the TP page, that has something to do with it. Either that or there is something more we are supposed to be doing other than checking the box to enable it and putting the topic number in.
Title: Re: Force Topic Read on Login
Post by: 4b11l on August 29, 2008, 09:50:46 PM
Sounds like an excellent mod. Any chance of having them separated between two instances?

#1, only for new member registrations. That way, the idea of redirecting them to the rules makes a lot more sense not having to worry about cookies and what not.

#2, for all members like the way it currently is.
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 29, 2008, 10:03:45 PM
Kimmie, what other mods do you have installed, just in case it's not a TP issue. I'll check out TP and SP and ensure they don't conflict with my mod.

And Flamer, at this time I don't intend to support redirection to multiple topics. Since the Global Announcements mod does this, I don't think I'm going to integrate my mod with it. The mod will continue to redirect users to only one (1) topic of your choosing. And since announcements are at the top of every forum, you shouldn't have a problem with getting people to read them.

4b11l, interesting idea. I'll put it down on the future features list.
Title: Re: Force Topic Read on Login
Post by: Impsat-1 on August 30, 2008, 04:02:59 AM
Wowww!!!... Excelent MOD, Fine Work in a First Try... Thanks Eliana, Regards 8).-
Title: Re: Force Topic Read on Login
Post by: Daggers on August 30, 2008, 04:13:56 AM
Unfortunately this mod does not work for me either :(

I dont use TP either. I have tried with a test account on several topics but without any success
Title: Re: Force Topic Read on Login
Post by: digit on August 30, 2008, 05:29:34 AM
Very cool and useful mod.  Thanks!

I was wondering if I could redirect to a custom action rather than a post.

I thought I could just change....

redirectexit('topic=' . $topic . '.0');

to...

redirectexit('action=' . $topic . '');

and enter my custom action name instead of the topic ID...  but then I noticed..

$topic = (int) $modSettings['force_read_topic_id'];

Could I just remove the (int) ?


Thanks in advance.
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on August 30, 2008, 05:34:42 AM
Kimmie or Daggers:

Can one of you provide me an admin account via pm to check it?

digit:

That won't work. Maybe you can add a new setting to Mod Settings and do it like:

redirectexit('topic=' . $topic . '.' . $modSettings['force_read_topic_msg_id']);
Title: Re: Force Topic Read on Login
Post by: Daggers on August 30, 2008, 05:59:46 AM
I can create an admin account...

Before I do... if a user is signed in 'forever' and the next time they visit the forum are they taken to the assigned topic, or do they HAVE to be logged out and then logged back in to be taken to the topic?



Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 30, 2008, 06:10:03 AM
Digit
That won't work, because the field in ModSettings is also an int. I could add redirection to an action as well if you needed, it's possible.

Daggers
I'm pretty sure it checks sessions, but I'll test it.

To all that are experiencing problems, can you PM me the following:
A link to your forum
A test admin account
A test nonadmin account
Title: Re: Force Topic Read on Login
Post by: Daggers on August 30, 2008, 06:32:07 AM
pm sent ;)
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 30, 2008, 06:58:02 AM
Daggers, the redirection works for me on your forum. You have all the settings correct and I was redirected to your topic properly on login. For both accounts. I don't see the problem.
Title: Re: Force Topic Read on Login
Post by: Daggers on August 30, 2008, 06:59:57 AM
Thanks for that.

It might have something to do with trying this with test accounts from the same machine
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on August 30, 2008, 07:13:54 AM
Just ensure those accounts have not yet read the topics. ;)
Title: Re: Force Topic Read on Login
Post by: Kimmie on September 01, 2008, 02:03:38 AM
Quote from: Eliana Tamerin on August 30, 2008, 06:10:03 AM


Daggers
I'm pretty sure it checks sessions, but I'll test it.


I finally figured out what the problem is - it wouldnt redirect my test account because it checks cookies (found that out as soon as I cleaned mine out). It also even redirects admins cuz it redirected me right after I cleared out my cookies. Basically this mod will only be useful in redirecting new members because most folks dont know to clean out their cookies on a regular basis..lol.

My only wory is, since its cookie based, will a member get redirected "every" time they clean out their cookies. (Ive been redirected twice already)
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on September 01, 2008, 08:56:34 AM
Well, it's based on SMF's "mark read" status. I'm unsure if that's cookie based or not. I *could* add a field to the member table once the member has read it, and then clean that out every time the topic ID changes.
Title: Re: Force Topic Read on Login
Post by: ManilaGurL on September 01, 2008, 11:17:48 AM
Will this work with DilberMC and TinyPortal installed?
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on September 01, 2008, 11:27:05 AM
It should work on any theme. And I'm not sure about any TP conflict yet, but you can try it.
Title: Re: Force Topic Read on Login
Post by: ASF on September 01, 2008, 01:50:17 PM
I installed but i get this error at the top of my forum..

/ Start Force Read Topic on Login Mod $txt['force_read_enable'] = 'Enable Force Read Topic on Login mod?
(This will force users to read this topic when they login, if they haven\'t read it before.)'; $txt['force_read_topic_id'] = 'Enter the Topic ID'; // End Force Read Topic on Login Mo

i'm using smf 1.1.5
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on September 01, 2008, 03:12:45 PM
Open your Modifications.english.php

Make sure that ?> is at the end of the file. If not, move it there.

Save and upload.
Title: Re: Force Topic Read on Login
Post by: 4Kstore on September 01, 2008, 10:05:34 PM
Thx For the mod.

Spanish traduction:

Modifications.spanish.php

// Force Read Topic on Login Mod
   / Start Force Read Topic on Login Mod
$txt['force_read_enable'] = 'Activar Force Read Topic on Login mod?<br /><span class="smalltext" style="font-weight: bold;">(Esto forzara a los usuarios a leer este topic cuando ellos se loggen, solo si no lo leyeron antes.)</span>';

$txt['force_read_topic_id'] = 'Ingresar el ID del topic';



Help.spanish.php:

// Start Force Read Topic on Login Mod
$helptxt['force_read_topic_id'] = 'Para el econtrar el id del topic,haga lo siguiente:<br />-Abra el topic que desee.<br />-Copie la URL que sera de esta forma: http://tusitio.com/forum/index.php?topic=<b>123456</b>.0<br />-Copie el id del topic (ejemplo, lo marcado con negrita: <b>123456</b>)<br />-y vaya a Características y Opciones > Basic Settings es su panel de admin<br />-Pegue el topic id (ej: <b>123456</b>) dentro del box de " Ingresar el ID del topic"';
// End Force Read Topic on Login Mod


i wait the next version with membergroups permissions

Baiis (!)
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on September 01, 2008, 10:16:53 PM
Thanks 4kstore, I'll include those translations in the next version.
Title: Re: Force Topic Read on Login
Post by: bran8464 on September 08, 2008, 08:54:20 AM
Nice mod idea. I have installed it and checked the box plus the topic id but I cannot get it to work. I logged out of admin and used a test member ID but no success. I then checked with a member and it didn't work for him either. Any help would be much appreciated.

Freedom Island (http://www.noodiebooties.com/69)
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on September 08, 2008, 08:57:12 AM
And users have access to this topic?

Would you mind PMing me a test admin and test non-admin account details?
Title: Re: Force Topic Read on Login
Post by: Kimmie on September 08, 2008, 01:29:33 PM
Theirs definitely somethign weird going on with it. I have a test account that I log in with periodically to keep an eye on things without being logged in as admin and every time I log in, it redirects me to my rules thread. I also have the Topic Log mod installed so I can see who all has viewed a topic and this account only shows as having viewed the topic "once" so something somewhere isnt updating. Not sure if its this mod, or the topic mod log, but in either case, that is also tied to the files within SMF that record "views".

Heck if I know..lol

I hope its not redirecting every member every time they log in.. that would be a big deterrent to folks. :(
Title: Re: Force Topic Read on Login
Post by: M@nNiak on September 14, 2008, 07:16:01 AM
i already installed, and works great!.

thanks.   :D
Title: Re: Force Topic Read on Login
Post by: digit on September 14, 2008, 11:30:01 AM
Weird...  it worked for me until recently.

Now even if I update the topic ID no one is redirected. 

>:(
Title: Re: Force Topic Read on Login
Post by: DirtRider on September 18, 2008, 07:13:30 AM
I have upgraded to SMF 1.1.6 and the mod has stopped working       
Title: Re: Force Topic Read on Login
Post by: EV on September 25, 2008, 12:13:04 PM
Has there been a fix yet for this?  I doesn't work at all for me.

Before I apply the mod this is what is displayed.

Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    .\Sources/LogInOut.php    Test successful
2.    Execute Modification    .\Sources/ModSettings.php    Test successful
3.    Execute Modification    .\Themes\default/languages/Modifications.english.php    Test successful
4.    Execute Modification    .\Themes\default/languages/Modifications.english-utf8.php    Skipping file
5.    Execute Modification    .\Themes\default/languages/Modifications.english_british.php    Skipping file
6.    Execute Modification    .\Themes\default/languages/Modifications.english_british-utf8.php    Skipping file
7.    Execute Modification    .\Themes\default/languages/Help.english.php    Test successful
8.    Execute Modification    .\Themes\default/languages/Help.english-utf8.php    Skipping file
9.    Execute Modification    .\Themes\default/languages/Help.english_british.php    Skipping file
10.    Execute Modification    .\Themes\default/languages/Help.english_british-utf8.php    Skipping file
Title: Re: Force Topic Read on Login
Post by: EV on September 30, 2008, 01:55:18 PM
I found why this isn't working on my system.

The following code is always empty or nothing.  It never determines a user has access to the topic, even though they do.

   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $user_info[query_see_board]
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on October 01, 2008, 07:46:38 AM
EV, what is the problem with that code? Can you elaborate?

- Mod should be enabled
- A correct topic ID should be set from settings
- User logging in, should have never read the topic

Tested with a fresh 1.1.6 and no problems for me. You might be missing a small point.
Title: Re: Force Topic Read on Login
Post by: EV on October 01, 2008, 09:18:41 AM
Quote from: [SiNaN] on October 01, 2008, 07:46:38 AM
EV, what is the problem with that code? Can you elaborate?

- Mod should be enabled
- A correct topic ID should be set from settings
- User logging in, should have never read the topic

Tested with a fresh 1.1.6 and no problems for me. You might be missing a small point.

Check this thread out. 

http://www.simplemachines.org/community/index.php?topic=265175.0 (http://www.simplemachines.org/community/index.php?topic=265175.0)
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on October 01, 2008, 10:47:48 AM
I see. Seems like the query see board is not updated until. This should fix it:

Find:

   // Check if the user can see the topic first.
   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $user_info[query_see_board]
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);


Replace:

$groups = !empty($user_settings['additionalGroups'][0]) ? array_unique(array_merge(array($user_settings['ID_GROUP']), $user_settings['additionalGroups'])) : array($user_settings['ID_GROUP']);
$query = $user_info['is_admin'] ? '1' : '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $groups) . ', b.memberGroups))';

   // Check if the user can see the topic first.
   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $query
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);
Title: Re: Force Topic Read on Login
Post by: digit on October 01, 2008, 01:46:31 PM
sigh.... trying to follow this (how many related threads do we have?)

What file is the above referenced code on?

Thanks in advance.
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on October 01, 2008, 02:29:20 PM
This is the only one, no worries. Above code should be in LogInOut.php after you install the mod.
Title: Re: Force Topic Read on Login
Post by: EV on October 05, 2008, 03:51:49 PM
Quote from: [SiNaN] on October 01, 2008, 10:47:48 AM
I see. Seems like the query see board is not updated until. This should fix it:

Find:

   // Check if the user can see the topic first.
   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $user_info[query_see_board]
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);


Replace:

$groups = !empty($user_settings['additionalGroups'][0]) ? array_unique(array_merge(array($user_settings['ID_GROUP']), $user_settings['additionalGroups'])) : array($user_settings['ID_GROUP']);
$query = $user_info['is_admin'] ? '1' : '(FIND_IN_SET(' . implode(', b.memberGroups) OR FIND_IN_SET(', $groups) . ', b.memberGroups))';

   // Check if the user can see the topic first.
   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $query
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);


I just tried your fix and it does seem to work now.  Thank you for your assistance!  I really appreciate the effort.
Title: Re: Force Topic Read on Login
Post by: [SiNaN] on October 05, 2008, 03:57:32 PM
You're welcome. And thanks for you too, for reporting and helping with identifying the bug.
Title: Re: Force Topic Read on Login
Post by: InternetMafia on October 09, 2008, 07:14:11 PM
Any plans to make this compatible with 1.1.6
Title: Re: Force Topic Read on Login
Post by: floydpink on February 05, 2009, 02:34:49 AM
I followed the manual instructions for 1.1.7 installation and its working like a dream.
Great mod, thanks.
Title: Re: Force Topic Read on Login
Post by: DirtRider on March 06, 2009, 01:04:38 AM
Will this be upgraded for RC1 at all
Title: Re: Force Topic Read on Login
Post by: jossanaijr on June 12, 2009, 06:14:56 PM
Any news here?
What about force topic read only if member did not read it yet or if he did not read all new replies?
Title: Re: Force Topic Read on Login
Post by: JBlaze on July 28, 2009, 11:44:32 PM
Update:

Mod taken over by JBlaze
Updated for 2.0 RC1.2 and 1.1.10
Title: Re: Force Topic Read on Login
Post by: JBlaze on July 29, 2009, 12:47:41 AM
Update:

7/29/09 - v2.1
! Fixed a bug that would throw a DB error for SMF 2.0 RC1.2
Title: Re: Force Topic Read on Login
Post by: Groundhog on July 29, 2009, 03:01:20 AM
Working good thanks (SMF 2.0 RC1) :)
Title: Re: Force Topic Read on Login
Post by: JBlaze on July 29, 2009, 03:43:31 AM
Quote from: Groundhog on July 29, 2009, 03:01:20 AM
Working good thanks (SMF 2.0 RC1) :)

Glad you like it :)
Title: Re: Force Topic Read on Login
Post by: ralliart on July 29, 2009, 11:04:31 AM
any future plan for adding a feature that forces EVERYONE to read a specific thread rather than the new users?  :)
Title: Re: Force Topic Read on Login
Post by: Eliana Tamerin on July 29, 2009, 11:39:03 AM
That's exactly what this does, ralliart. If your users haven't already read this topic (in which case, they're ahead of the game), then it directs them there the next time they log in. All users, young and old, new and ancient.
Title: Re: Force Topic Read on Login
Post by: ralliart on July 30, 2009, 09:58:29 AM
Quote from: Eliana Tamerin on July 29, 2009, 11:39:03 AM
That's exactly what this does, ralliart. If your users haven't already read this topic (in which case, they're ahead of the game), then it directs them there the next time they log in. All users, young and old, new and ancient.

Thanks for the clarification, Eliana.  :)
Title: Re: Force Topic Read on Login
Post by: Ampix0 on August 03, 2009, 04:45:57 PM
Ok i have a question.

Is this EVERY TIME the user logs in?

Because i would love a mod where if i have an announcement the user is asked to read it before continuing.
Title: Re: Force Topic Read on Login
Post by: JBlaze on August 03, 2009, 07:13:59 PM
This mod makes it so that a user is forced to read a topic if they have not yet read it before. Once they read it, it is no longer forced upon them.
Title: Re: Force Topic Read on Login
Post by: imrich on September 06, 2009, 08:18:21 AM
Thanks for this great mod!

This appears to only support one 'must read' topic.

What I'd like is something that can allow more than one must read topic.

As an example:

First must read will be a 'forum code of conduct' which everyone must read.

Another could come up from time to time for a club, for example "The club meeting is postponed one week due to the holiday, don't forget!"

Is there any way to support more than one 'must read' topic on login?

The way it could work is for a new member, they would have to read each 'must read' topic. For someone that has been a member for a while, they would have read 'must read #1' already, so they wouldn't see it again. But if a new 'must read' comes up, then they will be forced to read it.

Is this possible?

Thanks for any advice and for your support of this helpful mod.

Title: Re: Force Topic Read on Login
Post by: Blinker on September 06, 2009, 10:03:12 AM
For your rules, there's a redirect on activation mod that will send your new users to a certain location when they first activate.

After that you can use this mod for your single week to week "must read" topics.

If you need more than that there is also a redirect on login mod that you can use to send them to a certain topic.

It's a bit messy I know but you have some choices to make this all work.

Redirect on login/logout (http://custom.simplemachines.org/mods/index.php?mod=1443)

Redirect users on activation (http://custom.simplemachines.org/mods/index.php?mod=1445)

Redirect users on registration (http://custom.simplemachines.org/mods/index.php?mod=1446)
Title: Re: Force Topic Read on Login
Post by: imrich on September 09, 2009, 07:06:03 AM
Quote from: Blinker on September 06, 2009, 10:03:12 AM
For your rules, there's a redirect on activation mod that will send your new users to a certain location when they first activate.

After that you can use this mod for your single week to week "must read" topics.

If you need more than that there is also a redirect on login mod that you can use to send them to a certain topic.

It's a bit messy I know but you have some choices to make this all work.

Redirect on login/logout (http://custom.simplemachines.org/mods/index.php?mod=1443)

Redirect users on activation (http://custom.simplemachines.org/mods/index.php?mod=1445)

Redirect users on registration (http://custom.simplemachines.org/mods/index.php?mod=1446)

Thanks for these ideas. They may come in handly. However at this time those mods require that SMF be configured in very certain ways (such as immediate activation). Our SMF is a small group and may be controlled, so we are considering using 'member approval' activation.
Title: Re: Force Topic Read on Login
Post by: Blinker on September 09, 2009, 08:18:22 AM
It will still work. Member approval has an "approve and require activation" setting. That is what I use on my forum.

When the user activates they are immediately redirected to the forum rules.

Title: Re: Force Topic Read on Login
Post by: imrich on November 09, 2009, 02:59:12 PM
Any update for SMF 2 RC2? :) thanks!
Title: Re: Force Topic Read on Login
Post by: JBlaze on November 11, 2009, 09:06:37 PM
Quote from: imrich on November 09, 2009, 02:59:12 PM
Any update for SMF 2 RC2? :) thanks!

It's on my todo list ;D
Title: Re: Force Topic Read on Login
Post by: Eclipse16V on November 24, 2009, 07:21:38 AM
Any News for SMF 2.0 RC2 ?
Title: Re: Force Topic Read on Login
Post by: meko me on December 26, 2009, 03:46:44 PM
Quote from: Eclipse16V on November 24, 2009, 07:21:38 AM
Any News for SMF 2.0 RC2 ?

hello this is working on RC2  ??? works for me  :P
Title: Re: Force Topic Read on Login
Post by: JBlaze on December 26, 2009, 05:28:30 PM
Yes it will work on 2.0 RC2 I just haven't gotten around to marking as so.
Title: Re: Force Topic Read on Login
Post by: B.SkiLLs on January 21, 2010, 05:53:17 AM
Hi.. Great mod.

Question tho. What can we do and enter if and when we are using the pretty URL mod ?? Instead of topic ID ?

Thxs.

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on January 24, 2010, 04:22:59 PM
Updated for SMF 2.0 RC2!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: TheListener on January 26, 2010, 08:35:25 AM
Do users get redirected everytime they log in or just on their first ever log in?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on January 26, 2010, 08:36:16 AM
Just first time. Since it checks if they have read the topic or nto.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: TheListener on January 26, 2010, 08:45:21 AM
Consider me sold.

;)

Edit:  Darn my rules are not as a topic.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Achilles. on January 27, 2010, 11:48:05 AM
Nice, however how can you get the TOPIC ID when you use the Pretty URL mod? Thanks!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on January 27, 2010, 08:06:39 PM
Quote from: Achilles. on January 27, 2010, 11:48:05 AM
Nice, however how can you get the TOPIC ID when you use the Pretty URL mod? Thanks!
That is very tricky hmm see if you can see it when you try to move the topic or reply
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Achilles. on January 27, 2010, 10:48:08 PM
Quote from: vbgamer45 on January 27, 2010, 08:06:39 PM
Quote from: Achilles. on January 27, 2010, 11:48:05 AM
Nice, however how can you get the TOPIC ID when you use the Pretty URL mod? Thanks!
That is very tricky hmm see if you can see it when you try to move the topic or reply

I'll try it, thanks!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Welovea1 on January 28, 2010, 12:28:09 PM
We are unable to get this mod to work on our forum.  We have the following mods installed.  Could there possibly be a conflict? 

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi271.photobucket.com%2Falbums%2Fjj150%2FBoaterLady%2FInstalledMods.jpg&hash=d9955c013411ebdb69c14d5a8ec4f86ebcbe4f53)

Our language is English and we've made no manual changes to the loginout.php, help.php, or the modsettings.php files.   

We're hopeful that we can get this very useful mod to work. 

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on January 28, 2010, 12:28:57 PM
Is not redirecting or did it not install cleanly?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Welovea1 on January 28, 2010, 03:09:03 PM
Quote from: vbgamer45 on January 28, 2010, 12:28:57 PM
Is not redirecting or did it not install cleanly?

It's not redirecting.  Install was clean.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on January 28, 2010, 03:14:00 PM
Click unread on the topic then logout and login again.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Welovea1 on January 28, 2010, 05:07:36 PM
Quote from: vbgamer45 on January 28, 2010, 03:14:00 PM
Click unread on the topic then logout and login again.

That didn't work.  Also tried logging back in as a general member and was not redirected.  I ver much appreciate the suggestions.  I'd love to get this working.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: codevarun on February 05, 2010, 01:10:13 PM
neither this working on mine and there is only one common mod package b/w mine and the image above which is thank-o-matic
If you could help me please?
Thanks
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: Bugo on February 14, 2010, 09:59:41 AM
Russian text:


// Start Force Read Topic on Login Mod
$txt['force_read_enable'] = 'Активировать переадресацию после авторизации на форуме?<br /><span class="smalltext" style="font-weight: bold;">(Все пользователи будут принудительно перенаправлены к теме с указанным ниже ID, если они не читали её ранее)</span>';
$txt['force_read_topic_id'] = 'Введите ID темы';
// End Force Read Topic on Login Mod
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on February 14, 2010, 10:39:41 AM
Thanks for the translation
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: MordyT on February 14, 2010, 08:54:06 PM
Quote from: Achilles. on January 27, 2010, 11:48:05 AM
Nice, however how can you get the TOPIC ID when you use the Pretty URL mod? Thanks!

The easiest way to get the topic ID when you have Pretty URLs installed is:

Open Topic
Right Click > View Source
Ctrl+F (search) start typing "topicid" and it should show you the ID.
Try it with this one...

Screenshot Attached....works like a charm!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: vbgamer45 on February 15, 2010, 12:26:07 AM
Nice tip! It does get a little tricky with the SEO mods
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: MordyT on February 15, 2010, 11:40:30 AM
Nice mod. Least i can do is share some tricks...
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: linette97 on February 23, 2010, 03:31:06 PM
I'm having the same problem, It does not redirect, It hasn't for awhile, It use to before I changed to 2.0 RC2... I un-installed and installed again after I seen it was updated. any Iclues?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC2
Post by: sattninja on February 25, 2010, 02:22:44 PM
i have installed this on RC2 and it installed with no errors however it does not so anything i have enabled it and put the post# 256 fir my rules but is doesnt redirec to to anytihng i made a test acct and logged in for the first time and nothing happened
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on March 08, 2010, 09:17:01 PM
Updated for SMF 2.0 RC3!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on March 08, 2010, 09:19:39 PM
wow thanks but i still havent gotten it to work on RC2 and have gotten no response on my post either

keep up the good work maybe after RC3 becomes public i can try it again
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on March 08, 2010, 09:24:52 PM
RC3 is public now :)
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: MarcusJ on March 10, 2010, 10:24:54 PM
Installed and working perfectly on RC3.  Thank you vbgamer.

On suggestion I'd like to see for this mod is a pop-up that lets the user know they are getting redirected to an important topic.  Similar I guess to how I have seen it work on vB.  Of course I have no idea how to implement this or if it's even possible.

Thanks again for a great mod.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: CapadY on March 15, 2010, 01:18:40 PM
I've manualy installed this MOD in RC3

There are 2 problems.
First, there is no text in the modifications Menu-part. The needed text isn't in the language file too. The field "$txt['force_read_desc']" is used in ManageSettings. This field can't be find in Modifications_English. After Adding this text it wasn't shown either.

Second, as far as I can see there is no redirection at all.

Any support here ?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: luismanson on April 05, 2010, 02:18:00 PM
same here, it does not appear to redirect
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 12:57:23 PM
hi i have this installed on RC2 everything seems to be installed fine however when i turn the mod on and insert the post id i log in with a test acct and it does not do anything like it isn't even installed
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:00:41 PM
Quote from: sattninja on June 25, 2010, 12:57:23 PM
hi i have this installed on RC2 everything seems to be installed fine however when i turn the mod on and insert the post id i log in with a test acct and it does not do anything like it isn't even installed

Because you have already read that ...
make new account then check that again ...

Cheers..
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 01:26:09 PM
no sir just made a brand new acct and logged in for the first time and still no redirect 

i also checked the parser and all edits seem to be where they are supposed to be
weird just doesn't want to work
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:31:54 PM
do you have global announcement installed? or any similar...?

and upload the ./Sources/LogInOut.php (or similar)


or just make sure this file maches with this mod

http://custom.simplemachines.org/mods/index.php?mod=1364

(parse it and then match it)
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 01:36:41 PM
yes i do have this installed

Yet Another Global Announcements Mod"

i tried to uninstall it cause i do not really use it but i have a page of errors so i am afraid to uninstall

i have attached the requested file
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:40:48 PM
I had the same problem so let me check if I can fix it .. but what I did was...

I uninstalled the forcetopic on read... then uninstalled the global announcement and then reinstall the force and then global announcement
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 01:44:34 PM
ok i have uninstalled the global anouncement mod and went to reinstall it there is only errors in the loginout php now i am gonna do that i am gonna uninstall both
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:46:18 PM
okay just figured out..
you have the issue with the login security mod... as this url is calling first then other ... don't know anything else I leave it to other
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:47:37 PM
Please give me the list of all the mods you have installed ...

Let me see how many effects the loginout.php file...
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 01:48:55 PM
holy ****** man hod onto your hat
1.     Set the default session length for login      1.0       [ Uninstall ]  [ List Files ]  [ Delete ]
2.    Team Page    3.2    [ Uninstall ] [ List Files ] [ Delete ]
3.    nCode Image Resizer    1.2    [ List Files ] [ Delete ]
4.    Anonymize Links    2.5    [ Uninstall ] [ List Files ] [ Delete ]
5.    MonthUser    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    BK-SMF Sub-Board    1.5    [ Uninstall ] [ List Files ] [ Delete ]
7.    Moderator and Administrator Comment Tags    1.7    [ Uninstall ] [ List Files ] [ Delete ]
8.    Display Name On Registration    2.0    [ Uninstall ] [ List Files ] [ Delete ]
9.    Dynamic_Memberlist    2.0.2    [ Uninstall ] [ List Files ] [ Delete ]
10.    Yet Another Global Announcements Mod    2.4    [ Install Mod ] [ List Files ] [ Delete ]
11.    vNES Integration    1.0    [ Uninstall ] [ List Files ] [ Delete ]
12.    Board Notices    1.0    [ Uninstall ] [ List Files ] [ Delete ]
13.    Extended Registration Notifications    0.9    [ Uninstall ] [ List Files ] [ Delete ]
14.    InformationBar    1.0    [ Uninstall ] [ List Files ] [ Delete ]
15.    PageDropdown    1.3    [ Uninstall ] [ List Files ] [ Delete ]
16.    SideSparks Chat Integration    1.2.1    [ Uninstall ] [ List Files ] [ Delete ]
17.    Signature Prompt    1.0    [ Uninstall ] [ List Files ] [ Delete ]
18.    Mark Personal Messages as Read    1.0    [ Uninstall ] [ List Files ] [ Delete ]
19.    Menu Order    0.1    [ Uninstall ] [ List Files ] [ Delete ]
20.    Reason For Editing Mod    2.3.2    [ Uninstall ] [ List Files ] [ Delete ]
21.    Join Reason    1.2.1    [ Install Mod ] [ List Files ] [ Delete ]
22.    Auto Link Checker    1.1    [ Uninstall ] [ List Files ] [ Delete ]
23.    Add to Existing Ban Group    1.0    [ Uninstall ] [ List Files ] [ Delete ]
24.    [BBCode] Blink    1.0    [ Uninstall ] [ List Files ] [ Delete ]
25.    Global Headers Footers    2.0    [ Uninstall ] [ List Files ] [ Delete ]
26.    Remove SMF Logo    1.301    [ Uninstall ] [ List Files ] [ Delete ]
27.    Add Favicon.ico Support    1.101    [ Uninstall ] [ List Files ] [ Delete ]
28.    Simple Award System    2.1    [ Uninstall ] [ List Files ] [ Delete ]
29.    Force Topic Read On Login Mod    2.1    [ Uninstall ] [ List Files ] [ Delete ]
30.    Member Awards    2.2.1    [ List Files ] [ Delete ]
31.    Activity_Bar    1.0.1.2    [ Uninstall ] [ List Files ] [ Delete ]
32.    last login    2.3    [ Uninstall ] [ List Files ] [ Delete ]
33.    Tapatalk SMF Plugin    0.9.10    [ Install Mod ] [ List Files ] [ Delete ]
34.    Add IP2Location to Track IP    1.3    [ Uninstall ] [ List Files ] [ Delete ]
35.    SMF4iPhone-Mod    1.0    [ Uninstall ] [ List Files ] [ Delete ]
36.    Users Online Today    1.5.6    [ Uninstall ] [ List Files ] [ Delete ]
37.    Default_Membergroup    1.0.0.3    [ Uninstall ] [ List Files ] [ Delete ]
38.    Bookmarks    2.3    [ Uninstall ] [ List Files ] [ Delete ]
39.    Copy Topics    1.6    [ Uninstall ] [ List Files ] [ Delete ]
40.    Center Post Box    1.0    [ Uninstall ] [ List Files ] [ Delete ]
41.    Enhanced PM Warning Message    1.0    [ Uninstall ] [ List Files ] [ Delete ]
42.    AjaxChat Integration    3.2.1 (modified for SMF 2 RC2)    [ Install Mod ] [ List Files ] [ Delete ]
43.    Post_Board_Select    1.2    [ Uninstall ] [ List Files ] [ Delete ]
44.    Best 3    0.1    [ Uninstall ] [ List Files ] [ Delete ]
45.    Custom Copyright    1.2    [ Install Mod ] [ List Files ] [ Delete ]
46.    Country Flags    1.1    [ Uninstall ] [ List Files ] [ Delete ]
47.    Menu Buttons    1.1    [ Uninstall ] [ List Files ] [ Delete ]
48.    Move Old Topics    1.3.5.2    [ Uninstall ] [ List Files ] [ Delete ]
49.    SimplePortal    2.3.1    [ Uninstall ] [ List Files ] [ Delete ]
50.    Thank-O-Matic    2.0 RC1.3    [ Uninstall ] [ List Files ] [ Delete ]
51.    Member Color Link    3.0.7    [ Uninstall ] [ List Files ] [ Delete ]
52.    Slash through Banned Usernames    1.0    [ Install Mod ] [ List Files ] [ Delete ]
53.    Login Security    1.0.2.1    [ Uninstall ] [ List Files ] [ Delete ]
54.    No Temp Directory Removal    1.0    [ Uninstall ] [ List Files ] [ Delete ]
55.    The Rules    1.3    [ Uninstall ] [ List Files ] [ Delete ]
56.    Referrals Mod    2.2.7.1    [ Uninstall ] [ List Files ] [ Delete ]
57.    Aeva Media    1.0 Alpha 2    [ Uninstall ] [ List Files ] [ Delete ]
58.    Post Ratings    1.1    [ Uninstall ] [ List Files ] [ Delete ]
59.    Admin member list registration date    1.1    [ Uninstall ] [ List Files ] [ Delete ]
60.    New Topic Button    1.0    [ Uninstall ] [ List Files ] [ Delete ]
61.    SMF Topic Prefix LM Mod    1.1    [ Uninstall ] [ List Files ] [ Delete ]
62.    ResizeImagesToFitScreen    0.1.5    [ Uninstall ] [ List Files ] [ Delete ]
63.    Buddy List Page    1.0    [ Uninstall ] [ List Files ] [ Delete ]
64.    Warning Point    1.5    [ Uninstall ] [ List Files ] [ Delete ]
65.    dQuoteSelection    2.4    [ Install Mod ] [ List Files ] [ Delete ]
66.    Personal Messages to Membergroups    1.4    [ Uninstall ] [ List Files ] [ Delete ]
67.    Tidy Child Boards    1.1    [ Uninstall ] [ List Files ] [ Delete ]
68.    Avatar On Board RC2    2.1    [ Uninstall ] [ List Files ] [ Delete ]
69.    Current Signature Mod    1.1    [ Uninstall ] [ List Files ] [ Delete ]
70.    Message for your guests    0.1    [ Uninstall ] [ List Files ] [ Delete ]
71.    Profile Comments    2.0    [ Uninstall ] [ List Files ] [ Delete ]
72.    Purge inactive members with a number of posts    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
73.    Next Topic Page    1.1    [ Uninstall ] [ List Files ] [ Delete ]
74.    Signature Area BBCode Buttons    2.0.1    [ Uninstall ] [ List Files ] [ Delete ]
75.    AvatarSelect    1.2.1    [ Install Mod ] [ List Files ] [ Delete ]
76.    New In Topic View    1.1    [ Uninstall ] [ List Files ] [ Delete ]
77.    Wysiwyg Quick Reply RC2    RC2    [ Uninstall ] [ List Files ] [ Delete ]
78.    Ban List    2.0    [ Uninstall ] [ List Files ] [ Delete ]
79.    Welcome Topic Mod    2.0.3    [ Uninstall ] [ List Files ] [ Delete ]
80.    Search Focus Dropdown
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 01:50:03 PM
okay just desable the Login Security and hope it will sort out... (don't uninstall it for the moment)
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 01:57:15 PM
i could not disable it so i uninstalled login security but still no go
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: codevarun on June 25, 2010, 02:08:37 PM
Quote from: sattninja on June 25, 2010, 01:57:15 PM
i could not disable it so i uninstalled login security but still no go

have you read that post otherwise?
whats your site let me see that..
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 02:16:07 PM
i have changed the post number  few times and i am logging in with a test acct brand new and hasn't read any posts at all

i will pm you with the log in
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 25, 2010, 02:37:58 PM
new file as requested

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on June 26, 2010, 08:04:12 PM
anyone can you help me figure this out
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on July 06, 2010, 02:14:04 PM
anyone i have checked everything all the code is in place but it just will not work i am lost
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: DarkflameQ on August 18, 2010, 07:20:02 AM
Another mod i've never been able to get working.

Does anyone know of any mods that may interfere with this one?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on August 18, 2010, 10:30:13 AM
yeah i had the same problem man until i upgraded to RC3 and i havent installed all the mods i had but this one is working now maybe you  should post a list of your mods install let me see what matches what i had it is a place to start
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: DarkflameQ on August 18, 2010, 10:34:58 AM
Too many to list to be honest (55+), i have none relating to logging in so that's why i'm curious to know if anyone knew of any mods in particular non login related that may interfere with this one.

It's very aggravating that mods break other mods but SMF without mods would only be average software at best.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: sattninja on August 18, 2010, 10:37:58 AM
i agree

what version of smf are you running and you sound like me i had a crap load of mods running and like i said i just upgraded and didnt install alot of stuff just the real cool stuff and everything seems to be working now
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: DarkflameQ on August 18, 2010, 10:39:26 AM
RC3 and all the mods i've installed, i've installed because they are useful to me and my site not just for the hell of it :)

The majority of the mods i have working so i'm happy for the most part, it's just little mods like this i leave till last, but i can live without them if i can't find a solution but it would be helpful if they did work.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: petesky on November 15, 2010, 04:08:49 AM
Question: I installed on RC4 but user will not be redirected to the topic set in Modsettings for some reason.
What can be the reason why user is not being redirected to ? Have to set something else ?

EDIT: OK sorry, just read obove thread right now  ;D Any suggestions ?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: petesky on November 15, 2010, 11:23:25 AM
So, the update function works as expected as it is and i noticed still a problem with force topic read. So i decided to reduced the function without checking for existent topic and now it works.
Don't know why but have no time to debug this further.

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: dougiefresh on June 15, 2011, 02:48:04 PM
Thank you for the wonderful mod!  I thought I'd let everybody know that when I updated my forum from 2.0 RC5 to 2.0 Gold, I had to reinstall all my mods.  This mod installed without issues and without emulation.  Hope this info helps someone!
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: jeffreesworld on December 16, 2011, 10:10:36 AM
Not sure if I'll get a response... but I need help!

I need to know how to stop making a topic a force read.
I can't find the page of settings in my admin panel and every time I login I have to read the same page again and It's really annoying ._.
So if someone could help It'd be so appreciated! :)
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: floydpink on January 13, 2012, 11:21:18 PM
@jeffreesworld
UPDATE `{$db_prefix}settings` SET value =0 WHERE variable = 'force_read_enable'
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: floydpink on January 14, 2012, 01:16:37 AM
This is a great mod. The only restriction is that you can only force the viewing of one post at a time. As some of my members are not that regular it means waiting for quite a long time before being able to change the forced post to a new one.
Here's an update to the mod that allows a list of posts to be entered e.g. 1233,1243,1255 such that the first post in the list that hasn't been read is displayed.
Array of Forced Topics (Tested of Verion 1.1.16)
./Sources/LogInOut.php
Find
if (!empty($modSettings['force_read_enable']) && !empty($modSettings['force_read_topic_id']))
{
$topic = (int) $modSettings['force_read_topic_id'];
       
   // Check if the user can see the topic first.
   $request = db_query("
      SELECT t.ID_TOPIC
       FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
      WHERE ID_TOPIC = $topic
      AND $user_info[query_see_board]
      LIMIT 1", __FILE__, __LINE__);
      list ($exists) = mysql_fetch_row($request);
      mysql_free_result($request);

// Check if he read that topic.
   $request = db_query("
  SELECT ID_TOPIC
  FROM {$db_prefix}log_topics
  WHERE ID_TOPIC = $topic
AND ID_MEMBER = $ID_MEMBER
  LIMIT 1", __FILE__, __LINE__);
   list ($read) = mysql_fetch_row($request);
   mysql_free_result($request);
   
   // Just log you back out if it's in maintenance mode and you AREN'T an admin.
   if((empty($maintenance) || allowedTo('admin_forum')) && (empty($read) && !empty($exists)))
      redirectexit('topic=' . $topic . '.0');
   elseif ((empty($maintenance) || allowedTo('admin_forum')) && ((!empty($read)) || empty($exists)))
  redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, $context['server']['needs_login_fix']);
   else
      redirectexit('action=logout;sesc=' . $sc, $context['server']['needs_login_fix']);
   }
   else
   {
    // Just log you back out if it's in maintenance mode and you AREN'T an admin.
if (empty($maintenance) || allowedTo('admin_forum'))
redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, $context['server']['needs_login_fix']);
else
redirectexit('action=logout;sesc=' . $sc, $context['server']['needs_login_fix']);
}

Replace with // Floydpink INSERT - Replace Force Login Mod code above with more efficient version that allows arrays
// Force Topic Read MOD
    // Just log you back out if it's in maintenance mode and you AREN'T an admin.
if (allowedTo('admin_forum'))
redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, $context['server']['needs_login_fix']);
else if (!empty($maintenance))
redirectexit('action=logout;sesc=' . $sc, $context['server']['needs_login_fix']);
else
{
if (!empty($modSettings['force_read_enable']) && !empty($modSettings['force_read_topic_id']))
{
$topicidlist = $modSettings['force_read_topic_id'];
    // Check if the user can see the topic first.
    $request = db_query("
  SELECT t.ID_TOPIC
    FROM {$db_prefix}topics as t
  LEFT JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
  WHERE ID_TOPIC IN ($topicidlist)
  AND $user_info[query_see_board]
  ", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
$canseeids[] = $row['ID_TOPIC'];
}
  mysql_free_result($request);

if (!empty($canseeids))
{
// Check if already read each topic; show it if they haven't
foreach ($canseeids as $topic) {
$request = db_query("
SELECT ID_TOPIC
  FROM {$db_prefix}log_topics
  WHERE ID_TOPIC = $topic
AND ID_MEMBER = $ID_MEMBER
  LIMIT 1", __FILE__, __LINE__);
list ($read) = mysql_fetch_row($request);
    mysql_free_result($request);
   
    if(empty($read))
  redirectexit('topic=' . $topic . '.0');
}
}
}
// Default action
redirectexit('action=login2;sa=check;member=' . $ID_MEMBER, $context['server']['needs_login_fix']);
}
// Floydpink End EDIT


./Sources/ModSettings.php
Find // Force Read Topic on Login Mod
      array('check', 'force_read_enable',
      &$txt['force_read_desc']),
      array('int', 'force_read_topic_id'),
    '',

Replace with// Force Read Topic on Login Mod
      array('check', 'force_read_enable',
      &$txt['force_read_desc']),
      array('text', 'force_read_topic_id'),
    '',

Find
// Start Force Read Topic on Login Mod
$txt['force_read_enable'] = 'Enable Force Read Topic on Login mod?<br /><span class="smalltext" style="font-weight: bold;">(This will force users to read this topic when they login, if they haven\'t read it before.)</span>';
$txt['force_read_topic_id'] = 'Enter the Topic ID';
// End Force Read Topic on Login Mod

Replace with // Start Force Read Topic on Login Mod
$txt['force_read_enable'] = 'Enable Force Read Topic on Login mod?<br /><span class="smalltext" style="font-weight: bold;">(This will force users to read this topic when they login, if they haven\'t read it before.)</span>';
$txt['force_read_topic_id'] = 'Enter a list of Topic IDs separated by commas';
// End Force Read Topic on Login Mod
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on January 14, 2012, 01:21:20 AM
Thanks floydpink for code example that should be very useful for people who need it.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: bestfriendavinash on April 26, 2012, 02:21:54 AM
sounds good...

but will it work with 2.0.2 ?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: SMFHacks.com Team on April 26, 2012, 09:24:09 PM
It should work with 2.0.2
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: tMicky on September 17, 2012, 10:34:48 PM
Can you use it with the Welcome Topic Mod, so the new user sees that first?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on September 18, 2012, 01:55:37 PM
Maybe I would give it a try.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Kimmie on November 15, 2012, 02:54:34 PM
Would there be any conflict between this mod....


and this one?
http://custom.simplemachines.org/mods/index.php?mod=2666
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on November 15, 2012, 08:23:10 PM
No idea try and find out.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Jade Elizabeth on December 26, 2012, 08:56:37 AM
Is there a way I can change it to require them to reply to the topic?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on December 27, 2012, 02:48:15 PM
Could be done but would require extra code.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Jade Elizabeth on December 28, 2012, 01:29:42 AM
I'd really really really really really really like it done so please let me know what I need to do to make it happen :).
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: imrich on January 06, 2013, 10:37:38 AM
This mod used to be working perfectly for me.  But now it's forcing a read to the indicated topic for everyone, each time they login, even if they have read it before.

It's been a while since I first installed this mod and thought I remembered that it worked in that a user would only be forced to read a particular message the first time, not every time they logged in.

I am currently using SMF 2.0.3 and version 2.1 of this mod.

I use this mod to send new users to a 'welcome' message the first time they login. The welcome message gets a little old after they have seen it many many times. LOL

Note that the 'welcome' message is a 'locked' and 'sticky' message, could this be affecting the operation of this mod?


Any ideas of where I should look so not to continually force a read of this topic every time they login? Thanks for any help!

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Jade Elizabeth on January 06, 2013, 10:43:42 AM
Quote from: Jade Elizabeth on December 28, 2012, 01:29:42 AM
I'd really really really really really really like it done so please let me know what I need to do to make it happen :).

Pleeeeeeeeeeeeeeeeeeeeeeeeease? :D
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Jonesy125 on January 19, 2013, 04:07:29 AM
Would be great if you could specify multiple topics that needed to be read.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on January 19, 2013, 02:14:38 PM
Maybe one day
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: iain sherriff on February 25, 2013, 10:03:20 AM
Hi
using this with Anecdota/2.0.4.
I get this
// Start Force Read Topic on Login Mod $helptxt['force_read_topic_id'] = 'To find the topic ID, do the following:
-Open the topic you wish.
-Copy the URL. It should be in this format: http://yoursite.com/forum/index.php?topic=123456.0
-Copy the topic ID (ex, the bolded area: 123456)
-Go to the Features and Options > Basic Settings in your admin panel
-Copy the topic ID (ex: 123456) into this topic ID box'; // End Force Read Topic on Login Mod

at the top of some pages (not all)
i have checked that ?> is at the end of modifications.english.php.it is.

The mod installed OK but is not redirecting.
i have tried a member account that I know hasn't read the topic and I have read all this topic.
It is enabled and I have tried the default theme.

mods installed
QuoteCopyright and Footer Links    3.2    [ Uninstall ] [ List Files ] [ Delete ]
2.    Voter Visibility    1.01    [ Uninstall ] [ List Files ] [ Delete ]
3.    Google Analytics Code    1.4    [ Uninstall ] [ List Files ] [ Delete ]
4.    Topic Solved    1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
5.    Thank-o-matic    3.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    VigLink    1.3    [ List Files ] [ Delete ]
7.    Similar Topics    0.4    [ Uninstall ] [ List Files ] [ Delete ]
8.    Order Custom Profile Fields    1.1.1    [ Uninstall ] [ List Files ] [ Delete ]
9.    Tapatalk SMF 2.0 RC5/Final Plugin    3.2.1    [ List Files ] [ Delete ]
10.    SMF 2.0.3 Update    1.0    [ List Files ] [ Delete ]
11.    SMF 2.0.4 Update    1.0    [ Uninstall ] [ List Files ] [ Delete ]
12.    Ad Managment    3.0.1    [ Uninstall ] [ List Files ] [ Delete ]
13.    SimpleColorizer    1.1    [ Uninstall ] [ List Files ] [ Delete ]
14.    Member Color Link    3.1    [ List Files ] [ Delete ]
15.    Default_Membergroup    1.0.0.3    [ Uninstall ] [ List Files ] [ Delete ]
16.    Tapatalk SMF 2.0 RC5/Final Plugin    3.4.0    [ Uninstall ] [ List Files ] [ Delete ]
17.    Christmas Smileys    1.1    [ Uninstall ] [ List Files ] [ Delete ]
18.    FAQ Mod    1.2    [ Uninstall ] [ List Files ] [ Delete ]
19.    Force Topic Read On Login Mod    2.1    [ Uninstall ] [ List Files ] [ Delete ]
20.    Search Focus Dropdown


the bit of code above tells me to go to "basic settings" .am I right in thinking that does not apply to 2.0.4? 9I have put the topic number in the modification settings along with enable.

thanks

(this is not the board in my signature. It is in a closed board so no point giving you the link atm. I can give access if needed tho)
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Mr.FixIT on March 17, 2013, 03:30:08 PM
This mod doesn't work with smf 2.0.4 regardless what it says in topic for the mod....it doesn't work at all.  Even tried emulating without luck.  Also it says to look under basic settings and add topic id there but there is no location to enter it for there isn't a basic setting area....what settings there are under it says nothing about a id for the topic so this will need to be adjusted in order to work with smf 2.0.4 sad to say....  :(

I was hoping to redirect new members to the rules but I guess not.  Thanks for trying though but you should edit and remove the smf 2.0.4 from versions it works with for it doesn't. 
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: davidgould on June 11, 2013, 12:58:02 PM
Doesn't work here on 2.04 either.  No errors reported, just no change in SMF behaviour.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: davidgould on July 10, 2013, 01:11:17 AM
Any chance of this getting fixed?  It would be very very useful here.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: vbgamer45 on July 10, 2013, 10:33:30 AM
Not likely since I am busy at the moment.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: danielwmoore on November 22, 2013, 09:42:29 AM
For those out there wondering, in 2.0.6, you can use the settings in the Admin panel, but they do absolutely nothing. User's aren't having to read any topic. It's like a useless checkbox and textbox taking up room in the admin panel.

It's a shame, too. This sure would be handy to direct new users to the rules on their first login, or a welcome message, depending on your preference.

I have a forum that is closing in just under a month, and was going to use it to redirect all users that have been there for years to the topic announcing the closure, so they'd know what to expect.

Ah, well. I suppose that's what Newsletters are for.

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Hristo on November 22, 2013, 11:33:51 AM
Works fine on my localhost test forum with 98 mods installed.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: danielwmoore on November 22, 2013, 02:06:32 PM
Quote from: Hristo on November 22, 2013, 11:33:51 AM
Works fine on my localhost test forum with 98 mods installed.
Interesting.  Must be a particular mod I'm using. I've got over 50 installed, but only about a half-dozen or so from the SMF Mods site. The rest were custom programmed.

It doesn't do anything for 2 sites that I've tried it on, and I've also tested it on localhost test forum as well. I sign up a new user, log them in, but it does nothing. Yes, it is enabled.

I've given up and uninstalled it. It's just not that crucial at this point.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Augustine on November 22, 2013, 03:01:06 PM
I just installed this mod into my forum and it works perfectly.
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: jawad96 on March 03, 2014, 04:37:28 PM
Tried this on 2.0.7. Installed fine, but doesn't re-direct. The problem may be:

In the instructions it says "It should be in this format: http://yoursite.com/forum/index.php?topic=123456.0"

However, the forum URL is http://myforum.com/index.php?topic=1.0

The 'forum' isn't part of the URL?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: kasparh on March 06, 2014, 10:14:51 AM
My also, 2.0.7 installed, created more than one new topic, more than one test account, but no redirecting on login.
Simply the home page of the forum
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: diy guy on June 11, 2014, 02:29:49 PM
i noticed that when i prevent guests from viewing a particular board in which a topic to force read is created i.e unchecking guest in the board's modification and keeping all other users checked, it prevents this mod from working but if  i  check all users including the guests to have access to the board it seem to work.

please is there any way i can modify the code to prevent guests from viewing the board and still have it to work for me?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: kasparh on June 19, 2014, 06:14:47 AM
Quote from: diy guy on June 11, 2014, 02:29:49 PM
i noticed that when i prevent guests from viewing a particular board in which a topic to force read is created i.e unchecking guest in the board's modification and keeping all other users checked, it prevents this mod from working but if  i  check all users including the guests to have access to the board it seem to work.

please is there any way i can modify the code to prevent guests from viewing the board and still have it to work for me?

i tried the new version and tried also this trick, but no luck in any way, the mod doesn't work.
May be i have a conflict with another mod. Need to make some tests
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Shades. on June 20, 2014, 11:22:28 AM
Quote from: kasparh on June 19, 2014, 06:14:47 AM
Quote from: diy guy on June 11, 2014, 02:29:49 PM
i noticed that when i prevent guests from viewing a particular board in which a topic to force read is created i.e unchecking guest in the board's modification and keeping all other users checked, it prevents this mod from working but if  i  check all users including the guests to have access to the board it seem to work.

please is there any way i can modify the code to prevent guests from viewing the board and still have it to work for me?

i tried the new version and tried also this trick, but no luck in any way, the mod doesn't work.
May be i have a conflict with another mod. Need to make some tests

I'm  having the same problem! :o
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: ikeveles on August 28, 2014, 07:31:42 PM
How do you find the topic ID if you are using PrettyURLs?

Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: kasparh on October 10, 2014, 08:41:04 AM
with the new release it works like a charm
a big thank to the coder
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: DarkTexas on August 08, 2015, 03:20:33 PM
It ried that for a German Forum, but seems like it didn't work there?
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Impsat-1 on August 15, 2015, 05:07:31 AM
Quote from: kasparh on October 10, 2014, 08:41:04 AM
with the new release it works like a charm
a big thank to the coder

Mmm... and, please can tell where is the New Release?.... because not working for me now, please tell where is download page... Thanks


Thanks & Regards 8).-
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: villasg on August 15, 2015, 05:58:14 AM
Quote from: Impsat-1 on August 15, 2015, 05:07:31 AM
Quote from: kasparh on October 10, 2014, 08:41:04 AM
with the new release it works like a charm
a big thank to the coder

Mmm... and, please can tell where is the New Release?.... because not working for me now, please tell where is download page... Thanks


Thanks & Regards 8).-

2.1 work great in my 2.0.10 ---> http://custom.simplemachines.org/mods/index.php?mod=1364
Title: Re: Force Topic Read on Login Updated for SMF 2.0 RC3
Post by: Impsat-1 on August 15, 2015, 06:14:18 AM
Quote from: villasg on August 15, 2015, 05:58:14 AM
Quote from: Impsat-1 on August 15, 2015, 05:07:31 AM
Quote from: kasparh on October 10, 2014, 08:41:04 AM
with the new release it works like a charm
a big thank to the coder

Mmm... and, please can tell where is the New Release?.... because not working for me now, please tell where is download page... Thanks


Thanks & Regards 8).-

2.1 work great in my 2.0.10 ---> http://custom.simplemachines.org/mods/index.php?mod=1364


Mmm... yea ok... but don't work if the topic is closed or blocked for visitors :(

Thanks & Regards 8).-
Title: Re: Force Topic Read on Login
Post by: aegersz on July 19, 2016, 05:49:28 AM
Hi, I can't get this working on my 2.0.11 system. It installs OK but when i enable the mod, it doesn't work at all.

any ideas and/or mod conflicts ?
Title: Re: Force Topic Read on Login
Post by: aegersz on January 13, 2018, 01:35:03 PM
it is working - i had to use an ID on a board that is available to guests
Title: Re: Force Topic Read on Login
Post by: @rjen on January 13, 2018, 03:53:16 PM
This Mod works fine. There is only one annoying problem. If a user marks all as read , the topic is displayed EVERY time the user logs on.

This due to how the code checks the topics read. Any chance to get that fixed?
Title: Re: Force Topic Read on Login
Post by: RFD on February 18, 2018, 01:04:49 PM
unless i'm doing something wrong, this mod won't work for my 2.0.15 forum. 

logged in as admin, installed the mod, created a new thread, used the new topic id, logged out, logged in as non-admin user and ... nothing.  tried 3 more times, each time as a different user who's never seen the new thread and ... still nothing.

   
Title: Re: Force Topic Read on Login
Post by: -Rock Lee- on February 19, 2018, 10:01:28 PM
Quote from: RFD on February 18, 2018, 01:04:49 PM
unless i'm doing something wrong, this mod won't work for my 2.0.15 forum. 

logged in as admin, installed the mod, created a new thread, used the new topic id, logged out, logged in as non-admin user and ... nothing.  tried 3 more times, each time as a different user who's never seen the new thread and ... still nothing.



When installing the brand, an error? Are you using a custom theme?


Regards!
Title: Re: Force Topic Read on Login
Post by: RFD on February 20, 2018, 06:20:09 AM
no installation errors, no custom theme.
Title: Re: Force Topic Read on Login
Post by: Kindred on February 20, 2018, 10:10:41 AM
Had you previously read the target thread?   Did you use the option to reset everyone and force to re-read?
Title: Re: Force Topic Read on Login
Post by: RFD on February 20, 2018, 10:22:44 AM
Quote from: Kindred on February 20, 2018, 10:10:41 AM
Had you previously read the target thread?   

purposely, no.  created the target thread via admin and set it's message number in the mod.

Did you use the option to reset everyone and force to re-read?

no, because as a test all i did was login as a test user who was not logged into the forum prior or during the setting of the forced thread read.

Title: Re: Force Topic Read on Login
Post by: RFD on February 20, 2018, 06:18:18 PM
what exactly is supposed to happen when a topic is set for a forced read and a user who's not read that topic logs in?
Title: My 2 cents about this
Post by: SMiFFER on April 01, 2018, 05:04:39 AM
"Force new users" - only new users?

How about entering the names of users who are forced to read topic x

How about having a simple table?

user,topic
user,topic

?
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on April 01, 2018, 08:51:33 AM
Probably not something i would do.
Title: Re: Force Topic Read on Login
Post by: RFD on April 01, 2018, 08:59:59 AM
if this mod would just work as designed, that would be wonderful.
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on April 01, 2018, 09:04:51 AM
Thanks!
Title: Re: Force Topic Read on Login
Post by: RFD on April 01, 2018, 09:25:04 AM
can not get this hack to work.  i give up.
Title: Re: Force Topic Read on Login
Post by: Kindred on April 01, 2018, 10:14:22 AM
Works perfectly well for me, exactly as described.

Recently reset the must read list because we changed the agreement, and it still works great
Title: Re: Force Topic Read on Login
Post by: RFD on April 01, 2018, 10:38:02 AM
it never has worked for me in 2.0.15

attached are my forced topic parameters and my installed package list ... any help would be appreciated.
Title: Re: Force Topic Read on Login
Post by: shadav on September 12, 2019, 02:56:52 PM
Quote from: Kindred on April 01, 2018, 10:14:22 AM
Works perfectly well for me, exactly as described.

Recently reset the must read list because we changed the agreement, and it still works great
could you tell me how to do this
thank you
Title: Re: Force Topic Read on Login
Post by: Kindred on September 12, 2019, 04:04:26 PM
Post a new message, change the MUST READ topic ID.
Title: Re: Force Topic Read on Login
Post by: shadav on September 12, 2019, 05:05:07 PM
Quote from: Kindred on September 12, 2019, 04:04:26 PM
Post a new message, change the MUST READ topic ID.
:laugh: ah ok, I thought you meant for the already posted topic
I'm using mine as a read the rules and would like to not delete it, but when editing the rules post or updating it, resetting it somehow for people to read it....
Title: Re: Force Topic Read on Login
Post by: Kindred on September 12, 2019, 05:09:15 PM
don't need to delete it. Just make it non-sticky and make a new one with the new rules....

Alternatively, I think they "read it" might be stored in the database and could be cleared.
Title: Re: Force Topic Read on Login
Post by: cuongvttt on October 13, 2020, 04:41:23 AM
Hello guys,

I wonder this is possible if I'm using PrettyURL and how to find the topic IDs?

Thank you so much.
Title: Re: Force Topic Read on Login
Post by: Doug Heffernan on October 13, 2020, 07:39:49 AM
Quote from: cuongvttt on October 13, 2020, 04:41:23 AM
Hello guys,

I wonder this is possible if I'm using PrettyURL and how to find the topic IDs?

Thank you so much.

When you click on a topic, you will see at the end of the url this: topic=xxxx. Where x-es equal the topic id. That is what you need.
Title: Re: Force Topic Read on Login
Post by: Arantor on October 13, 2020, 07:48:36 AM
Not with pretty URLs you don't...
Title: Re: Force Topic Read on Login
Post by: petewadey on October 13, 2020, 08:56:52 AM
I have pretty urls and get msg****** at tthe end of the url, which seems work as the topic number? Unless I'm just assuming it does?
Title: Re: Force Topic Read on Login
Post by: Arantor on October 13, 2020, 09:42:29 AM
It doesn't work as the topic number because it's not the topic id, it's the individual message id.
Title: Re: Force Topic Read on Login
Post by: petewadey on October 13, 2020, 09:47:35 AM
In that case I've not forced anyone to read anything. Opps. I'll watch this with interest to see what the answer is. There must be a way of IDing a topic?
Title: Re: Force Topic Read on Login
Post by: shadav on October 13, 2020, 09:59:05 AM
Quote from: cuongvttt on October 13, 2020, 04:41:23 AM
Hello guys,

I wonder this is possible if I'm using PrettyURL and how to find the topic IDs?

Thank you so much.

go to the topic and at the bottom if you hover over the merge topics button it will show you the topic number
siteurl/?action=mergetopics;from=971
so the topic number for me here is 971
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on October 13, 2020, 11:32:30 AM
Yup thats exactly what I do!^^^
Title: Re: Force Topic Read on Login
Post by: Shades. on February 11, 2021, 10:19:24 PM
Mod seems to be working but I'm having one issue with it..

When a new member registers they dont get forced to read the topic assigned unless they log out and then log in! Is that what it is supposed to do? Cause some people might register and stay logged in. So if they don't log out and then log back in they wont get the forced message!??
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on February 11, 2021, 10:32:00 PM
Currently it only does the check on login. But yet it should be improved to do something on registration.../activation if it does not.
Title: Re: Force Topic Read on Login
Post by: Kindred on February 12, 2021, 12:53:50 PM
I had to disable this because it forced the users to read the post EVERY login...  It does not appear to be recognizing that they already read it.
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on February 12, 2021, 01:07:13 PM
Will check that out probably have to redo the logic that is in place.
Title: Re: Force Topic Read on Login
Post by: SMiFFER on April 23, 2021, 05:00:24 AM
Quote from: Shades. on February 11, 2021, 10:19:24 PM
When a new member registers they dont get forced to read the topic assigned unless they log out and then log in! Is that what it is supposed to do? Cause some people might register and stay logged in. So if they don't log out and then log back in they wont get the forced message!??

A good argument.
Title: Re: Force Topic Read on Login
Post by: Shades. on May 01, 2021, 07:04:25 PM
What is the differences with this mod and the one at https://custom.simplemachines.org/mods/index.php?mod=4257
Title: Re: Force Topic Read on Login
Post by: Steve on May 02, 2021, 07:41:44 AM
It looks like same end result, different methods and compatibilities ...
Title: Re: Force Topic Read on Login
Post by: Dave J on June 11, 2023, 09:07:07 AM
Any chance of this being updated to 2.1 please VB
Title: Re: Force Topic Read on Login
Post by: vbgamer45 on July 04, 2023, 12:28:44 AM
@Dave J updated for 2.1 install support.
Title: Re: Force Topic Read on Login
Post by: Dave J on July 04, 2023, 09:42:47 AM
Quote from: vbgamer45 on July 04, 2023, 12:28:44 AM@Dave J updated for 2.1 install support.

Thank you very much VB
Title: Re: Force Topic Read on Login
Post by: Dave J on July 14, 2023, 06:26:23 AM
VB,

Just been testing this on my test site and I can't get it to work. I have set the topic ID and ticked the box. I then logged in as another member but nothing happened

I check permissions but there is nothing in there.

The member I logged in as was not admin.

Should the mod still work for admin?

Any help is appreciated
Title: Re: Force Topic Read on Login
Post by: Doug Heffernan on July 14, 2023, 09:46:23 AM
Quote from: Dave J on July 14, 2023, 06:26:23 AMThe member I logged in as was not admin.

The member that you logged in to test it, was the topic in question read beforehand by that account?
Title: Re: Force Topic Read on Login
Post by: Dave J on July 14, 2023, 01:48:44 PM
Quote from: Doug Heffernan on July 14, 2023, 09:46:23 AM
Quote from: Dave J on July 14, 2023, 06:26:23 AMThe member I logged in as was not admin.

The member that you logged in to test it, was the topic in question read beforehand by that account?

That's a good point Doug. I'll create another new topic as admin and then log in as others, thanks for the idea.
Title: Re: Force Topic Read on Login
Post by: Doug Heffernan on July 14, 2023, 02:09:13 PM
Quote from: Dave J on July 14, 2023, 01:48:44 PMThat's a good point Doug. I'll create another new topic as admin and then log in as others, thanks for the idea.

No problem :)

The reason I asked is that users will not be forced to read topics on login that they have already read before. It is for unread topics only.
Title: Re: Force Topic Read on Login
Post by: Dave J on July 14, 2023, 02:34:08 PM
Sorry VB, Doug was right. I think I created the topic previously and then logged in as the test member then set the topic in the settings.

Just tested it now and it works OK.

Thank again for the tip Doug
Title: Re: Force Topic Read on Login
Post by: Doug Heffernan on July 14, 2023, 03:11:30 PM
Quote from: Dave J on July 14, 2023, 02:34:08 PMThank again for the tip Doug

You are welcome Dave.
Title: Re: Force Topic Read on Login
Post by: Dave J on July 27, 2023, 11:42:36 AM
Gents,

Sorry but this wont work for Admin. Is it meant to be that way?

It works if I post a topic in a board that can be seen by members but when I create a board for admin only i.e no board permissions for regular and post based members, admin aren't forced to read it.

I've tried various combinations of ways to do this even to the point of giving made up members admin rights and global mod but it still wont got to the topic.

Any ideas on how to do that, or as I say is it just not meant to?

Title: Re: Force Topic Read on Login
Post by: vbgamer45 on July 27, 2023, 12:27:08 PM
I don't think it works for admins I think that is on purpose.
Title: Re: Force Topic Read on Login
Post by: Dave J on July 27, 2023, 01:20:45 PM
Quote from: vbgamer45 on July 27, 2023, 12:27:08 PMI don't think it works for admins I think that is on purpose.

OK thanks for the reply VB
Title: Re: Force Topic Read on Login
Post by: stoo23 on September 06, 2023, 12:33:05 AM
I have a strange case occurring with this Mod'.

I have a Main active forum and a test forum (which is a very recent clone of the main forum), so in effect virtually identical (apart from a few new members).

I can get this to work exactly as desired/intended on the testforum, with a variety of messages/posts including the New 'New member greeting post I made just for this purpose ... YET, when trying to make That message appear on the Main forum, it will NOT work.

I can get it to show other topics, like my forum rules post and the descriptive post about the forum but no matter what I do, it will NOT show this new 'greeting' post on the main forum and Not just for me as Administrator, another member has tried along with myself and new accounts we have made,.. ???

It seriously has me completely baffled,.. as the 2 x sites are to all intents and purposes, Identical !!
Title: Re: Force Topic Read on Login
Post by: stoo23 on September 06, 2023, 03:57:52 AM
Further to my post above, both forums are on the Same Server, running the same software and is ver' 2.1.4 of SMF.
Title: Re: Force Topic Read on Login
Post by: stoo23 on September 06, 2023, 09:05:57 PM
Well, I have at least temporarily, alleviated the issue, by Modifying an older message that was posted when the Forum was moved to it's new home (which had some useful Historical Info' for new members and added part of the Problematical (Non Displayable) Welcome message to that and it is working fine.

Seriously has me Beat, why the Message will Not work on the Main forum though ???

VERY Weird.
Title: Re: Force Topic Read on Login
Post by: stoo23 on October 19, 2023, 01:16:41 AM
For the most part, this seems to be working, (Mainly being used to present New Members with some information to read),... BUT, I  have a few much older members, who seem to keep being presented with the thread, Some virtually EVERY time they log in !!??

Any idea why ?? or what may be causing this ??
Obviously, they HAVE Read the thread,.. multiple times,.. LOL so I'm just wondering what may be causing this and hoping to find a way of stopping it happening for those older members who have seen the desired thread numerous times.

Any ideas or help/suggestions appreciated.
cheers