|
From: <luc...@us...> - 2013-09-03 21:05:04
|
Revision: 12001
http://sourceforge.net/p/xoops/svn/12001
Author: luciorota
Date: 2013-09-03 21:04:58 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
improved templates
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -89,11 +89,11 @@
$down['cid'] = $this->getVar('cid');
$use_mirrors = $wfdownloads->getConfig('enable_mirrors');
- $add_mirror = 0;
+ $add_mirror = false;
if (!is_object($xoopsUser) && ($wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_MIRROR || $wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH) && $use_mirrors == true) {
- $add_mirror = 1;
+ $add_mirror = true;
} elseif (is_object($xoopsUser) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH || $xoopsUser->isAdmin()) && $use_mirrors == true) {
- $add_mirror = 1;
+ $add_mirror = true;
}
$down['add_mirror'] = $add_mirror;
$down['use_mirrors'] = $use_mirrors;
@@ -116,7 +116,7 @@
if ($this->getVar('screenshot')) {
$down['screenshot_full'] = $this->getVar('screenshot');
if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb'] = down_createthumb($down['screenshot_full'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -127,7 +127,7 @@
if ($this->getVar('screenshot2') && $wfdownloads->getConfig('max_screenshot') >= 2) {
$down['screenshot_full2'] = $this->getVar('screenshot2');
if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb2'] = down_createthumb($down['screenshot_full2'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -138,7 +138,7 @@
if ($this->getVar('screenshot3') && $wfdownloads->getConfig('max_screenshot') >= 3) {
$down['screenshot_full3'] = $this->getVar('screenshot3');
if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb3'] = down_createthumb($down['screenshot_full3'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -149,7 +149,7 @@
if ($this->getVar('screenshot4') && $wfdownloads->getConfig('max_screenshot') >= 4) {
$down['screenshot_full4'] = $this->getVar('screenshot4');
if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb4'] = down_createthumb($down['screenshot_full4'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -191,16 +191,16 @@
$down['lang_subdate'] = $is_updated;
$summary = $this->getVar('summary');
- if ($wfdownloads->getConfig('autosummary') == 1 || empty($summary))
+ if ($wfdownloads->getConfig('autosummary') == true || empty($summary))
{
- $sumlength = (int)$wfdownloads->getConfig('autosumlength');
- $sumdesc = stripslashes($this->getVar('description'));
- if (strlen($sumdesc) > $sumlength) {
- $sumdesc = substr($sumdesc, 0, $sumlength);
- $sumdesc = trim(substr($sumdesc, 0, strrpos($sumdesc, ' '))).' ...';
- $down['summary'] = $myts->displayTarea($sumdesc, 1);
+ $summaryLength = (int)$wfdownloads->getConfig('autosumlength');
+ $summaryDescription = stripslashes($this->getVar('description'));
+ if (strlen($summaryDescription) > $summaryLength) {
+ $summaryDescription = substr($summaryDescription, 0, $summaryLength);
+ $summaryDescription = trim(substr($summaryDescription, 0, strrpos($summaryDescription, ' '))) . ' ...';
+ $down['summary'] = $myts->displayTarea($summaryDescription, 1);
} else {
- $down['summary'] = $myts->displayTarea($sumdesc, 1);
+ $down['summary'] = $myts->displayTarea($summaryDescription, 1);
}
} else {
$down['summary'] = $summary;
@@ -212,8 +212,8 @@
$down['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
$versiontypesArray = $wfdownloads->getConfig('versiontypes');
$down['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
- $licenceArray = $wfdownloads->getConfig('license');
- $down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenceArray[$this->getVar('license')]));
+ $licenseArray = $wfdownloads->getConfig('license');
+ $down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
$down['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
$publisher = $this->getVar('publisher');
if (!empty($publisher)) {
@@ -247,14 +247,14 @@
$down['adminlink'] = '';
if ($down['isadmin'] == true) {
- $down['adminlink'] = '[ <a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $down['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
- $down['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $down['id'] . '">' . _MD_WFD_DELETE . '</a> ]';
+ $down['adminlink'] = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $down['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
+ $down['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $down['id'] . '">' . _MD_WFD_DELETE . '</a>]';
}
$votestring = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
$down['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
if (is_object($xoopsUser) && $down['isadmin'] != true) {
- $down['useradminlink'] = (intval($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
+ $down['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
}
global $xoopsDB;
@@ -367,7 +367,9 @@
$sform->addElement($versiontypes_select);
$sform->addElement(new XoopsFormText(_MD_WFD_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
- $sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary'), false);
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFD_SUMMARY_DESC);
+ $sform->addElement($summary_dhtmltextarea, false);
$sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription'), true);
$features_textarea = new XoopsFormTextArea(_MD_WFD_KEYFEATURESC, 'features', $this->getVar('features', 'e'), 7, 60);
$features_textarea->setDescription(_MD_WFD_KEYFEATURESC_DESC);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1065,25 +1065,25 @@
-function wfd_isnewimage($published)
+function wfdownloads_isNewImage($published)
{
- $oneDay = (time() - (86400 * 1));
- $threeDays = (time() - (86400 * 3));
- $week = (time() - (86400 * 7));
+ $oneDay = (time() - (86400 * 1)); // 1 day
+ $threeDays = (time() - (86400 * 3)); // 3 days
+ $week = (time() - (86400 * 7)); // 1 week
if ($published > 0 && $published < $week) {
- $indicator['image'] = "images/icon/download4.gif";
+ $indicator['image'] = 'images/icon/download4.gif';
$indicator['alttext'] = _MD_WFD_NEWLAST;
} elseif ($published >= $week && $published < $threeDays) {
- $indicator['image'] = "images/icon/download3.gif";
+ $indicator['image'] = 'images/icon/download3.gif';
$indicator['alttext'] = _MD_WFD_NEWTHIS;
} elseif ($published >= $threeDays && $published < $oneDay) {
- $indicator['image'] = "images/icon/download2.gif";
+ $indicator['image'] = 'images/icon/download2.gif';
$indicator['alttext'] = _MD_WFD_THREE;
} elseif ($published >= $oneDay) {
- $indicator['image'] = "images/icon/download1.gif";
+ $indicator['image'] = 'images/icon/download1.gif';
$indicator['alttext'] = _MD_WFD_TODAY;
} else {
- $indicator['image'] = "images/icon/download.gif";
+ $indicator['image'] = 'images/icon/download.gif';
$indicator['alttext'] = _MD_WFD_NO_FILES;
}
return $indicator;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -21,6 +21,27 @@
$currentFile = basename(__FILE__);
include 'header.php';
+$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
+
+// Check if submission is allowed
+$isSubmissionAllowed = false;
+if (is_object($xoopsUser) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_DOWNLOAD || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH)) {
+ // if user is a registered user
+ $groups = $xoopsUser->getGroups();
+ if (array_intersect($xoopsModuleConfig['submitarts'], $groups)) {
+ $isSubmissionAllowed = true;
+ }
+} else {
+ // if user is anonymous
+ if ($wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_DOWNLOAD || $wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) {
+ $isSubmissionAllowed = true;
+ }
+}
+
+// Get download/upload permissions
+$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
+
$xoopsOption['template_main'] = 'wfdownloads_index.html';
include XOOPS_ROOT_PATH . '/header.php';
@@ -65,13 +86,10 @@
$chcount = 0;
$countin = 0;
-$userGroups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
+$listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
-$allowedCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $userGroups, $wfdownloads->getModule()->mid());
-$listings = wfd_getTotalItems(0, $allowedCategoriesIds);
-
// Get total amount of categories
-$total_cat = count($allowedCategoriesIds);
+$total_cat = count($allowedDownCategoriesIds);
// Get all main categories
$mainCategories = $categoriesTree->getFirstChild(0);
$count = 0;
@@ -91,87 +109,105 @@
}
// Foreach main category
foreach (array_keys($mainCategories) as $i) {
- if (in_array($mainCategories[$i]->getVar('cid'), $allowedCategoriesIds)) {
+ if (in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds)) {
// Get this category image
// Get this category subcategories
- $allSubCategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
+ $allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
// Sort subcategories by: cid or title or weight
switch($wfdownloads->getConfig('subcatssortby')) {
case 'cid' :
- uasort($allSubCategories, 'categoriesCompareCid');
+ uasort($allSubcategories, 'categoriesCompareCid');
break;
case 'title' :
- uasort($allSubCategories, 'categoriesCompareTitle');
+ uasort($allSubcategories, 'categoriesCompareTitle');
break;
case 'weight' :
default :
- uasort($allSubCategories, 'categoriesCompareWeight');
+ uasort($allSubcategories, 'categoriesCompareWeight');
break;
}
// Get this category indicator image
$publishdate = isset($listings['published'][$mainCategories[$i]->getVar('cid')]) ? $listings['published'][$mainCategories[$i]->getVar('cid')] : 0;
- if (count($allSubCategories) > 0) {
+ if (count($allSubcategories) > 0) {
// Foreach subcategory
- foreach (array_keys($allSubCategories) as $k) {
- if (in_array($allSubCategories[$k]->getVar('cid'), $allowedCategoriesIds)) {
- $publishdate = (isset($listings['published'][$allSubCategories[$k]->getVar('cid')]) AND $listings['published'][$allSubCategories[$k]->getVar('cid')] > $publishdate) ? $listings['published'][$allSubCategories[$k]->getVar('cid')] : $publishdate;
+ foreach (array_keys($allSubcategories) as $k) {
+ if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
+ $publishdate = (isset($listings['published'][$allSubcategories[$k]->getVar('cid')]) AND $listings['published'][$allSubcategories[$k]->getVar('cid')] > $publishdate) ? $listings['published'][$allSubcategories[$k]->getVar('cid')] : $publishdate;
}
}
}
- $indicator = wfd_isnewimage($publishdate);
+ $isNewImage = wfdownloads_isNewImage($publishdate);
if (($mainCategories[$i]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imgurl = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
"thumbs", $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
- $imgurl = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl');
+ $imageURL = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl');
}
} else {
- $imgurl = $indicator['image'];
+ $imageURL = $isNewImage['image'];
}
// Get this category subcategories id and title
- $subCategories = array();
+ $subcategories = array();
$count++;
$download_count = isset($listings['count'][$mainCategories[$i]->getVar('cid')]) ? $listings['count'][$mainCategories[$i]->getVar('cid')] : 0;
// modified July 5 2006 by Freeform Solutions (jwe)
// make download count recursive, to include all sub categories that the user has permission to view
- //$allSubCategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
- if (count($allSubCategories) > 0) {
- foreach (array_keys($allSubCategories) as $k) {
- if (in_array($allSubCategories[$k]->getVar('cid'), $allowedCategoriesIds)) {
- $download_count += isset($listings['count'][$allSubCategories[$k]->getVar('cid')]) ? $listings['count'][$allSubCategories[$k]->getVar('cid')] : 0;
- if($wfdownloads->getConfig('subcats') == 1 AND $allSubCategories[$k]->getVar('pid') == $mainCategories[$i]->getVar('cid')) {
+ //$allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
+ if (count($allSubcategories) > 0) {
+ foreach (array_keys($allSubcategories) as $k) {
+ if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
+ $download_count += isset($listings['count'][$allSubcategories[$k]->getVar('cid')]) ? $listings['count'][$allSubcategories[$k]->getVar('cid')] : 0;
+ if($wfdownloads->getConfig('subcats') == 1 AND $allSubcategories[$k]->getVar('pid') == $mainCategories[$i]->getVar('cid')) {
// if we are collecting subcat info for displaying, and this subcat is a first level child...
- $subCategories[] = array("id" => $allSubCategories[$k]->getVar('cid'), "title" => $allSubCategories[$k]->getVar('title'));
+ $subcategories[] = array(
+ 'id' => $allSubcategories[$k]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => $allSubcategories[$k]->getVar('cid'),
+ 'allowed_download' => in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($allSubcategories[$k]->getVar('cid'), $allowedUpCategoriesIds)),
+ 'title' => $allSubcategories[$k]->getVar('title')
+ );
}
}
}
}
- if($wfdownloads->getConfig('subcats') != 1) {
- unset($subCategories);
+ if($wfdownloads->getConfig('subcats') != true) {
+ unset($subcategories);
$xoopsTpl->append('categories', array(
- 'image' => $imgurl,
- 'id' => (int)$mainCategories[$i]->getVar('cid'),
+ 'image' => $imageURL, // this definition is not removed for compatibility issues
+ 'image_URL' => $imageURL,
+ 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => (int)$mainCategories[$i]->getVar('cid'),
+ 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
'title' => $mainCategories[$i]->getVar('title'),
'summary' => $mainCategories[$i]->getVar('summary'),
- 'totaldownloads' => (int)$download_count,
+ 'totaldownloads' => (int)$download_count, // this definition is not removed for compatibility issues
+ 'downloads_count' => (int)$download_count,
'count' => (int)$count,
- 'alttext' => $indicator['alttext']));
+ 'alttext' => $isNewImage['alttext'])
+ );
} else {
$xoopsTpl->append('categories', array(
- 'image' => $imgurl,
- 'id' => (int)$mainCategories[$i]->getVar('cid'),
+ 'image' => $imageURL, // this definition is not removed for compatibility issues
+ 'image_URL' => $imageURL,
+ 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => (int)$mainCategories[$i]->getVar('cid'),
+ 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
'title' => $mainCategories[$i]->getVar('title'),
'summary' => $mainCategories[$i]->getVar('summary'),
- 'subcategories' => $subCategories,
- 'totaldownloads' => (int)$download_count,
+ 'subcategories' => $subcategories,
+ 'totaldownloads' => (int)$download_count, // this definition is not removed for compatibility issues
+ 'downloads_count' => (int)$download_count,
'count' => (int)$count,
- 'alttext' => $indicator['alttext']));
+ 'alttext' => $isNewImage['alttext'])
+ );
}
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -21,7 +21,7 @@
define("_MD_WFD_THANKSFORHELP","Thank-you for helping to maintain this directory's integrity.");
define("_MD_WFD_FORSECURITY","For security reasons your user name and IP address will also be temporarily recorded.");
define("_MD_WFD_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!!</b> <br /><br /><b>Definition of a Leecher:</b> One who is to lazy to link from his own server or steals other peoples hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
-define("_MD_WFD_SUMMARY","Summary<br /><br /><span style='font-weight: normal;'>You can leave this blank<br />A summary will be created if empty</span>");
+define("_MD_WFD_SUMMARY","Summary");
define("_MD_WFD_DESCRIPTION","Description");
define("_MD_WFD_SUBMITCATHEAD","Submit download form");
define("_MD_WFD_MAIN","HOME");
@@ -36,7 +36,7 @@
define("_MD_WFD_DATENEW","Date (new files listed first)");
define("_MD_WFD_RATINGLTOH","Rating (lowest to highest score)");
define("_MD_WFD_RATINGHTOL","Rating (highest to lowest score)");
-define("_MD_WFD_DESCRIPTIONC","Description: ");
+define("_MD_WFD_DESCRIPTIONC","Description");
define("_MD_WFD_CATEGORYC","Category");
define("_MD_WFD_VERSION","Version");
define("_MD_WFD_SUBMITDATE","Released");
@@ -84,7 +84,7 @@
define("_MD_WFD_UPDATEDON","Updated on");
define("_MD_WFD_PRICEFREE","Free");
define("_MD_WFD_VIEWDETAILS","View full details");
-define("_MD_WFD_OPTIONS", 'Options: ');
+define("_MD_WFD_OPTIONS", 'Options');
define("_MD_WFD_NOTIFYAPPROVE", 'Notify me when this file is approved');
define("_MD_WFD_VOTEAPPRE","Your vote is appreciated.");
define("_MD_WFD_THANKYOU","Thank you for taking the time to vote here at %s"); // %s is your site name
@@ -104,7 +104,7 @@
define("_MD_WFD_DATE","Date");
define("_MD_WFD_POPULARITY","Popularity");
define("_MD_WFD_TOPRATED","Rating");
-define("_MD_WFD_CURSORTBY","Files currently sorted by: %s");
+define("_MD_WFD_CURSORTBY","Downloads currently sorted by: %s");
define("_MD_WFD_CANCEL","Cancel");
define("_MD_WFD_ALREADYREPORTED","You have already submitted a broken report for this resource.");
define("_MD_WFD_MUSTREGFIRST","Sorry, you don't have the permission to perform this action.<br />Please register or login first!");
@@ -126,21 +126,21 @@
define("_MD_WFD_AGREE","I Agree");
define("_MD_WFD_DOYOUAGREE","Do you agree to the above terms?");
define("_MD_WFD_DISCLAIMERAGREEMENT","Disclaimer");
-define("_MD_WFD_DUPLOADSCRSHOT","Upload screenshot image:");
-define("_MD_WFD_RESOURCEID","Resource id#: ");
-define("_MD_WFD_REPORTER","Original reporter: ");
-define("_MD_WFD_DATEREPORTED","Date reported: ");
+define("_MD_WFD_DUPLOADSCRSHOT","Upload screenshot image");
+define("_MD_WFD_RESOURCEID","Resource id#");
+define("_MD_WFD_REPORTER","Original reporter");
+define("_MD_WFD_DATEREPORTED","Date reported");
define("_MD_WFD_RESOURCEREPORTED","Resource reported broken");
define("_MD_WFD_BROWSETOTOPIC","<b>Browse downloads by alphabetical listing</b>");
-define("_MD_WFD_WEBMASTERACKNOW","Broken report acknowledged: ");
-define("_MD_WFD_WEBMASTERCONFIRM","Broken report confirmed: ");
+define("_MD_WFD_WEBMASTERACKNOW","Broken report acknowledged");
+define("_MD_WFD_WEBMASTERCONFIRM","Broken report confirmed");
define("_MD_WFD_DELETE","Delete");
define("_MD_WFD_DISPLAYING","Displayed by: ");
define("_MD_WFD_LEGENDTEXTNEW","New today");
define("_MD_WFD_LEGENDTEXTNEWTHREE","New 3 days");
define("_MD_WFD_LEGENDTEXTTHISWEEK","New this week");
define("_MD_WFD_LEGENDTEXTNEWLAST","Over 1 week");
-define("_MD_WFD_THISFILEDOESNOTEXIST","Error: this file does not exist!");
+define("_MD_WFD_THISFILEDOESNOTEXIST","ERROR: this file does not exist!");
define("_MD_WFD_BROKENREPORTED","Broken file reported");
define("_MD_WFD_LEGENDTEXTRSS","RSS feeds");
define("_MD_WFD_LEGENDTEXTCATRSS","RSS category feed");
@@ -166,7 +166,7 @@
define("_MD_WFD_REV_RATING","Review rating");
define("_MD_WFD_REV_DESCRIPTION","Review");
define("_MD_WFD_REV_SUBMITREV","Submit review");
-define("_MD_WFD_ERROR_CREATEREVIEW","Error when creating a review");
+define("_MD_WFD_ERROR_CREATEREVIEW","ERROR: unable to create a review");
define("_MD_WFD_REV_SNEWMNAMEDESC","
Please completely fill out the form below, and we'll add your review as soon as possible.<br /><br />
@@ -202,7 +202,7 @@
define("_MD_WFD_USERREVIEWSTITLE","User reviews");
define("_MD_WFD_USERREVIEWS","Read User reviews on %s");
define("_MD_WFD_NOUSERREVIEWS","Be the first person to review %s");
-define("_MD_WFD_ERROR","Error updating database: information not saved");
+define("_MD_WFD_ERROR","ERROR: error updating database, information not saved");
define("_MD_WFD_COPYRIGHT","copyright");
define("_MD_WFD_INFORUM","Discuss in forum");
@@ -246,7 +246,7 @@
define("_MD_WFD_MIRROR_LOCATION","Location");
define("_MD_WFD_MIRROR_DOWNURL","Download URL");
define("_MD_WFD_MIRROR_SUBMITMIRROR","Submit mirror");
-define("_MD_WFD_ERROR_CREATEMIRROR","Error when creating mirror");
+define("_MD_WFD_ERROR_CREATEMIRROR","ERROR: unable to create a mirror");
define("_MD_WFD_MIRROR_SNEWMNAMEDESC","
Please completely fill out the form below, and we'll add your mirror as soon as possible.<br /><br />
Thank you for your assistance in providing another location to download these files. We want to give our users a possibility to find quality software faster.<br /><br />All mirror submissions will be reviewed by one of our webmasters before they are put up on the web site.
@@ -268,7 +268,7 @@
define("_MD_WFD_CONT7","Oceania");
-define("_MD_WFD_ADMIN_PAGE",":: Administrative section ::");
+define("_MD_WFD_ADMIN_PAGE","Administrative section");
define("_MD_WFD_DOWNLOADS_LIST","Downloads list (%s)");
define("_MD_WFD_NEWDOWNLOADS_ALL","All");
define("_MD_WFD_NEWDOWNLOADS_INTHELAST","In the last %s days");
@@ -303,4 +303,9 @@
define("_MD_WFD_KEYFEATURESC_DESC","Separate each key feature with a |");
define("_MD_WFD_REQUIREMENTSC_DESC","Separate each requirement with |");
define("_MD_WFD_HISTORYD_DESC","The submit date will automatically be added to this.");
-define("_MD_WFD_UPLOAD_FILEC_DESC","Max file size: %s<br />Max image width: %dpx<br />Max image height: %dpx<br />Allowed mimetypes: %s");
\ No newline at end of file
+define("_MD_WFD_UPLOAD_FILEC_DESC","Max file size: %s<br />Max image width: %dpx<br />Max image height: %dpx<br />Allowed extensions: %s");
+
+define("_MD_WFD_SUMMARY_DESC","You can leave this blank<br />A summary will be created if empty");
+
+define("_MD_WFD_SUBCATEGORIESLISTING","Subcategories listing");
+define("_MD_WFD_DOWNLOADSLISTING","Downloads listing");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -95,7 +95,7 @@
define("_MI_WFD_REVIEWANONPOST","[reviews] Anonymous user reviews");
define("_MI_WFD_REVIEWANONPOSTDSC","Allow Anonymous users to submit new reviews to your website.");
-define('_MI_WFD_MAXFILESIZE','[upload files] Upload size (kilobytes)');
+define('_MI_WFD_MAXFILESIZE','[upload files] Max file size (bytes)');
define('_MI_WFD_MAXFILESIZEDSC','Maximum file size permitted with file uploads.');
define('_MI_WFD_IMGWIDTH','[upload files] Max upload image width (pixels)');
define('_MI_WFD_IMGWIDTHDSC','Maximum image width permitted when uploading image files.');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -68,11 +68,12 @@
$criteria->setLimit($wfdownloads->getConfig('perpage'));
$criteria->setStart(0);
$downloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
-foreach (array_keys($downloads) as $i) {
- $down = $downloads[$i]->getDownloadInfo();
- $xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $down['hits']));
- $xoopsTpl->assign('lang_subdate' , $down['is_updated']);
- $xoopsTpl->append('file', $down);
+foreach ($downloads as $download) {
+ $downloadInfo = $download->getDownloadInfo();
+ $xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $downloadInfo['hits']));
+ $xoopsTpl->assign('lang_subdate' , $downloadInfo['is_updated']);
+ $xoopsTpl->append('file', $downloadInfo);
+ $xoopsTpl->append('downloads', $downloadInfo); // this definition is not removed for compatibility issues
}
// Screenshots display
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -160,11 +160,11 @@
// Get download informations
-$down = $download->getDownloadInfo();
-$xoopsTpl->assign('categoryPath', $down['path'] . " > " . $down['title']); // this definition is not removed for compatibility issues
-$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $down['hits']));
-$xoopsTpl->assign('lang_subdate' , $down['is_updated']);
-$xoopsTpl->append('file', $down);
+$downloadInfo = $download->getDownloadInfo();
+$xoopsTpl->assign('categoryPath', $downloadInfo['path'] . " > " . $downloadInfo['title']); // this definition is not removed for compatibility issues
+$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $downloadInfo['hits']));
+$xoopsTpl->assign('lang_subdate' , $downloadInfo['is_updated']);
+$xoopsTpl->append('file', $downloadInfo);
$xoopsTpl->assign('show_screenshot', false);
if ($wfdownloads->getConfig('screenshot') == 1) {
$xoopsTpl->assign('shots_dir', $wfdownloads->getConfig('screenshots'));
@@ -182,7 +182,7 @@
$breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
}
$breadcrumb->addLink($category->getVar('title'), "viewcat.php?cid=" . $category->getVar('cid'));
-$breadcrumb->addLink($down['title'], '');
+$breadcrumb->addLink($downloadInfo['title'], '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
// Show other author downloads
@@ -192,12 +192,13 @@
$criteria->setSort('published');
$criteria->setOrder('DESC');
$downloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
-foreach (array_keys($downloads) as $i) {
- $downuid['title'] = $downloads[$i]->getVar('title');
- $downuid['lid'] = (int)$downloads[$i]->getVar('lid');
- $downuid['cid'] = (int)$downloads[$i]->getVar('cid');
- $downuid['published'] = formatTimestamp($downloads[$i]->getVar('published'), $wfdownloads->getConfig('dateformat'));
- $xoopsTpl->append('down_uid', $downuid);
+foreach ($downloads as $download) {
+ $downloadByUser['title'] = $download->getVar('title');
+ $downloadByUser['lid'] = (int)$download->getVar('lid');
+ $downloadByUser['cid'] = (int)$download->getVar('cid');
+ $downloadByUser['published'] = formatTimestamp($download->getVar('published'), $wfdownloads->getConfig('dateformat'));
+ $xoopsTpl->append('down_uid', $downloadByUser); // this definition is not removed for compatibility issues
+ $xoopsTpl->append('downloads_by_user', $downloadByUser);
}
$cid = (int)$download->getVar('cid');
@@ -221,7 +222,7 @@
/**
* User mirrors
*/
-$down['add_mirror'] = $add_mirror;
+$downloadInfo['add_mirror'] = $add_mirror;
$criteria = new CriteriaCompo(new Criteria("lid", $lid));
$criteria->add(new Criteria("submit", 1));
$mirrorsCount = $wfdownloads->getHandler('mirror')->getCount($criteria);
@@ -238,7 +239,8 @@
if ($wfdownloads->getConfig('copyright') == true) {
$xoopsTpl->assign('lang_copyright', $download->getVar('title') . " © " . _MD_WFD_COPYRIGHT . " " . date("Y"));
}
-$xoopsTpl->assign('down', $down);
+$xoopsTpl->assign('down', $downloadInfo); // this definition is not removed for compatibility issues
+$xoopsTpl->assign('download', $downloadInfo);
include XOOPS_ROOT_PATH . '/include/comment_view.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -387,26 +387,28 @@
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
$catarray['imageheader'] = wfd_imageheader();
-
+ $xoopsTpl->assign('catarray', $catarray);
+
// Breadcrumb
$breadcrumb = new WfdownloadsBreadcrumb();
$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
$breadcrumb->addLink(_MD_WFD_SUBMITDOWNLOAD, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl -> assign('catarray', $catarray);
- $xoopsTpl->assign('categoryPath', _MD_WFD_DISCLAIMERAGREEMENT);
- $xoopsTpl->assign('module_home', wfdownloads_module_home(true));
$xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('down_disclaimer', false);
$xoopsTpl->assign('disclaimer', $myts->displayTarea($wfdownloads->getConfig('disclaimer'), 1, 1, 1, 1, 1));
- $xoopsTpl->assign('down_disclaimer', false);
- $xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php');
+ $xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
if (!isset($_REQUEST['lid'])) {
$xoopsTpl->assign('agree_location', WFDOWNLOADS_URL . "/{$currentFile}?agree=1");
- } elseif (isset($_REQUEST['lid'])) {
+ } else {
$lid = WfdownloadsRequest::getInt('lid');
$xoopsTpl->assign('agree_location', WFDOWNLOADS_URL . "/{$currentFile}?agree=1&lid={$lid}");
}
+
+ $xoopsTpl->assign('categoryPath', _MD_WFD_DISCLAIMERAGREEMENT);
+ $xoopsTpl->assign('module_home', wfdownloads_module_home(true));
+
include XOOPS_ROOT_PATH . '/footer.php';
exit();
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -23,7 +23,7 @@
<br />
<input type='button' onclick='location="<{$agree_location}>"' class='formButton' value='<{$smarty.const._MD_WFD_AGREE}>' alt='<{$smarty.const._MD_WFD_AGREE}>' />
- <input type='button' onclick='location="<{$cancel_location}>"' class='formButton' value='<{$smarty.const._CANCEL}>' alt='<{$smarty.const._CANCEL}>' />
+ <input type='button' onclick='javascript:history.go(-1)' class='formButton' value='<{$smarty.const._CANCEL}>' alt='<{$smarty.const._CANCEL}>' />
<{if $down_disclaimer == true}>
<input type='hidden' name='lid' value='1' />
<input type='hidden' name='cid' value='1' />
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,141 +1,72 @@
-<div class="wfd_container">
- <div class="wfd_down_title">
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>"><span class="itemTitle"><{$down.title}> </span></a><{$down.icons}>
- </div>
- <div class="wfd_down_top_r">
- <b><{$lang_subdate}>:</b> <{$down.updated}>
- </div>
- <div class="wfd_down_top_l">
- <b><{$smarty.const._MD_WFD_SUBMITTER}>:</b> <{$down.submitter}> <{$down.adminlink}>
- </div>
- <div class="wfd_down_main_l">
+<div>
+ <b><a href="singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>" title="<{$smarty.const._MD_WFD_VIEWDETAILS}>"><{$download.title}></a></b> <{$download.icons}>
+<{if ($download.isadmin == true)}>
+ <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+<{/if}>
+</div>
+
<{if $show_screenshot == true}>
-<{if $down.screenshot_full != ''}>
+<div>
+<{if $download.screenshot_full != ''}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full2 != '' && $viewcat !== true}>
+<{if $download.screenshot_full2 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full2}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb2}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full2}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb2}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full3 != '' && $viewcat !== true}>
+<{if $download.screenshot_full3 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full3}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb3}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full3}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb3}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full4 != '' && $viewcat !== true}>
+<{if $download.screenshot_full4 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full4}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb4}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full4}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb4}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
+</div>
<{/if}>
- <p>
- <a href="<{$xoops_url}>/modules/wfdownloads/visit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
- <{$smarty.const._MD_WFD_DOWNLOADNOW}>
- </a>
- <{if $down.use_mirrors == 1 && $down.mirrors_num >= 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?op=list&cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
- </a>
- <{/if}>
- <{if $down.use_mirrors !== 1 && $down.mirror != ''}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" /> <{$down.mirror}>
- <{/if}>
- </p>
- <p>
- <{$down.summary}>
- </p>
- <div class="wfd_down_viewdetails">
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>"><{$smarty.const._MD_WFD_VIEWDETAILS}></a>
- </div>
- </div>
-
- <div class="wfd_down_main_r">
- <div class="wfd_down_info_top">
- <{if $down.version != 0}>
- <div><b><{$smarty.const._MD_WFD_VERSION}>:</b> <{$down.version}></div>
- <{/if}>
- <div><b><{$smarty.const._MD_WFD_VERSIONTYPES}>:</b> <{$down.versiontypes}></div>
- <div>
- <div><b><{$smarty.const._MD_WFD_DOWNLOADHITS}>:</b> <{$down.hits}></div>
- <div><b><{$smarty.const._MD_WFD_FILESIZE}>:</b> <{$down.size}></div>
- <{if $down.homepage != ''}>
- <div><b><{$smarty.const._MD_WFD_HOMEPAGE}>:</b> <{$down.homepage|wordwrap:50:"\n":true}></div>
- <{/if}>
- </div>
- </div>
- <br />
-
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_RATINGC}></b> <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/<{$down.rateimg}>" alt="" title="" align="middle" /> (<{$down.votes}>)
- </div>
- <br />
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_REVIEWS}></b> <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/<{$down.review_rateimg}>" alt="" title="" align="middle" /> (<{$down.reviews_num}>)
- </div>
- <br />
- <{if $down.use_mirrors == 1}>
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_MIRROR_AVAILABLE}></b> <{$down.mirrors_num}>
- </div>
- <{/if}>
- </div>
+<div title="<{$smarty.const._MD_WFD_SUMMARY}>">
+ <{$download.summary}>
</div>
-
-<{if !$custom_form}>
-<div class="wfd_down_main_bottom">
- <br />
- <b><{$smarty.const._MD_WFD_PRICE}>:</b> <{$down.price}> |
- <b><{$smarty.const._MD_WFD_SUPPORTEDPLAT}>:</b> <{$down.platform}> |
- <b><{$smarty.const._MD_WFD_DOWNLICENSE}>:</b> <{$down.license}> |
- <b><{$smarty.const._MD_WFD_LIMITS}>:</b> <{$down.limitations}>
+<div>
+ <a href="singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>"><{$smarty.const._MD_WFD_VIEWDETAILS}></a>
</div>
-<{/if}>
-<div class="wfd_down_main_bottom2">
-<{if $down.use_mirrors == 1 && $down.add_mirror == 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_ADDMIRROR}>
+<div>
+ <a href="visit.php?cid=<{$download.cid}>&lid=<{$download.id}>">
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
+ <{$smarty.const._MD_WFD_DOWNLOADNOW}>
+ </a>
+<{if $download.use_mirrors == 1 && $download.mirrors_num >= 1}>
+ <a href="mirror.php?op=list&cid=<{$download.cid}>&lid=<{$download.id}>">
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
+
+ <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
</a>
- |
<{/if}>
- <a href="<{$xoops_url}>/modules/wfdownloads/review.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_REVIEWTHISFILE}>
- </a>
- |
- <a href="<{$xoops_url}>/modules/wfdownloads/ratefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_RATETHISFILE}>
- </a>
- |
-<{if $down.useradminlink == true}>
- <a href="<{$xoops_url}>/modules/wfdownloads/submit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_MODIFY}>
- </a>
- |
+<{if $download.use_mirrors != 1 && $download.mirror != ''}>
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" /> <{$download.mirror}>
<{/if}>
- <a href="<{$xoops_url}>/modules/wfdownloads/brokenfile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_REPORTBROKEN}>
- </a>
- |
- <a target="_top" href="mailto:?subject=<{$down.mail_subject}>&body=<{$down.mail_body}>">
- <{$smarty.const._MD_WFD_TELLAFRIEND}>
- </a>
- |
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._COMMENTS}> (<{$down.comments}>)
- </a>
</div>
+
+<div>
+ <small>
+ <{$smarty.const._MD_WFD_SUBMITTER}>: <{$download.submitter}>
+ <br />
+ <{$lang_subdate}>: <{$download.updated}>
+ </small>
+</div>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,4 +1,4 @@
-<{if $isAdmin == 1}>
+<{if $isAdmin == true}>
<div class="wfdownloads_adminlinks"><{$wfdownloads_adminpage}></div>
<{/if}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,63 +1,66 @@
<{include file='db:wfdownloads_header.html'}>
<{if count($categories) gt 0}>
-<div class="even">
- <b><{$smarty.const._MD_WFD_MAINLISTING}></b>
-</div>
-<br />
-<table border="0" cellspacing="5" cellpadding="0">
- <tr>
+<div>
+ <h3><{$smarty.const._MD_WFD_MAINLISTING}></h3>
+ <br />
<!-- Start category loop -->
<{foreach item=category from=$categories}>
- <td>
- <a href="<{$xoops_url}>/modules/wfdownloads/viewcat.php?cid=<{$category.id}>">
- <img src="<{$category.image}>" alt="<{$category.alttext}>" title="<{$category.alttext}>" />
-
- <b><{$category.title}></b>
- </a>
- (<{$category.totaldownloads}>)
- <br />
- <div style="margin-bottom: 3px; margin-left: 10px;">
+ <div>
+ <div>
+ <a href="viewcat.php?cid=<{$category.id}>">
+ <img src="<{$category.image_URL}>" alt="<{$category.alttext}>" title="<{$category.alttext}>" />
+ <b><{$category.title}></b></a> (<{$category.downloads_count}>)
+ <{if $isAdmin == true}>
+ <a href="admin/categories.php?op=category.edit&cid=<{$category.cid}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/categories.php?op=category.delete&cid=<{$category.cid}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+ <{/if}>
+ <{if $category.allowed_upload == true}>
+ <a href="submit.php?cid=<{$category.cid}>"><img src="<{xoModuleIcons16 up.png}>" title="<{$smarty.const._MD_WFD_SUBMITDOWNLOAD}>" alt="<{$smarty.const._MD_WFD_SUBMITDOWNLOAD}>" /></a>
+ <{/if}>
+ </div>
+ <div title="<{$smarty.const._MD_WFD_CSUMMARY}>">
<{$category.summary}>
+ </div>
+ <{if $category.subcategories}>
+ <div>
+ <{foreach item=subcategory from=$category.subcategories}>
+ <div>
+ <small><a href="viewcat.php?cid=<{$subcategory.cid}>"><{$subcategory.title}></a></small>
</div>
- <{if $category.subcategories}>
- <{foreach item=subcat from=$category.subcategories}>
- <div style="margin-bottom: 3px; margin-left: 16px;">
- <small><a href="<{$xoops_url}>/modules/wfdownloads/viewcat.php?cid=<{$subcat.id}>"><{$subcat.title}></a></small>
- </div>
<{/foreach}>
- <{/if}>
- </td>
-<{if $category.count is div by 2}>
- </tr>
- <tr>
-<{/if}>
+ </div>
+ <{/if}>
+ </div>
+ <br />
<{/foreach}>
<!-- End category loop -->
- </tr>
-</table>
+</div>
<br />
-<div class="odd" style="line-height: 8px;">
+<div>
<small><{$lang_thereare}></small>
</div>
<br />
-<div style="margin-bottom: 1px;">
+<div>
<small>
-<{if $full_rssfeed_link !== ""}>
- <{$full_rssfeed_link}> <{$smarty.const._MD_WFD_LEGENDTEXTRSS}>
-<{/if}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download1.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEW}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download2.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWTHREE}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download3.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTTHISWEEK}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download4.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWLAST}>
+ <img src="images/icon/download1.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEW}>
+ <img src="images/icon/download2.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWTHREE}>
+ <img src="images/icon/download3.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTTHISWEEK}>
+ <img src="images/icon/download4.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWLAST}>
</small>
</div>
<{/if}>
+<{if $full_rssfeed_link !== ""}>
+ <div>
+ <{$full_rssfeed_link}> <{$smarty.const._MD_WFD_LEGENDTEXTRSS}>
+ </div>
+<{/if}>
+
<br />
<div align="<{$catarray.indexfooteralign}>">
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -20,7 +20,7 @@
<br />
<!-- Start link loop -->
-<{foreach item=down from=$file}>
+<{foreach item=download from=$file}>
<{include file="db:wfdownloads_download.html"}>
<br />
<{/foreach}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -3,242 +3,227 @@
<h1><{$category_title}></h1>
<img src="<{$category_image}>" alt="<{$category_title}>" title="<{$category_title}>" />
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="line-height: 12px;">
- <div>
- <h3 style="color: #2F5376;"><{$down.title}></h3>
- <div style="margin-left: 6px;">
- <a href="<{$xoops_url}>/modules/wfdownloads/visit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADNOW}>
- </a>
-
- <{if $down.use_mirrors == 1 && $down.mirrors_num >= 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?op=mirrors.list&cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
- </a>
- <{/if}>
- <{if $down.use_mirrors != 1 && $down.mirror != ''}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$down.mirror}>" title="<{$down.mirror}>" />
-
- <{$down.mirror}>
- <{/if}>
- </div>
+<div>
+ <h3>
+ <{$download.title}> <{$download.icons}>
+ <{if ($download.isadmin == true)}>
+ <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+ <{/if}>
+ </h3>
+ <div style="float:right; width:35%">
+ <small>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <div><b><{$smarty.const._MD_WFD_SUBMITTER}>:</b> <{$download.submitter}></div>
+ <{if $download.publisher != ''}>
+ <div><b><{$smarty.const._MD_WFD_PUBLISHER}>:</b> <{$download.publisher}></div>
+ <{/if}>
+ <div><b><{$lang_subdate}>:</b> <{$download.updated}></div>
<br />
- <{$down.adminlink}>
- <{if $down.forumid > 0}>
- <a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$down.forumid}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/forum.gif" alt="<{$smarty.const._MD_WFD_INFORUM}>" title="<{$smarty.const._MD_WFD_INFORUM}>" />
-
- <{$smarty.const._MD_WFD_INFORUM}>
- </a>
+ <{if $download.version != 0}>
+ <div><b><{$smarty.const._MD_WFD_VERSION}>:</b> <{$download.version}></div>
<{/if}>
+ <div><b><{$smarty.const._MD_WFD_VERSIONTYPES}>:</b...
[truncated message content] |