-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathossn_com.php
31 lines (30 loc) · 1.02 KB
/
ossn_com.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* OpenSource-SocialNetwork
*
* @package Speedtest
* @author TheDoggyBrad <[email protected]>
* @copyright 2023 TheDoggyBrad
* @license OSSN License v4
* @link https://www.opensource-socialnetwork.org/licence/v4.0.html
*/
define('__speedtest__', ossn_route()->com . 'speedtest/');
function speedtest_init() {
if(ossn_isLoggedin()) {
ossn_extend_view('css/ossn.default', 'css/speedtest');
ossn_register_page('speedtest', 'speedtest_pages');
ossn_register_sections_menu('newsfeed', array(
'name' => 'speedtest',
'text' => ossn_print('com:ossn:speedtest'),
'url' => ossn_site_url('speedtest'),
'section' => 'links',
));
}
}
function speedtest_pages($pages) {
$title = ossn_print('com:ossn:speedtest');
$contents['content'] = ossn_plugin_view('pages/speedtest', array());
$content = ossn_set_page_layout('newsfeed', $contents);
echo ossn_view_page($title, $content);
}
ossn_register_callback('ossn', 'init', 'speedtest_init');