Topic views in mobile format

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Floyd
Registered User
Posts: 187
Joined: Tue Sep 03, 2013 10:16 am

Topic views in mobile format

Post by Floyd »

Greetings,
Our forum uses v. 3.2.5. When browsing the forum using a mobile device, the number of views a topic has received is not displayed when viewing a list of topics in a forum. However, views are displayed for a topic in the list of search results. How do I get views to be displayed in a regular view of a forum? Can this be made an option in the UCP (perhaps through an extension)?

Thanks.
Entropy is maintenance free.
User avatar
janus_zonstraal
Registered User
Posts: 6414
Joined: Sat Aug 30, 2014 1:30 pm

Re: Topic views in mobile format

Post by janus_zonstraal »

turn your screen 90º :D
Sorry! My English is bat ;) !!!
User avatar
warmweer
Jr. Extension Validator
Posts: 11194
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Topic views in mobile format

Post by warmweer »

janus_zonstraal wrote: Sun Nov 28, 2021 11:06 am turn your screen 90º :D
clockwise or counterclockwise ? :P
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Topic views in mobile format

Post by david63 »

warmweer wrote: Sun Nov 28, 2021 3:09 pm clockwise or counterclockwise ?
Both - oh no you will end up back where you started :oops:
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
Floyd
Registered User
Posts: 187
Joined: Tue Sep 03, 2013 10:16 am

Re: Topic views in mobile format

Post by Floyd »

Thanks for the replies. In both portrait and landscape views I see the following.

Topic title
Last post by ‘username’ << Date Time
Replies

Views are not displayed.
Last edited by Floyd on Sun Nov 28, 2021 5:29 pm, edited 1 time in total.
Entropy is maintenance free.
User avatar
warmweer
Jr. Extension Validator
Posts: 11194
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Topic views in mobile format

Post by warmweer »

Just tested and it depends on the resolution applied.
width less than 700 removes views (also in desktop view); (that is using prosilver, it probably also depends on the style being used
That's actually normal and intended behaviour because there's just not enough room to fit everything.
A solution would be to reduce font size for the whole board when that happens but at first sight that would involve quite some css editing. (haven't tested that).
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic views in mobile format

Post by bennybernaer »

I just tested it, and it works, but the css is not quite right.

in responsive css.

Code: Select all


@media (max-width: 700px) {
.topiclist.topics dd.views {
    display: block;
    padding-left: 52px;
    width: 90%;
    text-align: left;
    font-size: 1em;
}

.topiclist.topics dd.views::before {
    content: "Views ";
}
Naamloos.png
Floyd
Registered User
Posts: 187
Joined: Tue Sep 03, 2013 10:16 am

Re: Topic views in mobile format

Post by Floyd »

warmweer wrote: Sun Nov 28, 2021 4:38 pm Just tested and it depends on the resolution applied.
width less than 700 removes views (also in desktop view); (that is using prosilver, it probably also depends on the style being used
That's actually normal and intended behaviour because there's just not enough room to fit everything.
Thanks for the reply. In landscape mode the resolution is 1136 x 640.
Entropy is maintenance free.
User avatar
warmweer
Jr. Extension Validator
Posts: 11194
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Topic views in mobile format

Post by warmweer »

Strange: it shows up on my view (although I can't confirm that responsive mode on PC is a perfect simulation).
This is using FF but Opera and Chrome produce just about the same result. (using prosilver)
responsiveFloyd.jpg
Added: just noticed that my printscreen is 1136 x 940, so changed that on the PC but no new printscreen made as the result is the same

bennybernaer is using a different style I think.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
User avatar
bennybernaer
Registered User
Posts: 599
Joined: Tue Mar 22, 2011 9:53 pm
Contact:

Re: Topic views in mobile format

Post by bennybernaer »

@warmweer I just use Prosilver, with here and the necessary changes

I tested it like this:

In responsive.css.

Search:

Code: Select all

	.responsive-show-inline-block { display: inline-block !important; }
Post below on a new line:

Code: Select all

   .topiclist.topics dd.views {
      display: block;
      padding-left: 52px;
      width: 90%;
      text-align: left;
      font-size: 1em;
}

.topiclist.topics dd.views::before {
    content: "Views ";
}
It works as it should work. Only it should of course be above the postal numbers. Don't know how, just tried it.
Naamloos2.png
User avatar
warmweer
Jr. Extension Validator
Posts: 11194
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Topic views in mobile format

Post by warmweer »

bennybernaer wrote: Sun Nov 28, 2021 6:42 pm @warmweer I just use Prosilver, with here and the necessary changes
Thanks for the follow-up: I'll try that (a bit later today) . (responsive simulation isn't always reliable :( )
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
Floyd
Registered User
Posts: 187
Joined: Tue Sep 03, 2013 10:16 am

Re: Topic views in mobile format

Post by Floyd »

Our forum uses Prosilver, Prosilver Special Edition and Metrolike. None of these styles display the topic views in mobile format in either portrait or landscape mode.

https://www.thisisms.com
Entropy is maintenance free.
User avatar
warmweer
Jr. Extension Validator
Posts: 11194
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium
Contact:

Re: Topic views in mobile format

Post by warmweer »

Actually, even in desktop view, when reducing resolution, at a certain point there's just not enough space to show everything.
bennybernaer's edits work but will need tweaking per style.
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.


Time flies like an arrow, but fruit flies like a banana.
Floyd
Registered User
Posts: 187
Joined: Tue Sep 03, 2013 10:16 am

Re: Topic views in mobile format

Post by Floyd »

warmweer wrote: Tue Nov 30, 2021 5:03 am Actually, even in desktop view, when reducing resolution, at a certain point there's just not enough space to show everything.
bennybernaer's edits work but will need tweaking per style.
The topic views are displayed in the search results. If there’s room for them in the search results, then there’s room in the standard topic listing. The exclusion of the view count was likely a design decision when the mobile style template was written.

One option could be the following format where replies and views are displayed on the same line.

Topic title
Last post by ‘username’ << Day Date Time
Replies: n Views: n
Entropy is maintenance free.
User avatar
canam800er
Registered User
Posts: 174
Joined: Thu Jul 21, 2011 7:42 pm
Contact:

Re: Topic views in mobile format

Post by canam800er »

Maybe that would be a possibility
Open: root/styles/[yourstyle]/template/viewforum_body.html
Find:

Code: Select all

							<!-- IF topicrow.REPLIES -->
							<span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong></span>
							<!-- ENDIF -->
Replace with:

Code: Select all

							<!-- IF topicrow.REPLIES -->
							<span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{topicrow.REPLIES}</strong>&nbsp; &bull; &nbsp;</span>
							<!-- ENDIF -->
							<span class="responsive-show left-box" style="display: none;">{L_VIEWS}{L_COLON} <strong>{topicrow.VIEWS}</strong></span>
Result:
Image
Sorry for my bad english, I am German and translated with DeepL!
My Extensionen!
Post Reply

Return to “[3.2.x] Styles Support & Discussion”