Repository navigation
Expand file tree
/
Copy pathhelper.php
More file actions
executable file
·60 lines (50 loc) · 1.73 KB
/
Copy pathhelper.php
File metadata and controls
executable file
·60 lines (50 loc) · 1.73 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
// no direct access
defined('_JEXEC') or die;
abstract class modDZFacebookLikeboxHelper
{
public static function getDataAttribs($params)
{
$data = array();
# Href
$href = $params->get('href', 'https://www.facebook.com/dezign.vn');
$data[] = "data-href=\"$href\"";
# Box width
$width = (int) $params->get('width', 0);
if ($width)
$data[] = "data-width=\"$width\"";
# Box height
$height = (int) $params->get('height', 0);
if ($height)
$data[] = "data-height=\"$height\"";
# Show faces in box
$show_faces = (int) $params->get('show_faces', 1);
if ($show_faces)
$data[] = "data-show-faces=\"true\"";
else
$data[] = "data-show-faces=\"false\"";
# Box colorscheme
$colorscheme = $params->get('colorscheme', 'light');
$data[] = "data-colorscheme=\"$colorscheme\"";
# Show profile stream in box
$stream = (int) $params->get('stream', 1);
if ($stream)
$data[] = "data-stream=\"true\"";
else
$data[] = "data-stream=\"false\"";
# Show box border
$show_border = (int) $params->get('show_border', 1);
if ($show_border)
$data[] = "data-show-border=\"true\"";
else
$data[] = "data-show-border=\"false\"";
# Show box header
$header = (int) $params->get('header', 1);
if ($header)
$data[] = "data-header=\"true\"";
else
$data[] = "data-header=\"false\"";
# Return data attribs in string
return implode(" ", $data);
}
}