![]() |
Plugin based on user's screen size?
Hi everyone,
I saw this thread here: https://vborg.vbsupport.ru/showthread.php?p=2415381 and am trying to do something similar. I would like to be able to have certain code run only when a user's screen width is larger than a certain amount. On my site I currently have a plugin that hooks into global_setup_complete and determines when to show a second advertisement on my forum to a guest visitor. Currently it is setup to only show a second advert if the user is not using a tablet or a phone to view the page. I would also like to add the check for screen width at the plugin level. I have the following code: Code:
global $vbulletin, $show; In the thread I linked above, they are using the following code in a template. How can I modify that to work inside my plugin code? Code:
<vb:if condition="screen.width <= 1280"> |
All times are GMT. The time now is 03:57 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|