Rules for EasyBlog

More
7 years 5 months ago #35493 by nordmograph
Here are the rules converted for EasyBlog.

File Attachment:

File Name: altaup_rul...free.zip
File Size:5 KB


These are the rules, but not the plugin. This means eventhough these would integrater with ALtaUserPoints, the script will still activate the Alpha script.
What extension is processing these rules ? Is it EasyBlog itself or is ther a dedicated plugin for it ?

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #35497 by simonetravaglini
Replied by simonetravaglini on topic Rules for EasyBlog
Hello and thanks for your great work.
I face a problem during installation.
I go to rules -> new -> plugin
but when i load file i get:

Warning: Failed to move file: /tmp/phpL8yLqb to /altaup_rules_3.9.2_free.zip
Error on upload file
Error on extraction archive

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #35504 by simonetravaglini
Replied by simonetravaglini on topic Rules for EasyBlog
Hi, just talked with team and they said that code is in aup.php in administrator/components/com_easyblog/includes/aup


<?php
/**
* @package EasyBlog
* @copyright Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* EasyBlog is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');

class EasyBlogAUP
{
public function __construct()
{
EB::loadLanguages();
}

public function enabled()
{
jimport('joomla.filesystem.file');

$config = EB::config();
$path = JPATH_ROOT . '/components/com_alphauserpoints/helper.php';

// make sure the config is enabled
if ($config->get('main_alpha_userpoint')) {

if (JFile::exists($path)) {

require_once($path);
return true;
}
}

return false;
}

private function loadHelper()
{
$file = JPATH_ROOT . '/components/com_alphauserpoints/helper.php';
if( !JFile::exists( $file ) )
{
return false;
}

require_once( $file );

return true;
}

public function getPoints( $userId )
{
$config = EasyBlogHelper::getConfig();

if( !$config->get( 'main_alpha_userpoint_points' ) )
{
return false;
}

if(!$this->loadHelper() )
{
return false;
}

$info = AlphaUserPointsHelper::getUserInfo( '' , $userId );

if( !$info )
{
return '';
}

return JText::sprintf( 'COM_EASYBLOG_AUP_POINTS_EARNED' , $info->points );
}

public function assignPoints($cmd, $userId, $message)
{
if (!$this->enabled()) {
return false;
}

// Get the user id
$userId = AlphaUserPointsHelper::getAnyUserReferreID($userId);

$state = AlphaUserPointsHelper::newpoints($cmd, $userId, '', $message);

return $state;
}

public function assign($cmd, $msg, $cmdSingle, $text)
{
if (!$this->enabled()) {
return false;
}

$state = AlphaUserPointsHelper::newpoints($cmd, $msg, $cmdSingle, $text);

return $state;
}

public function getMedals( $userId )
{
$config = EasyBlogHelper::getConfig();

if (!$config->get('main_alpha_userpoint_medals')) {
return false;
}

if (!$this->loadHelper()) {
return false;
}

if (! method_exists('AlphaUserPointsHelper','getUserMedals')) {
return false;
}

$medals = AlphaUserPointsHelper::getUserMedals( '' , $userId );

$theme = EB::template();
$theme->set('medals', $medals);
return $theme->output('site/aup/medals');
}

public function getRanks( $userId )
{
$config = EasyBlogHelper::getConfig();

if (!$config->get('main_alpha_userpoint_ranks')) {
return false;
}

if (!$this->loadHelper()) {
return false;
}

if (! method_exists('AlphaUserPointsHelper','getUserRank')) {
return false;
}

$rank = AlphaUserPointsHelper::getUserRank( '' , $userId );
$theme = EB::template();
$theme->set( 'rank' , $rank );
return $theme->output( 'site/aup/ranks' );
}
}

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #35505 by nordmograph
Replied by nordmograph on topic Rules for EasyBlog
Yes , this is it. can you attach the file as a php file or copy its content but inside code tags

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #35506 by simonetravaglini
Replied by simonetravaglini on topic Rules for EasyBlog
file attached

File Attachment:

File Name: aup.zip
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #35508 by nordmograph
Replied by nordmograph on topic Rules for EasyBlog
Here it is converted

File Attachment:

File Name: aup.php.zip
File Size:1 KB

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.339 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.