Skip to content

Commit

Permalink
Merge pull request #11 from bleekk/master
Browse files Browse the repository at this point in the history
Bleekk
  • Loading branch information
mambax7 committed May 19, 2017
2 parents 9544318 + 7528ac9 commit eec6a11
Show file tree
Hide file tree
Showing 38 changed files with 867 additions and 392 deletions.
4 changes: 3 additions & 1 deletion admin/brokenvideo.php
Expand Up @@ -110,6 +110,7 @@
$aboutAdmin = new ModuleAdmin();
echo $aboutAdmin->addNavigation(basename(__FILE__));


echo '
<fieldset style="border: #E8E8E8 1px solid;">
<legend style="display: inline; font-weight: bold; color: #0A3760;">' . _AM_XOOPSTUBE_BROKEN_REPORTINFO . '</legend>
Expand Down Expand Up @@ -157,7 +158,8 @@

$ack_image = $acknowledged ? $xtubeImageArray['ack_yes'] : $xtubeImageArray['ack_no'];
$con_image = $confirmed ? $xtubeImageArray['con_yes'] : $xtubeImageArray['con_no'];

xoops_load('XoopsUserUtility');

echo '<tr style="text-align: center;">';
echo '<td class="head">' . $reportid . '</td>';
echo '<td class="even" style="text-align: left;"><a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/singlevideo.php?cid=' . $cid . '&amp;lid=' . $lid
Expand Down
2 changes: 1 addition & 1 deletion admin/category.php
Expand Up @@ -295,7 +295,7 @@ function createCategory($cid = 0)
$groups = XoopsRequest::getArray('groups', array(), 'POST'); //isset($_REQUEST['groups']) ? $_REQUEST['groups'] : array();
$cid = XoopsRequest::getInt('cid', 0, 'POST'); //(isset($_REQUEST['cid'])) ? $_REQUEST['cid'] : 0;
$pid = XoopsRequest::getInt('pid', 0, 'POST'); //(isset($_REQUEST['pid'])) ? $_REQUEST['pid'] : 0;
$weight = (XoopsRequest::getInt('pid', 0, 'POST') > 0) ? XoopsRequest::getInt('pid', 0, 'POST') : 0; //(isset($_REQUEST['weight']) && $_REQUEST['weight'] > 0) ? $_REQUEST['weight'] : 0;
$weight = (XoopsRequest::getInt('weight', 0, 'POST') > 0) ? XoopsRequest::getInt('weight', 0, 'POST') : 0; //(isset($_REQUEST['weight']) && $_REQUEST['weight'] > 0) ? $_REQUEST['weight'] : 0;
$spotlighthis = XoopsRequest::getInt('lid', 0, 'POST'); //(isset($_REQUEST['lid'])) ? $_REQUEST['lid'] : 0;
$spotlighttop = (1 == XoopsRequest::getInt('spotlighttop', 0, 'POST')) ? 1 : 0; //($_REQUEST['spotlighttop'] == 1) ? 1 : 0;
$title = XoopsRequest::getString('title', '', 'POST'); //$xtubemyts->addslashes($_REQUEST['title']);
Expand Down
9 changes: 4 additions & 5 deletions assets/css/xtubestyle.css
@@ -1,7 +1,6 @@
/**
*
* Module: XoopsTube
*/
.xt-list li{
padding-bottom: 5px !important;
}

.xoopstube_button {
padding: 2px 0.5em 3px;
Expand Down Expand Up @@ -87,4 +86,4 @@ div.xoopstube_socbookmark a img {
div.xoopstube_socbookmark a:hover img {
opacity: 1;
filter: alpha(opacity=100);
}
}
Binary file added assets/images/icon/rating_0.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon/rating_1.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon/rating_2.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon/rating_3.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon/rating_4.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon/rating_5.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions class/xoopstubetree.php
Expand Up @@ -247,7 +247,7 @@ public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $se
*/
public function getNicePathFromId($selectId, $title, $funcURL, $path = '')
{
$path = !empty($path) ? '&nbsp;:&nbsp;' . $path : $path;
$path = !empty($path) ? $path : $path;
$selectId = (int)$selectId;
$sql = 'SELECT ' . $this->pid . ', ' . $title . ' FROM ' . $this->table . ' WHERE ' . $this->id . "=$selectId";
$result = $this->db->query($sql);
Expand All @@ -257,7 +257,7 @@ public function getNicePathFromId($selectId, $title, $funcURL, $path = '')
list($parentid, $name) = $this->db->fetchRow($result);
$myts = MyTextSanitizer::getInstance();
$name = $myts->htmlspecialchars($name);
$path = "<a href='" . $funcURL . '&amp;' . $this->id . '=' . $selectId . "'>" . $name . '</a>' . $path . '';
$path = "<li><a href='" . $funcURL . '&amp;' . $this->id . '=' . $selectId . "'>" . $name . '</a></li>' . $path . '';
if (0 == $parentid) {
return $path;
}
Expand Down
8 changes: 8 additions & 0 deletions docs/changelog.txt
@@ -1,3 +1,11 @@
=========================================================
1.07 Beta 2 2015-05-01
=========================================================
- Update templates for bootstrap (bleekk)
- fixed bug in admin->broken (bleekk)
- fixed date bug in category and videos (bleekk)
- load css not in templates (bleekk)

=========================================================
1.07 Beta 1 2016-06-16
=========================================================
Expand Down
7 changes: 4 additions & 3 deletions include/videoloadinfo.php
Expand Up @@ -35,7 +35,7 @@
$video['category'] = $path;

$rating = round(number_format($video_arr['rating'], 0) / 2);
$video['rateimg'] = "rate$rating.png";
$video['rateimg'] = "rating_".$rating.".gif";
unset($rating);

$video['votes'] = (1 == $video_arr['votes']) ? _MD_XOOPSTUBE_ONEVOTE : sprintf(_MD_XOOPSTUBE_NUMVOTES, $video_arr['votes']);
Expand Down Expand Up @@ -87,15 +87,16 @@
if (true === XoopstubeUtilities::xtubeCheckGroups($cid)) {
$video['useradminvideo'] = 1;
if ($GLOBALS['xoopsUser']->getVar('uid') === $video_arr['submitter']) {
$video['usermodify'] = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/submit.php?lid=' . $video_arr['lid'] . '"> ' . _MD_XOOPSTUBE_MODIFY . '</a> |';
$video['usermodify'] = '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/submit.php?lid=' . $video_arr['lid'] . '"> ' . _MD_XOOPSTUBE_MODIFY . '</a>';
}
}
}

$description =& $xtubemyts->displayTarea($video_arr['description'], 1, 1, 1, 1, 1);
$video['description'] = xoops_substr($description, 0, $GLOBALS['xoopsModuleConfig']['totalchars'], '...');

$video['updated'] = XoopstubeUtilities::xtubeGetTimestamp(formatTimestamp($time, $GLOBALS['xoopsModuleConfig']['dateformat']));
$video['updated'] = XoopstubeUtilities::xtubeGetTimestamp(formatTimestamp($video_arr['date'], $GLOBALS['xoopsModuleConfig']['dateformat']));
//$video['updated'] = date($GLOBALS['xoopsModuleConfig']['dateformat'], $video_arr['date']);
$video['submitter'] = XoopstubeUtilities::xtubeGetLinkedUserNameFromId($video_arr['submitter']);
$video['time'] = $video_arr['time'];
$video['mail_subject'] = rawurlencode(sprintf(_MD_XOOPSTUBE_INTFILEFOUND, $GLOBALS['xoopsConfig']['sitename']));
Expand Down
6 changes: 3 additions & 3 deletions language/english/main.php
Expand Up @@ -19,7 +19,7 @@
*/

define('_MD_XOOPSTUBE_NOVIDEO', 'This video does not exist!');
define('_MD_XOOPSTUBE_SUBCATLISTING', 'Category Listing');
define('_MD_XOOPSTUBE_SUBCATLISTING', 'Subcategories');
define('_MD_XOOPSTUBE_ISADMINNOTICE', 'Webmaster: There is a problem with this image.');
define('_MD_XOOPSTUBE_THANKSFORINFO', 'Thank you for your submission.<br>You will be notified once your request has be approved by the Webmaster.');
define('_MD_XOOPSTUBE_ISAPPROVED', 'Thank-you for your submission.<br>Your request has been approved and will now appear in our listing.');
Expand Down Expand Up @@ -110,7 +110,7 @@
define('_MD_XOOPSTUBE_HITS', 'Views');
define('_MD_XOOPSTUBE_RATING', 'Rating');
define('_MD_XOOPSTUBE_VOTE', 'Vote');
define('_MD_XOOPSTUBE_SORTBY', 'Sort by:');
define('_MD_XOOPSTUBE_SORTBY', 'Sort by');
define('_MD_XOOPSTUBE_TITLE', 'Title');
define('_MD_XOOPSTUBE_DATE', 'Date');
define('_MD_XOOPSTUBE_POPULARITY', 'Popularity');
Expand All @@ -125,7 +125,7 @@
define('_MD_XOOPSTUBE_SUBMITVIDEO', 'Submit video');
define('_MD_XOOPSTUBE_SUB_SNEWMNAMEDESC',
'<ul><li>All new videos are subject to validation and may take up to 24 hours before they appear in our listing.</li><li>We reserve the rights to refuse any submitted video or change the content without approval.</li></ul>');
define('_MD_XOOPSTUBE_MAINLISTING', 'Main Category Listings');
define('_MD_XOOPSTUBE_MAINLISTING', 'Categories');
define('_MD_XOOPSTUBE_LASTWEEK', 'Last Week');
define('_MD_XOOPSTUBE_LAST30DAYS', 'Last 30 Days');
define('_MD_XOOPSTUBE_1WEEK', '1 Week');
Expand Down
14 changes: 11 additions & 3 deletions newlist.php
Expand Up @@ -22,12 +22,17 @@

$xoopsOption['template_main'] = 'xoopstube_newlistindex.tpl';
include XOOPS_ROOT_PATH . '/header.php';
$xoTheme->addStylesheet('modules/'.$moduleDirName.'/assets/css/xtubestyle.css');

global $xoopsModule;

$catarray['imageheader'] = XoopstubeUtilities::xtubeRenderImageHeader();
$xoopsTpl->assign('catarray', $catarray);

if (!isset($_GET['newvideoshowdays'])){
redirect_header('newlist.php?newvideoshowdays=7',1,'');
}

if (XoopsRequest::getInt('newvideoshowdays', '', 'GET')) {
$newvideoshowdays = XoopsRequest::getInt('newvideoshowdays', 7, 'GET');
if ($newvideoshowdays !== 7) {
Expand All @@ -46,6 +51,7 @@
$result =
$GLOBALS['xoopsDB']->query('SELECT lid, cid, published, updated FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE (published >= ' . $duration . ' AND published <= '
. $time_cur . ') OR updated >= ' . $duration . ' AND (expired = 0 OR expired > ' . $time_cur . ') AND offline = 0');

while (false !== ($myrow = $GLOBALS['xoopsDB']->fetcharray($result))) {
$published = ($myrow['updated'] > 0) ? $myrow['updated'] : $myrow['published'];
++$allmonthvideos;
Expand All @@ -60,14 +66,16 @@
// $newvideoshowdays = xtubeCleanRequestVars($_REQUEST, 'newvideoshowdays', 7 );
$newvideoshowdays = (int)XoopsRequest::getInt('newvideoshowdays', 7, 'GET');
$xoopsTpl->assign('newvideoshowdays', $newvideoshowdays);

$dailyvideos = array();
for ($i = 0; $i < $newvideoshowdays; ++$i) {
$key = $newvideoshowdays - $i - 1;
$time = $time_cur - (86400 * $key);
$dailyvideos[$key]['newvideodayRaw'] = $time;
$dailyvideos[$key]['newvideoView'] = XoopstubeUtilities::xtubeGetTimestamp(formatTimestamp($time, $GLOBALS['xoopsModuleConfig']['dateformat']));
$dailyvideos[$key]['totalvideos'] = 0;

$dailyvideos[$key]['totalvideos'] = 0;

}
}

Expand All @@ -76,7 +84,7 @@
$GLOBALS['xoopsDB']->query('SELECT lid, cid, published, updated FROM ' . $GLOBALS['xoopsDB']->prefix('xoopstube_videos') . ' WHERE (published > ' . $duration . ' AND published <= ' . $time_cur
. ') OR (updated >= ' . $duration . ' AND updated <= ' . $time_cur . ') AND (expired = 0 OR expired > ' . $time_cur . ') AND offline = 0');
while (false !== ($myrow = $GLOBALS['xoopsDB']->fetcharray($result))) {
$published = ($myrow['updated'] > 0) ? $myrow['updated'] : $myrow['published'];
$published = ($myrow['updated'] > 0) ? date($GLOBALS['xoopsModuleConfig']['dateformat'], $myrow['updated']) : date($GLOBALS['xoopsModuleConfig']['dateformat'], $myrow['published']);
$d = date('j', $published);
$m = date('m', $published);
$y = date('Y', $published);
Expand Down
2 changes: 2 additions & 0 deletions singlevideo.php
Expand Up @@ -48,6 +48,8 @@

include XOOPS_ROOT_PATH . '/header.php';

$xoTheme->addStylesheet('modules/'.$moduleDirName.'/assets/css/xtubestyle.css');

// tags support
if (XoopstubeUtilities::xtubeIsModuleTagInstalled()) {
include_once XOOPS_ROOT_PATH . '/modules/tag/include/tagbar.php';
Expand Down
2 changes: 1 addition & 1 deletion sql/mysql.sql
Expand Up @@ -45,7 +45,7 @@ CREATE TABLE `xoopstube_cat` (
pid INT(5) UNSIGNED NOT NULL DEFAULT '0',
title VARCHAR(50) NOT NULL DEFAULT '',
imgurl VARCHAR(150) NOT NULL DEFAULT '',
description VARCHAR(255) NOT NULL DEFAULT '',
description TEXT NOT NULL DEFAULT '',
total INT(11) NOT NULL DEFAULT '0',
spotlighttop INT(11) NOT NULL DEFAULT '0',
spotlighthis INT(11) NOT NULL DEFAULT '0',
Expand Down
15 changes: 13 additions & 2 deletions submit.php
Expand Up @@ -35,7 +35,15 @@
redirect_header('index.php', 1, _MD_XOOPSTUBE_NOPERMISSIONTOPOST);
}


if (true === XoopstubeUtilities::xtubeCheckGroups($cid, 'XTubeSubPerm')) {
echo '<div class="row">
<div class="col-md-12">';
echo '<ol class="breadcrumb">
<li><a href="index.php">'.$moduleDirName.'</a></li>
<li>'._MD_XOOPSTUBE_SUBMITCATHEAD.'</li>
</ol>
';
// if (xtubeCleanRequestVars($_REQUEST, 'submit', 0)) {
if (XoopsRequest::getString('submit', '')) {
if (false === XoopstubeUtilities::xtubeCheckGroups($cid, 'XTubeSubPerm')) {
Expand Down Expand Up @@ -174,7 +182,7 @@
$approve = XoopsRequest::getInt('approve', 0, 'POST'); // xtubeCleanRequestVars($_REQUEST, 'approve', 0);

// Show disclaimer
if ($GLOBALS['xoopsModuleConfig']['showdisclaimer'] && !XoopsRequest::getInt('agree', '', 'GET') && 0 == $approve) {
if ($GLOBALS['xoopsModuleConfig']['showdisclaimer'] && !XoopsRequest::getInt('agree', '', 'GET') && 0 == $approve) {
echo '<br><div style="text-align: center;">' . XoopstubeUtilities::xtubeRenderImageHeader() . '</div><br>';
echo '<h4>' . _MD_XOOPSTUBE_DISCLAIMERAGREEMENT . '</h4>';
echo '<div>' . $xtubemyts->displayTarea($GLOBALS['xoopsModuleConfig']['disclaimer'], 1, 1, 1, 1, 1) . '</div>';
Expand All @@ -187,7 +195,6 @@
include XOOPS_ROOT_PATH . '/footer.php';
exit();
}
echo '<br><div style="text-align: center;">' . XoopstubeUtilities::xtubeRenderImageHeader() . '</div><br>';
echo '<div>' . _MD_XOOPSTUBE_SUB_SNEWMNAMEDESC . '</div>';
// echo "<div class='xoopstube_singletitle'>" . _MD_XOOPSTUBE_SUBMITCATHEAD . "</div>\n";

Expand Down Expand Up @@ -352,8 +359,12 @@
$sform->addElement($button_tray);
$sform->display();

echo '</div></div>';

include XOOPS_ROOT_PATH . '/footer.php';
}

} else {
redirect_header('index.php', 2, _MD_XOOPSTUBE_NOPERMISSIONTOPOST);
}

@@ -1,8 +1,8 @@
<div class="xoopstube-blocks row">
<{foreach item=videoload from=$block.videos}>
<div class="col-md-4 xoopstube-thumb">
<div class="col-md-12">
<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&lid=<{$videoload.id}>"><{$videoload.videothumb}></a>
<span>
<span style="display: block">
<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&lid=<{$videoload.id}>"><{$videoload.title}></a>
<{$videoload.date}>
</span>
Expand Down
@@ -0,0 +1,34 @@
<div style="background-color:#eeeeee; width: 520px; height:360px; text-align:center; clear:both;">

<{foreach item=videoload from=$block.videos name=grouploop}>

<{if $smarty.foreach.grouploop.first}>
<div style="float:right; background-color:#efefef; width: 380px; height:100%; position:relative;">
<div style="background-color:#dddddd; width:100%; position:absolute; top:50%; height:320px; margin-top:-160px; left:0;">
<!--<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&amp;lid=<{$videoload.id}>"><{$videoload.videothumb}></a> -->
<div style="padding: 10px 0; width:100%;">
<{$videoload.showvideo}>
<br>
<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&amp;lid=<{$videoload.id}>"
style="font-size: small;"><{$videoload.title}></a>
</div>
</div>
</div>

<div style="float:left; background-color:#cccccc; width:140px; height:100%; position:relative;">
<div style="background-color:#bbbbbb; width:100%; position:absolute; top:50%; height:320px; margin-top:-160px; left:0;">
<div style="padding: 9px 0;">
<{else}>
<div style="padding: 2px 0;">
<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&amp;lid=<{$videoload.id}>"><{$videoload.videothumb}></a>
<br>
<a href="<{$xoops_url}>/modules/<{$videoload.dirname}>/singlevideo.php?cid=<{$videoload.cid}>&amp;lid=<{$videoload.id}>"
style="font-size: small;"><{$videoload.title}></a>
</div>
<{/if}>

<{/foreach}>
</div>
</div>
</div>
</div>
@@ -1,5 +1,5 @@
<{if $show_categort_title == true}>
<{$smarty.const._MD_XOOPSTUBE_CATEGORYC}> <{$video.category}>
<{$smarty.const._MD_XOOPSTUBE_CATEGORYC}> <{$video.category}>
<{/if}>

<a href="<{$xoops_url}>/modules/<{$video.module_dir}>/singlevideo.php?cid=<{$video.cid}>&amp;lid=<{$video.id}>">
Expand All @@ -8,36 +8,37 @@
<{$video.icons}>

<{if $xoops_isadmin}>
<{$video.adminvideo}>
<{$video.adminvideo}>
<{/if}>

<{if $video.published > 0 }>
<a href="<{$xoops_url}>/modules/<{$video.module_dir}>/singlevideo.php?cid=<{$video.cid}>&amp;lid=<{$video.id}>">
<img src="<{$xoops_url}>/modules/<{$video.module_dir}>/assets/images/icon/play.png"
alt="<{$smarty.const._MD_XOOPSTUBE_VIEWDETAILS}>" title="<{$smarty.const._MD_XOOPSTUBE_VIEWDETAILS}>"/>
</a>
<a href="<{$xoops_url}>/modules/<{$video.module_dir}>/singlevideo.php?cid=<{$video.cid}>&amp;lid=<{$video.id}>">
<img src="<{$xoops_url}>/modules/<{$video.module_dir}>/images/icon/play.png"
alt="<{$smarty.const._MD_XOOPSTUBE_VIEWDETAILS}>" title="<{$smarty.const._MD_XOOPSTUBE_VIEWDETAILS}>"/>
</a>
<{/if}>
<{if $video.showsubmitterx}>
<{$smarty.const._MD_XOOPSTUBE_SUBMITTER}>: <{$video.submitter}>
<{$smarty.const._MD_XOOPSTUBE_SUBMITTER}>: <{$video.submitter}>
<{/if}>
<{$smarty.const._MD_XOOPSTUBE_PUBLISHER}>: <{$video.publisher}>
<{$lang_subdate}>: <{$video.updated}>
<{$video.hits|wordwrap:50:"\n":true}>
<{$smarty.const._MD_XOOPSTUBE_TIMEB}> <{$video.time}>

<{if $video.showrating}>
<br>
<div class="xoopstube_infoblock">
<span style="font-weight: bold;"><{$smarty.const._MD_XOOPSTUBE_RATINGC}></span>&nbsp;<img
src="<{$xoops_url}>/modules/<{$video.module_dir}>/assets/images/icon/<{$video.rateimg}>" alt="" align="middle"/>&nbsp;&nbsp;(<{$video.votes}>)
</div>
<br>

<div class="xoopstube_infoblock">
<span style="font-weight: bold;"><{$smarty.const._MD_XOOPSTUBE_RATINGC}></span>&nbsp;<img
src="<{$xoops_url}>/modules/<{$video.module_dir}>/images/icon/<{$video.rateimg}>" alt="" align="middle"/>&nbsp;&nbsp;(<{$video.votes}>)
</div>
<{/if}>
</div>

<div style="float: left; padding: 0 4px 4px 0;">
<{if $video.screen_shot}>
<a href="<{$xoops_url}>/modules/<{$video.module_dir}>/singlevideo.php?cid=<{$video.cid}>&amp;lid=<{$video.id}>"
target=""><{$video.videothumb}></a>
<a href="<{$xoops_url}>/modules/<{$video.module_dir}>/singlevideo.php?cid=<{$video.cid}>&amp;lid=<{$video.id}>"
target=""><{$video.videothumb}></a>
<{/if}>
</div>

Expand Down

0 comments on commit eec6a11

Please sign in to comment.