594 changed files with 23350 additions and 31836 deletions
-
1635app/assets/documents/Doxyfile
-
47app/assets/documents/Makefile
-
6app/assets/documents/colors.txt
-
451app/assets/documents/fdl.texi
-
BINapp/assets/documents/movim.png
-
594app/assets/documents/movim.texi
-
60app/assets/documents/texi.css
-
1app/assets/documents/texi2htmlrc
-
170app/assets/js/movim_rpc.js
-
8app/assets/js/movim_tpl.js
-
14app/assets/js/movim_utils.js
-
19app/assets/js/movim_websocket.js
-
11app/controllers/FeedController.php
-
10app/controllers/RoomController.php
-
2app/helpers/StringHelper.php
-
6app/helpers/TimezoneHelper.php
-
4app/models/config/Config.php
-
6app/models/config/ConfigDAO.php
-
23app/models/contact/Contact.php
-
20app/models/contact/ContactDAO.php
-
42app/models/message/Message.php
-
6app/models/message/MessageDAO.php
-
30app/models/postn/PostnDAO.php
-
19app/models/presence/Presence.php
-
24app/models/presence/PresenceDAO.php
-
8app/models/sessionx/Sessionx.php
-
20app/models/sessionx/SessionxDAO.php
-
1app/views/about.tpl
-
1app/views/feed.tpl
-
1app/views/group.tpl
-
1app/views/news.tpl
-
11app/views/room.tpl
-
8app/widgets/About/About.php
-
2app/widgets/About/about.tpl
-
40app/widgets/Account/Account.php
-
32app/widgets/Account/_account_form.tpl
-
91app/widgets/AccountError/AccountError.php
-
1app/widgets/AccountError/accounterror.tpl
-
10app/widgets/AccountError/locales.ini
-
14app/widgets/AccountNext/AccountNext.php
-
2app/widgets/AccountNext/accountnext.css
-
10app/widgets/AccountNext/accountnext.tpl
-
42app/widgets/AdminMain/adminmain.tpl
-
2app/widgets/AdminTest/admintest.css
-
5app/widgets/AdminTest/admintest.js
-
20app/widgets/AdminTest/admintest.tpl
-
3app/widgets/AdminTest/locales.ini
-
2app/widgets/Api/Api.php
-
2app/widgets/Avatar/avatar.js
-
19app/widgets/Blog/Blog.php
-
55app/widgets/Blog/blog.tpl
-
51app/widgets/Chat/Chat.php
-
5app/widgets/Chat/_chat.tpl
-
27app/widgets/Chat/_chat_empty.tpl
-
42app/widgets/Chat/_chat_header_room.tpl
-
8app/widgets/Chat/chat.css
-
12app/widgets/Chat/chat.js
-
1app/widgets/Chat/locales.ini
-
47app/widgets/Chats/Chats.php
-
8app/widgets/Chats/_chats.tpl
-
3app/widgets/Chats/_chats_add.tpl
-
1app/widgets/Chats/_chats_add_extend.tpl
-
8app/widgets/Chats/_chats_item.tpl
-
3app/widgets/Chats/locales.ini
-
54app/widgets/Contact/Contact.php
-
50app/widgets/Contact/_contact.tpl
-
37app/widgets/Contact/_contact_explore.tpl
-
44app/widgets/Contact/_contact_public.tpl
-
11app/widgets/Contact/locales.ini
-
42app/widgets/Group/Group.php
-
12app/widgets/Group/_group_empty.tpl
-
9app/widgets/Group/_group_posts.tpl
-
2app/widgets/Group/_group_publish.tpl
-
4app/widgets/Group/group.js
-
9app/widgets/Group/group.tpl
-
1app/widgets/Group/locales.ini
-
39app/widgets/Groups/Groups.php
-
2app/widgets/Groups/_groups_server.tpl
-
1app/widgets/Groups/_groups_subscriptions.tpl
-
3app/widgets/Groups/groups.js
-
2app/widgets/Groups/locales.ini
-
2app/widgets/Header/Header.php
-
6app/widgets/Header/_header_about.tpl
-
2app/widgets/Header/_header_main.tpl
-
4app/widgets/Header/_header_news.tpl
-
4app/widgets/Header/_header_room.tpl
-
4app/widgets/Header/locales.ini
-
2app/widgets/Hello/Hello.php
-
13app/widgets/Hello/hello.tpl
-
3app/widgets/Init/Init.php
-
52app/widgets/Login/Login.php
-
6app/widgets/Login/_login_sessions.tpl
-
1app/widgets/Login/locales.ini
-
11app/widgets/Login/login.js
-
1app/widgets/Login/login.tpl
-
59app/widgets/LoginAnonymous/LoginAnonymous.php
-
2app/widgets/LoginAnonymous/locales.ini
-
8app/widgets/LoginAnonymous/loginanonymous.js
-
1app/widgets/LoginAnonymous/loginanonymous.tpl
-
186app/widgets/Media/Media.php
1635
app/assets/documents/Doxyfile
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,47 +0,0 @@ |
|||
HTMLER=texi2html |
|||
PDF=texi2pdf |
|||
DVI=texi2dvi |
|||
INFO=makeinfo |
|||
TEXI_OPT=-c -b |
|||
SRC=movim.texi |
|||
HTML_OUTP=bookhtml/ |
|||
HTML_OPT=--no-menu --init-file texi2htmlrc --css-include=texi.css |
|||
HTML_OPT_DIR=--split=chapter --output=$(HTML_OUTP) |
|||
DOXYGEN=doxygen |
|||
|
|||
.PHONY: all htmlmulti htmlmono dvi pdf reference |
|||
|
|||
all: dvi pdf htmlmono htmlmulti reference info |
|||
|
|||
clean: |
|||
rm -rf bookhtml reference movim.dvi movim.pdf movim.info movim.html |
|||
|
|||
htmlmulti: bookhtml/movim.html |
|||
|
|||
htmlmono: movim.html |
|||
|
|||
dvi: movim.dvi |
|||
|
|||
pdf: movim.pdf |
|||
|
|||
info: movim.info |
|||
|
|||
reference: reference/html/index.html |
|||
|
|||
movim.html: movim.texi fdl.texi |
|||
$(HTMLER) $(HTML_OPT) $(SRC) |
|||
|
|||
bookhtml/movim.html: movim.texi fdl.texi |
|||
$(HTMLER) $(HTML_OPT) $(HTML_OPT_DIR) $(SRC) |
|||
|
|||
movim.dvi: movim.texi fdl.texi |
|||
$(DVI) $(TEXI_OPT) $(SRC) |
|||
|
|||
movim.pdf: movim.texi fdl.texi |
|||
$(PDF) $(TEXI_OPT) $(SRC) |
|||
|
|||
movim.info: movim.texi fdl.texi |
|||
$(INFO) $(SRC) |
|||
|
|||
reference/html/index.html: Doxyfile |
|||
$(DOXYGEN) Doxyfile |
@ -1,6 +0,0 @@ |
|||
red : #D92727 |
|||
orange : #FC8F12 |
|||
yellow : #FFE433 |
|||
green : #6FCC43 |
|||
blue : #0DB8B5 |
|||
purple : #442178 |
@ -1,451 +0,0 @@ |
|||
@c The GNU Free Documentation License. |
|||
@center Version 1.2, November 2002 |
|||
|
|||
@c This file is intended to be included within another document, |
|||
@c hence no sectioning command or @node. |
|||
|
|||
@display |
|||
Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. |
|||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA |
|||
|
|||
Everyone is permitted to copy and distribute verbatim copies |
|||
of this license document, but changing it is not allowed. |
|||
@end display |
|||
|
|||
@enumerate 0 |
|||
@item |
|||
PREAMBLE |
|||
|
|||
The purpose of this License is to make a manual, textbook, or other |
|||
functional and useful document @dfn{free} in the sense of freedom: to |
|||
assure everyone the effective freedom to copy and redistribute it, |
|||
with or without modifying it, either commercially or noncommercially. |
|||
Secondarily, this License preserves for the author and publisher a way |
|||
to get credit for their work, while not being considered responsible |
|||
for modifications made by others. |
|||
|
|||
This License is a kind of ``copyleft'', which means that derivative |
|||
works of the document must themselves be free in the same sense. It |
|||
complements the GNU General Public License, which is a copyleft |
|||
license designed for free software. |
|||
|
|||
We have designed this License in order to use it for manuals for free |
|||
software, because free software needs free documentation: a free |
|||
program should come with manuals providing the same freedoms that the |
|||
software does. But this License is not limited to software manuals; |
|||
it can be used for any textual work, regardless of subject matter or |
|||
whether it is published as a printed book. We recommend this License |
|||
principally for works whose purpose is instruction or reference. |
|||
|
|||
@item |
|||
APPLICABILITY AND DEFINITIONS |
|||
|
|||
This License applies to any manual or other work, in any medium, that |
|||
contains a notice placed by the copyright holder saying it can be |
|||
distributed under the terms of this License. Such a notice grants a |
|||
world-wide, royalty-free license, unlimited in duration, to use that |
|||
work under the conditions stated herein. The ``Document'', below, |
|||
refers to any such manual or work. Any member of the public is a |
|||
licensee, and is addressed as ``you''. You accept the license if you |
|||
copy, modify or distribute the work in a way requiring permission |
|||
under copyright law. |
|||
|
|||
A ``Modified Version'' of the Document means any work containing the |
|||
Document or a portion of it, either copied verbatim, or with |
|||
modifications and/or translated into another language. |
|||
|
|||
A ``Secondary Section'' is a named appendix or a front-matter section |
|||
of the Document that deals exclusively with the relationship of the |
|||
publishers or authors of the Document to the Document's overall |
|||
subject (or to related matters) and contains nothing that could fall |
|||
directly within that overall subject. (Thus, if the Document is in |
|||
part a textbook of mathematics, a Secondary Section may not explain |
|||
any mathematics.) The relationship could be a matter of historical |
|||
connection with the subject or with related matters, or of legal, |
|||
commercial, philosophical, ethical or political position regarding |
|||
them. |
|||
|
|||
The ``Invariant Sections'' are certain Secondary Sections whose titles |
|||
are designated, as being those of Invariant Sections, in the notice |
|||
that says that the Document is released under this License. If a |
|||
section does not fit the above definition of Secondary then it is not |
|||
allowed to be designated as Invariant. The Document may contain zero |
|||
Invariant Sections. If the Document does not identify any Invariant |
|||
Sections then there are none. |
|||
|
|||
The ``Cover Texts'' are certain short passages of text that are listed, |
|||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that |
|||
the Document is released under this License. A Front-Cover Text may |
|||
be at most 5 words, and a Back-Cover Text may be at most 25 words. |
|||
|
|||
A ``Transparent'' copy of the Document means a machine-readable copy, |
|||
represented in a format whose specification is available to the |
|||
general public, that is suitable for revising the document |
|||
straightforwardly with generic text editors or (for images composed of |
|||
pixels) generic paint programs or (for drawings) some widely available |
|||
drawing editor, and that is suitable for input to text formatters or |
|||
for automatic translation to a variety of formats suitable for input |
|||
to text formatters. A copy made in an otherwise Transparent file |
|||
format whose markup, or absence of markup, has been arranged to thwart |
|||
or discourage subsequent modification by readers is not Transparent. |
|||
An image format is not Transparent if used for any substantial amount |
|||
of text. A copy that is not ``Transparent'' is called ``Opaque''. |
|||
|
|||
Examples of suitable formats for Transparent copies include plain |
|||
@sc{ascii} without markup, Texinfo input format, La@TeX{} input |
|||
format, @acronym{SGML} or @acronym{XML} using a publicly available |
|||
@acronym{DTD}, and standard-conforming simple @acronym{HTML}, |
|||
PostScript or @acronym{PDF} designed for human modification. Examples |
|||
of transparent image formats include @acronym{PNG}, @acronym{XCF} and |
|||
@acronym{JPG}. Opaque formats include proprietary formats that can be |
|||
read and edited only by proprietary word processors, @acronym{SGML} or |
|||
@acronym{XML} for which the @acronym{DTD} and/or processing tools are |
|||
not generally available, and the machine-generated @acronym{HTML}, |
|||
PostScript or @acronym{PDF} produced by some word processors for |
|||
output purposes only. |
|||
|
|||
The ``Title Page'' means, for a printed book, the title page itself, |
|||
plus such following pages as are needed to hold, legibly, the material |
|||
this License requires to appear in the title page. For works in |
|||
formats which do not have any title page as such, ``Title Page'' means |
|||
the text near the most prominent appearance of the work's title, |
|||
preceding the beginning of the body of the text. |
|||
|
|||
A section ``Entitled XYZ'' means a named subunit of the Document whose |
|||
title either is precisely XYZ or contains XYZ in parentheses following |
|||
text that translates XYZ in another language. (Here XYZ stands for a |
|||
specific section name mentioned below, such as ``Acknowledgements'', |
|||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' |
|||
of such a section when you modify the Document means that it remains a |
|||
section ``Entitled XYZ'' according to this definition. |
|||
|
|||
The Document may include Warranty Disclaimers next to the notice which |
|||
states that this License applies to the Document. These Warranty |
|||
Disclaimers are considered to be included by reference in this |
|||
License, but only as regards disclaiming warranties: any other |
|||
implication that these Warranty Disclaimers may have is void and has |
|||
no effect on the meaning of this License. |
|||
|
|||
@item |
|||
VERBATIM COPYING |
|||
|
|||
You may copy and distribute the Document in any medium, either |
|||
commercially or noncommercially, provided that this License, the |
|||
copyright notices, and the license notice saying this License applies |
|||
to the Document are reproduced in all copies, and that you add no other |
|||
conditions whatsoever to those of this License. You may not use |
|||
technical measures to obstruct or control the reading or further |
|||
copying of the copies you make or distribute. However, you may accept |
|||
compensation in exchange for copies. If you distribute a large enough |
|||
number of copies you must also follow the conditions in section 3. |
|||
|
|||
You may also lend copies, under the same conditions stated above, and |
|||
you may publicly display copies. |
|||
|
|||
@item |
|||
COPYING IN QUANTITY |
|||
|
|||
If you publish printed copies (or copies in media that commonly have |
|||
printed covers) of the Document, numbering more than 100, and the |
|||
Document's license notice requires Cover Texts, you must enclose the |
|||
copies in covers that carry, clearly and legibly, all these Cover |
|||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on |
|||
the back cover. Both covers must also clearly and legibly identify |
|||
you as the publisher of these copies. The front cover must present |
|||
the full title with all words of the title equally prominent and |
|||
visible. You may add other material on the covers in addition. |
|||
Copying with changes limited to the covers, as long as they preserve |
|||
the title of the Document and satisfy these conditions, can be treated |
|||
as verbatim copying in other respects. |
|||
|
|||
If the required texts for either cover are too voluminous to fit |
|||
legibly, you should put the first ones listed (as many as fit |
|||
reasonably) on the actual cover, and continue the rest onto adjacent |
|||
pages. |
|||
|
|||
If you publish or distribute Opaque copies of the Document numbering |
|||
more than 100, you must either include a machine-readable Transparent |
|||
copy along with each Opaque copy, or state in or with each Opaque copy |
|||
a computer-network location from which the general network-using |
|||
public has access to download using public-standard network protocols |
|||
a complete Transparent copy of the Document, free of added material. |
|||
If you use the latter option, you must take reasonably prudent steps, |
|||
when you begin distribution of Opaque copies in quantity, to ensure |
|||
that this Transparent copy will remain thus accessible at the stated |
|||
location until at least one year after the last time you distribute an |
|||
Opaque copy (directly or through your agents or retailers) of that |
|||
edition to the public. |
|||
|
|||
It is requested, but not required, that you contact the authors of the |
|||
Document well before redistributing any large number of copies, to give |
|||
them a chance to provide you with an updated version of the Document. |
|||
|
|||
@item |
|||
MODIFICATIONS |
|||
|
|||
You may copy and distribute a Modified Version of the Document under |
|||
the conditions of sections 2 and 3 above, provided that you release |
|||
the Modified Version under precisely this License, with the Modified |
|||
Version filling the role of the Document, thus licensing distribution |
|||
and modification of the Modified Version to whoever possesses a copy |
|||
of it. In addition, you must do these things in the Modified Version: |
|||
|
|||
@enumerate A |
|||
@item |
|||
Use in the Title Page (and on the covers, if any) a title distinct |
|||
from that of the Document, and from those of previous versions |
|||
(which should, if there were any, be listed in the History section |
|||
of the Document). You may use the same title as a previous version |
|||
if the original publisher of that version gives permission. |
|||
|
|||
@item |
|||
List on the Title Page, as authors, one or more persons or entities |
|||
responsible for authorship of the modifications in the Modified |
|||
Version, together with at least five of the principal authors of the |
|||
Document (all of its principal authors, if it has fewer than five), |
|||
unless they release you from this requirement. |
|||
|
|||
@item |
|||
State on the Title page the name of the publisher of the |
|||
Modified Version, as the publisher. |
|||
|
|||
@item |
|||
Preserve all the copyright notices of the Document. |
|||
|
|||
@item |
|||
Add an appropriate copyright notice for your modifications |
|||
adjacent to the other copyright notices. |
|||
|
|||
@item |
|||
Include, immediately after the copyright notices, a license notice |
|||
giving the public permission to use the Modified Version under the |
|||
terms of this License, in the form shown in the Addendum below. |
|||
|
|||
@item |
|||
Preserve in that license notice the full lists of Invariant Sections |
|||
and required Cover Texts given in the Document's license notice. |
|||
|
|||
@item |
|||
Include an unaltered copy of this License. |
|||
|
|||
@item |
|||
Preserve the section Entitled ``History'', Preserve its Title, and add |
|||
to it an item stating at least the title, year, new authors, and |
|||
publisher of the Modified Version as given on the Title Page. If |
|||
there is no section Entitled ``History'' in the Document, create one |
|||
stating the title, year, authors, and publisher of the Document as |
|||
given on its Title Page, then add an item describing the Modified |
|||
Version as stated in the previous sentence. |
|||
|
|||
@item |
|||
Preserve the network location, if any, given in the Document for |
|||
public access to a Transparent copy of the Document, and likewise |
|||
the network locations given in the Document for previous versions |
|||
it was based on. These may be placed in the ``History'' section. |
|||
You may omit a network location for a work that was published at |
|||
least four years before the Document itself, or if the original |
|||
publisher of the version it refers to gives permission. |
|||
|
|||
@item |
|||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve |
|||
the Title of the section, and preserve in the section all the |
|||
substance and tone of each of the contributor acknowledgements and/or |
|||
dedications given therein. |
|||
|
|||
@item |
|||
Preserve all the Invariant Sections of the Document, |
|||
unaltered in their text and in their titles. Section numbers |
|||
or the equivalent are not considered part of the section titles. |
|||
|
|||
@item |
|||
Delete any section Entitled ``Endorsements''. Such a section |
|||
may not be included in the Modified Version. |
|||
|
|||
@item |
|||
Do not retitle any existing section to be Entitled ``Endorsements'' or |
|||
to conflict in title with any Invariant Section. |
|||
|
|||
@item |
|||
Preserve any Warranty Disclaimers. |
|||
@end enumerate |
|||
|
|||
If the Modified Version includes new front-matter sections or |
|||
appendices that qualify as Secondary Sections and contain no material |
|||
copied from the Document, you may at your option designate some or all |
|||
of these sections as invariant. To do this, add their titles to the |
|||
list of Invariant Sections in the Modified Version's license notice. |
|||
These titles must be distinct from any other section titles. |
|||
|
|||
You may add a section Entitled ``Endorsements'', provided it contains |
|||
nothing but endorsements of your Modified Version by various |
|||
parties---for example, statements of peer review or that the text has |
|||
been approved by an organization as the authoritative definition of a |
|||
standard. |
|||
|
|||
You may add a passage of up to five words as a Front-Cover Text, and a |
|||
passage of up to 25 words as a Back-Cover Text, to the end of the list |
|||
of Cover Texts in the Modified Version. Only one passage of |
|||
Front-Cover Text and one of Back-Cover Text may be added by (or |
|||
through arrangements made by) any one entity. If the Document already |
|||
includes a cover text for the same cover, previously added by you or |
|||
by arrangement made by the same entity you are acting on behalf of, |
|||
you may not add another; but you may replace the old one, on explicit |
|||
permission from the previous publisher that added the old one. |
|||
|
|||
The author(s) and publisher(s) of the Document do not by this License |
|||
give permission to use their names for publicity for or to assert or |
|||
imply endorsement of any Modified Version. |
|||
|
|||
@item |
|||
COMBINING DOCUMENTS |
|||
|
|||
You may combine the Document with other documents released under this |
|||
License, under the terms defined in section 4 above for modified |
|||
versions, provided that you include in the combination all of the |
|||
Invariant Sections of all of the original documents, unmodified, and |
|||
list them all as Invariant Sections of your combined work in its |
|||
license notice, and that you preserve all their Warranty Disclaimers. |
|||
|
|||
The combined work need only contain one copy of this License, and |
|||
multiple identical Invariant Sections may be replaced with a single |
|||
copy. If there are multiple Invariant Sections with the same name but |
|||
different contents, make the title of each such section unique by |
|||
adding at the end of it, in parentheses, the name of the original |
|||
author or publisher of that section if known, or else a unique number. |
|||
Make the same adjustment to the section titles in the list of |
|||
Invariant Sections in the license notice of the combined work. |
|||
|
|||
In the combination, you must combine any sections Entitled ``History'' |
|||
in the various original documents, forming one section Entitled |
|||
``History''; likewise combine any sections Entitled ``Acknowledgements'', |
|||
and any sections Entitled ``Dedications''. You must delete all |
|||
sections Entitled ``Endorsements.'' |
|||
|
|||
@item |
|||
COLLECTIONS OF DOCUMENTS |
|||
|
|||
You may make a collection consisting of the Document and other documents |
|||
released under this License, and replace the individual copies of this |
|||
License in the various documents with a single copy that is included in |
|||
the collection, provided that you follow the rules of this License for |
|||
verbatim copying of each of the documents in all other respects. |
|||
|
|||
You may extract a single document from such a collection, and distribute |
|||
it individually under this License, provided you insert a copy of this |
|||
License into the extracted document, and follow this License in all |
|||
other respects regarding verbatim copying of that document. |
|||
|
|||
@item |
|||
AGGREGATION WITH INDEPENDENT WORKS |
|||
|
|||
A compilation of the Document or its derivatives with other separate |
|||
and independent documents or works, in or on a volume of a storage or |
|||
distribution medium, is called an ``aggregate'' if the copyright |
|||
resulting from the compilation is not used to limit the legal rights |
|||
of the compilation's users beyond what the individual works permit. |
|||
When the Document is included in an aggregate, this License does not |
|||
apply to the other works in the aggregate which are not themselves |
|||
derivative works of the Document. |
|||
|
|||
If the Cover Text requirement of section 3 is applicable to these |
|||
copies of the Document, then if the Document is less than one half of |
|||
the entire aggregate, the Document's Cover Texts may be placed on |
|||
covers that bracket the Document within the aggregate, or the |
|||
electronic equivalent of covers if the Document is in electronic form. |
|||
Otherwise they must appear on printed covers that bracket the whole |
|||
aggregate. |
|||
|
|||
@item |
|||
TRANSLATION |
|||
|
|||
Translation is considered a kind of modification, so you may |
|||
distribute translations of the Document under the terms of section 4. |
|||
Replacing Invariant Sections with translations requires special |
|||
permission from their copyright holders, but you may include |
|||
translations of some or all Invariant Sections in addition to the |
|||
original versions of these Invariant Sections. You may include a |
|||
translation of this License, and all the license notices in the |
|||
Document, and any Warranty Disclaimers, provided that you also include |
|||
the original English version of this License and the original versions |
|||
of those notices and disclaimers. In case of a disagreement between |
|||
the translation and the original version of this License or a notice |
|||
or disclaimer, the original version will prevail. |
|||
|
|||
If a section in the Document is Entitled ``Acknowledgements'', |
|||
``Dedications'', or ``History'', the requirement (section 4) to Preserve |
|||
its Title (section 1) will typically require changing the actual |
|||
title. |
|||
|
|||
@item |
|||
TERMINATION |
|||
|
|||
You may not copy, modify, sublicense, or distribute the Document except |
|||
as expressly provided for under this License. Any other attempt to |
|||
copy, modify, sublicense or distribute the Document is void, and will |
|||
automatically terminate your rights under this License. However, |
|||
parties who have received copies, or rights, from you under this |
|||
License will not have their licenses terminated so long as such |
|||
parties remain in full compliance. |
|||
|
|||
@item |
|||
FUTURE REVISIONS OF THIS LICENSE |
|||
|
|||
The Free Software Foundation may publish new, revised versions |
|||
of the GNU Free Documentation License from time to time. Such new |
|||
versions will be similar in spirit to the present version, but may |
|||
differ in detail to address new problems or concerns. See |
|||
@uref{http://www.gnu.org/copyleft/}. |
|||
|
|||
Each version of the License is given a distinguishing version number. |
|||
If the Document specifies that a particular numbered version of this |
|||
License ``or any later version'' applies to it, you have the option of |
|||
following the terms and conditions either of that specified version or |
|||
of any later version that has been published (not as a draft) by the |
|||
Free Software Foundation. If the Document does not specify a version |
|||
number of this License, you may choose any version ever published (not |
|||
as a draft) by the Free Software Foundation. |
|||
@end enumerate |
|||
|
|||
@page |
|||
@heading ADDENDUM: How to use this License for your documents |
|||
|
|||
To use this License in a document you have written, include a copy of |
|||
the License in the document and put the following copyright and |
|||
license notices just after the title page: |
|||
|
|||
@smallexample |
|||
@group |
|||
Copyright (C) @var{year} @var{your name}. |
|||
Permission is granted to copy, distribute and/or modify this document |
|||
under the terms of the GNU Free Documentation License, Version 1.2 |
|||
or any later version published by the Free Software Foundation; |
|||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover |
|||
Texts. A copy of the license is included in the section entitled ``GNU |
|||
Free Documentation License''. |
|||
@end group |
|||
@end smallexample |
|||
|
|||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, |
|||
replace the ``with@dots{}Texts.'' line with this: |
|||
|
|||
@smallexample |
|||
@group |
|||
with the Invariant Sections being @var{list their titles}, with |
|||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts |
|||
being @var{list}. |
|||
@end group |
|||
@end smallexample |
|||
|
|||
If you have Invariant Sections without Cover Texts, or some other |
|||
combination of the three, merge those two alternatives to suit the |
|||
situation. |
|||
|
|||
If your document contains nontrivial examples of program code, we |
|||
recommend releasing these examples in parallel under your choice of |
|||
free software license, such as the GNU General Public License, |
|||
to permit their use in free software. |
|||
|
|||
@c Local Variables: |
|||
@c ispell-local-pdict: "ispell-dict" |
|||
@c End: |
|||
|
Before Width: 650 | Height: 650 | Size: 51 KiB |
@ -1,594 +0,0 @@ |
|||
\input texinfo @c -*-texinfo-*- |
|||
@c %**start of header |
|||
@documentencoding UTF-8 |
|||
@setfilename movim-reference.info |
|||
@settitle movim-reference |
|||
@setchapternewpage on |
|||
@c %**end of header |
|||
|
|||
@set VERSION 0.2 |
|||
@set UPDATED 28 May 2011 |
|||
|
|||
@copying |
|||
This manual documents Movim (version @value{VERSION}, @value{UPDATED}). |
|||
|
|||
Copyright @copyright{} 2009-2011 MOVIM project. |
|||
@sp 1 |
|||
@quotation |
|||
Permission is granted to copy, distribute and/or modify this document |
|||
under the terms of the GNU Free Documentation License, Version 1.2 |
|||
or any later version published by the Free Software Foundation; |
|||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover |
|||
Texts. A copy of the license is included in the section entitled ``GNU |
|||
Free Documentation License''. |
|||
@end quotation |
|||
@end copying |
|||
|
|||
@titlepage |
|||
@title MOVIM Reference Manual |
|||
@subtitle version @value{VERSION}, @value{UPDATED} |
|||
@vskip 4cm |
|||
@center{@image{movim, 15cm}} |
|||
@author Guillaume Pasquet, Timothée Jaussoin |
|||
@c Copyright page |
|||
@page |
|||
@vskip 0pt plus 1filll |
|||
@insertcopying |
|||
@end titlepage |
|||
|
|||
|
|||
@contents |
|||
|
|||
@ifnottex |
|||
@node Top |
|||
@top MOVIM |
|||
|
|||
This is Movim @value{VERSION}'s manual. |
|||
@end ifnottex |
|||
|
|||
@menu |
|||
* foreword:: What this document is all about |
|||
* introduction:: What is Movim and how to use this document |
|||
* structure:: A description of Movim's internals |
|||
* Widgets API:: Documentation of the widget's API |
|||
* MovimRPC:: The specification of Movim's remote procedure call |
|||
@end menu |
|||
|
|||
@node foreword |
|||
@chapter Foreword |
|||
Movim is an XMPP-based communication platform. It uses a widget-based UI |
|||
system. A widget is a combination of server-side and client-side scripts that |
|||
interact though a custom xmlrpc protocol. |
|||
|
|||
This document describes the principles on which Movim is built, and the API to |
|||
build new widgets. |
|||
|
|||
@node introduction |
|||
@chapter Introduction |
|||
Movim's core is designed to ease the implementation of XMPP web-based clients, |
|||
using massively asynchronous javascript and abstracting XMPP calls into an |
|||
events-based API. |
|||
|
|||
The widgets API doesn't only provide the necessary abstraction and framework to |
|||
communicate through XMPP, it also features a javascript abstration system that |
|||
lets you write as little javascript as possible. Moreover, widgets can embed |
|||
their own resources --- pictures, css, javascript. |
|||
|
|||
@section Requirements |
|||
Movim runs on any web server with PHP and Curl. The detailed requirements are: |
|||
|
|||
@itemize @bullet |
|||
@item |
|||
PHP5.3 or greater with the Curl, JSON, SimpleXML and SQLite3 extensions. |
|||
@item |
|||
A web server: apache, lighttpd (Note that other web servers should work, with |
|||
the possible exception of IIS, which hasn't been tested.) |
|||
@end itemize |
|||
|
|||
An XMPP web server with Bosh is also necessary, but you don't need to install |
|||
one, you can use and existing server. We provide such a server at |
|||
@url{movim.eu}. |
|||
|
|||
@section Getting Movim |
|||
Movim may be downloaded from @url{http://www.movim.eu}. |
|||
|
|||
You can also get the latest development version on our git branch at |
|||
@url{http://gitorious.org/movim}. Be advised that this version is not stable and |
|||
in fact it isn't even guaranteed to work. |
|||
|
|||
@section Installing Movim |
|||
After downloading the Movim archive, simply extract it somewhere in your |
|||
web server's root directory. You will need to give read/write rights to the |
|||
webserver on the folder where Movim is installed. |
|||
|
|||
You should see the installer when you visit your Movim folder from your web |
|||
browser. Follow the steps. |
|||
|
|||
Then you should be able to log in on the website's interface with your XMPP |
|||
credentials. |
|||
|
|||
Please note that not every XMPP server will work with Movim. Your server needs |
|||
to have Bosh enabled for this. You can register an account on the server we |
|||
provide @url{movim.eu} to try out Movim. |
|||
|
|||
@section Helping out |
|||
Movim is Free software under the AGPL license. You can check out the latest |
|||
code at @url{http://gitorious.org/movim}. Feel free to send in merge requests if |
|||
you want to lend a hand. |
|||
|
|||
All bug reports and feedback are welcome at |
|||
@url{http://codingteam.net/project/movim}. You can also help us translating |
|||
Movim so more people may benefit from our Free social network (on the same |
|||
website). |
|||
|
|||
@node structure |
|||
@chapter Internal structure |
|||
Understanding Movim's internals isn't necessary to use it. However, it may |
|||
help finding out problems and developing more efficiently. |
|||
|
|||
Movim is consists of a widgets system and an XMPP abstration that |
|||
communicate together through an asynchronous event handler. This is all |
|||
triggered by a controller, which is loaded depending on the page you visit. |
|||
|
|||
@section XMPP connection |
|||
The XMPP connection is managed by the JAXL library. It abstracts the raw sending |
|||
and receiving of XML messages. Each message is handled and pops up as an |
|||
event. |
|||
|
|||
@section Widgets |
|||
Widgets are small pieces of software that plug into Movim to provide extra |
|||
ability to the system. These are mostly graphical, and generate ajax code |
|||
automatically. |
|||
|
|||
Movim comes with several widgets. These sit in the @file{lib/widgets} |
|||
directory. User-defined widgets should be in the @file{widgets} directory. Note |
|||
that user-defined widgets always shadow the system widgets. |
|||
|
|||
Widgets can declare ajax functions and XMPP event handlers in order to interact |
|||
with their GUI part and the XMPP subsystem. @xref{Widget API} for more |
|||
information. |
|||
|
|||
Note that almost everything in Movim is a widget. Even things like the menu and |
|||
the configuration panel. One notable exception is the login page, which is |
|||
mostly static. |
|||
|
|||
@section Events manager |
|||
The XMPP connection is not aware of the widgets, nor is it able to access |
|||
them. However, the event manager knows what widgets are loaded on the client's |
|||
interface at any time. When the XMPP connection triggers an event in the event |
|||
manager, it loops through all the loaded widgets and executes all handlers that |
|||
are attached to this event. |
|||
|
|||
|
|||
@node Widget API |
|||
@chapter Widget API |
|||
Widgets inherit from the @emph{WidgetBase} base class. The base class automagically |
|||
generates ajax calls and javascript functions for you. |
|||
|
|||
The basic template of a Movim widget is as follows: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
class MyWidget extends WidgetBase |
|||
{ |
|||
function load() |
|||
{ |
|||
$this->registerEvent('incomemessage', 'onIncomingMessage'); |
|||
} |
|||
|
|||
function onIncomingMessage($data) |
|||
{ |
|||
RPC::call('movim_prepend', |
|||
'chatMessages', |
|||
RPC::cdata($data['message'])); |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
?> |
|||
<div id="chatMessages"> |
|||
</div> |
|||
<? |
|||
} |
|||
} |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
Note that the constructor must not be shadowed. Instead the parent class |
|||
provides a @code{load()} function that is called right at the end of the |
|||
parent constructor. |
|||
|
|||
Event handlers must be defined into @code{load()}. |
|||
|
|||
The @code{build()} function is called when the widget is being written onto the |
|||
interface. That's typically where you should put your HTML code. |
|||
|
|||
|
|||
@section Events |
|||
XMPP triggers many different kinds of events that are run against all the loaded |
|||
widgets. In order to process an event, you may register one or more handlers in |
|||
your widget. |
|||
|
|||
@subsection Handling events |
|||
An event handler is a public method that only takes one parameter: |
|||
@code{$data}, which usually is an array that contains the data returned by the |
|||
XMPP server. |
|||
|
|||
Your handlers must be registered in @code{load()} using the method: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
WidgetBase::registerEvent($eventType, $handler) |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@code{$handler} is a the name of the method as a string, and @code{$eventType} |
|||
is the name of the event as a string. |
|||
|
|||
@subsection Event types |
|||
The XMPP subsystem currently raises the following events: |
|||
|
|||
@table @code |
|||
@item postdisconnected |
|||
Event that is triggered immediately after the account has been |
|||
disconnected on the user's request. |
|||
@item incomingemptybody |
|||
A message that comes in without body. This is typically a presence ping. |
|||
@item myvcardreceived |
|||
Your vcard was received. |
|||
@item vcardreceived |
|||
The user's vcard was received. @code{$data} contains the vcard as a base64 |
|||
encoded string. |
|||
@item rosterreceived |
|||
The roster's list was received. @code{$data} is an array of groups and |
|||
users. |
|||
@item incomeactive |
|||
The contact is currently looking at his message list. |
|||
@item incomecomposing |
|||
The contact is writing a message. |
|||
@item incomemessage |
|||
A new message was received (contained in @code{$data}). |
|||
@item incomeoffline |
|||
A contact as gone offline. |
|||
@item incomeaway |
|||
A contact is now marked as away. |
|||
@item incomednd |
|||
A contact is now marked as @emph{do not disturb}. |
|||
@item incomeonline |
|||
A contact is now online. |
|||
@item serverdisconnect |
|||
The server has gone offline. |
|||
@end table |
|||
|
|||
One additional event type is availble: @code{allEvents}. This type of event is a |
|||
catchall that is always executed before the other event handlers in the widget. |
|||
|
|||
The event handling process cannot be interrupted. All loaded widgets will be |
|||
requested to run their eventhandlers, unless of course a fatal error occurs. |
|||
|
|||
@node MovimRPC |
|||
@section MovimRPC |
|||
Movim's javascript and PHP parts communicate through a custom xmlrpc |
|||
protocol. It is implemented in the class @code{MovimRPC} on the PHP side. |
|||
|
|||
MovimRPC exposes two static functions to the widget: |
|||
|
|||
@table @code |
|||
@item RPC::call(funcname, ...) |
|||
Calls the javascript function @emph{funcname} with the rest of arguments. |
|||
@item RPC::cdata(text) |
|||
Packs text into a cdata container. This is useful when passing through |
|||
strings containing messy characters (like HTML). |
|||
@end table |
|||
|
|||
You can define your own javascript functions on a per-widget basis, or use one |
|||
of the standard functions (@xref{Standard javascript callbacks}). |
|||
|
|||
@node Standard javascript callbacks |
|||
@subsection Standard javascript callbacks |
|||
You may define your own javascript callback functions and use them as |
|||
appropriate. Alternatively, Movim comes with a standard set of javascript |
|||
callbacks that allow simple operations on HTML elements (picked up by ID). |
|||
|
|||
@table @code |
|||
@item movim_append(target, string) |
|||
Appends @code{string} to the html element with ID @code{target}. |
|||
@item movim_prepend(target, string) |
|||
Prepends @code{string} to the html element with ID @code{target}. |
|||
@item movim_fill(target, string) |
|||
Fills @code{string} to the html element with ID @code{target}. |
|||
@item movim_drop() |
|||
Doesn't do anything. |
|||
@end table |
|||
|
|||
@node ajaxcalls |
|||
@section Ajax calls |
|||
Any method defined in your widget that starts with @code{ajax} will have a |
|||
javascript ajax call automatically generated. |
|||
|
|||
This ajax call can be explicitely called upon with the method: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
WidgetBase::callAjax($funcname, ...) |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@code{$funcname} is the name of the ajax function. The rest of paramters are |
|||
passed to the ajax-called PHP function. |
|||
|
|||
It is important to understand how the ajax calls work in Movim. Movim uses a |
|||
custom-designed xmlrpc protocol to callback PHP functions directly. Therefore, |
|||
making an ajax call is very similar to making a straight callback in PHP. |
|||
|
|||
So for example if you have defined an ajax function |
|||
|
|||
@code{ajaxMyfunction($param)} |
|||
|
|||
you can call it with |
|||
|
|||
@code{$this->callAjax('ajaxMyfunction', "'myparam'")}. |
|||
|
|||
Here is a complete example of a widget that implements an ajax call: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
class MyWidget extends WidgetBase |
|||
{ |
|||
function ajaxTest($param1, $param2) |
|||
{ |
|||
RPC::call('movim_append', 'test', |
|||
RPC::cdata('<p>Test</p>')); |
|||
} |
|||
|
|||
function build() |
|||
{ |
|||
?> |
|||
<div id="test"></div> |
|||
<input type="button" |
|||
onclick="<? $this->callAjax( |
|||
'ajaxTest', |
|||
'"param1"', |
|||
'2');?>"/> |
|||
<? |
|||
} |
|||
} |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
Note that string parameters passed to the ajax method must be double-quoted. The |
|||
reason for this is that javascript will remove the first set of quotes. Thus |
|||
single-quoted parameters will be javascript objects. |
|||
|
|||
The drawback of @code{WidgetBase::callAjax()} is that it prints the ajax call |
|||
straight away. It is sometimes desirable to have it return the generated |
|||
call. Another variant of the function exists that does this: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
WidgetBase::call($funcname, $callback, $target, ...) |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@node widget-resource |
|||
@section Widget resource |
|||
Widgets can come along with their own resources, in particular their CSS and |
|||
javascript. |
|||
|
|||
The @code{Widget} base class includes two methods to ease the integration of |
|||
custom javascript and css: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
WidgetBase::addjs($jsfile) |
|||
WidgetBase::addcss($cssfile) |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
The file paths given to these functions are relative to the widget's directory. |
|||
|
|||
For resources, you can use the function: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
WidgetBase::respath($file, $fspath = false) |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
This returns the URL to the specified file. The optional parameter |
|||
@code{$fspath} will make the function return the file-system path rather than |
|||
the URL to the file. |
|||
|
|||
@node IWC |
|||
@section Inter-Widget Communication |
|||
Widgets can communicate at two different levels. They can communicate through |
|||
the server using MovimRPC, but this is an awkward route for messages need to get |
|||
down to the server, then up to the other widget. Another manner is to use the |
|||
IWC. |
|||
|
|||
The IWC is basically a javascript-level event manager. In order to use it, your |
|||
widget can either add event handlers so that others can communicate with it, or |
|||
it can send events to other widgets. |
|||
|
|||
This means that you will not be able to use IWC from PHP. You'll need to add a |
|||
javascript resource file along with your widget and define the handlers in it. |
|||
|
|||
Handlers are defined with the function @code{movim_add_event_handler(event_type, |
|||
func)}. An example of it could be: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
function bar() { |
|||
// Do things |
|||
} |
|||
// Adding handler |
|||
movim_add_event_handler('foo', bar); |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
You may however trigger events from anywhere, including the widget's body with |
|||
the function @code{movim_events_emit(event_type)}. |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
<input type="button" onclick="movim_events_emit('foo')" /> |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@node session |
|||
@section Session |
|||
Movim has moved away from using PHP's sessions, which couldn't provide an |
|||
efficient locking and handling of Movim's multi-threaded behaviour. |
|||
|
|||
If you need to store data in session, use Movim's Session class rather than |
|||
PHP's session. The class provides you the following methods. |
|||
|
|||
@table @code |
|||
@item static Session::start($name) |
|||
Starts a session container named $name. Returns the session handle. |
|||
@item Session::get($varname) |
|||
Retrieves the value of $varname. |
|||
@item Session::set($varname, $value) |
|||
Sets the value of $varname to $value. |
|||
@item Session::remove($varname) |
|||
Deletes $varname from the session. |
|||
@item Session::delete_container() |
|||
Deletes the physical storage of the container. |
|||
@item static Session::dispose($name) |
|||
Deletes the container $name along with its physical storage. |
|||
@end table |
|||
|
|||
@node cache |
|||
@section Cache |
|||
Movim uses caching heavily in order to minimise load-time. Depending on how your |
|||
widget works, it might be convenient for you to cache parts of it, or even the |
|||
whole of its html output, rather than regenerate it every time. |
|||
|
|||
Movim's cache is user-specific. So you don't have to worry about your cached |
|||
data being accessible to others. |
|||
|
|||
Movim's Cache provides the following methods: |
|||
|
|||
@table @code |
|||
@item static Cache::create() |
|||
Gets a cache handle. |
|||
@item Cache::handle($key, ...) |
|||
Retrieves or stores one or more objects depending on the way it's |
|||
called. If only $key is provided, handle() will return the corresponding |
|||
cached object. If one or more extra objects are provided, they are cached |
|||
under $key. |
|||
@item static Cache::c($key, ...) |
|||
Shorthand for the two previous functions. |
|||
@end table |
|||
|
|||
Here is an example of how to use Cache in its two different forms: |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
$cache = Cache::create(); |
|||
|
|||
// Storing some object. |
|||
$cache->handle('foo', 'bar', 'baz'); |
|||
|
|||
// Retrieving data |
|||
list($bar, $baz) = $cache->handle('foo'); |
|||
|
|||
// Using the shorthand |
|||
Cache::c('foo', $bar); |
|||
|
|||
// Usual cache routine |
|||
if(!$bar = Cache::c('foo')) { |
|||
Cache::c('foo', $bar); |
|||
} |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
|
|||
@node MovimRPC spec |
|||
@chapter MovimRPC specification |
|||
Movim's interface is highly dynamic and composed of two parts, the server-side |
|||
written in PHP that provides the XMPP connection and the Javascript-side that |
|||
provides the GUI. |
|||
|
|||
Both systems communicate through Ajax. The javascript interface keeps polling |
|||
the server for new calls on the url: |
|||
|
|||
@url{http://mymovim.tld/jajax.php?do=poll} |
|||
|
|||
Whenever an event occurs, a MovimRPC call is sent though this interface. The GUI |
|||
also communicates directly with the server through the same protocol. |
|||
|
|||
@section Function calls |
|||
MovimRPC consists in sending XML-formatted strings that describe a function |
|||
call. Both communicating systems need to be aware of each other's functions set |
|||
as no return is available on a function call. |
|||
|
|||
Instead of returning data after a function call, the called system triggers a |
|||
movimRPC call to the calling system, feeding it the appropriate data as |
|||
paramaters. |
|||
|
|||
Messy strings parameters (e.g. those containing HTML code) need to be enclosed |
|||
in CDATA markups. |
|||
|
|||
One MovimRPC document can contain more than one function call. All function |
|||
calls need to be enclosed in @code{<movimcontainer>} tags. Function calls are |
|||
defined with the @code{<funcall>}. Each function parameter is enclosed in |
|||
@code{<param>} tags. |
|||
|
|||
Function calls must have a @code{NAME} parameter, and accept a @code{WIDGET} |
|||
parameter. |
|||
|
|||
Here is an example of a call to the function @code{myfunc} of the widget |
|||
@code{MyWidget} with the relevant parameters. |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<movimcontainer> |
|||
<funcall name="myfunc" widget="MyWidget"> |
|||
<param>foo</param> |
|||
<param>bar</param> |
|||
</funcall> |
|||
</movimcontainer> |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@section Parameters |
|||
The parameters passed to a function aren't typed. The required type needs to be |
|||
known by the caller. |
|||
|
|||
Arrays can be passed within parameters. Arrays may be associative or mixed or |
|||
not. They are declared within @code{<array>} tags. Each element in the array is |
|||
enclosed by @code{<arrayelt>} tags. Elements can be associated to a key with the |
|||
@code{NAME} parameter. |
|||
|
|||
An example of two function calls with an associative array. |
|||
|
|||
@cartouche |
|||
@verbatim |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<movimcontainer> |
|||
<funcall name="myfunc" widget="MyWidget"> |
|||
<param>foo</param> |
|||
<param>bar</param> |
|||
</funcall> |
|||
<funcall name="toto"> |
|||
<param>foo</param> |
|||
<param> |
|||
<array> |
|||
<arrayelt name="elt1">1</arrayelt> |
|||
<arrayelt name="2">associative</arrayelt> |
|||
<arrayelt>sequential</arrayelt> |
|||
</array> |
|||
</param> |
|||
</funcall> |
|||
</movimcontainer> |
|||
@end verbatim |
|||
@end cartouche |
|||
|
|||
@node license |
|||
@comment node-name, next, previous, up |
|||
@chapter GNU Free Documentation License |
|||
@include fdl.texi |
|||
|
|||
@bye |
@ -1,60 +0,0 @@ |
|||
body { |
|||
font-size: 10pt; |
|||
text-align: left; |
|||
width: 900px; |
|||
margin: auto auto; |
|||
background: white; |
|||
/* Borders */ |
|||
border-right: 5px solid #999; |
|||
border-bottom: 5px solid #999; |
|||
border-left: 5px solid #999; |
|||
padding: 10px; |
|||
/* Rounded corners */ |
|||
border-bottom-right-radius: 10px; |
|||
border-bottom-left-radius: 10px; |
|||
-moz-border-radius-bottomright: 10px; |
|||
-moz-border-radius-bottomleft: 10px; |
|||
} |
|||
|
|||
/* Text styles */ |
|||
h1 { |
|||
color: #555; |
|||
font-size: 200%; |
|||
} |
|||
h2 { |
|||
color: #666; |
|||
font-size: 150%; |
|||
} |
|||
h3, h4, h5 { |
|||
color: #777; |
|||
} |
|||
code { |
|||
background: #EEE; |
|||
font-family: Monaco,monospace; |
|||
font-size: 10pt; |
|||
border: 1px solid #999; |
|||
padding: 0 0.2em; |
|||
} |
|||
.cartouche { |
|||
background: #EEE; |
|||
border: 1px solid #999; |
|||
border-collapse: collapse; |
|||
margin: auto; |
|||
} |
|||
.cartouche td .verbatim { |
|||
padding: 0 1em; |
|||
} |
|||
hr { |
|||
background: #999; |
|||
border: 1px solid #AAA; |
|||
} |
|||
a { |
|||
color: #385D7C; |
|||
text-decoration: none; |
|||
} |
|||
a:hover { |
|||
text-decoration: underline; |
|||
} |
|||
a img { |
|||
border: none; |
|||
} |
@ -1 +0,0 @@ |
|||
@SECTION_BUTTONS=() |
@ -1,170 +0,0 @@ |
|||
/** |
|||
* Movim RPC class. |
|||
* |
|||
* Implements an abstraction to access MOVIM's RPC system. This includes |
|||
* facilities to simply call functions. |
|||
* |
|||
* This also includes functions to make arrays etc. |
|||
*/ |
|||
var movim_xmlhttp; |
|||
var movim_xmlhttp_hash = {}; |
|||
|
|||
function MovimRPC() |
|||
{ |
|||
/* Methods */ |
|||
/** |
|||
* Generates a new XMLHttpRequest object in a portable fashion. |
|||
*/ |
|||
this.make_xmlhttp = function() |
|||
{ |
|||
if (window.XMLHttpRequest) {// code for real browsers
|
|||
return new XMLHttpRequest(); |
|||
} else {// code for IE6, IE5
|
|||
return new ActiveXObject("Microsoft.XMLHTTP"); |
|||
} |
|||
}; |
|||
|
|||
this.startRequest = function(key) |
|||
{ |
|||
movim_xmlhttp_hash[this.key] = 1; |
|||
} |
|||
|
|||
this.endRequest = function(key) |
|||
{ |
|||
delete movim_xmlhttp_hash[this.key]; |
|||
} |
|||
|
|||
/** |
|||
* Sends data to the movim server through ajax. |
|||
* |
|||
* The provided mode determines what will become of the returned data. It |
|||
* can either be processed by a callback function provided as modeopt or |
|||
* it can append, prepend or fill the contents of the element which ID is |
|||
* modeopt. |
|||
*/ |
|||
this.commit = function() |
|||
{ |
|||
movim_xmlhttp = this.make_xmlhttp(); |
|||
|
|||
if(FAIL_SAFE) |
|||
var fail_safe = '?fail_safe=1'; |
|||
else |
|||
var fail_safe = ''; |
|||
|
|||
movim_xmlhttp.open('POST', BASE_URI+'jajax.php'+fail_safe, true); |
|||
|
|||
movim_xmlhttp = this.set_key(movim_xmlhttp); |
|||
|
|||
movim_xmlhttp.addEventListener('loadstart', this.startRequest, false); |
|||
movim_xmlhttp.addEventListener('loadend', this.endRequest, false); |
|||
|
|||
var handler = this.handle_rpc_json; |
|||
|
|||
movim_xmlhttp.onreadystatechange = function() { |
|||
if(movim_xmlhttp.readyState == 4 && movim_xmlhttp.status == 500) |
|||
movim_disconnect('internal'); |
|||
else if(movim_xmlhttp.readyState == 4) { |
|||
handler(movim_xmlhttp.response); |
|||
} |
|||
}; |
|||
|
|||
movim_xmlhttp.setRequestHeader("Content-Type", "application/json; charset=utf-8"); |
|||
|
|||
var json = this.generate_json(); |
|||
movim_xmlhttp.send(json); |
|||
}; |
|||
|
|||
/** |
|||
* Attach a key to the object |
|||
*/ |
|||
this.set_key = function(movim_xmlhttp) |
|||
{ |
|||
movim_xmlhttp.key = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5); |
|||
return movim_xmlhttp; |
|||
}; |
|||
|
|||
/** |
|||
* What widget do we call? |
|||
*/ |
|||
this.set_widget = function(widgetname) |
|||
{ |
|||
this.widget = widgetname; |
|||
}; |
|||
|
|||
/** |
|||
* What function to call in Movim? |
|||
*/ |
|||
this.set_func = function(funcname) |
|||
{ |
|||
this.func = funcname; |
|||
}; |
|||
|
|||
/** |
|||
* Adds a parameter to the called function. |
|||
*/ |
|||
this.add_param = function(param) |
|||
{ |
|||
this.params.push(param); |
|||
}; |
|||
|
|||
/** |
|||
* Sets all movim call parameters at once. |
|||
*/ |
|||
this.set_call = function(widget, func, params) |
|||
{ |
|||
this.set_widget(widget); |
|||
this.set_func(func); |
|||
this.params = params; |
|||
}; |
|||
|
|||
/** |
|||
* Handles returns (xmlrpc) |
|||
*/ |
|||
this.handle_rpc_json = function(json) |
|||
{ |
|||
var funcalls = eval(json); |
|||
if(funcalls != null) { |
|||
for(h = 0; h < funcalls.length; h++) { |
|||
var funcall = funcalls[h]; |
|||
|
|||
if(funcall.func != null && eval("typeof " + funcall.func) == "function") { |
|||
var funcs = funcall.func.split('.'); |
|||
|
|||
try { |
|||
if(funcs.length == 1) |
|||
window[funcs[0]](funcall.params); |
|||
else if(funcs.length == 2) |
|||
window[funcs[0]][funcs[1]](funcall.params); |
|||
} |
|||
catch(err) { |
|||
console.log("Error caught: " + err.toString() + " - " +funcall.func); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* Generates the JSON document corresponding to the provided parameters. |
|||
*/ |
|||
this.generate_json = function() |
|||
{ |
|||
return JSON.stringify(this); |
|||
}; |
|||
|
|||
/* Properties */ |
|||
this.widget = ''; |
|||
this.func = ''; |
|||
this.params = []; |
|||
} |
|||
|
|||
/** |
|||
* Putting it all together. |
|||
*/ |
|||
function movim_ajaxSend(widget, func, parameters) |
|||
{ |
|||
rpc.set_call(widget, func, parameters); |
|||
rpc.commit(); |
|||
} |
|||
|
|||
var rpc = new MovimRPC(); // Initialising global rpc handler.
|
@ -0,0 +1,11 @@ |
|||
<?php |
|||
|
|||
class FeedController extends BaseController { |
|||
function load() { |
|||
$this->session_only = false; |
|||
$this->raw = true; |
|||
} |
|||
|
|||
function dispatch() { |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
<?php |
|||
|
|||
class RoomController extends BaseController { |
|||
function load() { |
|||
} |
|||
|
|||
function dispatch() { |
|||
$this->page->setTitle(__('page.room')); |
|||
} |
|||
} |
@ -0,0 +1 @@ |
|||
<?php $this->widget('Syndication');?> |
@ -0,0 +1,11 @@ |
|||
<?php $this->widget('Presence'); ?> |
|||
<?php $this->widget('LoginAnonymous'); ?> |
|||
<main> |
|||
<?php $this->widget('Header');?> |
|||
<section> |
|||
<div> |
|||
<?php $this->widget('Rooms'); ?> |
|||
</div> |
|||
<?php $this->widget('Chat'); ?> |
|||
</section> |
|||
</main> |
@ -0,0 +1,32 @@ |
|||
<section class="scroll"> |
|||
<form name="command" data-sessionid="{$attributes->sessionid}" data-node="{$attributes->node}"> |
|||
{$form} |
|||
</form> |
|||
</section> |
|||
<div> |
|||
<a onclick="Dialog.clear()" class="button flat"> |
|||
{$c->__('button.close')} |
|||
</a> |
|||
{if="$actions != null"} |
|||
{if="isset($actions->next)"} |
|||
<a onclick="AdHoc.submit()" class="button flat"> |
|||
{$c->__('button.next')} |
|||
</a> |
|||
{/if} |
|||
{if="isset($actions->previous)"} |
|||
<a onclick="" class="button flat"> |
|||
{$c->__('button.previous')} |
|||
</a> |
|||
{/if} |
|||
{if="isset($actions->cancel)"} |
|||
<a onclick="" class="button flat"> |
|||
{$c->__('button.cancel')} |
|||
</a> |
|||
{/if} |
|||
{if="isset($actions->complete)"} |
|||
<!--<a onclick="" class="button flat"> |
|||
{$c->__('button.submit')} |
|||
</a>--> |
|||
{/if} |
|||
{/if} |
|||
</div> |
@ -1,91 +0,0 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file AccountError.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The account creation widget error. |
|||
* |
|||
* @author Timothée Jaussoin <edhelas@gmail.com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 25 November 2011 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class AccountError extends WidgetBase { |
|||
|
|||
function load() |
|||
{ |
|||
} |
|||
|
|||
function display() |
|||
{ |
|||
$warning = ''; |
|||
|
|||
if(isset($_GET['err'])) |
|||
switch ($_GET['err']) { |
|||
case 'datamissing': |
|||
$warning = ' |
|||
<div class="message warning"> |
|||
'.$this->__('error.data_missing').' |
|||
</div> '; |
|||
break; |
|||
case 'jiderror': |
|||
$warning = ' |
|||
<div class="message warning"> |
|||
'.$this->__('error.jid_error').' |
|||
</div> '; |
|||
break; |
|||
case 'passworddiff': |
|||
$warning = ' |
|||
<div class="message info"> |
|||
'.$this->__('error.password_diff').' |
|||
</div> '; |
|||
break; |
|||
case 'nameerr': |
|||
$warning = ' |
|||
<div class="message warning"> |
|||
'.$this->__('error.name_error').' |
|||
</div> '; |
|||
break; |
|||
case 'notacceptable': |
|||
$warning = ' |
|||
<div class="message error"> |
|||
'.$this->__('error.not_acceptable').' |
|||
</div> '; |
|||
break; |
|||
case 'userconflict': |
|||
$warning = ' |
|||
<div class="message warning"> |
|||
'.$this->__('error.user_conflict').' |
|||
</div> '; |
|||
break; |
|||
case 'xmppconnect': |
|||
$warning = ' |
|||
<div class="message error"> |
|||
'.$this->__('error.xmpp_connect').' |
|||
</div> '; |
|||
break; |
|||
case 'xmppcomm': |
|||
$warning = ' |
|||
<div class="message error"> |
|||
'.$this->__('error.xmpp_communicate').' |
|||
</div> '; |
|||
break; |
|||
case 'unknown': |
|||
$warning = ' |
|||
<div class="message error"> |
|||
'.$this->__('error.unknown').' |
|||
</div> '; |
|||
break; |
|||
} |
|||
|
|||
$this->view->assign('warning', $warning); |
|||
} |
|||
} |
@ -1 +0,0 @@ |
|||
{$warning} |
@ -1,10 +0,0 @@ |
|||
error.data_missing = 'Some data are missing !' |
|||
error.jid_error = 'Wrong ID' |
|||
error.password_diff = 'You entered different passwords' |
|||
error.name_error = 'Invalid name' |
|||
error.not_acceptable = 'Request not acceptable' |
|||
error.user_conflict = 'Username already taken' |
|||
error.xmpp_connect = 'Could not connect to the XMPP server' |
|||
error.xmpp_communicate = 'Could not communicate with the XMPP server' |
|||
error.unknown = 'Unknown error' |
|||
|
@ -1,3 +1,3 @@ |
|||
#subscription_form form > div { |
|||
padding-left: 2rem; |
|||
left: 2rem; |
|||
} |
@ -1,39 +1,6 @@ |
|||
<br /> |
|||
<h2>{$c->__('explore')}</h2> |
|||
|
|||
<ul class="flex card active thick"> |
|||
{loop="$users"} |
|||
<li class="{if="$value->description != ''"}condensed{/if} block" style="background-image: url();" onclick="Contact_ajaxGetContact('{$value->jid}');"> |
|||
{$url = $value->getPhoto('s')} |
|||
{if="$url"} |
|||
<span class="icon bubble"> |
|||
<img src="{$url}"> |
|||
</span> |
|||
{else} |
|||
<span class="icon bubble color {$value->jid|stringToColor}"> |
|||
<i class="md md-person"></i> |
|||
</span> |
|||
{/if} |
|||
|
|||
<span>{$value->getTrueName()}</span> |
|||
|
|||
{if="$value->getAge()"} |
|||
<span class="info">{$c->__('age.years', $value->getAge())}</span> |
|||
{/if} |
|||
{if="$value->getGender()"} |
|||
<span class="info">{$value->getGender()}</span> |
|||
{/if} |
|||
<!-- |
|||
{if="$value->getMarital()"} |
|||
<span class="info">{$value->getMarital()}</span> |
|||
{/if} |
|||
--> |
|||
|
|||
{if="$value->description != ''"} |
|||
<p> |
|||
{$value->description|strip_tags} |
|||
</p> |
|||
{/if} |
|||
</li> |
|||
{/loop} |
|||
<ul id="public_list" class="flex card active middle"> |
|||
{$users} |
|||
</ul> |
@ -0,0 +1,44 @@ |
|||
{loop="$users"} |
|||
<li class="{if="$value->description != ''"}condensed{/if} block" style="background-image: url();" onclick="Contact_ajaxGetContact('{$value->jid}');"> |
|||
{$url = $value->getPhoto('s')} |
|||
{if="$url"} |
|||
<span class="icon bubble"> |
|||
<img src="{$url}"> |
|||
</span> |
|||
{else} |
|||
<span class="icon bubble color {$value->jid|stringToColor}"> |
|||
<i class="md md-person"></i> |
|||
</span> |
|||
{/if} |
|||
|
|||
<span>{$value->getTrueName()}</span> |
|||
|
|||
{if="$value->getAge()"} |
|||
<span class="info">{$c->__('age.years', $value->getAge())}</span> |
|||
{/if} |
|||
{if="$value->getGender()"} |
|||
<span class="info">{$value->getGender()}</span> |
|||
{/if} |
|||
<!-- |
|||
{if="$value->getMarital()"} |
|||
<span class="info">{$value->getMarital()}</span> |
|||
{/if} |
|||
--> |
|||
|
|||
{if="$value->description != ''"} |
|||
<p> |
|||
{$value->description|strip_tags} |
|||
</p> |
|||
{/if} |
|||
</li> |
|||
{/loop} |
|||
{if="$pages"} |
|||
<li class="block condensed"> |
|||
<span class="icon gray"> |
|||
<i class="md md-my-library-books"></i> |
|||
</span> |
|||
{loop="$pages"} |
|||
<a onclick="Contact_ajaxPublic('{$key}');" class="button flat {if="$key == $page"}on{/if}">{$key+1}</a> |
|||
{/loop} |
|||
</li> |
|||
{/if} |
@ -1,3 +1,3 @@ |
|||
<a onclick="Group_ajaxPublish()" class="button action color"> |
|||
<a onclick="Publish_ajaxTestPublish('{$server}','{$node}')" class="button action color"> |
|||
<i class="md md-create"></i> |
|||
</a> |
@ -1,3 +1,12 @@ |
|||
<div id="group_widget" class="divided spinner"> |
|||
{$c->prepareEmpty()} |
|||
{if="$server && $node"} |
|||
<script type="text/javascript"> |
|||
MovimWebsocket.attach(function() { |
|||
Group_ajaxGetItems('{$server}', '{$node}'); |
|||
Group_ajaxGetMetadata('{$server}', '{$node}'); |
|||
Group_ajaxGetAffiliations('{$server}', '{$node}'); |
|||
}); |
|||
</script> |
|||
{/if} |
|||
</div> |
@ -0,0 +1,6 @@ |
|||
<div> |
|||
<a href="{$c->route('main')}" class="classic"> |
|||
<span id="menu" class="icon"><i class="md md-home"></i></span> |
|||
</a> |
|||
<h2>{$c->__('page.about')}</h2> |
|||
</div> |
@ -1,5 +1,5 @@ |
|||
<div> |
|||
<span id="menu" class="on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="md md-menu"></i></span> |
|||
<span class="on_desktop icon"><i class="md md-view-list"></i></span> |
|||
<span class="on_desktop icon"><i class="md md-home"></i></span> |
|||
<h2 class="r1">{$c->__('page.home')}</h2> |
|||
</div> |
@ -0,0 +1,4 @@ |
|||
<div> |
|||
<span class="icon"><i class="md md-forum"></i></span> |
|||
<h2 class="r1">{$c->__('page.room')}</h2> |
|||
</div> |
@ -1,8 +1,8 @@ |
|||
[menu] |
|||
menu.all = 'All' |
|||
menu.news = 'News' |
|||
menu.groups = 'Groups' |
|||
menu.contacts = 'Contacts' |
|||
menu.refresh = 'Refresh all the streams' |
|||
|
|||
[roster] |
|||
roster.search = 'Search' |
|||
roster.search = 'Search in your contacts' |
@ -0,0 +1,59 @@ |
|||
<?php |
|||
|
|||
use Respect\Validation\Validator; |
|||
|
|||
class LoginAnonymous extends WidgetBase |
|||
{ |
|||
function load() |
|||
{ |
|||
$this->addjs('loginanonymous.js'); |
|||
$this->registerEvent('session_start_handle', 'onStart'); |
|||
} |
|||
|
|||
function onStart($packet) |
|||
{ |
|||
$session = \Sessionx::start(); |
|||
$session->load(); |
|||
|
|||
if($session->mechanism == 'ANONYMOUS') { |
|||
RPC::call('Rooms.anonymousJoin'); |
|||
} |
|||
} |
|||
|
|||
function display() |
|||
{ |
|||
|
|||
} |
|||
|
|||
function ajaxLogin($username) |
|||
{ |
|||
$validate_user = Validator::string()->length(4, 40); |
|||
if(!$validate_user->validate($username)) { |
|||
Notification::append(null, $this->__('login_anonymous.bad_username')); |
|||
return; |
|||
} |
|||
|
|||
// We get the Server Configuration
|
|||
$cd = new \Modl\ConfigDAO; |
|||
$config = $cd->get(); |
|||
|
|||
$host = 'anonymous.jappix.com'; |
|||
$password = 'AmISnowden?'; |
|||
|
|||
// We try to get the domain
|
|||
$domain = \Moxl\Utils::getDomain($host); |
|||
|
|||
// We launch the XMPP socket
|
|||
RPC::call('register', $host); |
|||
|
|||
// We set the username in the session
|
|||
$s = Session::start(); |
|||
$s->set('username', $username); |
|||
|
|||
// We create a new session or clear the old one
|
|||
$s = Sessionx::start(); |
|||
$s->init($username, $password, $host, $domain); |
|||
|
|||
\Moxl\Stanza\Stream::init($host); |
|||
} |
|||
} |
@ -0,0 +1,2 @@ |
|||
[login_anonymous] |
|||
login_anonymous.bad_username = 'Bad nickname (between 4 and 40 characters)' |
@ -0,0 +1,8 @@ |
|||
window.onbeforeunload = function() { |
|||
//Presence_ajaxLogout();
|
|||
} |
|||
|
|||
MovimWebsocket.attach(function() { |
|||
// We register the socket
|
|||
MovimWebsocket.connection.register('anonymous.jappix.com'); |
|||
}); |
@ -0,0 +1 @@ |
|||
|
@ -1,186 +0,0 @@ |
|||
<?php |
|||
|
|||
/** |
|||
* @package Widgets |
|||
* |
|||
* @file Media.php |
|||
* This file is part of MOVIM. |
|||
* |
|||
* @brief The media manager. |
|||
* |
|||
* @author Timothée Jaussoin <edhelas@gmail.com> |
|||
* |
|||
* @version 1.0 |
|||
* @date 07 December 2011 |
|||
* |
|||
* Copyright (C)2010 MOVIM project |
|||
* |
|||
* See COPYING for licensing information. |
|||
*/ |
|||
|
|||
class Media extends WidgetBase { |
|||
function load() |
|||
{ |
|||
$this->addcss('media.css'); |
|||
$this->addjs('media.js'); |
|||
|
|||
if(isset($this->user) |
|||
&& !is_dir($this->user->userdir) |
|||
&& $this->user->userdir != '') { |
|||
mkdir($this->user->userdir); |
|||
touch($this->user->userdir.'index.html'); |
|||
} |
|||
|
|||
$this->registerEvent('media', 'onMediaUploaded'); |
|||
} |
|||
|
|||
function display() { |
|||
$this->view->assign('refresh', $this->call('ajaxRefreshMedia')); |
|||
} |
|||
|
|||
function ajaxRefreshMedia() |
|||
{ |
|||
$html = $this->mainFolder(); |
|||
RPC::call('movim_fill', 'media', $html); |
|||
RPC::commit(); |
|||
} |
|||
|
|||
function ajaxDeleteItem($name) |
|||
{ |
|||
unlink($this->user->userdir.$name); |
|||
|
|||
$this->ajaxRefreshMedia(); |
|||
} |
|||
|
|||
function listFiles() |
|||
{ |
|||
if(empty($this->user->getDir())) { |
|||
$mediaempty = $this->tpl(); |
|||
return $mediaempty->draw('_media_empty', true); |
|||
} |
|||
|
|||
$html = '<ul class="thumb">'; |
|||
|
|||
foreach($this->user->getDir() as $file) { |
|||
$p = new \Picture; |
|||
|
|||
// Just to prevent issue when you update from an old Movim version
|
|||
if($p->get($this->user->userdir.$file, 300) == false) { |
|||
$p->fromPath($this->user->userdir.$file); |
|||
$p->set($this->user->userdir.$file); |
|||
} |
|||
|
|||
$html .= |
|||
'<li style="background-image: url('.$p->get($this->user->userdir.$file, 300).');">
|
|||
<a href="'.Route::urlize('media', $file).'"> |
|||
</a> |
|||
<div |
|||
class="remove" |
|||
onclick="'.
|
|||
$this->call( |
|||
'ajaxDeleteItem', |
|||
"'".$file."'" |
|||
).'">
|
|||
<i class="fa fa-times"></i> |
|||
</div> |
|||
</li> |
|||
'; |
|||
} |
|||
|
|||
$html .= '</ul>'; |
|||
|
|||
return $html; |
|||
} |
|||
|
|||
function mainFolder() |
|||
{ |
|||
$percent = number_format(($this->user->dirSize()/$this->user->sizelimit)*100, 2); |
|||
|
|||
$html = |
|||
$this->listFiles().' |
|||
<span class="size" |
|||
title="'.sizeToCleanSize($this->user->dirSize()).' '.$this->__('media.on').' '.sizeToCleanSize($this->user->sizelimit).'" |
|||
>'. |
|||
$percent.'% |
|||
</span>'; |
|||
|
|||
return $html; |
|||
} |
|||
|
|||
function pictureViewer($f) |
|||
{ |
|||
if(file_exists($this->user->userdir.$f) && getimagesize($this->user->userdir.$f) != 0) { |
|||
|
|||
$er = @exif_read_data($this->user->userdir.$f); |
|||
|
|||
$exif = ''; |
|||
|
|||
if($er) { |
|||
if(isset($er['FileName'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.name').'</span>'. |
|||
$er['FileName'].' |
|||
</li>'; |
|||
if(isset($er['COMPUTED']['Width']) && isset($er['COMPUTED']['Height'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.resolution').'</span>'. |
|||
$er['COMPUTED']['Width'].'x'.$er['COMPUTED']['Height'].' |
|||
</li>'; |
|||
if(isset($er['FileSize'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.size').'</span>'. |
|||
sizeToCleanSize($er['FileSize']).' |
|||
</li>'; |
|||
if(isset($er['DateTime'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.date').'</span>'. |
|||
prepareDate(strtotime($er['DateTime'])).' |
|||
</li>'; |
|||
if(isset($er['ISOSpeedRatings'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.iso').'</span>'. |
|||
$er['ISOSpeedRatings'].' |
|||
</li>'; |
|||
if(isset($er['Model'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.camera').'</span>'. |
|||
$er['Model'].' |
|||
</li>'; |
|||
if(isset($er['Artist'])) |
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.artist').'</span>'. |
|||
$er['Artist'].' |
|||
</li>'; |
|||
} |
|||
|
|||
$exif .= ' |
|||
<li> |
|||
<span>'.$this->__('media.original').'</span> |
|||
<a target="_blank" href="'.$this->user->useruri.$f.'">'. |
|||
$this->__('media.link').' |
|||
</a> |
|||
</li>'; |
|||
|
|||
$html = ' |
|||
<div class="viewer"> |
|||
<img src="'.$this->user->useruri.$f.'" style="max-width: '.$er['COMPUTED']['Width'].'px"/> |
|||
|
|||
<div class="exif"> |
|||
<ul> |
|||
'.$exif.' |
|||
</ul> |
|||
</div> |
|||
</div>'; |
|||
|
|||
return $html; |
|||
} |
|||
} |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue