Skip to Content
It is currently October 6th, 2022, 9:47 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: August 27th, 2021, 10:03 am 
Offline
Super User
Super User

Joined: November 1st, 2005, 8:09 am
Posts: 575
Location: NJ NYC
We all know that the old and some newer php pages dont view well on mobile devices.
Often too large in width and really dont have a good clean look other than on desktop.

To fix this we can make the pages responsive to handheld devices by adding this DIV as the page container but i want to make sure to ask

Using the example of the PLAYING.php page, where would the div be added around?

Would it be on root/web/playing.php
or
root/display/display.playing.php


Using this code should help solve the issue for most users.

Code:
<div style="position: relative; padding-top: 56.25%;">
.................insert php code here...............
</div>


Please note
padding-top calculation is height / width (assuming 16:9 aspect ratio)


Top
 Profile  
Reply with quote  
PostPosted: August 28th, 2021, 10:15 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
The intention of splitting stuff into display, web and code parts is to have a separation of concerns.
web is only used to put together and coordinate the pther stuff.
If you want to, you can ignore that, but adding it in /web is more effort and requires you to know how PHP works at least on a basic level.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
PostPosted: August 28th, 2021, 10:22 am 
Offline
Super User
Super User

Joined: November 1st, 2005, 8:09 am
Posts: 575
Location: NJ NYC
I've read ur reply 4 times now and dont see how it answers my question.

Which file would he appropriate to add that to?


Top
 Profile  
Reply with quote  
PostPosted: August 28th, 2021, 10:58 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
Doesn't matter. Both files are loaded to display the now playing page, so you can add your code in either one.
The display one is the one that already has some HTML in it, so that might make things a lot easier for you.
The much better option to either of these is to just edit the CSS stylesheet instead of adding styles to the HTML elements directly.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group