Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Breeze 1.0 Beta 2

-Buddy system
-Notification system
-UI improvements
-JavaScript improvements
  • Loading branch information...
commit 98d0488ab826836b5405bc331d97295340a874fe 1 parent 9f0d1a3
@MissAllSunday authored
View
2  Breeze/Breeze.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is, the main file, handles the hooks, the actions, permissions, load needed files, etc.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Admin.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is, a procedural set of functions that handles the admin pages for Breeze
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Ajax.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
23 Breeze/Breeze_Buddy.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to replace the default buddy action in SMF with one that provides more functionality.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -90,16 +90,16 @@ public static function Buddy()
$sa->Raw('u')
);
- /* Load all the members up. */
- loadMemberData($user_load, false, 'profile');
+ /* Load all the members up. */
+ loadMemberData($user_load, false, 'profile');
- /* Setup the context for each buddy. */
- $temp_users_load = array();
- foreach ($user_load as $buddy)
- {
- loadMemberContext($buddy);
- $temp_users_load[$buddy] = $memberContext[$buddy];
- }
+ /* Setup the context for each buddy. */
+ $temp_users_load = array();
+ foreach ($user_load as $buddy)
+ {
+ loadMemberContext($buddy);
+ $temp_users_load[$buddy] = $memberContext[$buddy];
+ }
$params = array(
'user' => $sa->Raw('u'),
@@ -110,7 +110,8 @@ public static function Buddy()
'message' => sprintf($settings->GetText('buddy_messagerequest_message'), $temp_users_load[$user_info['id']]['link']),
'url' => $scripturl .'?action=profile;area=breezebuddies;u='. $sa->Raw('u'),
'from_link' => $temp_users_load[$user_info['id']]['link'],
- 'from_id' => $user_info['id']
+ 'from_id' => $user_info['id'],
+ 'from_buddies' => $user_info['buddies']
)
);
View
2  Breeze/Breeze_DB.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to perform the queries made by breeze, it only executes, no logic here.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Display.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to create proper html based on the type and the info it got.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Form.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_General.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to show a general wall where user can see tatus and updates from other users or buddies
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
6 Breeze/Breeze_Globals.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -61,7 +61,7 @@ public function __construct($var)
public function See($value)
{
- if (isset($this->request[$value]) && $this->Validate($this->request[$value]))
+ if ($this->Validate($value))
return $this->Sanitize($this->request[$value]);
else
return 'error_' . $value;
@@ -78,7 +78,7 @@ public function Raw($value)
public function Validate($var)
{
- if (!empty($var))
+ if (isset($this->request[$var]))
return true;
else
return false;
View
2  Breeze/Breeze_Modules.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to show all the current, enable modules for the users.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
23 Breeze/Breeze_Notifications.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to fetch all notifications for X user
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -69,12 +69,27 @@ function __construct()
public function Create($params)
{
+ global $user_info;
+
+ /* Set this as false by default */
+ $double_request = false;
+
/* if the type is buddy then let's do a check to avoid duplicate entries */
- /* if (!empty($params) && in_array($params['type'], $this->types) && $params['type'] == $this->types['buddy']) */
-
-
if (!empty($params) && in_array($params['type'], $this->types))
{
+ /* Load all the Notifications */
+ $temp = $this->query->GetNotifications();
+
+ foreach ($temp as $t)
+ if ($t['user'] == $params['user'] && $t['content']->from_id == $user_info['id'])
+ $double_request = true;
+ }
+
+ if ($double_request)
+ fatal_lang_error('BreezeMod_buddyrequest_error_doublerequest', false);
+
+ elseif (!empty($params) && in_array($params['type'], $this->types) && !$double_request)
+ {
$this->params = $params;
$this->query->InsertNotification($this->params);
}
View
2  Breeze/Breeze_Pagination.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to create a pagination from an array of items
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Parser.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to identify something in a tezt string and convert that to something different, for example, a url into an actual html link.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
17 Breeze/Breeze_Query.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to have all queries made by this mod in a single place, probably the most important file and the biggest one too.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -91,7 +91,7 @@ public static function getInstance()
* Cleans the old cache value
*
* Disclaimer: Killing in breeze world means replace the existing cache data with a null value so SMF generates a new cache...
- * @access private
+ * @access public
* @param mixed $type the name of value(s) to be deleted
* @return void
*/
@@ -926,7 +926,7 @@ protected function Notifications()
/* Populate the array like a boss! */
while ($row = $smcFunc['db_fetch_assoc']($result))
{
- $this->Notifications[$row['user']] = array(
+ $this->Notifications[$row['id']] = array(
'id' => $row['id'],
'user' => $row['user'],
'type' => $row['type'],
@@ -943,6 +943,11 @@ protected function Notifications()
return $this->Notifications;
}
+ public function GetNotifications()
+ {
+ return $this->Notifications();
+ }
+
public function InsertNotification($array)
{
/* We dont need this anymore */
@@ -969,6 +974,9 @@ public function InsertNotification($array)
public function MarkAsReadNotification($id)
{
+ /* We dont need this anymore */
+ $this->KillCache('Notifications');
+
/* Mark as read */
$params = array(
'set' => 'read = {int:read}',
@@ -986,6 +994,9 @@ public function MarkAsReadNotification($id)
public function DeleteNotification($id)
{
+ /* We dont need this anymore */
+ $this->KillCache('Notifications');
+
/* Delete! */
$params = array(
'where' => 'id = {int:id}'
View
2  Breeze/Breeze_Settings.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to extract the settings and text strings from the SMF arrays for a better and cleaner handling
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  Breeze/Breeze_Subs.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to provide some tools used across the mod
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
78 Breeze/Breeze_User.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is To show the user wall and provide a settings page
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -60,7 +60,8 @@ public static function Wall()
'UserInfo',
'Modules',
'Query',
- 'Pagination'
+ 'Pagination',
+ 'Globals'
));
/* We kinda need all this stuff, dont' ask why, just nod your head... */
@@ -68,6 +69,7 @@ public static function Wall()
$query = Breeze_Query::getInstance();
$tools = new Breeze_Subs();
$modules = new Breeze_Modules($context['member']['id']);
+ $globals = new Breeze_Globals('get');
/* Another page already checked the permissions and if the mod is enable, but better be safe... */
if (!$settings->Enable('admin_settings_enable'))
@@ -137,7 +139,7 @@ public static function Wall()
}
/* Getting the current page. */
- $page = !empty($_GET['page']) ? $_GET['page'] : 1;
+ $page = $globals->Validate('page') == true ? $globals->Raw('page') : 1;
/* Applying pagination. */
$pagination = new Breeze_Pagination($status, $page, '?action=profile;page=', '', !empty($user_settings['pagination_number']) ? $user_settings['pagination_number'] : 5, 5);
@@ -287,7 +289,7 @@ public static function Settings()
$context['Breeze']['UserSettings']['Form'] = $form->Display();
/* Saving? */
- if (isset($_GET['save']))
+ if ($globals->Validate('save') == true)
{
/* Kill the Settings cache */
$query->KillCache('Settings');
@@ -341,19 +343,23 @@ public static function BuddyRequest()
{
global $context, $user_info, $scripturl, $memberContext;
- // Do a quick check to ensure people aren't getting here illegally!
+ /* Do a quick check to ensure people aren't getting here illegally! */
if (!$context['user']['is_owner'])
fatal_lang_error('no_access', false);
loadtemplate('BreezeBuddy');
Breeze::Load(array(
'Buddy',
- 'Settings'
+ 'Settings',
+ 'Globals',
+ 'Query'
));
/* Load all we need */
$buddies = new Breeze_Buddy();
$text = Breeze_Settings::getInstance();
+ $globals = new Breeze_Globals('request');
+ $query = Breeze_Query::getInstance();
/* Set all the page stuff */
$context['sub_template'] = 'Breeze_buddy_list';
@@ -361,22 +367,72 @@ public static function BuddyRequest()
$context['user']['is_owner'] = $context['member']['id'] == $user_info['id'];
$context['canonical_url'] = $scripturl . '?action=profile;area=breezebuddies;u=' . $context['member']['id'];
- /* Send the buddy request to the template */
+ /* Show a nice message for confirmation */
+ if ($globals->Validate('inner') == true)
+ switch ($globals->Raw('inner'))
+ {
+ case 1:
+ $context['Breeze']['inner_message'] = $text->GetText('buddyrequest_confirmed_inner_message');
+ break;
+ case 2:
+ $context['Breeze']['inner_message'] = $text->GetText('buddyrequest_confirmed_inner_message_de');
+ break;
+ default:
+ $context['Breeze']['inner_message'] = '';
+ break;
+ }
+
+ else
+ $context['Breeze']['inner_message'] = '';
+
+ /* Send the buddy request(s) to the template */
$context['Breeze']['Buddy_Request'] = $buddies->ShowBuddyRequests($context['member']['id']);
- if (isset($_REQUEST['from']) && $user_info['id'] != $_REQUEST['from'])
+ if ($globals->Validate('from') == true && $globals->Validate('confirm') == true && $user_info['id'] != $globals->See('from'))
{
- $user_info['buddies'][] = (int) $_REQUEST['from'];
+ /* Load Subs-Post to use sendpm */
+ Breeze::Load('Subs-Post', true);
- /* Update the settings. */
+ $user_info['buddies'][] = $globals->See('from');
+ $context['Breeze']['Buddy_Request'][$globals->See('from')]['content']->from_buddies[] = $user_info['id'];
+
+ /* Update both users buddy array. */
updateMemberData($user_info['id'], array('buddy_list' => implode(',', $user_info['buddies'])));
+ updateMemberData($globals->See('from'), array('buddy_list' => implode(',', $context['Breeze']['Buddy_Request'][$globals->See('from')]['content']->from_buddies)));
/* Send a pm to the user */
+ $recipients = array(
+ 'to' => array($globals->See('from')),
+ 'bcc' => array(),
+ );
+ $from = array(
+ 'id' => $user_info['id'],
+ 'name' => $user_info['name'],
+ 'username' => $user_info['username'],
+ );
+
+ /* @todo let the user to send a customized message/title */
+ $subject = $text->GetText('buddyrequest_confirmed_subject');
+ $message = sprintf($text->GetText('buddyrequest_confirmed_message'), $user_info['name']);
+
+ sendpm($recipients, $subject, $message, false, $from);
/* Destroy the notification */
+ $query->DeleteNotification($globals->Raw('confirm'));
+
+
+ /* Redirect back to the profile buddy request page*/
+ redirectexit('action=profile;area=breezebuddies;inner=1;u=' . $user_info['id']);
+ }
+
+ /* Declined? */
+ elseif ($globals->Validate('decline') == true)
+ {
+ /* Delete the notification */
+ $query->DeleteNotification($globals->Raw('decline'));
/* Redirect back to the profile buddy request page*/
- redirectexit('action=profile;area=breezebuddies;u=' . $user_info['id']);
+ redirectexit('action=profile;area=breezebuddies;inner=2;u=' . $user_info['id']);
}
}
View
7 Breeze/Breeze_UserInfo.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to generate a div with the user common info, name, avatar, post, icons, stuff like that.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -78,11 +78,6 @@ public static function Profile($user, $id = false)
<div style="margin:3px;padding-right:15px;padding-left:5px;float:left;min-height:100px;">
'.($user['avatar']['image'] ? $user['avatar']['image'] : '').'<br />'.$user['link'].'';
- // Can they add this member as a buddy?
- if (!empty($context['can_have_buddy']) && !$user['is_owner'])
- $return .= '
- <br /><a href="'. $scripturl. '?action=buddy;u='.$user['id']. ';'.$context['session_var']. '='.$context['session_id'].'">['.$txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')].']</a>';
-
$return .= '</div>
<div>
<ul class="breeze_user_left_info">';
View
2  Breeze/Breeze_UserSettings.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is
* @package Breeze mod
- * @version 1.0 Beta 1 Beta 1
+ * @version 1.0 Beta 2 Beta 1
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  README.txt
@@ -6,7 +6,7 @@ Breeze is an Ajax powered social mod for your SMF forum, it allows your users to
Requirements:
-SMF 2.0.x
--PHP 5.3 or graater.
+-PHP 5.3 or greater.
Features:
View
61 install.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to create the tables Breeze needs.
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -249,6 +249,65 @@
'parameters' => array(),
);
+ /* Notifications */
+ $tables[] = array(
+ 'table_name' => '{db_prefix}breeze_notifications',
+ 'columns' => array(
+ array(
+ 'name' => 'id',
+ 'type' => 'int',
+ 'size' => 5,
+ 'null' => false,
+ 'auto' => true
+ ),
+ array(
+ 'name' => 'user',
+ 'type' => 'int',
+ 'size' => 5,
+ 'null' => false
+ ),
+ array(
+ 'name' => 'type',
+ 'type' => 'text',
+ 'size' => '',
+ 'default' => '',
+ ),
+ array(
+ 'name' => 'enable_visits_module',
+ 'type' => 'int',
+ 'size' => 5,
+ 'null' => false
+ ),
+ array(
+ 'name' => 'time',
+ 'type' => 'int',
+ 'size' => 5,
+ 'null' => false
+ ),
+ array(
+ 'name' => 'read',
+ 'type' => 'int',
+ 'size' => 5,
+ 'null' => false
+ ),
+ array(
+ 'name' => 'content',
+ 'type' => 'text',
+ 'size' => '',
+ 'default' => '',
+ ),
+ ),
+ 'indexes' => array(
+ array(
+ 'type' => 'primary',
+ 'columns' => array('id')
+ ),
+ ),
+ 'if_exists' => 'ignore',
+ 'error' => 'fatal',
+ 'parameters' => array(),
+ );
+
/* Installing */
foreach ($tables as $table)
$smcFunc['db_create_table']($table['table_name'], $table['columns'], $table['indexes'], $table['parameters'], $table['if_exists'], $table['error']);
View
2  js/breeze.js
@@ -3,7 +3,7 @@
*
* The purpose of this file is to handle all the client side code, the ajax call for the status, comments and other stuff
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
15 languages/Breeze.english.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is Provide the text strings
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -179,13 +179,20 @@
/* Notifications */
$txt['BreezeMod_noti_title'] = 'Notifications';
$txt['BreezeMod_noti_buddy_title'] = 'Buddy notification';
-$txt['BreezeMod_noti_buddy_message'] = 'The user %1$s has added you as his/her buddy, please confirm this request.';
+$txt['BreezeMod_noti_buddy_message'] = 'The user %s has added you as his/her buddy, please confirm this request.';
/* Buddy List */
+$txt['BreezeMod_buddyrequest_error_doublerequest'] = 'You already sent a buddy request, please wait for the user\'s response.';
+$txt['BreezeMod_buddyrequest_error_dunno'] = 'Something went wrong, please contact the forum admin.';
$txt['BreezeMod_buddy_messagerequest_message'] = '%s wants to be your buddy!';
$txt['BreezeMod_buddy_title'] = 'Buddy List';
-$txt['BreezeMod_buddy_desc'] = 'From here you can confirm buddy request.';
+$txt['BreezeMod_buddy_desc'] = 'From here you can confirm or decline your buddy request. If you confirm the buddy request, a pm on your behalf wil be send to the user, if you decine the request the user will not receive anything';
$txt['BreezeMod_buddyrequest_title'] = 'Buddy requests';
$txt['BreezeMod_buddyrequest_list_status'] = 'Status';
$txt['BreezeMod_buddyrequest_list_message'] = 'Message';
-$txt['BreezeMod_buddyrequest_list_confirm'] = 'Confirm';
+$txt['BreezeMod_buddyrequest_list_confirm'] = 'Confirm';
+$txt['BreezeMod_buddyrequest_list_decline'] = 'Decline';
+$txt['BreezeMod_buddyrequest_confirmed_subject'] = 'Buddy request accepted.';
+$txt['BreezeMod_buddyrequest_confirmed_message'] ='%s has confirmed your buddy request';
+$txt['BreezeMod_buddyrequest_confirmed_inner_message'] = 'You successfully confirmed the request';
+$txt['BreezeMod_buddyrequest_confirmed_inner_message_de'] = 'You successfully declined the request';
View
6 package-info.xml
@@ -3,17 +3,18 @@
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>Suki:breeze</id>
<name>Breeze</name>
- <version>1.0 Beta 1</version>
+ <version>1.0 Beta 2</version>
<type>modification</type>
<install for="2.0 - 2.0.99">
<readme parsebbc="true">README.txt</readme>
- <code>hooks.php</code>
<database>install.php</database>
+ <code>hooks.php</code>
<modification>Breeze.xml</modification>
<require-file name="templates/Breeze.template.php" destination="$themedir">Wall template</require-file>
<require-file name="templates/BreezeAdmin.template.php" destination="$themedir">Admin template</require-file>
<require-file name="templates/BreezeAjax.template.php" destination="$themedir">Ajax calls</require-file>
+ <require-file name="templates/BreezeBuddy.template.php" destination="$themedir">Buddy system</require-file>
<require-dir name="css" destination="$themedir">CSS files</require-dir>
<require-dir name="images" destination="$themedir">Image files</require-dir>
<require-dir name="js" destination="$themedir">JavaScript</require-dir>
@@ -30,6 +31,7 @@
<remove-file name="$themedir/Breeze.template.php" />
<remove-file name="$themedir/BreezeAjax.template.php" />
<remove-file name="$themedir/BreezeAdmin.template.php" />
+ <remove-file name="$themedir/BreezeBuddy.template.php" />
<remove-file name="$themedir/css/breeze.css" />
<remove-file name="$themedir/js/breeze.js" />
<remove-file name="$themedir/js/confirm.js" />
View
2  templates/Breeze.template.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  templates/BreezeAdmin.template.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to show the admin section for the mod's settings
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
2  templates/BreezeAjax.template.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to handle the ajax action and display the response form the server
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
View
14 templates/BreezeBuddy.template.php
@@ -5,7 +5,7 @@
*
* The purpose of this file is to show the admin section for the mod's settings
* @package Breeze mod
- * @version 1.0 Beta 1
+ * @version 1.0 Beta 2
* @author Jessica González <missallsunday@simplemachines.org>
* @copyright Copyright (c) 2012, Jessica González
* @license http://www.mozilla.org/MPL/MPL-1.1.html
@@ -66,6 +66,10 @@ function template_Breeze_buddy_list()
{
global $txt, $context, $scripturl;
+ /* If there is an inner_message, show it here */
+ if (!empty($context['Breeze']['inner_message']))
+ echo '<div class="windowbg" id="profile_success">', $context['Breeze']['inner_message'] ,'</div>';
+
/* Welcome message for the admin. */
echo '
<div class="cat_bar">
@@ -92,7 +96,8 @@ function template_Breeze_buddy_list()
<thead>
<tr class="catbg">
<th scope="col" class="first_th">', $txt['BreezeMod_buddyrequest_list_message'] ,'</th>
- <th scope="col" class="last_th">', $txt['BreezeMod_buddyrequest_list_confirm'] ,'</th>
+ <th scope="col">', $txt['BreezeMod_buddyrequest_list_confirm'] ,'</th>
+ <th scope="col" class="last_th">', $txt['BreezeMod_buddyrequest_list_decline'] ,'</th>
</tr>
</thead>
<tbody>';
@@ -105,7 +110,10 @@ function template_Breeze_buddy_list()
', $request['content']->message ,'
</td>
<td>
- <a href="', $scripturl ,'action=profile;area=breezebuddies;from=', $request['content']->from_id ,'" target="self">', $txt['BreezeMod_buddyrequest_list_confirm'] ,'</a>
+ <a href="', $scripturl ,'?action=profile;area=breezebuddies;from=', $request['content']->from_id ,';confirm=', $request['id'] ,'" target="self">', $txt['BreezeMod_buddyrequest_list_confirm'] ,'</a>
+ </td>
+ <td>
+ <a href="', $scripturl ,'?action=profile;area=breezebuddies;from=', $request['content']->from_id ,';decline=', $request['id'] ,'" target="self">', $txt['BreezeMod_buddyrequest_list_decline'] ,'</a>
</td>
</tr>';
}
Please sign in to comment.
Something went wrong with that request. Please try again.