Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
"Mark Read" and "Unfollow" drop-down options don't work?
Hi. On the page where I'm viewing all my categories, each one has the "Options" box that gives "Mark Read" and "Unfollow" as the options. My problem is the links don't work, and I can see why, but I don't know where to fix it.
The problem is each link for those options is going to a (default?) directory that doesn't exist. The "Mark Read" link, for example, goes to http://[website]/forum/index.php?p=/vanilla/category/markread&categoryid=2&tkey=QOB6344RNHBX
/vanilla/category don't exist on my server. I'm on a fresh 2.0.18.4 install with only CleanLog and Emotify plugins enabled.
Any advice on how to make these links functional? I tried doing a search for "vanilla", "category" and "Mark Read" but couldn't find anything. Thanks.
0
Comments
I'm stumped , that is odd hmmm...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Actually I found where the link is occuring (I think) in views/categories/helper_functions.php...I don't know why I didn't find it before...
// Mark category read. $Options .= '<li>'.Anchor(T('Mark Read'), "/vanilla/category/markread?categoryid=$CategoryID&tkey=$TKey").'</li>';
So that's where the link is hardcoded to mark a category as read. Do you know what I can change the link to so it works?
Are you absolutely sure it doesn't work, and are you sure you don't have a
applications/vanilla/category directory.
if you are certain it doesn't work, it is located in
applications/vanilla/views/categories/helper_functions.php
you need to elaborate more on the problem (or I need to understand what you mean better) .
What error is it giving you or what doesn't work??????
does the follow - unfollow work for you?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I have applications/vanilla/views/categories, but not applications/vanilla/category, which is in the code located in helper_functions.php I listed above.
Here's a screenshot of the option I'm talking about.
So, if you were to click on "General Blabbery" you'd see all the discussions, a bunch which have the "new" notification. If I go back to the screen above, and click "Mark Read" in the option, it does NOT mark that category as all read.
Are you saying I just need to change the code in helper_functions.php to point to the proper directory? (vanilla/views/categories)
Thanks
I don't think the mark read method is working as one would think it works.
does the follow - unfollow work for you?
this may give a clue on how to proceed.
mark read is the method in the category controller
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
mark read is the method in the category controller
and save tree - you could try var_dump and logging to see what is happening...
applications/vanilla/models/class.categorymodel.php:958: public function SaveUserTree($CategoryID, $Set) {
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Other than changing the background color, follow/unfollow does not work either (and again, the link for that option is pointing to vanilla/category, which doesn't exist)
It doesn't mark discussions as read. It changes the date in the UserCategory Table.
use phpmyadmin to look at usercategory table. it does not touch other tables, so it couldn;t possibly mark user discussions as read. The "mark read" is ambiguous, it pertains to the category not the discussions themselves.
look at the table and you will see the date does get changed.
you are confused, i believe on the way controllers and methods look
vanilla/category does indeed exist
it is applications/vanilla/controllers/class.categorycontroller.php
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
to prove it to yourself in /applications/vanilla/models/class.categorymodel.php
change
and you will see it will print permtree and then die, based on the var_dump and die -
it goes to where it needs to go - it just doesn't do what you think it does.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I guess I am confused, sorry...I performed a phpBB import, and because of that ALL discussions are marked as new. I was under the assumption that clicking "Mark Read" on a category would remove all those "New" notifications, but what you're saying is it just updates the category as read, but none of the discussions within that category are touched. This leaves me with two questions:
1) What is the purpose of that "Mark Read" option for each category?
2) Is there an easy way for users to mark all the discussions in a category as read?
put this in your custom.css and it will show categories on the category page as read.
li.Read {
background:yellow;
}
you could use the All Viewed plugin that is included with vanilla - but that would mark all discussions.
I suppose you could create some kind of plugin that is category specific, but I think most people in need of marking all discussion use the above plugin.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
actually, until you pointed out the options in the category, I never even noticed them before .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
And am I correct in that the only thing the "All Viewed" plugin does is remove/hide the "new" alerts in the css and not ACTUALLY mark the discussions as viewed? Because if I enable it, click the link it supplies (and all the "new" alerts disappear), then disable it, all the alerts return.
Like I said, my problem is I imported phpBB threads dating back to 2005, and since they're new to Vanilla, they're marked as new. Is there no easy way for my users to mark discussions as read (and have them actually be marked as read?). I don't think anyone wants to click on 243 pages worth of individual discussions one by one just so they can "officially" be marked as read. Thanks.
if you read the plugin - it explains what it does, or I seem to recall that.
Why are you disabling it. just leave it there, or you could do a massive set command to update the sql in your userdiscussions - which would be somewhat crazy. That is why the mark all read does what it does to save table space and improve performance.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Make a bug report on gitHub please. Maybe it's intended behaviour, but then we can post the SQL query on gitHub or here, how to fix those discussions.
I was under the assumption that clicking "Mark Read" on a category would remove all those "New" notifications, but what you're saying is it just updates the category as read, but none of the discussions within that category are touched. This leaves me with two questions:
Good question. You need to create an SQL query and execute it in phpMyAdmin.
You need to update all discussions and mark them as read, so you need to find the fieldname that marks a discussion as 'read' it's right in there in the table, you just need to find the fieldname.
The SQL query after that is easy.
of course you need to make a backup of your current Vanilla DB before you execute the update statement.
There was an error rendering this rich post.
It's not a bug. And it was clearly intended the way is was written, as far as I can tell.
If you view the category page and use some css (like I did above to signify read). You will note that is turned off the minute a new discussion is posted in the category.
So it is used as a shortcut, for someone to determine if any new discussions were added to the category.
And I quote from the plugin - why setting the userdiscussion table and adding every user and discussion to it is a bad idea.
snippets below from plugin - if you want to follow what it actually does.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
But when I "Unfollow" a post using that category drop-down option, all it does is change the background color of that category...it doesn't actually remove it from my category list (or is shading the background yet still being able to click on it all that options does?). And in the side panel under "Category Management" the links to show followed/unfollowed categories does nothing. If I click "Show unfollowed categories" I see all my categories. If I click "Only show followed categories" I still see all my categories. Maybe I just don't understand that option box, sorry.
I think I see what @peregrine is saying, though. A category could be FULL of new/unread discussions, but if someone clicks that "Mark Read" option it doesn't actually mark all those discussions as read (which is what I was hoping for, and thanks @UnderDog I'll look into that sql). It simply marks that category as read, so anything that happens after you click that option would show that something new happened in that category.
@StumpyJoe I don't know for sure that this is the case, but I would try logging in as a normal forum member (create a test account if you don't have one) and testing out stuff. Often times the administrator's view has extra functionality that makes managing easier but makes the reading experience suffer.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Hi, is this option still here in 2.2 and 2.3 ? I don't see it (the 'unfollow') and my users are asking for it. In fact, it seems like everytime they view a topic, the forum remembers it and shows the 'X new' tag when they come back later and someone posted in the topic. I guess this 'unfollow' would disable this functionality of writing 'X new', per topic, per user ?
Thanks
what is your goal? Please start a new discussion under vanilla 2.3 (after you upgrade if you haven't already ) and state what you want to happen. possibly show a screen shot.
better to start new discussions if the discussion was several years ago, and then refer to the other discussion in a link in your new discussion. if you post screen shots of what you want changed, you can probably get helped.
you can hide the "x new" if you want to via css as well.
if you want to mark an entire category of discussions read you can click the cogwheel on this page. Each category has a cogwheel to "mark as read"
https://vanillaforums.org/categories
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.