Skip to content

Commit

Permalink
Merge pull request #91 from mambax7/master
Browse files Browse the repository at this point in the history
rename to Suico
  • Loading branch information
mambax7 committed Apr 29, 2020
2 parents ef4664b + c30d4fc commit 03bd86b
Show file tree
Hide file tree
Showing 265 changed files with 3,632 additions and 11,334 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/XoopsModules25x/yogurt).
We accept contributions via Pull Requests on [Github](https://github.com/XoopsModules25x/suico).

## Pull Requests

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
## Yogurt module for [XOOPS CMS 2.5.10+](https://xoops.org)
## Suico module for [XOOPS CMS 2.5.10+](https://xoops.org)
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](LICENSE)

[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/XoopsModules25x/yogurt.svg?style=flat)](https://scrutinizer-ci.com/g/XoopsModules25x/yogurt/?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9b911a286e284d92809acb077b9da7fd)](https://www.codacy.com/app/mambax7/yogurt)
[![Code Climate](https://img.shields.io/codeclimate/github/mambax7/yogurt.svg?style=flat)](https://codeclimate.com/github/mambax7/yogurt)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mambax7_yogurt&metric=alert_status)](https://sonarcloud.io/dashboard?id=mambax7_yogurt)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/XoopsModules25x/suico.svg?style=flat)](https://scrutinizer-ci.com/g/XoopsModules25x/suico/?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9b911a286e284d92809acb077b9da7fd)](https://www.codacy.com/app/mambax7/suico)
[![Code Climate](https://img.shields.io/codeclimate/github/mambax7/suico.svg?style=flat)](https://codeclimate.com/github/mambax7/suico)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=mambax7_suico&metric=alert_status)](https://sonarcloud.io/dashboard?id=mambax7_suico)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/809fc531-0984-402e-9b7a-11e39b364260/mini.png)](https://insight.sensiolabs.com/projects/809fc531-0984-402e-9b7a-11e39b364260)
[![Latest Pre-Release](https://img.shields.io/github/tag/mambax7/yogurt.svg?style=flat)](https://github.com/mambax7/yogurt/tags/)
[![Latest Version](https://img.shields.io/github/release/mambax7/yogurt.svg?style=flat)](https://github.com/mambax7/yogurt/releases/)
[![Latest Pre-Release](https://img.shields.io/github/tag/mambax7/suico.svg?style=flat)](https://github.com/mambax7/suico/tags/)
[![Latest Version](https://img.shields.io/github/release/mambax7/suico.svg?style=flat)](https://github.com/mambax7/suico/releases/)

**Yogurt** module for [XOOPS CMS](https://xoops.org) is a Social Network module.
**Suico** module for [XOOPS CMS](https://xoops.org) is a Social Network module.

[![Tutorial Available](https://xoops.org/images/tutorial-available-blue.svg)](https://www.gitbook.com/book/xoops/yogurt-tutorial/) Tutorial: see [GitBook](https://www.gitbook.com/book/xoops/yogurt-tutorial/).
To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/yogurt-tutorial)
[![Tutorial Available](https://xoops.org/images/tutorial-available-blue.svg)](https://www.gitbook.com/book/xoops/suico-tutorial/) Tutorial: see [GitBook](https://www.gitbook.com/book/xoops/suico-tutorial/).
To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/suico-tutorial)

[![Translations on Transifex](https://xoops.org/images/translations-transifex-blue.svg)](https://www.transifex.com/xoops)

Expand Down
16 changes: 8 additions & 8 deletions abandongroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@

/**
* @category Module
* @package yogurt
* @package suico
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Marcello Brandão aka Suico, Mamba, LioMJ <https://xoops.org>
*/

use Xmf\Request;
use XoopsModules\Yogurt;
use XoopsModules\Suico;

require __DIR__ . '/header.php';

/**
* Verify Token
*/
//if (!($GLOBALS['xoopsSecurity']->check())){
// redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 5, _MD_YOGURT_TOKENEXPIRED);
// redirect_header(\Xmf\Request::getString('HTTP_REFERER', '', 'SERVER'), 5, _MD_SUICO_TOKENEXPIRED);
//}

/**
Expand All @@ -46,15 +46,15 @@
'confirm' => 1,
],
'abandongroup.php',
_MD_YOGURT_ASKCONFIRMABANDONGROUP,
_MD_YOGURT_CONFIRMABANDON
_MD_SUICO_ASKCONFIRMABANDONGROUP,
_MD_SUICO_CONFIRMABANDON
);
} else {
/**
* Creating the factory and the criteria to delete the picture
* The user must be the owner
*/
$relgroupuserFactory = new Yogurt\RelgroupuserHandler(
$relgroupuserFactory = new Suico\RelgroupuserHandler(
$xoopsDB
);
$criteria_rel_id = new Criteria('rel_id', $relgroupuser_id);
Expand All @@ -67,9 +67,9 @@
* Try to delete
*/
if ($relgroupuserFactory->deleteAll($criteria)) {
redirect_header('group.php?group_id=' . $group_id . '', 1, _MD_YOGURT_GROUPABANDONED);
redirect_header('group.php?group_id=' . $group_id . '', 1, _MD_SUICO_GROUPABANDONED);
} else {
redirect_header('group.php?group_id=' . $group_id . '', 1, _MD_YOGURT_ERROR);
redirect_header('group.php?group_id=' . $group_id . '', 1, _MD_SUICO_ERROR);
}
}
require dirname(__DIR__, 2) . '/footer.php';
2 changes: 1 addition & 1 deletion activate.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@
$form->display();
}

$xoBreadcrumbs[] = ['title' => _MD_YOGURT_REGISTER];
$xoBreadcrumbs[] = ['title' => _MD_SUICO_REGISTER];
include __DIR__ . '/footer.php';
2 changes: 1 addition & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
/**
* @category Module
* @package yogurt
* @package suico
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Marcello Brandão aka Suico, Mamba, LioMJ <https://xoops.org>
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
/**
* @category Module
* @package yogurt
* @package suico
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Marcello Brandão aka Suico, Mamba, LioMJ <https://xoops.org>
Expand Down
6 changes: 3 additions & 3 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

/**
* @category Module
* @package yogurt
* @package suico
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Marcello Brandão aka Suico, Mamba, LioMJ <https://xoops.org>
*/

use Xmf\Module\Admin;
use XoopsModules\Yogurt\Helper;
use XoopsModules\Yogurt\Utility;
use XoopsModules\Suico\Helper;
use XoopsModules\Suico\Utility;

include dirname(__DIR__) . '/preloads/autoloader.php';

Expand Down
50 changes: 25 additions & 25 deletions admin/audios.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* @category Module
* @package yogurt
* @package suico
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @author Marcello Brandão aka Suico, Mamba, LioMJ <https://xoops.org>
Expand All @@ -32,12 +32,12 @@

$adminObject->displayNavigation(basename(__FILE__));
$permHelper = new Permission();
$uploadDir = XOOPS_UPLOAD_PATH . '/yogurt/audio/';
$uploadUrl = XOOPS_UPLOAD_URL . '/yogurt/audio/';
$uploadDir = XOOPS_UPLOAD_PATH . '/suico/audio/';
$uploadUrl = XOOPS_UPLOAD_URL . '/suico/audio/';

switch ($op) {
case 'new':
$adminObject->addItemButton(AM_YOGURT_AUDIO_LIST, 'audios.php', 'list');
$adminObject->addItemButton(AM_SUICO_AUDIO_LIST, 'audios.php', 'list');
$adminObject->displayButton('left');

$audioObject = $audioHandler->create();
Expand All @@ -61,7 +61,7 @@
$audioObject->setVar('description', Request::getText('description', ''));
// $audioObject->setVar('filename', Request::getVar('filename', ''));
require_once XOOPS_ROOT_PATH . '/class/uploader.php';
$uploadDir = XOOPS_UPLOAD_PATH . '/yogurt/audio/';
$uploadDir = XOOPS_UPLOAD_PATH . '/suico/audio/';
$uploader = new \XoopsMediaUploader(
$uploadDir, $helper->getConfig('mimetypes'), $helper->getConfig('maxsize'), null, null
);
Expand All @@ -88,16 +88,16 @@

//insert object
if ($audioHandler->insert($audioObject)) {
redirect_header('audios.php?op=list', 2, AM_YOGURT_FORMOK);
redirect_header('audios.php?op=list', 2, AM_SUICO_FORMOK);
}

echo $audioObject->getHtmlErrors();
$form = $audioObject->getForm();
$form->display();
break;
case 'edit':
$adminObject->addItemButton(AM_YOGURT_ADD_AUDIO, 'audios.php?op=new', 'add');
$adminObject->addItemButton(AM_YOGURT_AUDIO_LIST, 'audios.php', 'list');
$adminObject->addItemButton(AM_SUICO_ADD_AUDIO, 'audios.php?op=new', 'add');
$adminObject->addItemButton(AM_SUICO_AUDIO_LIST, 'audios.php', 'list');
$adminObject->displayButton('left');
$audioObject = $audioHandler->get(Request::getString('audio_id', ''));
$form = $audioObject->getForm();
Expand All @@ -111,7 +111,7 @@
}

if ($audioHandler->delete($audioObject)) {
redirect_header('audios.php', 3, AM_YOGURT_FORMDELOK);
redirect_header('audios.php', 3, AM_SUICO_FORMDELOK);
} else {
echo $audioObject->getHtmlErrors();
}
Expand All @@ -124,7 +124,7 @@
],
Request::getUrl('REQUEST_URI', '', 'SERVER'),
sprintf(
AM_YOGURT_FORMSUREDEL,
AM_SUICO_FORMSUREDEL,
$audioObject->getVar('title')
)
);
Expand All @@ -134,16 +134,16 @@

$id_field = Request::getString('audio_id', '');

if ($utility::cloneRecord('yogurt_audios', 'audio_id', $id_field)) {
redirect_header('audios.php', 3, AM_YOGURT_CLONED_OK);
if ($utility::cloneRecord('suico_audios', 'audio_id', $id_field)) {
redirect_header('audios.php', 3, AM_SUICO_CLONED_OK);
} else {
redirect_header('audios.php', 3, AM_YOGURT_CLONED_FAILED);
redirect_header('audios.php', 3, AM_SUICO_CLONED_FAILED);
}

break;
case 'list':
default:
$adminObject->addItemButton(AM_YOGURT_ADD_AUDIO, 'audios.php?op=new', 'add');
$adminObject->addItemButton(AM_SUICO_ADD_AUDIO, 'audios.php?op=new', 'add');
$adminObject->displayButton('left');
$start = Request::getInt('start', 0);
$audioPaginationLimit = $helper->getConfig('userpager');
Expand All @@ -158,7 +158,7 @@
/*
//
//
<th class='center width5'>".AM_YOGURT_FORM_ACTION."</th>
<th class='center width5'>".AM_SUICO_FORM_ACTION."</th>
// </tr>";
// $class = "odd";
*/
Expand Down Expand Up @@ -198,38 +198,38 @@

$GLOBALS['xoopsTpl']->assign(
'selectoraudio_id',
AM_YOGURT_AUDIO_AUDIO_ID
AM_SUICO_AUDIO_AUDIO_ID
);

$audioArray['audio_id'] = $audioTempArray[$i]->getVar('audio_id');

$GLOBALS['xoopsTpl']->assign('selectoruid_owner', AM_YOGURT_AUDIO_UID_OWNER);
$GLOBALS['xoopsTpl']->assign('selectoruid_owner', AM_SUICO_AUDIO_UID_OWNER);

$audioArray['uid_owner'] = strip_tags(
XoopsUser::getUnameFromId($audioTempArray[$i]->getVar('uid_owner'))
);

$GLOBALS['xoopsTpl']->assign('selectorauthor', AM_YOGURT_AUDIO_AUTHOR);
$GLOBALS['xoopsTpl']->assign('selectorauthor', AM_SUICO_AUDIO_AUTHOR);

$audioArray['author'] = $audioTempArray[$i]->getVar('author');

$GLOBALS['xoopsTpl']->assign('selectortitle', AM_YOGURT_AUDIO_TITLE);
$GLOBALS['xoopsTpl']->assign('selectortitle', AM_SUICO_AUDIO_TITLE);

$audioArray['title'] = $audioTempArray[$i]->getVar('title');

$GLOBALS['xoopsTpl']->assign('selectordescription', AM_YOGURT_AUDIO_DESCRIPTION);
$GLOBALS['xoopsTpl']->assign('selectordescription', AM_SUICO_AUDIO_DESCRIPTION);

$audioArray['description'] = $audioTempArray[$i]->getVar('description');

$GLOBALS['xoopsTpl']->assign('selectorfilename', AM_YOGURT_AUDIO_URL);
$GLOBALS['xoopsTpl']->assign('selectorfilename', AM_SUICO_AUDIO_URL);

$audioArray['filename'] = $audioTempArray[$i]->getVar('filename');

$GLOBALS['xoopsTpl']->assign('selectordate_created', AM_YOGURT_AUDIO_DATE_CREATED);
$GLOBALS['xoopsTpl']->assign('selectordate_created', AM_SUICO_AUDIO_DATE_CREATED);

$audioArray['date_created'] = formatTimestamp($audioTempArray[$i]->getVar('date_created'), 's');

$GLOBALS['xoopsTpl']->assign('selectordate_updated', AM_YOGURT_AUDIO_DATE_UPDATED);
$GLOBALS['xoopsTpl']->assign('selectordate_updated', AM_SUICO_AUDIO_DATE_UPDATED);

$audioArray['date_updated'] = formatTimestamp($audioTempArray[$i]->getVar('date_updated'), 's');

Expand Down Expand Up @@ -276,7 +276,7 @@

// <tr>

// <th class='center width5'>".AM_YOGURT_FORM_ACTION."XXX</th>
// <th class='center width5'>".AM_SUICO_FORM_ACTION."XXX</th>

// </tr><tr><td class='errorMsg' colspan='8'>There are noXXX audio</td></tr>";

Expand All @@ -287,7 +287,7 @@
echo $GLOBALS['xoopsTpl']->fetch(
XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['xoopsModule']->getVar(
'dirname'
) . '/templates/admin/yogurt_admin_audios.tpl'
) . '/templates/admin/suico_admin_audios.tpl'
);
}

Expand Down
2 changes: 1 addition & 1 deletion admin/blockform.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName

//$helper = \XoopsModules\Yogurt\Helper::getInstance();
//$helper = \XoopsModules\Suico\Helper::getInstance();
//$helper->loadLanguage('blocksadmin');

xoops_loadLanguage('blocksadmin', $moduleDirName);
Expand Down
2 changes: 1 addition & 1 deletion admin/blocksadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName

//$helper = \XoopsModules\Yogurt\Helper::getInstance();
//$helper = \XoopsModules\Suico\Helper::getInstance();
//$helper->loadLanguage('blocksadmin');

xoops_loadLanguage('blocksadmin', $moduleDirName);
Expand Down

0 comments on commit 03bd86b

Please sign in to comment.