Skip to content

Commit

Permalink
Merge pull request #172 from MissAllSunday/general_wall
Browse files Browse the repository at this point in the history
General wall
  • Loading branch information
MissAllSunday authored Mar 17, 2018
2 parents b1c0461 + ff13bce commit 6906025
Show file tree
Hide file tree
Showing 47 changed files with 77 additions and 61 deletions.
4 changes: 4 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Tested on PHP 5.3 and 5.4, Opera12, IE8 and whatever version Firefox was when I
[size=12pt][color=purple]Changelog[/color][/size]

[code]
1.0.13 March 17, 2018
- Add admin setting for the general wall
- Prevent loading status and activity from users on your ignored list.

1.0.12 May 5, 2017
- Concatenation on $txt strings
- Add a "live from the support site" atom box
Expand Down
8 changes: 4 additions & 4 deletions Sources/Breeze/Breeze.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Breeze
*
* @package Breeze mod
* @version 1.0.12
* @version 1.0.13
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down Expand Up @@ -37,7 +37,7 @@ function breeze_autoloader($class_name)
class Breeze
{
public static $name = 'Breeze';
public static $version = '1.0.12';
public static $version = '1.0.13';
public static $folder = '/Breeze/';
public static $txtpattern = 'Breeze_';
public static $permissions = array('deleteComments', 'deleteOwnComments', 'deleteProfileComments', 'deleteStatus', 'deleteOwnStatus', 'deleteProfileStatus', 'postStatus', 'postComments', 'canMention', 'beMentioned');
Expand Down Expand Up @@ -277,7 +277,7 @@ public static function menu(&$menu_buttons)
array('wall' => array(
'title' => $tools->text('general_wall'),
'href' => $scripturl . '?action=wall',
'show' => ($tools->enable('master') && !$user_info['is_guest'] && !empty($userSettings['general_wall'])),
'show' => ($tools->enable('master') && !$user_info['is_guest'] && !empty($userSettings['general_wall']) && $tools->enable('enable_general_wall')),
'sub_buttons' => array(
'noti' => array(
'title' => $tools->text('user_notisettings_name'),
Expand Down
3 changes: 2 additions & 1 deletion Sources/Breeze/BreezeAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down Expand Up @@ -91,6 +91,7 @@ function Breeze_Admin_Settings()
$config_vars = array(
array('title', Breeze::$txtpattern .'page_settings'),
array('check', Breeze::$txtpattern .'master', 'subtext' => $context['Breeze']['instance']->adminText('master_sub')),
array('check', Breeze::$txtpattern .'enable_general_wall', 'subtext' => $context['Breeze']['instance']->adminText('enable_general_wall_sub')),
array('check', Breeze::$txtpattern .'force_enable', 'subtext' => $context['Breeze']['instance']->adminText('force_enable_sub')),
array('check', Breeze::$txtpattern .'notifications', 'subtext' => $context['Breeze']['instance']->adminText('notifications_sub')),
array('text', Breeze::$txtpattern .'allowed_actions', 'size' => 60, 'subtext' => $context['Breeze']['instance']->adminText('allowed_actions_sub')),
Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeDisplay.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeMention.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeNotifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Sources/Breeze/BreezeUserInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
19 changes: 15 additions & 4 deletions Sources/Breeze/BreezeWall.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down Expand Up @@ -67,6 +67,10 @@ public function call()
if (!$this->_tools->enable('master'))
fatal_lang_error('Breeze_error_no_valid_action', false);

// The general wall needs to be enable
if (!$this->_tools->enable('enable_general_wall'))
fatal_lang_error('Breeze_error_no_valid_action', false);

// Guest aren't allowed, sorry.
is_not_guest($this->_tools->text('error_no_access'));

Expand Down Expand Up @@ -122,7 +126,7 @@ public function call()
}

/**
* BreezeAjax::generalWall()
* BreezeWall::generalWall()
*
* Shows the latest activity form your buddies.
* @return
Expand Down Expand Up @@ -165,12 +169,19 @@ public function generalWall()
// Time to overheat the server!
if (!empty($this->userSettings['buddiesList']))
{
// Doesn't make much sense to have the same user as buddy and on their ignored list but meh...
if (!empty($this->userSettings['ignoredList']))
$buddies = array_diff($this->userSettings['buddiesList'], explode(',', $this->userSettings['ignoredList']));

else
$buddies = $this->userSettings['buddiesList'];

// Get the latest status
$status = $this->_query->getStatusByUser($this->userSettings['buddiesList'], $maxIndex, $currentPage);
$status = $this->_query->getStatusByUser($buddies, $maxIndex, $currentPage);
$context['Breeze']['status'] = $status['data'];

// Get the latest activity
$context['Breeze']['log'] = $this->log->getActivity($this->userSettings['buddiesList']);
$context['Breeze']['log'] = $this->log->getActivity($buddies);

// Load users data.
if (!empty($status['users']))
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/Breeze.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017, Jessica González
* @copyright Copyright (c) 2011 - 2018, Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/
// User's wall.
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/BreezeAdmin.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* BreezeAdmin.template.php
*
* @package Breeze mod
* @version 1.0.12
* @version 1.0.13
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017, Jessica González
* @copyright Copyright (c) 2011 - 2018, Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/BreezeFunctions.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica González <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017, Jessica González
* @copyright Copyright (c) 2011 - 2018, Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/js/breeze.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2011 - 2017 Jessica González
Copyright (c) 2011 - 2018 Jessica González
@license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/js/breezeLoadMore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2011 - 2017 Jessica González
Copyright (c) 2011 - 2018 Jessica González
@license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/js/breezeMention.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2011 - 2017 Jessica González
Copyright (c) 2011 - 2018 Jessica González
@license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/js/breezeNoti.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2011 - 2017 Jessica González
Copyright (c) 2011 - 2018 Jessica González
@license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/js/breezeTabs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2011 - 2017 Jessica González
Copyright (c) 2011 - 2018 Jessica González
@license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.english-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica González
* @copyright Copyright (c) 2011 - 2018 Jessica González
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.pt-br-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.pt-br.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.spanish_latin-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.spanish_latin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.turkish-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/
/**
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/languages/Breeze.turkish.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @package Breeze mod
* @version 1.0.11
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/
/**
Expand Down
4 changes: 2 additions & 2 deletions Themes/default/languages/BreezeAdmin.english-utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* BreezeAdmin.english-utf8
*
* @package Breeze mod
* @version 1.0.12
* @version 1.0.13
* @author Jessica Gonzalez <suki@missallsunday.com>
* @copyright Copyright (c) 2011 - 2017 Jessica Gonzalez
* @copyright Copyright (c) 2011 - 2018 Jessica Gonzalez
* @license //www.mozilla.org/MPL/MPL-1.1.html
*/

Expand Down
Loading

0 comments on commit 6906025

Please sign in to comment.