XF 2.2 Remove Mark read/Watched?

Solution
*Ie: positioned above threads lists?
For that one in the template forum_view remove:

Code:
<xf:if is="$forum.canWatch()">
                        <xf:button href="{{ link('forums/watch', $forum) }}" class="button--link"
                            data-xf-click="switch-overlay"
                            data-sk-watch="{{ phrase('watch') }}"
                            data-sk-unwatch="{{ phrase('unwatch') }}">
                            <xf:if is="{$forum.Watch.{$xf.visitor.user_id}}">{{ phrase('unwatch') }}<xf:else />{{ phrase('watch') }}</xf:if>
                        </xf:button>
                    </xf:if>

and

Code:
<xf:if is="$xf.visitor.user_id">
                        <xf:button href="{{ link('forums/mark-read'...
Presumably you did that then as it would have been there by default when you first install xenForo
Omg yes, you're absolutely right too. Sorry, Mr Lucky, my mistake.

It would appear I'd somehow failed-(😅4×)-to notice the 'Mark forums read' in the Public Navigation section last night.

Definitely is there, just as you've said.
And you are right again that it is already disabled too.

I'm not sure, but could I just double check with you that we're thinking of the same element intended for removal(?)

Are you referring to the:

[✓][Mark read/Watch]

*Ie: positioned above threads lists?
(*I'm sure this is the only one, but I could be wrong of course)
 
*Ie: positioned above threads lists?
For that one in the template forum_view remove:

Code:
<xf:if is="$forum.canWatch()">
                        <xf:button href="{{ link('forums/watch', $forum) }}" class="button--link"
                            data-xf-click="switch-overlay"
                            data-sk-watch="{{ phrase('watch') }}"
                            data-sk-unwatch="{{ phrase('unwatch') }}">
                            <xf:if is="{$forum.Watch.{$xf.visitor.user_id}}">{{ phrase('unwatch') }}<xf:else />{{ phrase('watch') }}</xf:if>
                        </xf:button>
                    </xf:if>

and

Code:
<xf:if is="$xf.visitor.user_id">
                        <xf:button href="{{ link('forums/mark-read', $forum, {'date': $xf.time}) }}"
                            class="button--link" overlay="true">
                            {{ phrase('mark_read') }}
                        </xf:button>
                    </xf:if>

and from thread_view

remove
Code:
<xf:if is="$thread.canWatch()">
                            <xf:button href="{{ link('threads/watch', $thread) }}" class="button--link"
                                data-xf-click="switch-overlay"
                                data-sk-watch="{{ phrase('watch') }}"
                                data-sk-unwatch="{{ phrase('unwatch') }}">
                                <xf:if is="{$thread.Watch.{$xf.visitor.user_id}}">
                                    {{ phrase('unwatch') }}
                                <xf:else />
                                    {{ phrase('watch') }}
                                </xf:if>
                            </xf:button>
                        </xf:if>
 
Solution
For that one in the template forum_view remove:

Code:
<xf:if is="$forum.canWatch()">
                        <xf:button href="{{ link('forums/watch', $forum) }}" class="button--link"
                            data-xf-click="switch-overlay"
                            data-sk-watch="{{ phrase('watch') }}"
                            data-sk-unwatch="{{ phrase('unwatch') }}">
                            <xf:if is="{$forum.Watch.{$xf.visitor.user_id}}">{{ phrase('unwatch') }}<xf:else />{{ phrase('watch') }}</xf:if>
                        </xf:button>
                    </xf:if>

and

Code:
<xf:if is="$xf.visitor.user_id">
                        <xf:button href="{{ link('forums/mark-read', $forum, {'date': $xf.time}) }}"
                            class="button--link" overlay="true">
                            {{ phrase('mark_read') }}
                        </xf:button>
                    </xf:if>

and from thread_view

remove
Code:
<xf:if is="$thread.canWatch()">
                            <xf:button href="{{ link('threads/watch', $thread) }}" class="button--link"
                                data-xf-click="switch-overlay"
                                data-sk-watch="{{ phrase('watch') }}"
                                data-sk-unwatch="{{ phrase('unwatch') }}">
                                <xf:if is="{$thread.Watch.{$xf.visitor.user_id}}">
                                    {{ phrase('unwatch') }}
                                <xf:else />
                                    {{ phrase('watch') }}
                                </xf:if>
                            </xf:button>
                        </xf:if>
😃 How on Earth do you know all this mind boggling stuff?

I can't even begin to fathom being able to comprehend—and recall such complicated technicalities. It really amazes me anyone can do this.

Nevertheless, I've just removed the codes as instructed and it appears to have successfully removed the [Mark read] & the [Watch] thingies in both Forum & Thread views.

All that remains to be removed is the little check box bit, ie: [✓]

(*Sorry. I currently can't provide visual examples due to the latest Android system update bug inhibiting attachment uploads)
 
😃 How on Earth do you know all this mind boggling stuff?

I can't even begin to fathom being able to comprehend—and recall such complicated technicalities. It really amazes me anyone can do this.

Nevertheless, I've just removed the codes as instructed and it appears to have successfully removed the [Mark read] & the [Watch] thingies in both Forum & Thread views.

All that remains to be removed is the little check box bit, ie: [✓]

(*Sorry. I currently can't provide visual examples due to the latest Android system update bug inhibiting attachment uploads)
😄 Apparently that little check box doodacky is some sort of moderation fandangle and probably unrelated to the 'Mark read/Watch' dealies.

Therefore this thread's OP query has thusly achieved resolution as of post #8 thanks to our very knowledgeable and incredibly helpful @Mr Lucky.

Thank you kindly good sir.
Your generous assistance is greatly appreciated.
 
Apparently that little check box doodacky is some sort of moderation fandangle and probably unrelated to the 'Mark read/Watch' dealies.
It is unrelated, just happens to be in the same area. It is there to show if, and how many, items you have marked for moderation. It can be useful in case you have something marked somewhere and forgot about it. Only moderators see it. It can be removed (at your own risk) but I would not advise it:

Code:
<xf:if is="$canInlineMod">
                        <xf:macro template="inline_mod_macros" name="button" />
                    </xf:if>
 
How on Earth do you know all this mind boggling stuff?
Trial and error mostly.

Plenty of error so test thoroughly before doing template edits, also I advise make a note of what you have edited and why. Whenever there are upgrades to xenForo it is possible that the edited templates show up in a list templates that may need attention. Often you can just click on merge and your edits carry on in the revised (updated) template, but sometimes you need to redo the edits.
 
Last edited:
It is unrelated, just happens to be in the same area. It is there to show if, and how many, items you have marked for moderation. It can be useful in case you have something marked somewhere and forgot about it. Only moderators see it. It can be removed (at your own risk) but I would not advise it:

Code:
<xf:if is="$canInlineMod">
                        <xf:macro template="inline_mod_macros" name="button" />
                    </xf:if>
Sir, you had me at "...risk)".

It'll probably take a few years to locate where this code is buried, but as soon as I do...😄....it is definitely gone.
 
Trial and error mostly.

Plenty of error so test thoroughly before doing template edits, also I advise make a note of what you have edited and why. Whenever there are upgrades to xenForo it is possible that the edited templates show up in a list templates that may need attention. Often you can just click on merge and your edits carry on in the revised (updated) template, but sometimes you need to redo the edits.
🤔Far out! It's amazing anything holds together at all.

I am not sure how else to thoroughly test this stuff other than just going hard and doing it aye, like you've been doing. Trial and error.

The other day I went through deleting entire templates at random just to see what would happen. Apparently not much.

Fortunately I have no spare time nor interest in all the nightmarish computer coding. I appreciate the advise, however there will certainly be no dilly-dallying on my part.

These XF systems are better than the others I've tried and thus has been selected as the primary candidate.
Yet I simply cannot use it, because first we have to go through stripping out all the copious amounts of excess highly polished junk that seems to be left over from the '90s. Which is part of the reason I decided to wipe entire templates, speed up the whole demo job..
 
Back
Top Bottom