Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
c0af1820
Commit
c0af1820
authored
Nov 08, 2015
by
daryl herzmann
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #367 from akrherz/of967
OF-967 add option to use Name as nickname for muc bookmark
parents
da205c4d
bbbd15bf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
8 deletions
+38
-8
changelog.html
src/plugins/clientControl/changelog.html
+4
-0
plugin.xml
src/plugins/clientControl/plugin.xml
+2
-2
clientcontrol_i18n.properties
...gins/clientControl/src/i18n/clientcontrol_i18n.properties
+2
-0
BookmarkInterceptor.java
...vesoftware/openfire/plugin/spark/BookmarkInterceptor.java
+7
-0
confirm-bookmark-delete.jsp
...plugins/clientControl/src/web/confirm-bookmark-delete.jsp
+4
-0
create-bookmark.jsp
src/plugins/clientControl/src/web/create-bookmark.jsp
+17
-5
groupchat-bookmarks.jsp
src/plugins/clientControl/src/web/groupchat-bookmarks.jsp
+2
-1
No files found.
src/plugins/clientControl/changelog.html
View file @
c0af1820
...
@@ -43,6 +43,10 @@
...
@@ -43,6 +43,10 @@
<h1>
<h1>
Client Control Plugin Changelog
Client Control Plugin Changelog
</h1>
</h1>
<p><b>
1.3.1
</b>
-- Nov 08, 2015
</p>
<ul>
<li>
Added Name as a nickname option to Group Chat Bookmark.
</li>
</ul>
<p><b>
1.3.0
</b>
-- June 22, 2015
</p>
<p><b>
1.3.0
</b>
-- June 22, 2015
</p>
<ul>
<ul>
<li>
Requires Openfire 3.11.0.
</li>
<li>
Requires Openfire 3.11.0.
</li>
...
...
src/plugins/clientControl/plugin.xml
View file @
c0af1820
...
@@ -8,8 +8,8 @@
...
@@ -8,8 +8,8 @@
<name>
Client Control
</name>
<name>
Client Control
</name>
<description>
Controls clients allowed to connect and available features
</description>
<description>
Controls clients allowed to connect and available features
</description>
<author>
Jive Software
</author>
<author>
Jive Software
</author>
<version>
1.
2.0
</version>
<version>
1.
3.1
</version>
<date>
6/22
/2015
</date>
<date>
11/05
/2015
</date>
<minServerVersion>
3.11.0
</minServerVersion>
<minServerVersion>
3.11.0
</minServerVersion>
<databaseKey>
clientcontrol
</databaseKey>
<databaseKey>
clientcontrol
</databaseKey>
<databaseVersion>
0
</databaseVersion>
<databaseVersion>
0
</databaseVersion>
...
...
src/plugins/clientControl/src/i18n/clientcontrol_i18n.properties
View file @
c0af1820
...
@@ -145,6 +145,7 @@ group.chat.bookmark.removed = Group chat bookmark removed.
...
@@ -145,6 +145,7 @@ group.chat.bookmark.removed = Group chat bookmark removed.
group.chat.bookmark.name
=
Group Chat Name
group.chat.bookmark.name
=
Group Chat Name
group.chat.bookmark.address
=
Group Chat Address
group.chat.bookmark.address
=
Group Chat Address
group.chat.bookmark.autojoin
=
Auto-Join
group.chat.bookmark.autojoin
=
Auto-Join
group.chat.bookmark.nameasnick
=
Name as a nick
group.chat.bookmark.users
=
user(s)
group.chat.bookmark.users
=
user(s)
group.chat.bookmark.groups
=
group(s)
group.chat.bookmark.groups
=
group(s)
group.chat.bookmark.none
=
You do not currently have any group chat bookmarks. Click the 'add group chat bookmark' to add a new group chat room.
group.chat.bookmark.none
=
You do not currently have any group chat bookmarks. Click the 'add group chat bookmark' to add a new group chat room.
...
@@ -198,5 +199,6 @@ bookmark.delete.chat.address = Group Chat Address:
...
@@ -198,5 +199,6 @@ bookmark.delete.chat.address = Group Chat Address:
bookmark.delete.chat.users
=
Users:
bookmark.delete.chat.users
=
Users:
bookmark.delete.chat.groups
=
Groups:
bookmark.delete.chat.groups
=
Groups:
bookmark.delete.chat.autojoin
=
Auto-Join:
bookmark.delete.chat.autojoin
=
Auto-Join:
bookmark.delete.chat.nameasnick
=
Name as a nick:
bookmark.delete.chat.submit
=
Delete
bookmark.delete.chat.submit
=
Delete
bookmark.delete.chat.cancel
=
Cancel
bookmark.delete.chat.cancel
=
Cancel
\ No newline at end of file
src/plugins/clientControl/src/java/org/jivesoftware/openfire/plugin/spark/BookmarkInterceptor.java
View file @
c0af1820
...
@@ -27,6 +27,7 @@ import org.jivesoftware.openfire.interceptor.InterceptorManager;
...
@@ -27,6 +27,7 @@ import org.jivesoftware.openfire.interceptor.InterceptorManager;
import
org.jivesoftware.openfire.interceptor.PacketInterceptor
;
import
org.jivesoftware.openfire.interceptor.PacketInterceptor
;
import
org.jivesoftware.openfire.interceptor.PacketRejectedException
;
import
org.jivesoftware.openfire.interceptor.PacketRejectedException
;
import
org.jivesoftware.openfire.session.Session
;
import
org.jivesoftware.openfire.session.Session
;
import
org.jivesoftware.openfire.user.User
;
import
org.jivesoftware.openfire.user.UserManager
;
import
org.jivesoftware.openfire.user.UserManager
;
import
org.jivesoftware.openfire.user.UserNotFoundException
;
import
org.jivesoftware.openfire.user.UserNotFoundException
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -198,6 +199,12 @@ public class BookmarkInterceptor implements PacketInterceptor {
...
@@ -198,6 +199,12 @@ public class BookmarkInterceptor implements PacketInterceptor {
boolean
autojoin
=
Boolean
.
valueOf
(
bookmark
.
getProperty
(
"autojoin"
));
boolean
autojoin
=
Boolean
.
valueOf
(
bookmark
.
getProperty
(
"autojoin"
));
conferenceElement
.
addAttribute
(
"autojoin"
,
Boolean
.
toString
(
autojoin
));
conferenceElement
.
addAttribute
(
"autojoin"
,
Boolean
.
toString
(
autojoin
));
conferenceElement
.
addAttribute
(
"jid"
,
bookmark
.
getValue
());
conferenceElement
.
addAttribute
(
"jid"
,
bookmark
.
getValue
());
boolean
nameasnick
=
Boolean
.
valueOf
(
bookmark
.
getProperty
(
"nameasnick"
));
if
(
nameasnick
)
{
User
currentUser
=
userManager
.
getUser
(
jid
.
getNode
());
Element
nick
=
conferenceElement
.
addElement
(
"nick"
);
nick
.
addText
(
currentUser
.
getName
());
}
}
}
appendSharedElement
(
conferenceElement
);
appendSharedElement
(
conferenceElement
);
...
...
src/plugins/clientControl/src/web/confirm-bookmark-delete.jsp
View file @
c0af1820
...
@@ -127,6 +127,10 @@ else { %>
...
@@ -127,6 +127,10 @@ else { %>
<tr>
<tr>
<td><b><fmt:message
key=
"bookmark.delete.chat.autojoin"
/></b></td>
<td><b><fmt:message
key=
"bookmark.delete.chat.autojoin"
/></b></td>
<td><%=
bookmark
.
getProperty
(
"autojoin"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
<td><%=
bookmark
.
getProperty
(
"autojoin"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
</tr>
<tr>
<td><b><fmt:message
key=
"bookmark.delete.chat.nameasnick"
/></b></td>
<td><%=
bookmark
.
getProperty
(
"nameasnick"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
</tr>
</tr>
<tr>
<tr>
<td></td>
<td></td>
...
...
src/plugins/clientControl/src/web/create-bookmark.jsp
View file @
c0af1820
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
String
groupchatJID
=
request
.
getParameter
(
"groupchatJID"
);
String
groupchatJID
=
request
.
getParameter
(
"groupchatJID"
);
boolean
autojoin
=
ParamUtils
.
getBooleanParameter
(
request
,
"autojoin"
);
boolean
autojoin
=
ParamUtils
.
getBooleanParameter
(
request
,
"autojoin"
);
boolean
nameAsNick
=
ParamUtils
.
getBooleanParameter
(
request
,
"nameasnick"
);
String
users
=
request
.
getParameter
(
"users"
);
String
users
=
request
.
getParameter
(
"users"
);
String
groups
=
request
.
getParameter
(
"groups"
);
String
groups
=
request
.
getParameter
(
"groups"
);
...
@@ -94,6 +95,7 @@
...
@@ -94,6 +95,7 @@
else
{
else
{
groupchatName
=
editBookmark
.
getName
();
groupchatName
=
editBookmark
.
getName
();
autojoin
=
editBookmark
.
getProperty
(
"autojoin"
)
!=
null
;
autojoin
=
editBookmark
.
getProperty
(
"autojoin"
)
!=
null
;
nameAsNick
=
editBookmark
.
getProperty
(
"nameasnick"
)
!=
null
;
groupchatJID
=
editBookmark
.
getValue
();
groupchatJID
=
editBookmark
.
getValue
();
}
}
...
@@ -175,17 +177,23 @@
...
@@ -175,17 +177,23 @@
if
(
isRSS
)
{
if
(
isRSS
)
{
bookmark
.
setProperty
(
"rss"
,
"true"
);
bookmark
.
setProperty
(
"rss"
,
"true"
);
}
}
else
{
else
{
bookmark
.
deleteProperty
(
"rss"
);
bookmark
.
deleteProperty
(
"rss"
);
}
}
}
}
else
{
else
{
if
(
autojoin
)
{
if
(
autojoin
)
{
bookmark
.
setProperty
(
"autojoin"
,
"true"
);
bookmark
.
setProperty
(
"autojoin"
,
"true"
);
}
}
else
{
else
{
bookmark
.
deleteProperty
(
"autojoin"
);
bookmark
.
deleteProperty
(
"autojoin"
);
}
}
if
(
nameAsNick
)
{
bookmark
.
setProperty
(
"nameasnick"
,
"true"
);
}
else
{
bookmark
.
deleteProperty
(
"nameasnick"
);
}
}
}
}
}
}
}
...
@@ -366,6 +374,10 @@ else { %>
...
@@ -366,6 +374,10 @@ else { %>
<tr>
<tr>
<td><b><fmt:message
key=
"group.chat.bookmark.autojoin"
/>
:
</b></td><td><input
type=
"checkbox"
name=
"autojoin"
<%=
autojoin
?
"checked"
:
""
%>/></td>
<td><b><fmt:message
key=
"group.chat.bookmark.autojoin"
/>
:
</b></td><td><input
type=
"checkbox"
name=
"autojoin"
<%=
autojoin
?
"checked"
:
""
%>/></td>
</tr>
</tr>
<tr>
<td><b><fmt:message
key=
"group.chat.bookmark.nameasnick"
/>
:
</b></td><td><input
type=
"checkbox"
name=
"nameasnick"
<%=
nameAsNick
?
"checked"
:
""
%>/></td>
</tr>
<tr>
<tr>
<td></td>
<td></td>
<td><input
type=
"submit"
name=
"createGroupchatBookmark"
value=
"
<%=
editBookmark
!=
null
?
LocaleUtils
.
getLocalizedString
(
"bookmark.save.changes"
,
"clientcontrol"
)
:
LocaleUtils
.
getLocalizedString
(
"create"
,
"clientcontrol"
)
%>
"
/>
<td><input
type=
"submit"
name=
"createGroupchatBookmark"
value=
"
<%=
editBookmark
!=
null
?
LocaleUtils
.
getLocalizedString
(
"bookmark.save.changes"
,
"clientcontrol"
)
:
LocaleUtils
.
getLocalizedString
(
"create"
,
"clientcontrol"
)
%>
"
/>
...
...
src/plugins/clientControl/src/web/groupchat-bookmarks.jsp
View file @
c0af1820
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<div
class=
"div-border"
style=
"padding: 12px; width: 95%;"
>
<div
class=
"div-border"
style=
"padding: 12px; width: 95%;"
>
<table
class=
"jive-table"
cellspacing=
"0"
width=
"100%"
>
<table
class=
"jive-table"
cellspacing=
"0"
width=
"100%"
>
<th><fmt:message
key=
"group.chat.bookmark.name"
/></th><th><fmt:message
key=
"group.chat.bookmark.address"
/></th><th><fmt:message
key=
"users"
/></th><th><fmt:message
key=
"groups"
/></th><th><fmt:message
key=
"group.chat.bookmark.autojoin"
/></th><th><fmt:message
key=
"options"
/></th>
<th><fmt:message
key=
"group.chat.bookmark.name"
/></th><th><fmt:message
key=
"group.chat.bookmark.address"
/></th><th><fmt:message
key=
"users"
/></th><th><fmt:message
key=
"groups"
/></th><th><fmt:message
key=
"group.chat.bookmark.autojoin"
/></th><th><fmt:message
key=
"
group.chat.bookmark.nameasnick"
/></th><th><fmt:message
key=
"
options"
/></th>
<%
<%
boolean
hasBookmarks
=
false
;
boolean
hasBookmarks
=
false
;
for
(
Bookmark
bookmark
:
bookmarks
)
{
for
(
Bookmark
bookmark
:
bookmarks
)
{
...
@@ -80,6 +80,7 @@
...
@@ -80,6 +80,7 @@
<td><%=
users
%></td>
<td><%=
users
%></td>
<td><%=
groups
%></td>
<td><%=
groups
%></td>
<td><%=
bookmark
.
getProperty
(
"autojoin"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
<td><%=
bookmark
.
getProperty
(
"autojoin"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
<td><%=
bookmark
.
getProperty
(
"nameasnick"
)
!=
null
?
"
<
img
src
=
'
/
images
/
check
.
gif
'>
" : "
&
nbsp
;
"
%></td>
<td>
<td>
<a
href=
"create-bookmark.jsp?edit=true&bookmarkID=
<%=
bookmark
.
getBookmarkID
()
%>
"
><img
src=
"/images/edit-16x16.gif"
border=
"0"
width=
"16"
height=
"16"
alt=
"Edit Bookmark"
/></a>
<a
href=
"create-bookmark.jsp?edit=true&bookmarkID=
<%=
bookmark
.
getBookmarkID
()
%>
"
><img
src=
"/images/edit-16x16.gif"
border=
"0"
width=
"16"
height=
"16"
alt=
"Edit Bookmark"
/></a>
<a
href=
"confirm-bookmark-delete.jsp?bookmarkID=
<%=
bookmark
.
getBookmarkID
()
%>
"
><img
src=
"/images/delete-16x16.gif"
border=
"0"
width=
"16"
height=
"16"
alt=
"Delete Bookmark"
/></a>
<a
href=
"confirm-bookmark-delete.jsp?bookmarkID=
<%=
bookmark
.
getBookmarkID
()
%>
"
><img
src=
"/images/delete-16x16.gif"
border=
"0"
width=
"16"
height=
"16"
alt=
"Delete Bookmark"
/></a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment