Adult Script Pro Community Forums

Create, help and share your ideas with the community!

You are not logged in.

#1 2015-04-27 19:42:31

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

number of videos by resolution

Hey

Would be nice to have number of videos for
Being Watched Videos
Featured Videos
Most Recent Videos
Popular Models
and anything on front page by screen resolution

for example i have setop 32 videos for Most Recent Videos and in defrent resolution show up bad.

Thank you

Offline

#2 2015-04-28 05:27:52

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: number of videos by resolution

This is not possible. The resolution cannot be found from PHP. The script is responsive, but generally speaking there only be a few used resolutions (like 4-5).


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2015-04-28 12:31:33

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: number of videos by resolution

huh?

i have find way...pls check here
http://mathimata.byethost14.com/test1.php

if give u screen resolution i can send you the code.or if this not work in javascript?

Thank you

Last edited by thiva7 (2015-04-28 12:37:38)

Offline

#4 2015-04-28 14:25:39

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: number of videos by resolution

Hmm...from what i know you need to get the resolution via javascript and then send it via ajax to php. Will research and see what i can do in 2.2.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2015-04-28 17:53:29

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: number of videos by resolution

symtab wrote:

Hmm...from what i know you need to get the resolution via javascript and then send it via ajax to php. Will research and see what i can do in 2.2.

Hey

Actually is not need ajax....and it is javascript inside php

<script type="text/javascript">
document.write(screen.height+screen.width+);
</script>

so this code i edit it and i made it simple Variables in php

$width = '<script type="text/javascript">
document.write(screen.width);
</script>';
$height = '<script type="text/javascript">
document.write(screen.height);
</script>';

so since you have $width and  $height you can do any thing you want smile

Offline

#6 2015-04-29 05:58:06

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: number of videos by resolution

It does not work this way. Please test and you will see.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2015-04-29 09:25:19

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: number of videos by resolution

hmm for me is work

here is

http://mathimata.byethost14.com/test1.php

is not show you resolution?

and the code

<?php
$width = '<script type="text/javascript">
document.write(screen.width);
</script>';
$height = '<script type="text/javascript">
document.write(screen.height);
</script>';

echo $width ."x". $height;

?>

Offline

#8 2015-04-29 13:04:07

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: number of videos by resolution

Mr thiva7, things are not that simple as you post in your example
using "doucument.write" you will only destroy current template. Javascript write result replaces rest of content,.
Have you tried it on a website with some content, not just blank page?

Display rules are defined in css, and this is the right place to manipulate display depending on screen size.
If something is breaking layout, it's always possible to fix from css or template level.

Offline

#9 2015-04-29 13:27:30

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: number of videos by resolution

@thiva7: it works for you, because its a php file and then on top of that its javascript. You cannot get the width/height from php itself, only with javascript and
then pass it to php (however this cannot be done in the same file). what could be done is after the resolution detect to hide the videos that dont display correctly.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#10 2015-04-29 16:48:37

thiva7
Member
Registered: 2011-04-30
Posts: 1,022

Re: number of videos by resolution

Nuevolab wrote:

Mr thiva7, things are not that simple as you post in your example
using "doucument.write" you will only destroy current template. Javascript write result replaces rest of content,.
Have you tried it on a website with some content, not just blank page?

Display rules are defined in css, and this is the right place to manipulate display depending on screen size.
If something is breaking layout, it's always possible to fix from css or template level.


No i didnt test it since i dont know good coding yet..am trying  to learn yet .so i ask if is possible


symtab wrote:

@thiva7: it works for you, because its a php file and then on top of that its javascript. You cannot get the width/height from php itself, only with javascript and
then pass it to php (however this cannot be done in the same file). what could be done is after the resolution detect to hide the videos that dont display correctly.

am just asking if is posible.if you can do it pls add it in next versions

Thanks

Offline

#11 2015-04-29 17:45:45

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: number of videos by resolution

Suggestion regarding video thumbs display inside thumb container, but more to Symtab.

It may happen that thumb image size is different size than other thumbs or even does not exist for some reason.
It may happen that webmaster decides to change dimensions for generated thumbs.
Then thumb container can be either higher or smaller, and this can break layout.
The solution and suggested thing for every browser is to set img attributes to expected same thumb size. just as it is in admin.
<img width="" height="">
This won't affect responsivity as in css width is "100%" and height is "auto".
But if static width/height set, this stops browser from calculating initial image size, so thumb image will be always same size, expanded according to CSS rule. 
In situtation when thumb image doesn't exists, there will be empty image space but of same size, thumb container same size.
In situtation when thumb is smaller height, with width/height defined, it will be same size as other thumbs, container same size.

I think Adrian you should have it in your script. It's very small thing and you can easily do that, helps to avoid possible issues with initial thumbs display. Is also good for site load speed, saves time required to calculate initial thumb's size by browser.

Last edited by Nuevolab (2015-04-29 17:46:13)

Offline

Board footer

Powered by FluxBB