Viki
(PethuVignesh)
May 15, 2019, 1:17pm
1
How to check the Topic Pageviews in mobile when we don’t have any replies?
Stephen
(Stephen)
May 16, 2019, 1:57am
3
The topic views can be seen below the OP in every topic:
2 Likes
Stephen
(Stephen)
May 16, 2019, 4:23am
5
Yes, that’s true, the gray bar below from my screenshot doesn’t appear until the topic has a response.
Viki
(PethuVignesh)
May 16, 2019, 4:25am
6
Any possibilities to enable the views without responses?
1 Like
Bathinda
(Bathinda Helper)
February 24, 2020, 10:35am
7
I hope there was some data query to check a particular topic views (when topic doesn’t have any replies).
Since posts can have diff views, is there some way to check individual post views also?
merefield
(Robert)
February 24, 2020, 10:54am
8
FYI Topic List Previews plugin can include that data in the Topic List on mobile (so you don’t even have to navigate to the Topic). It doesn’t require any additional posts than the OP.
3 Likes
Jagster
(Jakke Lehtonen)
January 31, 2024, 5:34am
10
Because this bumped…
This goes in head
:
<script type="text/discourse-plugin" version="0.8">
api.includePostAttributes('topicMap');
</script>
That’s it.
And yes, I copied it from here but because I don’t remember who gave this snippet in the beginning I can’t link to original.
Edit:
This is one topic and there are others:
There are a few workarounds in this topic (variations of ‘add a post’):
1 Like
This one from Don in the same topic has some extra details in:
Hello,
Now that I saw this topic, I remembered that I had seen a commit about this before.
I think this should work now
Header
<script type="text/discourse-plugin" version="0.8">
api.includePostAttributes('topicMap');
</script>
I’ve also added a little CSS to hide unnecessary stats when no other posts.
Common / CSS
body:not(.archetype-private_message) {
.topic-post.regular {
// if last-of-type is the #post_1
&:last-of-type {
article#post_1 {
.topic-map {
width: max-content;
nav.buttons {
display: none;
}
ul li {
// hide all statistics but views
&:not(.secondary.views) {
display: none;
}
}
// show views on mobile view
.secondary.views {
.mobile-view & {
display: list-item;
text-align: center;
}
}
}
}
}
}
}
Desktop (with no reply)
Mobile (with no reply)
When someone reply it changes back to the default.