- Edited
arajdon Only think im surely planning is to be able to sort by views, just like u can sort by "top", "latest" and "newest". Also thats a nice css edit!
You should do a pull request if you like, it would be much better design than current
arajdon Only think im surely planning is to be able to sort by views, just like u can sort by "top", "latest" and "newest". Also thats a nice css edit!
You should do a pull request if you like, it would be much better design than current
A great extension, I like it.
One question: is it meant to drop the number of comments for each discussion when you enter 'tablet view'?
On full view, I have the number of comments and the number of views from H Y P E
For me, drop it into tablet view, and it drops the number of comments, and only keeps the number of views.
I think that's more appropriate MichaelBelgium
extension.less
.item-discussion-views {
font-size: 14px;
float:right;
width: 10px;
margin-top: 10px;
margin-right: -45px;
}
@media (min-width: 768px)
{
.item-discussion-views:before {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: "\f26c";
float: left;
margin-left: -21px;
margin-top: 3px;
}
}
@media (max-width: 767px) {
.item-discussion-views
{
display: none !important;
}
}
MichaelBelgium can't wait for this ?
cabbagetimil Neat ! This one doesnt interfere with the triple dots. thanks
Niice job. Looks great on on my dark themed forum.
Way to go on your first extension. ?
May you please allow for options to disable (hide) the replied count or number viewed on both mobile or desktop view?
It looks great on desktop but on mobile I would like to hide the replied count and only show number viewed. I'm using a Pixel XL and can provide a screenshot if needed.
Thank you.
0E800 Euh mhm ? If i figure it out how, I might implement that
MichaelBelgium Check out the @media css code for small screens. This one might be useful.
I get an error.
Installation failed, reverting ./composer.json to its original content.
[ErrorException]
file_put_contents(/home/website/public_html/forums/vendor/composer/installed.
json): failed to open stream: Permission denied
jordanjay29 I guess it needs to be a toggle or something on the admin page so u can choose to display the comment count or not etc
ericm9 I don't think that's the fault of the extension, I assume you're installing it on a VPS or some kind, and the webserver doesn't have permission to write/edit files
MichaelBelgium You'd probably need a check on the JS that adds your CSS class to the frontend.
ericm9
Try:
sudo composer require michaelbelgium/flarum-discussion-views
MichaelBelgium jordanjay29
Possibly its my own custom CSS that is interfering?
Does anyone else notice the following formatting issues on their mobile site?
MichaelBelgium I would suggest to use IP and cookies to check for unique view only. The way it's implemented now, anyone would keep opening and closing his own discussion to make more views and admins won't be able to use those views for any purpose.
Secondly, can you also extend this extension for user profile views? Every user participates in a community to get exposure and profile views can actually help in telling him that how good the community is ?
gurjyot anyone would keep opening and closing his own discussion to make more views and admins won't be able to use those views for any purpose.
Well normal users don't know that. But yeah I will look sooner or later how to do unique views nonetheless.
Also about profile views, thats a great idea, however I think it's better to make a seperate extension or that imo, else i need to edit the package name and I don't think thats a great idea
0E800 I know it might overlap with the discussions but that first one is rly weird, it didn't look like that when i tested the new css
MichaelBelgium Actually, having multiple small extensions for handling views is not that of a good idea I guess ?
Instead, if one extension handles all the views related stuff then that would be great. Moreover, your extension can also be used to have new discussion sorting "Most views" and users sorting "popular users" ?
Yeah, changing name would be a problem but you can always announce the new extension which would work even with old extension's views data (since there shouldn't be any data loss).
luceos I seriously don't know a technical answer for this. But from a users point of view, it's easy to remember one big extension rather than multiple small extensions. Moreover, having all the similar stuff together at one place is what's called being organised (at least that's what I think). Although, making multiple extensions might be better for performance, that I really do not know.
gurjyot There's that approach. There's also making extensions that are separate but interoperable, like Flarum's own Tags, Sticky, etc.