Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mambax7 committed Jul 25, 2017
1 parent fdd1aef commit 5e41ff8
Show file tree
Hide file tree
Showing 63 changed files with 280 additions and 1,024 deletions.
2 changes: 1 addition & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
xoops_cp_header();

$adminObject->displayNavigation(basename(__FILE__));
\Xmf\Module\Admin::setPaypal('[email protected]');
$adminObject->setPaypal('[email protected]');
$adminObject->displayAbout(false);

require_once __DIR__ . '/admin_footer.php';
9 changes: 1 addition & 8 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@

$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);

echo "<div class='adminfooter'>\n"
. " <div style='text-align: center;'>\n"
. " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
. " </div>\n"
. ' '
. _AM_MODULEADMIN_ADMIN_FOOTER
. "\n"
. '</div>';
echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';

xoops_cp_footer();
3 changes: 1 addition & 2 deletions admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
// exit();
} else {
xoops_cp_header();
xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php',
_AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
xoops_confirm(array('op' => 'del', 'categoryid' => $categoryObj->categoryid(), 'confirm' => 1, 'name' => $categoryObj->name()), 'category.php', _AM_PUBLISHER_DELETECOL . " '" . $categoryObj->name() . "'. <br> <br>" . _AM_PUBLISHER_DELETE_CAT_CONFIRM, _AM_PUBLISHER_DELETE);
xoops_cp_footer();
}
break;
Expand Down
3 changes: 1 addition & 2 deletions admin/clone.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ public static function createLogo($dirname)
}

if (!file_exists($imageBase = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/logoModule.png'))
|| !file_exists($font = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/VeraBd.ttf'))
) {
|| !file_exists($font = $GLOBALS['xoops']->path('modules/' . $dirname . '/assets/images/VeraBd.ttf'))) {
return false;
}

Expand Down
3 changes: 1 addition & 2 deletions admin/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ function publisher_editFile($showmenu = false, $fileid = 0, $itemid = 0)
$fileid = Request::getInt('fileid', 0, 'GET');

PublisherUtility::cpHeader();
xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php',
_AM_PUBLISHER_DELETETHISFILE . ' <br>' . $fileObj->name() . ' <br> <br>', _AM_PUBLISHER_DELETE);
xoops_confirm(array('op' => 'del', 'fileid' => $fileObj->fileid(), 'confirm' => 1, 'name' => $fileObj->name()), 'file.php', _AM_PUBLISHER_DELETETHISFILE . ' <br>' . $fileObj->name() . ' <br> <br>', _AM_PUBLISHER_DELETE);
xoops_cp_footer();
}

Expand Down
17 changes: 4 additions & 13 deletions admin/import/ams.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,9 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");

Expand Down Expand Up @@ -123,11 +119,7 @@
//---------- mb ------------------

// Categories to be imported
$sql = 'SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM '
. $GLOBALS['xoopsDB']->prefix('ams_topics')
. ' AS cat INNER JOIN '
. $GLOBALS['xoopsDB']->prefix('nw_stories')
. ' AS art ON cat.topic_id=art.topicid GROUP BY art.topicid';
$sql = 'SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM ' . $GLOBALS['xoopsDB']->prefix('ams_topics') . ' AS cat INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('nw_stories') . ' AS art ON cat.topic_id=art.topicid GROUP BY art.topicid';

$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();
Expand Down Expand Up @@ -234,8 +226,7 @@

// Category image: copying to Publisher category uploads
if (($arrCat['topic_imgurl'] !== 'blank.gif') && ($arrCat['topic_imgurl'] !== '')) {
if (copy($GLOBALS['xoops']->path('uploads/AMS/topics/' . $arrCat['topic_imgurl']),
$GLOBALS['xoops']->path('uploads/' . PUBLISHER_DIRNAME . '/images/category/' . $arrCat['topic_imgurl']))) {
if (copy($GLOBALS['xoops']->path('uploads/AMS/topics/' . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path('uploads/' . PUBLISHER_DIRNAME . '/images/category/' . $arrCat['topic_imgurl']))) {
$categoryObj->setVar('image', $arrCat['topic_imgurl']);

//======== there is no need to add the category images to Image Manager, because they are handled directly from /images/category/ folder
Expand Down
8 changes: 2 additions & 6 deletions admin/import/cjaycontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");

Expand Down
16 changes: 6 additions & 10 deletions admin/import/fmcontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
$fmContentCount = $fmContentHdlr->getCount(new Criteria('content_modid', $fm_module_id));

if (empty($fmContentCount)) {
echo "<span style='color: #567; margin: 3px 0 12px 0; font-size: small; display: block;'>"
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $fmContentCount)
. '</span>';
echo "<span style='color: #567; margin: 3px 0 12px 0; font-size: small; display: block;'>" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $fmContentCount) . '</span>';
} else {
/*
echo "<span style='color: #567; margin: 3px 0 12px 0; font-size: small; display: block;'>" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $fmContentCount, $fmTopicCount) . "</span>";
Expand Down Expand Up @@ -85,8 +83,7 @@
}
natcasesort($cat_cbox_options); //put them in "alphabetical" order

echo "<span style='color: #567; margin: 3px 0 12px 0; font-size: small; display: block;'>" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $fmContentCount,
count($cat_cbox_options)) . '</span>';
echo "<span style='color: #567; margin: 3px 0 12px 0; font-size: small; display: block;'>" . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $fmContentCount, count($cat_cbox_options)) . '</span>';
$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");

$cat_label = new XoopsFormLabel(_AM_PUBLISHER_IMPORT_CATEGORIES, implode('<br>', $cat_cbox_options));
Expand All @@ -95,9 +92,9 @@

// Publisher parent category
xoops_load('tree');
$categoryHdlr = $publisher->getHandler('category');
$catObjs = $categoryHdlr->getAll();
$myObjTree = new XoopsObjectTree($catObjs, 'categoryid', 'parentid');
$categoryHdlr = $publisher->getHandler('category');
$catObjs = $categoryHdlr->getAll();
$myObjTree = new XoopsObjectTree($catObjs, 'categoryid', 'parentid');
$moduleDirName = basename(dirname(__DIR__));
$module = XoopsModule::getByDirname($moduleDirName);
if (PublisherUtility::checkVerXoops($module, '2.5.9')) {
Expand Down Expand Up @@ -254,8 +251,7 @@

// Category image
if (('blank.gif' !== $thisFmTopicObj->getVar('topic_img')) && ('' !== $thisFmTopicObj->getVar('topic_img'))) {
if (copy($GLOBALS['xoops']->path('www/uploads/fmcontent/img/' . $thisFmTopicObj->getVar('topic_img')),
$GLOBALS['xoops']->path('www/uploads/publisher/images/category/' . $thisFmTopicObj->getVar('topic_img')))) {
if (copy($GLOBALS['xoops']->path('www/uploads/fmcontent/img/' . $thisFmTopicObj->getVar('topic_img')), $GLOBALS['xoops']->path('www/uploads/publisher/images/category/' . $thisFmTopicObj->getVar('topic_img')))) {
$categoryObj->setVar('image', $thisFmTopicObj->getVar('topic_img'));
}
}
Expand Down
17 changes: 4 additions & 13 deletions admin/import/news.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,14 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/{$scriptname}");

// Categories to be imported
$sql = 'SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM '
. $GLOBALS['xoopsDB']->prefix('news_topics')
. ' AS cat INNER JOIN '
. $GLOBALS['xoopsDB']->prefix('news_stories')
. ' AS art ON cat.topic_id=art.topicid GROUP BY art.topicid';
$sql = 'SELECT cat.topic_id, cat.topic_pid, cat.topic_title, COUNT(art.storyid) FROM ' . $GLOBALS['xoopsDB']->prefix('news_topics') . ' AS cat INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('news_stories') . ' AS art ON cat.topic_id=art.topicid GROUP BY art.topicid';

$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();
Expand Down Expand Up @@ -139,8 +131,7 @@

// Category image
if (($arrCat['topic_imgurl'] !== 'blank.gif') && ($arrCat['topic_imgurl'] !== '')) {
if (copy($GLOBALS['xoops']->path('modules/news/assets/images/topics/' . $arrCat['topic_imgurl']),
$GLOBALS['xoops']->path('uploads/publisher/images/category/' . $arrCat['topic_imgurl']))) {
if (copy($GLOBALS['xoops']->path('modules/news/assets/images/topics/' . $arrCat['topic_imgurl']), $GLOBALS['xoops']->path('uploads/publisher/images/category/' . $arrCat['topic_imgurl']))) {
$categoryObj->setVar('image', $arrCat['topic_imgurl']);
}
}
Expand Down
14 changes: 3 additions & 11 deletions admin/import/smartsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,14 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/{$scriptname}");

// Categories to be imported
$sql = 'SELECT cat.categoryid, cat.parentid, cat.name, COUNT(art.itemid) FROM '
. $GLOBALS['xoopsDB']->prefix('smartsection_categories')
. ' AS cat INNER JOIN '
. $GLOBALS['xoopsDB']->prefix('smartsection_items')
. ' AS art ON cat.categoryid=art.categoryid GROUP BY art.categoryid';
$sql = 'SELECT cat.categoryid, cat.parentid, cat.name, COUNT(art.itemid) FROM ' . $GLOBALS['xoopsDB']->prefix('smartsection_categories') . ' AS cat INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('smartsection_items') . ' AS art ON cat.categoryid=art.categoryid GROUP BY art.categoryid';

$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_options = array();
Expand Down
14 changes: 3 additions & 11 deletions admin/import/wfsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,14 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");

// Categories to be imported
$sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM '
. $GLOBALS['xoopsDB']->prefix('wfs_category')
. ' AS cat INNER JOIN '
. $GLOBALS['xoopsDB']->prefix('wfs_article')
. ' AS art ON cat.id=art.categoryid GROUP BY art.categoryid';
$sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM ' . $GLOBALS['xoopsDB']->prefix('wfs_category') . ' AS cat INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('wfs_article') . ' AS art ON cat.id=art.categoryid GROUP BY art.categoryid';
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_values = array();
$cat_cbox_options = array();
Expand Down
14 changes: 3 additions & 11 deletions admin/import/xfsection.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,14 @@
list($totalArticles) = $GLOBALS['xoopsDB']->fetchRow($result);

if ($totalArticles == 0) {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND_NO_ITEMS, $importFromModuleName, $totalArticles) . '</span>';
} else {
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">'
. sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat)
. '</span>';
echo '<span style="color: #567; margin: 3px 0 12px 0; font-size: small; display: block; ">' . sprintf(_AM_PUBLISHER_IMPORT_MODULE_FOUND, $importFromModuleName, $totalArticles, $totalCat) . '</span>';

$form = new XoopsThemeForm(_AM_PUBLISHER_IMPORT_SETTINGS, 'import_form', PUBLISHER_ADMIN_URL . "/import/$scriptname");

// Categories to be imported
$sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM '
. $GLOBALS['xoopsDB']->prefix('xfs_category')
. ' AS cat INNER JOIN '
. $GLOBALS['xoopsDB']->prefix('xfs_article')
. ' AS art ON cat.id=art.categoryid GROUP BY art.categoryid';
$sql = 'SELECT cat.id, cat.pid, cat.title, COUNT(art.articleid) FROM ' . $GLOBALS['xoopsDB']->prefix('xfs_category') . ' AS cat INNER JOIN ' . $GLOBALS['xoopsDB']->prefix('xfs_article') . ' AS art ON cat.id=art.categoryid GROUP BY art.categoryid';
$result = $GLOBALS['xoopsDB']->query($sql);
$cat_cbox_values = array();
$cat_cbox_options = array();
Expand Down
Loading

0 comments on commit 5e41ff8

Please sign in to comment.