-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod_sleekFeed.php
executable file
·130 lines (100 loc) · 3.25 KB
/
mod_sleekFeed.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
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?php
/**
/**
*Author: Vipin Sahu
*Mail: [email protected]
*URL:www.webkul.com
**/
defined('_JEXEC') or die('Restricted access');
//params
$subject0 = trim( $params->get( 'subject0' ) );
$subject1 = trim( $params->get( 'subject1' ) );
$subject2 = trim( $params->get( 'subject2' ) );
$subject3 = trim( $params->get( 'subject3' ) );
$subject4 = trim( $params->get( 'subject4' ) );
$subject5 = trim( $params->get( 'subject5' ) );
$linksub0 = trim( $params->get( 'linksub0' ) );
$linksub1 = trim( $params->get( 'linksub1' ) );
$linksub2 = trim( $params->get( 'linksub2' ) );
$linksub3 = trim( $params->get( 'linksub3' ) );
$linksub4 = trim( $params->get( 'linksub4' ) );
$linksub5 = trim( $params->get( 'linksub5' ) );
$modwidth = trim( $params->get( 'modwidth' ) );
$bgcolor = trim( $params->get( 'bgcolor' ) );
$defaultab = $params->get( 'defaultab',$subject1 );
$jqueryload = $params->get( 'jqueryload' );
?>
<style type="text/css">
#feedWidget{
width:<?php echo $modwidth."px" ;?>;
background:<?php echo $bgcolor ;?>;
}
</style>
<?php if($jqueryload=="Yes"){ ?>
<script type="text/javascript" src="modules/mod_sleekFeed/js/jquery.js"></script>
<?php } ?>
<script type="text/javascript" src="modules/mod_sleekFeed/js/script.js"></script>
<link rel="stylesheet" type="text/css" href="modules/mod_sleekFeed/styles.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript"> var $j = jQuery.noConflict();
</script>
<script type="text/javascript">
var tabs = {
"<?php echo $subject0; ?>" : {
"feed" : "<?php echo $linksub0 ; ?>",
"function" : rss
},
"<?php echo $subject1; ?>": {
"feed" : "<?php echo $linksub1 ;?> ",
"function" : rss
},
"<?php echo $subject2; ?>": {
"feed" : "<?php echo $linksub2 ;?>",
"function" : rss
},
"<?php echo $subject3; ?>" : {
"feed" : "<?php echo $linksub3 ;?>",
"function" : rss
},
"<?php echo $subject4; ?>" : {
"feed" : "<?php echo $linksub4 ;?>",
"function" : rss
},
"<?php echo $subject5; ?>" : {
"feed" : "<?php echo $linksub5 ;?>",
"function" : rss
}
}
var totalTabs;
$j(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */
/* Counting the tabs */
totalTabs=0;
$j.each(tabs,function(){totalTabs++;})
$j('#feedWidget').show().mouseleave(function(){
/* If the cursor left the widet, hide the drop down list: */
$j('.dropDownList').remove();
$j('#activeTab').removeClass('hover');
}).mouseenter(function(){
if(totalTabs>1) $j('#activeTab').addClass('hover');
});
$j('#activeTab').click(showDropDown);
/* Using the live method to bind an event, because the .dropDownList does not exist yet: */
$j('.dropDownList div').live('click',function(){
/* Calling the showDropDown function, when the drop down is already shown, will hide it: */
showDropDown();
showTab($j(this).text());
});
/* Showing one of the tabs on load: */
showTab('<?php echo $$defaultab; ?>');
});
</script>
<title>head</title><div id="feedWidget">
<div id="activeTab">
<!-- The name of the current tab is inserted here -->
</div>
<div class="line"></div>
<div id="tabContent">
<!-- The feed items are inserted here -->
</div>
</div>