Hello There, Guest! Register

MySubscriptions 2.3.4 released.
Looking for a custom plugin for your site? Ask here for a quote.

How to show who is currently on a custom page?
#1

I have made custom page on my forum where I embed a video and we have a watch together type thing. I want to know who is currently on that custom page to be visible to other members. 

Essentially


I want to add this: (which is at the top of every forum/subform)

[Image: cA31ad6.png]



To the top of my custom page:




[Image: stJOnNm.png]




This is the current code for the custom page:


Code:
<html>
<head>
<title>{$mybb->settings[bbname]} - *** **</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
<!-- Content: Start -->
<div class="box"><center><iframe width="100%" height="315" src="//****/videoembed/******?nochat=1&autoplay=1" frameborder="0" allow="autoplay" allowfullscreen></iframe></center></div>
{mychatbox}
<a href="https://discord.gg/*******">
<img src="http://***********.net/forums/images/smilies/discord.png" />
</a>
<!-- Content: End -->
{$footer}
</body>
</html>
<table>
<tr><td class="trow1">
<if $mybb->user['uid'] then>
<span class="smalltext">
</span>
<else />
<span class="smalltext">
<strong><a href="member.php?action=login">Login</a> or <a href="member.php?action=register">Register</a></strong>
</span>
</if>
</td>
</table><br>
<?php
$allowed = array('33'); // The numbers are the usergroup IDs

if(!in_array($mybb->user['usergroup'], $allowed))
{
error('Subscription is required to view this page.</br><a href="http://***********.net/forums/newpoints.php?action=subscriptions"<span style="color: gold;">Click here to subscribe</span></a>', '*** **');
}
?>
Reply
#2

Hi,

This goes beyond the support that we provide. What you're looking for is help on how to code something that achieves your goal. I'm moving this to Coding Help.

Your plugin needs to add a hook to the "online hooks" that are available - look at how MyDownloads does for example.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
Reply




Users browsing this thread: 1 Guest(s)