Initial commit (files from DA)
This commit is contained in:
commit
2f708eb6d9
25 changed files with 4418 additions and 0 deletions
63
CHANGELOG
Normal file
63
CHANGELOG
Normal file
|
@ -0,0 +1,63 @@
|
|||
cinecturlink2 0.7 - 2013-11-03
|
||||
===========================================================
|
||||
* Switch to Dotclear 2.6
|
||||
* Add dashboard icon
|
||||
* Clean up code
|
||||
|
||||
cinecturlink2 0.6.3 - 2010-11-12
|
||||
===========================================================
|
||||
* Fixed install on nightly build
|
||||
|
||||
cinecturlink2 0.6.2 - 2010-07-07
|
||||
===========================================================
|
||||
* Fixed error on non-existing repository (tks Geraldine)
|
||||
|
||||
cinecturlink2 0.6.1 - 2010-06-11
|
||||
===========================================================
|
||||
* Removed rateIt behaviors (included in rateIt > 2.0)
|
||||
|
||||
cinecturlink2 0.6 - 2010-06-06
|
||||
===========================================================
|
||||
* Switched to DC 2.2
|
||||
* Fixed minor bugs
|
||||
* Changed admin interface
|
||||
|
||||
cinecturlink2 0.5.4 - 2010-03-06
|
||||
===========================================================
|
||||
* Removed behavior when update only link_count
|
||||
|
||||
cinecturlink2 0.5.3 - 2010-03-01
|
||||
===========================================================
|
||||
* Fixed bug with null values
|
||||
* Cleaned add and update functions
|
||||
|
||||
cinecturlink2 0.5.1 - 2010-01-27
|
||||
===========================================================
|
||||
* Fixed PostgreSQL compatibility on table creation
|
||||
|
||||
cinecturlink2 0.5 - 2010-01-15
|
||||
===========================================================
|
||||
* Added a public page with navigation and categories
|
||||
* Added RSS/Atom feeds
|
||||
* Added new sort option on widget
|
||||
* Added support of plugin sitemap
|
||||
* Added support of plugin rateIt (first step)
|
||||
* Fixed author note on new link
|
||||
* Fixed typo
|
||||
* Prepared DC 2.2 Break
|
||||
|
||||
cinecturlink2 0.3 - 2009-10-26
|
||||
===========================================================
|
||||
* Removed option "open in new window"
|
||||
* Added option "enable link" on widget
|
||||
* Added option "random order" on widget
|
||||
* Added reports to plugin activityReport
|
||||
|
||||
cinecturlink2 0.2 - 2009-10-21
|
||||
===========================================================
|
||||
* Fixed cat_id in admin
|
||||
* Added trigger to update public side
|
||||
|
||||
cinecturlink2 0.1 - 2009-10-19
|
||||
===========================================================
|
||||
* First lab release
|
339
LICENSE
Normal file
339
LICENSE
Normal file
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, 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.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program 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.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public 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.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
36
README.md
Normal file
36
README.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# README
|
||||
|
||||
## WHAT IS CINECTURLINK2 ?
|
||||
|
||||
cinecturlink2 is a plugin for the open-source
|
||||
web publishing software called Dotclear.
|
||||
|
||||
It help you to share books, musics and more with your visitor.
|
||||
It is hightly based on cinecturlink for Dotclear 1
|
||||
by Tigroux and maintain by brol.
|
||||
|
||||
## REQUIREMENTS
|
||||
|
||||
cinecturlink2 requires:
|
||||
|
||||
* admin perms for configuration
|
||||
* contentadmin permissions for management
|
||||
* Dotclear 2.6
|
||||
* A writable directory on public path to store picture
|
||||
* Note: it also creates dedicated database tables
|
||||
|
||||
## USAGE
|
||||
|
||||
First install cinecturlink2, manualy from a zip package or from
|
||||
Dotaddict repository. (See Dotclear's documentation to know how do this)
|
||||
|
||||
Go to ''plugins manager'', expand cinecturlink2 information then
|
||||
go to ''configure plugin'', fill in form.
|
||||
|
||||
Once it's done you can manage your cinecturlink from menu
|
||||
''My cinecturlink'' on sidebar or you can add dashboard icon.
|
||||
|
||||
There are templates for public page. These template is adapted to
|
||||
default Dotclear's theme. If you want to create your own template
|
||||
for your theme, copy files from cinecturlink2/default-templates
|
||||
to your theme tpl path and adapt them.
|
65
_admin.php
Normal file
65
_admin.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/_widgets.php';
|
||||
|
||||
# Admin menu
|
||||
$_menu['Plugins']->addItem(
|
||||
__('My cinecturlink'),
|
||||
'plugin.php?p=cinecturlink2',
|
||||
'index.php?pf=cinecturlink2/icon.png',
|
||||
preg_match(
|
||||
'/plugin.php\?p=cinecturlink2(&.*)?$/',
|
||||
$_SERVER['REQUEST_URI'])
|
||||
,
|
||||
$core->auth->check('contentadmin', $core->blog->id)
|
||||
);
|
||||
|
||||
$core->addBehavior(
|
||||
'adminDashboardFavorites',
|
||||
array('cinecturlink2AdminBehaviors', 'adminDashboardFavorites')
|
||||
);
|
||||
|
||||
class cinecturlink2AdminBehaviors
|
||||
{
|
||||
public static function adminDashboardFavorites($core, $favs)
|
||||
{
|
||||
$favs->register('cinecturlink2', array(
|
||||
'title' => __('My cinecturlink'),
|
||||
'url' => 'plugin.php?p=cinecturlink2#links',
|
||||
'small-icon' => 'index.php?pf=cinecturlink2/icon.png',
|
||||
'large-icon' => 'index.php?pf=cinecturlink2/icon-big.png',
|
||||
'permissions' => $core->auth->check(
|
||||
'contentadmin',
|
||||
$core->blog->id
|
||||
),
|
||||
'active_cb' => array(
|
||||
'cinecturlink2AdminBehaviors',
|
||||
'adminDashboardFavoritesActive'
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public static function adminDashboardFavoritesActive($request, $params)
|
||||
{
|
||||
return $request == 'plugin.php'
|
||||
&& isset($params['p'])
|
||||
&& $params['p'] == 'cinecturlink2';
|
||||
}
|
||||
}
|
144
_config.php
Normal file
144
_config.php
Normal file
|
@ -0,0 +1,144 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_MODULE')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$redir = empty($_REQUEST['redir']) ?
|
||||
$list->getURL().'#plugins' : $_REQUEST['redir'];
|
||||
|
||||
# -- Get settings --
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
$s = $core->blog->settings->cinecturlink2;
|
||||
$cinecturlink2_active = (boolean) $s->cinecturlink2_active;
|
||||
$cinecturlink2_widthmax = abs((integer) $s->cinecturlink2_widthmax);
|
||||
$cinecturlink2_folder = (string) $s->cinecturlink2_folder;
|
||||
$cinecturlink2_triggeronrandom = (boolean) $s->cinecturlink2_triggeronrandom;
|
||||
$cinecturlink2_public_active = (boolean) $s->cinecturlink2_public_active;
|
||||
$cinecturlink2_public_title = (string) $s->cinecturlink2_public_title;
|
||||
$cinecturlink2_public_description = (string) $s->cinecturlink2_public_description;
|
||||
$cinecturlink2_public_nbrpp = (integer) $s->cinecturlink2_public_nbrpp;
|
||||
if ($cinecturlink2_public_nbrpp < 1) {
|
||||
$cinecturlink2_public_nbrpp = 10;
|
||||
}
|
||||
|
||||
# -- Set settings --
|
||||
if (!empty($_POST['save'])) {
|
||||
|
||||
try {
|
||||
$cinecturlink2_active = !empty($_POST['cinecturlink2_active']);
|
||||
$cinecturlink2_widthmax = abs((integer) $_POST['cinecturlink2_widthmax']);
|
||||
$cinecturlink2_folder = (string) files::tidyFileName($_POST['cinecturlink2_folder']);
|
||||
$cinecturlink2_triggeronrandom = !empty($_POST['cinecturlink2_triggeronrandom']);
|
||||
$cinecturlink2_public_active = !empty($_POST['cinecturlink2_public_active']);
|
||||
$cinecturlink2_public_title = (string) $_POST['cinecturlink2_public_title'];
|
||||
$cinecturlink2_public_description = (string) $_POST['cinecturlink2_public_description'];
|
||||
$cinecturlink2_public_nbrpp = (integer) $_POST['cinecturlink2_public_nbrpp'];
|
||||
if ($cinecturlink2_public_nbrpp < 1) {
|
||||
$cinecturlink2_public_nbrpp = 10;
|
||||
}
|
||||
|
||||
if (empty($cinecturlink2_folder)) {
|
||||
throw new Exception(__('You must provide a specific folder for images.'));
|
||||
}
|
||||
cinecturlink2::test_folder(
|
||||
DC_ROOT.'/'.$core->blog->settings->system->public_path,
|
||||
$cinecturlink2_folder,
|
||||
true
|
||||
);
|
||||
|
||||
$s->put('cinecturlink2_active', $cinecturlink2_active);
|
||||
$s->put('cinecturlink2_public_active', $cinecturlink2_public_active);
|
||||
$s->put('cinecturlink2_public_title', $cinecturlink2_public_title);
|
||||
$s->put('cinecturlink2_public_description', $cinecturlink2_public_description);
|
||||
$s->put('cinecturlink2_public_nbrpp', $cinecturlink2_public_nbrpp);
|
||||
$s->put('cinecturlink2_widthmax', $cinecturlink2_widthmax);
|
||||
$s->put('cinecturlink2_folder', $cinecturlink2_folder);
|
||||
$s->put('cinecturlink2_triggeronrandom', $cinecturlink2_triggeronrandom);
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Configuration has been successfully updated.')
|
||||
);
|
||||
http::redirect(
|
||||
$list->getURL('module=cinecturlink2&conf=1&redir='.
|
||||
$list->getRedir())
|
||||
);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
# -- Display form --
|
||||
echo '
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('General').'</h4>
|
||||
|
||||
<p><label class="classic" for="cinecturlink2_active">'.
|
||||
form::checkbox('cinecturlink2_active', 1, $cinecturlink2_active).
|
||||
__('Enable extension').'</label></p>
|
||||
|
||||
<p><label for="cinecturlink2_widthmax">'.__('Maximum width of images (in pixel):').' '.
|
||||
form::field('cinecturlink2_widthmax', 10, 4, $cinecturlink2_widthmax, 'maximal').'</label></p>
|
||||
|
||||
<p><label for="cinecturlink2_folder">'.__('Public folder of images (under public folder of blog):').' '.
|
||||
form::field('cinecturlink2_folder', 60, 64, $cinecturlink2_folder, 'maximal').'</label></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('Widget').'</h4>
|
||||
|
||||
<p><label class="classic" for="cinecturlink2_triggeronrandom">'.
|
||||
form::checkbox('cinecturlink2_triggeronrandom', 1, $cinecturlink2_triggeronrandom).
|
||||
__('Update cache when use "Random" or "Number of view" order on widget (Need reload of widgets on change)').'</label></p>
|
||||
<p class="form-note">'.__('This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog.').'</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('Public page').'</h4>
|
||||
|
||||
<p><label class="classic" for="cinecturlink2_public_active">'.
|
||||
form::checkbox('cinecturlink2_public_active', 1, $cinecturlink2_public_active).
|
||||
__('Enable public page').'</label></p>
|
||||
<p class="form-note">'.sprintf(__('Public page has url: %s'),'<a href="'.$core->blog->url.$core->url->getBase('cinecturlink2').'" title="public page">'.$core->blog->url.$core->url->getBase('cinecturlink2').'</a>').'</p>
|
||||
|
||||
<p><label for="cinecturlink2_public_title">'.__('Title of the public page:').' '.
|
||||
form::field('cinecturlink2_public_title', 60, 255, $cinecturlink2_public_title, 'maximal').'</label></p>
|
||||
|
||||
<p><label for="cinecturlink2_public_description">'.__('Description of the public page:').' '.
|
||||
form::field('cinecturlink2_public_description', 60, 255, $cinecturlink2_public_description, 'maximal').'</label></p>
|
||||
|
||||
<p><label for="cinecturlink2_public_nbrpp">'.__('Limit number of entries per page on pulic page to:').' '.
|
||||
form::field('cinecturlink2_public_nbrpp', 5, 10, $cinecturlink2_public_nbrpp, 'maximal').'</label></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('Informations').'</h4>
|
||||
|
||||
<ul>
|
||||
<li>'.__('Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar.').'</li>
|
||||
<li>'.sprintf(__('In order to open links in new window you can use plugin %s.'),'<a href="http://plugins.dotaddict.org/dc2/details/externalLinks">External Links</a>').'</li>
|
||||
<li>'.sprintf(__('In order to change URL of public page you can use plugin %s.'),'<a href="http://lab.dotclear.org/wiki/plugin/myUrlHandlers">My URL handlers</a>').'</li>
|
||||
<li>'.sprintf(__('You can add public pages of cinecturlink to the plugin %s.'),'<a href="http://plugins.dotaddict.org/dc2/details/sitemaps">sitemaps</a>').'</li>
|
||||
<li>'.sprintf(__('The plugin Cinecturlink2 is compatible with plugin %s.'),'<a href="http://plugins.dotaddict.org/dc2/details/rateIt">Rate it</a>').'</li>
|
||||
<li>'.sprintf(__('The plugin Cinecturlink2 is compatible with plugin %s.'),'<a href="http://plugins.dotaddict.org/dc2/details/activityReport">Activity report</a>').'</li>
|
||||
</ul>
|
||||
|
||||
</div>';
|
43
_define.php
Normal file
43
_define.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
/*
|
||||
* Taken from cinecturlink for Dotclear 1
|
||||
* By Tigroux and Brol
|
||||
* Under GNU GPL 2.0 license
|
||||
*/
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->registerModule(
|
||||
/* Name */
|
||||
"Cinecturlink 2",
|
||||
/* Description*/
|
||||
"Widgets and pages about books, musics, films, blogs you are interested in",
|
||||
/* Author */
|
||||
"Jean-Christian Denis",
|
||||
/* Version */
|
||||
'0.7',
|
||||
/* Properties */
|
||||
array(
|
||||
'permissions' => 'contentadmin',
|
||||
'type' => 'plugin',
|
||||
'dc_min' => '2.6',
|
||||
'support' => 'http://jcd.lv/q=cinecturlink2',
|
||||
'details' => 'http://plugins.dotaddict.org/dc2/details/cinecturlink2'
|
||||
)
|
||||
);
|
109
_install.php
Normal file
109
_install.php
Normal file
|
@ -0,0 +1,109 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
# Check module version
|
||||
if (version_compare(
|
||||
$core->getVersion('cinecturlink2'),
|
||||
$core->plugins->moduleInfo('cinecturlink2', 'version'),
|
||||
'>='
|
||||
)) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
# Check Dotclear version
|
||||
if (!method_exists('dcUtils', 'versionsCompare')
|
||||
|| dcUtils::versionsCompare(DC_VERSION, '2.6', '>', false)) {
|
||||
throw new Exception(sprintf(
|
||||
'%s requires Dotclear %s', 'cinecturlink2', '2.6'
|
||||
));
|
||||
}
|
||||
|
||||
# Tables
|
||||
$s = new dbStruct($core->con, $core->prefix);
|
||||
$s->cinecturlink2
|
||||
->link_id ('bigint', 0, false)
|
||||
->blog_id ('varchar', 32, false)
|
||||
->cat_id ('bigint', 0, true)
|
||||
->user_id ('varchar', 32, true)
|
||||
->link_type ('varchar', 32, false, "'cinecturlink'")
|
||||
->link_title ('varchar', 255, false)
|
||||
->link_desc ('varchar', 255, false)
|
||||
->link_author ('varchar', 255, false)
|
||||
->link_lang ('varchar', 5, false, "'en'")
|
||||
->link_url ('varchar', 255, false)
|
||||
->link_img ('varchar', 255, false)
|
||||
->link_creadt ('timestamp', 0, false, 'now()')
|
||||
->link_upddt ('timestamp', 0, false, 'now()')
|
||||
->link_pos ('smallint', 0, false, "'0'")
|
||||
->link_note('smallint', 0, false, "'10'")
|
||||
->link_count('bigint', 0, false, "'0'")
|
||||
|
||||
->primary('pk_cinecturlink2', 'link_id')
|
||||
->index('idx_cinecturlink2_title', 'btree', 'link_title')
|
||||
->index('idx_cinecturlink2_author', 'btree', 'link_author')
|
||||
->index('idx_cinecturlink2_blog_id', 'btree', 'blog_id')
|
||||
->index('idx_cinecturlink2_cat_id', 'btree', 'cat_id')
|
||||
->index('idx_cinecturlink2_user_id', 'btree', 'user_id')
|
||||
->index('idx_cinecturlink2_type', 'btree', 'link_type');
|
||||
|
||||
$s->cinecturlink2_cat
|
||||
->cat_id ('bigint', 0, false)
|
||||
->blog_id ('varchar', 32, false)
|
||||
->cat_title ('varchar', 255, false)
|
||||
->cat_desc ('varchar', 255, false)
|
||||
->cat_creadt ('timestamp', 0, false, 'now()')
|
||||
->cat_upddt ('timestamp', 0, false, 'now()')
|
||||
->cat_pos ('smallint', 0, false, "'0'")
|
||||
|
||||
->primary('pk_cinecturlink2_cat', 'cat_id')
|
||||
->index('idx_cinecturlink2_cat_blog_id', 'btree', 'blog_id')
|
||||
->unique('uk_cinecturlink2_cat_title', 'cat_title', 'blog_id');
|
||||
|
||||
$si = new dbStruct($core->con,$core->prefix);
|
||||
$changes = $si->synchronize($s);
|
||||
|
||||
# Settings
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
$s = $core->blog->settings->cinecturlink2;
|
||||
$s->put('cinecturlink2_active', true, 'boolean', 'Enable cinecturlink2', false, true);
|
||||
$s->put('cinecturlink2_widthmax', 100, 'integer', 'Maximum width of picture', false, true);
|
||||
$s->put('cinecturlink2_folder', 'cinecturlink', 'string', 'Public folder of pictures', false, true);
|
||||
$s->put('cinecturlink2_triggeronrandom', false, 'boolean', 'Open link in new window', false, true);
|
||||
$s->put('cinecturlink2_public_active', false, 'boolean', 'Enable cinecturlink2', false, true);
|
||||
$s->put('cinecturlink2_public_title', '', 'string', 'Title of public page', false, true);
|
||||
$s->put('cinecturlink2_public_description', '', 'string','Description of public page', false, true);
|
||||
$s->put('cinecturlink2_public_nbrpp', 20, 'integer', 'Number of entries per page on public page', false, true);
|
||||
$s->put('cinecturlink2_public_caturl', 'c2cat', 'string', 'Part of URL for a category list', false, true);
|
||||
|
||||
|
||||
# Set module version
|
||||
$core->setVersion(
|
||||
'cinecturlink2',
|
||||
$core->plugins->moduleInfo('cinecturlink2', 'version')
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
|
||||
return false;
|
46
_prepend.php
Normal file
46
_prepend.php
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$d = dirname(__FILE__).'/inc/';
|
||||
|
||||
$__autoload['cinecturlink2'] = $d.'class.cinecturlink2.php';
|
||||
$__autoload['cinecturlink2Context'] = $d.'lib.cinecturlink2.context.php';
|
||||
$__autoload['sitemapsCinecturlink2'] = $d.'lib.sitemaps.cinecturlink2.php';
|
||||
|
||||
$core->url->register(
|
||||
'cinecturlink2',
|
||||
'cinecturlink',
|
||||
'^cinecturlink(?:/(.+))?$',
|
||||
array('urlCinecturlink2', 'c2Page')
|
||||
);
|
||||
|
||||
# Add cinecturlink2 report on plugin activityReport
|
||||
if (defined('ACTIVITY_REPORT')) {
|
||||
require_once $d.'lib.cinecturlink2.activityreport.php';
|
||||
}
|
||||
|
||||
# cinecturlink2 libraries for sitemaps
|
||||
$core->addBehavior(
|
||||
'sitemapsDefineParts',
|
||||
array('sitemapsCinecturlink2', 'sitemapsDefineParts')
|
||||
);
|
||||
$core->addBehavior(
|
||||
'sitemapsURLsCollect',
|
||||
array('sitemapsCinecturlink2', 'sitemapsURLsCollect')
|
||||
);
|
569
_public.php
Normal file
569
_public.php
Normal file
|
@ -0,0 +1,569 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__).'/_widgets.php';
|
||||
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
$c2_tpl_values = array(
|
||||
'c2PageFeedID',
|
||||
'c2PageFeedURL',
|
||||
'c2PageURL',
|
||||
'c2PageTitle',
|
||||
'c2PageDescription',
|
||||
|
||||
'c2EntryIfOdd',
|
||||
'c2EntryIfFirst',
|
||||
'c2EntryFeedID',
|
||||
'c2EntryID',
|
||||
'c2EntryTitle',
|
||||
'c2EntryDescription',
|
||||
'c2EntryFromAuthor',
|
||||
'c2EntryAuthorCommonName',
|
||||
'c2EntryAuthorDisplayName',
|
||||
'c2EntryAuthorEmail',
|
||||
'c2EntryAuthorID',
|
||||
'c2EntryAuthorLink',
|
||||
'c2EntryAuthorURL',
|
||||
'c2EntryLang',
|
||||
'c2EntryURL',
|
||||
'c2EntryCategory',
|
||||
'c2EntryCategoryID',
|
||||
'c2EntryCategoryURL',
|
||||
'c2EntryImg',
|
||||
'c2EntryDate',
|
||||
'c2EntryTime',
|
||||
|
||||
'c2PaginationCounter',
|
||||
'c2PaginationCurrent',
|
||||
'c2PaginationURL',
|
||||
|
||||
'c2CategoryFeedID',
|
||||
'c2CategoryFeedURL',
|
||||
'c2CategoryID',
|
||||
'c2CategoryTitle',
|
||||
'c2CategoryDescription',
|
||||
'c2CategoryURL'
|
||||
);
|
||||
|
||||
$c2_tpl_blocks = array(
|
||||
'c2If',
|
||||
|
||||
'c2Entries',
|
||||
'c2EntriesHeader',
|
||||
'c2EntriesFooter',
|
||||
'c2EntryIf',
|
||||
|
||||
'c2Pagination',
|
||||
'c2PaginationIf',
|
||||
|
||||
'c2Categories',
|
||||
'c2CategoriesHeader',
|
||||
'c2CategoriesFooter',
|
||||
'c2CategoryIf'
|
||||
);
|
||||
|
||||
if ($core->blog->settings->cinecturlink2->cinecturlink2_active) {
|
||||
|
||||
foreach($c2_tpl_blocks as $v) {
|
||||
$core->tpl->addBlock($v, array('tplCinecturlink2', $v));
|
||||
}
|
||||
foreach($c2_tpl_values as $v) {
|
||||
$core->tpl->addValue($v, array('tplCinecturlink2', $v));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
foreach(array_merge($c2_tpl_blocks, $c2_tpl_values) as $v) {
|
||||
$core->tpl->addBlock($v, array('tplCinecturlink2', 'disable'));
|
||||
}
|
||||
}
|
||||
|
||||
class urlCinecturlink2 extends dcUrlHandlers
|
||||
{
|
||||
public static function c2Page($args)
|
||||
{
|
||||
global $core, $_ctx;
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
if (!$core->blog->settings->cinecturlink2->cinecturlink2_active
|
||||
|| !$core->blog->settings->cinecturlink2->cinecturlink2_public_active)
|
||||
{
|
||||
self::p404();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$core->tpl->setPath(
|
||||
$core->tpl->getPath(),
|
||||
dirname(__FILE__).'/default-templates/'
|
||||
);
|
||||
|
||||
$params = array();
|
||||
|
||||
$n = self::getPageArgs($args, 'c2page');
|
||||
if ($n) {
|
||||
$GLOBALS['c2_page_number'] = $n;
|
||||
}
|
||||
|
||||
$caturl = $core->blog->settings->cinecturlink2->cinecturlink2_public_caturl;
|
||||
if (!$caturl) $caturl = 'c2cat';
|
||||
|
||||
$c = self::getPageArgs($args, $caturl);
|
||||
if ($c) {
|
||||
if (is_numeric($c)) {
|
||||
$params['cat_id'] = (integer) $c;
|
||||
}
|
||||
else {
|
||||
$params['cat_title'] = urldecode($c);
|
||||
}
|
||||
}
|
||||
|
||||
$f = self::getPageArgs($args, 'feed');
|
||||
if ($f && in_array($f, array('atom', 'rss2'))) {
|
||||
$mime = $f == 'atom' ? 'application/atom+xml' : 'application/xml';
|
||||
|
||||
//$_ctx->short_feed_items = $core->blog->settings->system->short_feed_items;
|
||||
|
||||
$params['limit'] = $core->blog->settings->system->nb_post_per_feed;
|
||||
$_ctx->c2_page_params = $params;
|
||||
|
||||
header('X-Robots-Tag: '.context::robotsPolicy($core->blog->settings->system->robots_policy, ''));
|
||||
self::serveDocument('cinecturlink2-'.$f.'.xml', $mime);
|
||||
}
|
||||
else {
|
||||
$d = self::getPageArgs($args, 'c2detail');
|
||||
if ($d) {
|
||||
if (is_numeric($d)) {
|
||||
$params['link_id'] = (integer) $d;
|
||||
}
|
||||
else {
|
||||
$params['link_title'] = urldecode($d);
|
||||
}
|
||||
}
|
||||
|
||||
$params['limit'] = $core->blog->settings->cinecturlink2->cinecturlink2_public_nbrpp;
|
||||
$_ctx->c2_page_params = $params;
|
||||
|
||||
self::serveDocument('cinecturlink2.html', 'text/html');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected static function getPageArgs(&$args, $part)
|
||||
{
|
||||
if (preg_match('#(^|/)'.$part.'/([^/]+)#', $args, $m)) {
|
||||
$args = preg_replace('#(^|/)'.$part.'/([^/]+)#', '', $args);
|
||||
|
||||
return $m[2];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class tplCinecturlink2
|
||||
{
|
||||
public static function disable($a, $c=null)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function c2PageURL($a)
|
||||
{
|
||||
return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$core->blog->url.$core->url->getBase(\'cinecturlink2\')')."; ?>";
|
||||
}
|
||||
|
||||
public static function c2PageTitle($a)
|
||||
{
|
||||
return "<?php \$title = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_title; if (empty(\$title)) { \$title = __('My cinecturlink'); } echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$title')."; ?>";
|
||||
}
|
||||
|
||||
public static function c2PageFeedURL($a)
|
||||
{
|
||||
return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/feed/'.(!empty($a['type']) && preg_match('#^(rss2|atom)$#', $a['type']) ? $a['type'] : 'atom').'"')."; ?>";
|
||||
}
|
||||
|
||||
public static function c2PageFeedID($a)
|
||||
{
|
||||
return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2"); ?>';
|
||||
}
|
||||
|
||||
public static function c2PageDescription($a)
|
||||
{
|
||||
return "<?php \$description = (string) \$core->blog->settings->cinecturlink2->cinecturlink2_public_description; echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$description')."; ?>";
|
||||
}
|
||||
|
||||
public static function c2If($a ,$c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
$operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&';
|
||||
|
||||
if (isset($a['request_link'])) {
|
||||
$sign = (boolean) $a['request_link'] ? '' : '!';
|
||||
$if[] = $sign.'(isset($_ctx->c2_page_params["link_id"]) || isset($_ctx->c2_page_params["link_title"]))';
|
||||
}
|
||||
|
||||
if (isset($a['request_cat'])) {
|
||||
$sign = (boolean) $a['request_cat'] ? '' : '!';
|
||||
$if[] = $sign.'(isset($_ctx->c2_page_params["cat_id"]) || isset($_ctx->c2_page_params["cat_title"]))';
|
||||
}
|
||||
|
||||
return empty($if) ? $c : "<?php if(".implode(' '.$operator.' ', $if).") : ?>\n".$c."<?php endif; ?>\n";
|
||||
}
|
||||
|
||||
public static function c2Entries($a, $c)
|
||||
{
|
||||
$lastn = isset($a['lastn']) ? abs((integer) $a['lastn'])+0 : -1;
|
||||
|
||||
$res = 'if (!isset($c2_page_number)) { $c2_page_number = 1; }'."\n";
|
||||
|
||||
if ($lastn != 0) {
|
||||
if ($lastn > 0) {
|
||||
$res .= "\$params['limit'] = ".$lastn.";\n";
|
||||
}
|
||||
else {
|
||||
$res .= "if (!isset(\$params['limit']) || \$params['limit'] < 1) { \$params['limit'] = 10; }\n";
|
||||
}
|
||||
if (!isset($a['ignore_pagination']) || $a['ignore_pagination'] == "0") {
|
||||
$res .= "\$params['limit'] = array(((\$c2_page_number-1)*\$params['limit']),\$params['limit']);\n";
|
||||
}
|
||||
else {
|
||||
$res .= "\$params['limit'] = array(0, \$params['limit']);\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($a['category'])) {
|
||||
if ($a['category'] == 'null') {
|
||||
$res .= "\$params['sql'] = ' AND L.cat_id IS NULL ';\n";
|
||||
}
|
||||
elseif (is_numeric($a['category'])) {
|
||||
$res .= "\$params['cat_id'] = ".(integer) $a['category'].";\n";
|
||||
}
|
||||
else {
|
||||
$res .= "\$params['cat_title'] = '".$a['category']."';\n";
|
||||
}
|
||||
}
|
||||
|
||||
$sort = isset($a['sort']) && $a['sort'] == 'asc' ? ' asc' : ' desc';
|
||||
$sortby = isset($a['order']) && in_array($a['order'],array('link_count','link_upddt','link_creadt','link_note','link_title')) ? $a['order'] : 'link_upddt';
|
||||
|
||||
$res .=
|
||||
"\$params['order'] = '".$sortby.$sort."';\n";
|
||||
|
||||
return
|
||||
"<?php \n".
|
||||
"\$params = is_array(\$_ctx->c2_page_params) ? \$_ctx->c2_page_params : array(); \n".
|
||||
$res.
|
||||
"\$_ctx->c2_params = \$params; unset(\$params);\n".
|
||||
"if (!\$_ctx->exists('cinecturlink')) { \$_ctx->cinecturlink = new cinecturlink2(\$core); } \n".
|
||||
"\$_ctx->c2_entries = \$_ctx->cinecturlink->getLinks(\$_ctx->c2_params); \n".
|
||||
'while ($_ctx->c2_entries->fetch()) : ?>'.$c.'<?php endwhile; '."\n".
|
||||
"\$_ctx->c2_entries = null; \$_ctx->c2_params = null; \n".
|
||||
"?>\n";
|
||||
}
|
||||
|
||||
public static function c2EntriesHeader($a, $c)
|
||||
{
|
||||
return "<?php if (\$_ctx->c2_entries->isStart()) : ?>".$c."<?php endif; ?>";
|
||||
}
|
||||
|
||||
public static function c2EntriesFooter($a, $c)
|
||||
{
|
||||
return "<?php if (\$_ctx->c2_entries->isEnd()) : ?>".$c."<?php endif; ?>";
|
||||
}
|
||||
|
||||
public static function c2EntryIf($a, $c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
$operator = isset($a['operator']) ? self::getOperator($a['operator']) : '&&';
|
||||
|
||||
if (isset($a['has_category'])) {
|
||||
$sign = (boolean) $a['has_category'] ? '!' : '=';
|
||||
$if[] = '($_ctx->exists("c2_entries") && "" '.$sign.'= $_ctx->c2_entries->cat_title)';
|
||||
}
|
||||
|
||||
return empty($if) ? $c : "<?php if(".implode(' '.$operator.' ',$if).") : ?>\n".$c."<?php endif; ?>\n";
|
||||
}
|
||||
|
||||
public static function c2EntryIfFirst($a)
|
||||
{
|
||||
return '<?php if ($_ctx->c2_entries->index() == 0) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'first').'"; } ?>';
|
||||
}
|
||||
|
||||
public static function c2EntryIfOdd($a)
|
||||
{
|
||||
return '<?php if (($_ctx->c2_entries->index()+1)%2 == 1) { echo "'.(isset($a['return']) ? addslashes(html::escapeHTML($a['return'])) : 'odd').'"; } ?>';
|
||||
}
|
||||
|
||||
public static function c2EntryFeedID($a)
|
||||
{
|
||||
return 'urn:md5:<?php echo md5($_ctx->c2_entries->blog_id.$_ctx->c2_entries->link_id.$_ctx->c2_entries->link_dt); ?>';
|
||||
}
|
||||
|
||||
public static function c2EntryID($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_id', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryTitle($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_title', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryDescription($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_desc', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorCommonName($a)
|
||||
{
|
||||
return self::getGenericValue('dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorDisplayName($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->user_displayname', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorID($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->user_id', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorEmail($a)
|
||||
{
|
||||
return self::getGenericValue((isset($a['spam_protected']) && !$a['spam_protected'] ? '$_ctx->c2_entries->user_email' : "strtr(\$_ctx->c2_entries->user_email,array('@'=>'%40','.'=>'%2e'))"), $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorLink($a)
|
||||
{
|
||||
return self::getGenericValue('sprintf(($_ctx->c2_entries->user_url ? \'<a href="%2$s">%1$s</a>\' : \'%1$s\'),html::escapeHTML(dcUtils::getUserCN($_ctx->c2_entries->user_id,$_ctx->c2_entries->user_name,$_ctx->c2_entries->user_firstname,$_ctx->c2_entries->user_displayname)),html::escapeHTML($_ctx->c2_entries->user_url))', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryAuthorURL($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->user_url', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryFromAuthor($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_author', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryLang($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_lang', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryURL($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->link_url', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryCategory($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->cat_title', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryCategoryID($a)
|
||||
{
|
||||
return self::getGenericValue('$_ctx->c2_entries->cat_id', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryCategoryURL($a)
|
||||
{
|
||||
return self::getGenericValue('$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_entries->cat_title)', $a);
|
||||
}
|
||||
|
||||
public static function c2EntryImg($a)
|
||||
{
|
||||
global $core;
|
||||
$f = $core->tpl->getFilters($a);
|
||||
$style = isset($a['style']) ? html::escapeHTML($a['style']) : '';
|
||||
|
||||
return
|
||||
"<?php if (\$_ctx->exists('c2_entries')) { ".
|
||||
"\$widthmax = (integer) \$core->blog->settings->cinecturlink2->cinecturlink2_widthmax; ".
|
||||
"\$img = sprintf('<img src=\"%s\" alt=\"%s\" %s/>',".
|
||||
"\$_ctx->c2_entries->link_img, ".
|
||||
"html::escapeHTML(\$_ctx->c2_entries->link_title.' - '.\$_ctx->c2_entries->link_author), ".
|
||||
"(\$widthmax ? ' style=\"width:'.\$widthmax.'px;$style\"' : '') ".
|
||||
"); ".
|
||||
"echo ".sprintf($f,'$img')."; unset(\$img); } ?> \n";
|
||||
}
|
||||
|
||||
public static function c2EntryDate($a)
|
||||
{
|
||||
$format = !empty($a['format']) ? addslashes($a['format']) : '';
|
||||
|
||||
if (!empty($a['rfc822']))
|
||||
$p = "dt::rfc822(strtotime(\$_ctx->c2_entries->link_creadt), \$_ctx->posts->post_tz)";
|
||||
elseif (!empty($a['iso8601']))
|
||||
$p = "dt::iso8601(strtotime(\$_ctx->c2_entries->link_creadt), \$_ctx->posts->post_tz)";
|
||||
elseif ($format)
|
||||
$p = "dt::dt2str('".$format."', \$_ctx->c2_entries->link_creadt)";
|
||||
else
|
||||
$p = "dt::dt2str(\$core->blog->settings->system->date_format, \$_ctx->c2_entries->link_creadt)";
|
||||
|
||||
return self::getGenericValue($p, $a);
|
||||
}
|
||||
|
||||
public static function c2EntryTime($a)
|
||||
{
|
||||
return self::getGenericValue("dt::dt2str(".(!empty($a['format']) ? "'".addslashes($a['format'])."'" : '$core->blog->settings->system->time_format').", \$_ctx->c2_entries->link_creadt)", $a);
|
||||
}
|
||||
|
||||
public static function c2Pagination($a, $c)
|
||||
{
|
||||
$p =
|
||||
"<?php\n".
|
||||
"\$params = \$_ctx->c2_params;\n".
|
||||
"\$_ctx->c2_pagination = \$_ctx->cinecturlink->getLinks(\$params,true); unset(\$params);\n".
|
||||
"?>\n";
|
||||
|
||||
return isset($a['no_context']) ? $p.$c : $p.'<?php if ($_ctx->c2_pagination->f(0) > $_ctx->c2_entries->count()) : ?>'.$c.'<?php endif; ?>';
|
||||
}
|
||||
|
||||
public static function c2PaginationCounter($a)
|
||||
{
|
||||
return self::getGenericValue('cinecturlink2Context::PaginationNbPages()', $a);
|
||||
}
|
||||
|
||||
public static function c2PaginationCurrent($a)
|
||||
{
|
||||
return self::getGenericValue('cinecturlink2Context::PaginationPosition('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')', $a);
|
||||
}
|
||||
|
||||
public static function c2PaginationIf($a, $c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
if (isset($a['start'])) {
|
||||
$sign = (boolean) $a['start'] ? '' : '!';
|
||||
$if[] = $sign.'cinecturlink2Context::PaginationStart()';
|
||||
}
|
||||
if (isset($a['end'])) {
|
||||
$sign = (boolean) $a['end'] ? '' : '!';
|
||||
$if[] = $sign.'cinecturlink2Context::PaginationEnd()';
|
||||
}
|
||||
|
||||
return empty($if) ? $c : '<?php if('.implode(' && ', $if).') : ?>'.$c.'<?php endif; ?>';
|
||||
}
|
||||
|
||||
public static function c2PaginationURL($a)
|
||||
{
|
||||
return self::getGenericValue('cinecturlink2Context::PaginationURL('.(isset($a['offset']) ? (integer) $a['offset'] : 0).')', $a);
|
||||
}
|
||||
|
||||
public static function c2Categories($a, $c)
|
||||
{
|
||||
return
|
||||
"<?php \n".
|
||||
"if (!\$_ctx->exists('cinecturlink')) { \$_ctx->cinecturlink = new cinecturlink2(\$core); } \n".
|
||||
"\$_ctx->c2_categories = \$_ctx->cinecturlink->getCategories(); \n".
|
||||
'while ($_ctx->c2_categories->fetch()) : ?>'.$c.'<?php endwhile; '."\n".
|
||||
"\$_ctx->c2_categories = null; \n".
|
||||
"?>\n";
|
||||
}
|
||||
|
||||
public static function c2CategoriesHeader($a, $c)
|
||||
{
|
||||
return "<?php if (\$_ctx->c2_categories->isStart()) : ?>".$c."<?php endif; ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoriesFooter($a, $c)
|
||||
{
|
||||
return "<?php if (\$_ctx->c2_categories->isEnd()) : ?>".$c."<?php endif; ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoryIf($a, $c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
if (isset($a['current'])) {
|
||||
$sign = (boolean) $a['current'] ? '' : '!';
|
||||
$if[] = $sign.'cinecturlink2Context::CategoryCurrent()';
|
||||
}
|
||||
if (isset($a['first'])) {
|
||||
$sign = (boolean) $a['first'] ? '' : '!';
|
||||
$if[] = $sign.'$_ctx->c2_categories->isStart()';
|
||||
}
|
||||
|
||||
return empty($if) ? $c : '<?php if('.implode(' && ', $if).') : ?>'.$c.'<?php endif; ?>';
|
||||
}
|
||||
|
||||
public static function c2CategoryFeedURL($a)
|
||||
{
|
||||
$p = !empty($a['type']) ? $a['type'] : 'atom';
|
||||
|
||||
if (!preg_match('#^(rss2|atom)$#', $p)) {
|
||||
$p = 'atom';
|
||||
}
|
||||
|
||||
return "<?php echo ".sprintf($GLOBALS['core']->tpl->getFilters($a),'$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_categories->cat_title)."/feed/'.$p.'"')."; ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoryFeedID($a)
|
||||
{
|
||||
return 'urn:md5:<?php echo md5($core->blog->blog_id."cinecturlink2".$_ctx->c2_categories->cat_id); ?>';
|
||||
}
|
||||
|
||||
public static function c2CategoryID($a)
|
||||
{
|
||||
return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_id')."; } ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoryTitle($a)
|
||||
{
|
||||
return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_title')."; } ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoryDescription($a)
|
||||
{
|
||||
return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$_ctx->c2_categories->cat_desc')."; } ?>";
|
||||
}
|
||||
|
||||
public static function c2CategoryURL($a)
|
||||
{
|
||||
return "<?php if (\$_ctx->exists('c2_categories')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), '$core->blog->url.$core->url->getBase("cinecturlink2")."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl."/".urlencode($_ctx->c2_categories->cat_title)')."; } ?>";
|
||||
}
|
||||
|
||||
protected static function getGenericValue($p,$a)
|
||||
{
|
||||
return "<?php if (\$_ctx->exists('c2_entries')) { echo ".sprintf($GLOBALS['core']->tpl->getFilters($a), "$p")."; } ?>";
|
||||
}
|
||||
|
||||
protected static function getOperator($op)
|
||||
{
|
||||
switch (strtolower($op))
|
||||
{
|
||||
case 'or':
|
||||
case '||':
|
||||
return '||';
|
||||
case 'and':
|
||||
case '&&':
|
||||
default:
|
||||
return '&&';
|
||||
}
|
||||
}
|
||||
}
|
88
_uninstall.php
Normal file
88
_uninstall.php
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$this->addUserAction(
|
||||
/* type */ 'settings',
|
||||
/* action */ 'delete_all',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ __('delete all settings')
|
||||
);
|
||||
|
||||
$this->addUserAction(
|
||||
/* type */ 'tables',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ sprintf(__('delete %s table'), 'cinecturlink2')
|
||||
);
|
||||
|
||||
$this->addUserAction(
|
||||
/* type */ 'tables',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2_cat',
|
||||
/* desc */ sprintf(__('delete %s table'), 'cinecturlink2_cat')
|
||||
);
|
||||
|
||||
$this->addUserAction(
|
||||
/* type */ 'versions',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ __('delete the version number')
|
||||
);
|
||||
|
||||
$this->addUserAction(
|
||||
/* type */ 'plugins',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ __('delete plugin files')
|
||||
);
|
||||
|
||||
$this->addDirectAction(
|
||||
/* type */ 'settings',
|
||||
/* action */ 'delete_all',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ sprintf(__('delete all %s settings'), 'cinecturlink2')
|
||||
);
|
||||
|
||||
$this->addDirectAction(
|
||||
/* type */ 'tables',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ sprintf(__('delete %s table'), 'cinecturlink2')
|
||||
);
|
||||
|
||||
$this->addDirectAction(
|
||||
/* type */ 'tables',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2_cat',
|
||||
/* desc */ sprintf(__('delete %s table'), 'cinecturlink2_cat')
|
||||
);
|
||||
|
||||
$this->addDirectAction(
|
||||
/* type */ 'versions',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* desc */ sprintf(__('delete %s version number'), 'cinecturlink2')
|
||||
);
|
||||
|
||||
$this->addDirectAction(
|
||||
/* type */ 'plugins',
|
||||
/* action */ 'delete',
|
||||
/* ns */ 'cinecturlink2',
|
||||
/* description */ sprintf(__('delete %s plugin files'), 'cinecturlink2')
|
||||
);
|
347
_widgets.php
Normal file
347
_widgets.php
Normal file
|
@ -0,0 +1,347 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$core->addBehavior(
|
||||
'initWidgets',
|
||||
array('cinecturlink2Widget', 'adminLinks')
|
||||
);
|
||||
$core->addBehavior(
|
||||
'initWidgets',
|
||||
array('cinecturlink2Widget', 'adminCats')
|
||||
);
|
||||
|
||||
class cinecturlink2Widget
|
||||
{
|
||||
public static function adminLinks($w)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$C2 = new cinecturlink2($core);
|
||||
|
||||
$categories_combo = array('' => '', __('Uncategorized') => 'null');
|
||||
$categories = $C2->getCategories();
|
||||
while($categories->fetch()) {
|
||||
$cat_title = html::escapeHTML($categories->cat_title);
|
||||
$categories_combo[$cat_title] = $categories->cat_id;
|
||||
}
|
||||
|
||||
$sortby_combo = array(
|
||||
__('Update date') => 'link_upddt',
|
||||
__('My rating') => 'link_note',
|
||||
__('Title') => 'link_title',
|
||||
__('Random') => 'RANDOM',
|
||||
__('Number of views') => 'COUNTER'
|
||||
);
|
||||
$order_combo = array(
|
||||
__('Ascending') => 'asc',
|
||||
__('Descending') => 'desc'
|
||||
);
|
||||
|
||||
$w->create(
|
||||
'cinecturlink2links',
|
||||
__('My cinecturlink'),
|
||||
array('cinecturlink2Widget', 'publicLinks'),
|
||||
'null',
|
||||
__('Show selection of cinecturlinks')
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'title',
|
||||
__('Title:'),
|
||||
__('My cinecturlink'),
|
||||
'text'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'category',
|
||||
__('Category:'),
|
||||
'',
|
||||
'combo',
|
||||
$categories_combo
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'sortby',
|
||||
__('Order by:'),
|
||||
'link_upddt',
|
||||
'combo',
|
||||
$sortby_combo
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'sort',
|
||||
__('Sort: (only for date, note and title)'),
|
||||
'desc',
|
||||
'combo',
|
||||
$order_combo
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'limit',
|
||||
__('Limit:'),
|
||||
10,
|
||||
'text'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'withlink',
|
||||
__('Enable link'),
|
||||
1,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'showauthor',
|
||||
__('Show author'),
|
||||
1,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'shownote',
|
||||
__('Show my rating'),
|
||||
0,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'showdesc',
|
||||
__('Show description'),
|
||||
0,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'showpagelink',
|
||||
__('Show a link to cinecturlink page'),
|
||||
0,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2links->setting(
|
||||
'homeonly',
|
||||
__('Display on:'),
|
||||
1,
|
||||
'combo',
|
||||
array(
|
||||
__('All pages') => 0,
|
||||
__('Home page only') => 1,
|
||||
__('Except on home page') => 2
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static function adminCats($w)
|
||||
{
|
||||
$w->create(
|
||||
'cinecturlink2cats',
|
||||
__('List of categories of cinecturlink'),
|
||||
array('cinecturlink2Widget', 'publicCats'),
|
||||
null,
|
||||
__('List of categories of cinecturlink')
|
||||
);
|
||||
$w->cinecturlink2cats->setting(
|
||||
'title',
|
||||
__('Title:'),
|
||||
__('My cinecturlink by categories'),
|
||||
'text'
|
||||
);
|
||||
$w->cinecturlink2cats->setting(
|
||||
'shownumlink',
|
||||
__('Show number of links'),
|
||||
0,
|
||||
'check'
|
||||
);
|
||||
$w->cinecturlink2cats->setting(
|
||||
'homeonly',
|
||||
__('Display on:'),
|
||||
1,
|
||||
'combo',
|
||||
array(
|
||||
__('All pages') => 0,
|
||||
__('Home page only') => 1,
|
||||
__('Except on home page') => 2
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static function publicLinks($w)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
if (!$core->blog->settings->cinecturlink2->cinecturlink2_active
|
||||
|| $w->homeonly == 1 && $core->url->type != 'default'
|
||||
|| $w->homeonly == 2 && $core->url->type == 'default'
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$C2 = new cinecturlink2($core);
|
||||
|
||||
if ($w->category) {
|
||||
if ($w->category == 'null') {
|
||||
$params['sql'] = ' AND L.cat_id IS NULL ';
|
||||
}
|
||||
elseif (is_numeric($w->category)) {
|
||||
$params['cat_id'] = (integer) $w->category;
|
||||
}
|
||||
}
|
||||
|
||||
$limit = abs((integer) $w->limit);
|
||||
|
||||
# Tirage aléatoire
|
||||
# Consomme beaucoup de ressources!
|
||||
if ($w->sortby == 'RANDOM') {
|
||||
$big_rs = $C2->getLinks($params);
|
||||
|
||||
if ($big_rs->isEmpty()) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$ids= array();
|
||||
while($big_rs->fetch()) {
|
||||
$ids[] = $big_rs->link_id;
|
||||
}
|
||||
shuffle($ids);
|
||||
$ids = array_slice($ids, 0, $limit);
|
||||
|
||||
$params['link_id'] = array();
|
||||
foreach($ids as $id) {
|
||||
$params['link_id'][] = $id;
|
||||
}
|
||||
}
|
||||
elseif ($w->sortby == 'COUNTER') {
|
||||
$params['order'] = 'link_count asc';
|
||||
$params['limit'] = $limit;
|
||||
}
|
||||
else {
|
||||
$params['order'] = $w->sortby;
|
||||
$params['order'] .= $w->sort == 'asc' ? ' asc' : ' desc';
|
||||
$params['limit'] = $limit;
|
||||
}
|
||||
|
||||
$rs = $C2->getLinks($params);
|
||||
|
||||
if ($rs->isEmpty()) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$widthmax = (integer) $core->blog->settings->cinecturlink2->cinecturlink2_widthmax;
|
||||
$style = $widthmax ? ' style="width:'.$widthmax.'px;"' : '';
|
||||
|
||||
$entries = array();
|
||||
while($rs->fetch()) {
|
||||
$url = $rs->link_url;
|
||||
$img = $rs->link_img;
|
||||
$title = html::escapeHTML($rs->link_title);
|
||||
$author = html::escapeHTML($rs->link_author);
|
||||
$cat = html::escapeHTML($rs->cat_title);
|
||||
$note = $w->shownote ? ' <em>('.$rs->link_note.'/20)</em>' : '';
|
||||
$desc = $w->showdesc ? '<br /><em>'.html::escapeHTML($rs->link_desc).'</em>' : '';
|
||||
$lang = $rs->link_lang ? ' hreflang="'.$rs->link_lang.'"' : '';
|
||||
$count = abs((integer) $rs->link_count);
|
||||
|
||||
# --BEHAVIOR-- cinecturlink2WidgetLinks
|
||||
$bhv = $core->callBehavior('cinecturlink2WidgetLinks', $rs->link_id);
|
||||
|
||||
$entries[] =
|
||||
'<p style="text-align:center;">'.
|
||||
($w->withlink && !empty($url) ? '<a href="'.$url.'"'.$lang.' title="'.$cat.'">' : '').
|
||||
'<strong>'.$title.'</strong>'.$note.'<br />'.
|
||||
($w->showauthor ? $author.'<br />' : '').'<br />'.
|
||||
'<img src="'.$img.'" alt="'.$title.' - '.$author.'"'.$style.' />'.
|
||||
$desc.
|
||||
($w->withlink && !empty($url) ? '</a>' : '').
|
||||
'</p>'.$bhv;
|
||||
|
||||
try {
|
||||
$cur = $core->con->openCursor($C2->table);
|
||||
$cur->link_count = ($count + 1);
|
||||
$C2->updLink($rs->link_id, $cur, false);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
# Tirage aléatoire
|
||||
if ($w->sortby == 'RANDOM'
|
||||
|| $w->sortby == 'COUNTER'
|
||||
) {
|
||||
shuffle($entries);
|
||||
if ($core->blog->settings->cinecturlink2->cinecturlink2_triggeronrandom) {
|
||||
$core->blog->triggerBlog();
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
'<div class="cinecturlink2list">'.
|
||||
($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
|
||||
implode(' ',$entries).
|
||||
($w->showpagelink && $core->blog->settings->cinecturlink2->cinecturlink2_public_active ?
|
||||
'<p><a href="'.$core->blog->url.$core->url->getBase('cinecturlink2').'" title="'.__('view all links').'">'.__('More links').'</a></p>' : ''
|
||||
).
|
||||
'</div>';
|
||||
}
|
||||
|
||||
public static function publicCats($w)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
if (!$core->blog->settings->cinecturlink2->cinecturlink2_active
|
||||
|| !$core->blog->settings->cinecturlink2->cinecturlink2_public_active
|
||||
|| $w->homeonly == 1 && $core->url->type != 'default'
|
||||
|| $w->homeonly == 2 && $core->url->type == 'default'
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$C2 = new cinecturlink2($core);
|
||||
|
||||
$rs = $C2->getCategories(array());
|
||||
|
||||
if ($rs->isEmpty()) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$res =
|
||||
'<li><a href="'.
|
||||
$core->blog->url.$core->url->getBase('cinecturlink2').
|
||||
'" title="'.__('view all links').'">'.__('all links').
|
||||
'</a>';
|
||||
if ($w->shownumlink) {
|
||||
$res .= ' ('.($C2->getLinks(array(), true)->f(0)).')';
|
||||
}
|
||||
$res .= '</li>';
|
||||
|
||||
while($rs->fetch()) {
|
||||
$res .=
|
||||
'<li><a href="'.
|
||||
$core->blog->url.$core->url->getBase('cinecturlink2').'/'.$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl.'/'.urlencode($rs->cat_title).
|
||||
'" title="'.__('view links of this category').'">'.
|
||||
html::escapeHTML($rs->cat_title).
|
||||
'</a>';
|
||||
if ($w->shownumlink) {
|
||||
$res .= ' ('.($C2->getLinks(array('cat_id'=>$rs->cat_id), true)->f(0)).')';
|
||||
}
|
||||
$res .= '</li>';
|
||||
}
|
||||
|
||||
return
|
||||
'<div class="cinecturlink2cat">'.
|
||||
($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : '').
|
||||
'<ul>'.$res.'</ul>'.
|
||||
'</div>';
|
||||
}
|
||||
}
|
35
default-templates/cinecturlink2-atom.xml
Normal file
35
default-templates/cinecturlink2-atom.xml
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
xml:lang="{{tpl:BlogLanguage}}">
|
||||
|
||||
<title type="html">{{tpl:BlogName encode_xml="1"}} - {{tpl:c2PageTitle encode_xml="1"}}</title>
|
||||
<subtitle type="html">{{tpl:c2PageDescription encode_xml="1"}}</subtitle>
|
||||
<link href="{{tpl:SysSelfURI}}" rel="self" type="application/atom+xml"/>
|
||||
<link href="{{tpl:BlogURL}}" rel="alternate" type="text/html" title="{{tpl:BlogDescription encode_xml="1"}}"/>
|
||||
<updated>{{tpl:BlogUpdateDate iso8601="1"}}</updated>
|
||||
<author>
|
||||
<name>{{tpl:BlogEditor encode_xml="1"}}</name>
|
||||
</author>
|
||||
<id>{{tpl:c2PageFeedID}}</id>
|
||||
<generator uri="http://www.dotclear.net/">Dotclear</generator>
|
||||
|
||||
<tpl:c2Entries>
|
||||
|
||||
<entry>
|
||||
<title>{{tpl:c2EntryTitle encode_xml="1"}}</title>
|
||||
<link href="{{tpl:c2EntryURL encode_xml="1"}}" rel="alternate" type="text/html" title="{{tpl:c2EntryTitle encode_xml="1"}}" />
|
||||
<id>{{tpl:c2EntryFeedID}}</id>
|
||||
<updated>{{tpl:c2EntryDate iso8601="1"}}</updated>
|
||||
<author><name>{{tpl:c2EntryFromAuthor encode_xml="1"}}</name></author>
|
||||
<tpl:c2EntryIf has_category="1"><dc:subject>{{tpl:c2EntryCategory encode_xml="1"}}</dc:subject></tpl:c2EntryIf>
|
||||
<content type="html">
|
||||
<p>{{tpl:c2EntryImg absolute_urls="1" encode_xml="1"}}<br />
|
||||
{{tpl:c2EntryDescription absolute_urls="1" encode_xml="1"}}</p>
|
||||
</content>
|
||||
</entry>
|
||||
|
||||
</tpl:c2Entries>
|
||||
|
||||
</feed>
|
36
default-templates/cinecturlink2-rss2.xml
Normal file
36
default-templates/cinecturlink2-rss2.xml
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml-stylesheet title="XSL formatting" type="text/xsl" href="{{tpl:BlogURL}}feed/rss2/xslt" ?>
|
||||
<rss version="2.0"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{tpl:BlogName encode_xml="1"}} - {{tpl:c2PageTitle encode_xml="1"}}</title>
|
||||
<link>{{tpl:BlogURL}}</link>
|
||||
<atom:link href="{{tpl:SysSelfURI}}" rel="self" type="application/rss+xml"/>
|
||||
<description>{{tpl:c2PageDescription encode_xml="1"}}</description>
|
||||
<language>{{tpl:BlogLanguage}}</language>
|
||||
<pubDate>{{tpl:BlogUpdateDate rfc822="1"}}</pubDate>
|
||||
<copyright>{{tpl:BlogCopyrightNotice encode_xml="1"}}</copyright>
|
||||
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||
<generator>Dotclear</generator>
|
||||
|
||||
<tpl:c2Entries>
|
||||
|
||||
<item>
|
||||
<title>{{tpl:c2EntryTitle encode_xml="1"}}</title>
|
||||
<link>{{tpl:c2EntryURL encode_xml="1"}}</link>
|
||||
<tpl:c2EntryIf has_category="1"><categorie>{{tpl:c2EntryCategory encode_xml="1"}}</categorie></tpl:c2EntryIf>
|
||||
<guid isPermaLink="false">{{tpl:c2EntryFeedID}}</guid>
|
||||
<pubDate>{{tpl:c2EntryDate rfc822="1"}}</pubDate>
|
||||
<dc:creator>{{tpl:c2EntryFromAuthor encode_xml="1"}}</dc:creator>
|
||||
<description>
|
||||
<p>{{tpl:c2EntryImg encode_xml="1"}}<br />
|
||||
{{tpl:c2EntryDescription encode_xml="1"}}</p>
|
||||
</description>
|
||||
</item>
|
||||
</tpl:c2Entries>
|
||||
|
||||
</channel>
|
||||
</rss>
|
133
default-templates/cinecturlink2.html
Normal file
133
default-templates/cinecturlink2.html
Normal file
|
@ -0,0 +1,133 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{tpl:BlogLanguage}}" lang="{{tpl:BlogLanguage}}">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
|
||||
|
||||
<title>{{tpl:c2PageTitle encode_html="1"}} - {{tpl:BlogName encode_html="1"}}</title>
|
||||
|
||||
<meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription cut_string="180" encode_html="1"}}" />
|
||||
<meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
|
||||
<meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" />
|
||||
<meta name="date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
|
||||
|
||||
<link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
|
||||
<meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogName encode_html="1"}} - {{tpl:c2PageTitle encode_html="1"}}" />
|
||||
<meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription encode_html="1"}}" />
|
||||
<meta name="dc.language" content="{{tpl:BlogLanguage}}" />
|
||||
<meta name="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" />
|
||||
<meta name="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" />
|
||||
<meta name="dc.date" scheme="W3CDTF" content="{{tpl:BlogUpdateDate iso8601="1"}}" />
|
||||
<meta name="dc.type" content="text" />
|
||||
<meta name="dc.format" content="text/html" />
|
||||
|
||||
<link rel="contents" title="{{tpl:lang Cinecturlink}}" href="{{tpl:c2PageURL}}" />
|
||||
|
||||
<tpl:c2Entries>
|
||||
<tpl:c2EntriesHeader>
|
||||
<tpl:c2Pagination>
|
||||
<tpl:c2PaginationIf end="0">
|
||||
<link rel="previous" title="{{tpl:lang previous links}}" href="{{tpl:c2PaginationURL offset="1"}}" />
|
||||
</tpl:c2PaginationIf>
|
||||
|
||||
<tpl:c2PaginationIf start="0">
|
||||
<link rel="next" title="{{tpl:lang next links}}" href="{{tpl:c2PaginationURL offset="-1"}}" />
|
||||
</tpl:c2PaginationIf>
|
||||
</tpl:c2Pagination>
|
||||
</tpl:c2EntriesHeader>
|
||||
</tpl:c2Entries>
|
||||
|
||||
{{tpl:include src="_head.html"}}
|
||||
</head>
|
||||
|
||||
<body class="dc-post">
|
||||
<div id="page">
|
||||
{{tpl:include src="_top.html"}}
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
|
||||
<div id="content-info">
|
||||
<h2>{{tpl:c2PageTitle encode_html="1"}}</h2>
|
||||
<p>{{tpl:c2PageDescription}}</p>
|
||||
<tpl:c2If operator="or" request_link="1" request_cat="1"><p><a href="{{tpl:c2PageURL}}" title="{{tpl:lang view all links}}">{{tpl:lang view all links}}</a></p></tpl:c2If>
|
||||
<p>
|
||||
<a type="application/atom+xml" href="{{tpl:c2PageFeedURL type="atom"}}" title="{{tpl:lang These entries Atom feed}}" class="feed">{{tpl:lang Entries feed}}</a>
|
||||
<tpl:c2Categories>
|
||||
<tpl:c2CategoryIf current="1"> - <a type="application/atom+xml" href="{{tpl:c2CategoryFeedURL type="atom"}}" title="{{tpl:lang This category's entries Atom feed}}" class="feed">{{tpl:lang Category's entries feed}}</a></p></tpl:c2CategoryIf>
|
||||
</tpl:c2Categories>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<tpl:c2Categories>
|
||||
<tpl:c2CategoriesHeader>
|
||||
<div id="content-info cinecturlink-categories">
|
||||
<h2>{{tpl:lang Categories}}</h2>
|
||||
<ul>
|
||||
</tpl:c2CategoriesHeader>
|
||||
<tpl:c2CategoryIf current="1"><li>{{tpl:c2CategoryTitle}}</li></tpl:c2CategoryIf>
|
||||
<tpl:c2CategoryIf current="0"><li><a href="{{tpl:c2CategoryURL}}" title="{{tpl:c2CategoryDescription remove_html="1"}}">{{tpl:c2CategoryTitle}}</a> </li></tpl:c2CategoryIf>
|
||||
<tpl:c2CategoriesFooter>
|
||||
</ul>
|
||||
</div>
|
||||
</tpl:c2CategoriesFooter>
|
||||
</tpl:c2Categories>
|
||||
|
||||
<div class="content-inner cinecturlink-entries">
|
||||
|
||||
<tpl:c2Entries order="link_creadt" sort="desc">
|
||||
<div id="p{{tpl:c2EntryID}}" class="post {{tpl:c2EntryIfOdd}} {{tpl:c2EntryIfFirst}}" lang="{{tpl:c2EntryLang}}" xml:lang="{{tpl:c2EntryLang}}" style="clear:both;">
|
||||
|
||||
<h2 class="post-title"><a href="{{tpl:c2EntryURL}}">{{tpl:c2EntryTitle encode_html="1"}}</a></h2>
|
||||
|
||||
<p class="post-info">{{tpl:lang By}} {{tpl:c2EntryFromAuthor}} - <a href="{{tpl:c2EntryURL}}" title="{{tpl:lang link}}">{{tpl:lang link}}</a>
|
||||
({{tpl:lang on}} {{tpl:c2EntryDate}}, {{tpl:c2EntryTime}} {{tpl:lang by}} {{tpl:c2EntryAuthorLink}} <tpl:c2EntryIf has_category="1"> - <a href="{{tpl:c2EntryCategoryURL}}" title="{{tpl:lang category}}">{{tpl:c2EntryCategory encode_html="1"}}</a></tpl:c2EntryIf>)</p>
|
||||
|
||||
<!-- # --BEHAVIOR-- publicC2EntryBeforeContent -->
|
||||
{{tpl:SysBehavior behavior="publicC2EntryBeforeContent"}}
|
||||
|
||||
<div class="post-content">
|
||||
<p>
|
||||
{{tpl:c2EntryImg style="float:left; margin: 0 1em 1em 0;"}}
|
||||
{{tpl:c2EntryDescription remove_html="1"}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- # --BEHAVIOR-- publicC2EntryAfterContent -->
|
||||
{{tpl:SysBehavior behavior="publicC2EntryAfterContent"}}
|
||||
|
||||
</div>
|
||||
<tpl:c2EntriesFooter>
|
||||
<tpl:c2Pagination>
|
||||
<p class="pagination"><tpl:c2PaginationIf end="0"><a href="{{tpl:c2PaginationURL offset="+1"}}" class="prev">«
|
||||
{{tpl:lang previous links}}</a> - </tpl:c2PaginationIf>
|
||||
{{tpl:lang page}} {{tpl:c2PaginationCurrent}} {{tpl:lang of}} {{tpl:c2PaginationCounter}}
|
||||
<tpl:c2PaginationIf start="0"> - <a href="{{tpl:c2PaginationURL offset="-1"}}" class="next">{{tpl:lang next links}}
|
||||
»</a></tpl:c2PaginationIf></p>
|
||||
</tpl:c2Pagination>
|
||||
</tpl:c2EntriesFooter>
|
||||
</tpl:c2Entries>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- End #main -->
|
||||
|
||||
<div id="sidebar">
|
||||
<div id="blognav">
|
||||
{{tpl:Widgets type="nav"}}
|
||||
</div> <!-- End #blognav -->
|
||||
|
||||
<div id="blogextra">
|
||||
{{tpl:Widgets type="extra"}}
|
||||
</div> <!-- End #blogextra -->
|
||||
</div>
|
||||
|
||||
</div> <!-- End #wrapper -->
|
||||
|
||||
{{tpl:include src="_footer.html"}}
|
||||
</div> <!-- End #page -->
|
||||
</body>
|
||||
</html>
|
BIN
icon-big.png
Normal file
BIN
icon-big.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
icon.png
Normal file
BIN
icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 708 B |
466
inc/class.cinecturlink2.php
Normal file
466
inc/class.cinecturlink2.php
Normal file
|
@ -0,0 +1,466 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup DC_PLUGIN_CINECTURLINK2
|
||||
* @brief Share media you like - main methods.
|
||||
* @since 2.6
|
||||
*/
|
||||
class cinecturlink2
|
||||
{
|
||||
/** @var dcCore dcCore instance */
|
||||
public $core;
|
||||
/** @var dbLayer dbLayer instance */
|
||||
public $con;
|
||||
/** @var string Cinecturlink table name */
|
||||
public $table;
|
||||
/** @var string Blog ID */
|
||||
public $blog;
|
||||
|
||||
/**
|
||||
* Contructor
|
||||
*
|
||||
* @param dcCore $core dcCore instance
|
||||
*/
|
||||
public function __construct(dcCore $core)
|
||||
{
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
|
||||
$this->core = $core;
|
||||
$this->con = $core->con;
|
||||
$this->table = $core->prefix.'cinecturlink2';
|
||||
$this->blog = $core->con->escape($core->blog->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get links
|
||||
*
|
||||
* @param array $params Query params
|
||||
* @param boolean $count_only Count only result
|
||||
* @return record record instance
|
||||
*/
|
||||
public function getLinks($params=array(), $count_only=false)
|
||||
{
|
||||
if ($count_only) {
|
||||
$strReq = 'SELECT count(L.link_id) ';
|
||||
}
|
||||
else {
|
||||
$content_req = '';
|
||||
if (!empty($params['columns']) && is_array($params['columns'])) {
|
||||
$content_req .= implode(', ', $params['columns']).', ';
|
||||
}
|
||||
|
||||
$strReq =
|
||||
'SELECT L.link_id, L.blog_id, L.cat_id, L.user_id, L.link_type, '.
|
||||
$content_req.
|
||||
'L.link_creadt, L.link_upddt, L.link_note, L.link_count, '.
|
||||
'L.link_title, L.link_desc, L.link_author, '.
|
||||
'L.link_lang, L.link_url, L.link_img, '.
|
||||
'U.user_name, U.user_firstname, U.user_displayname, U.user_email, '.
|
||||
'U.user_url, '.
|
||||
'C.cat_title, C.cat_desc ';
|
||||
}
|
||||
|
||||
$strReq .=
|
||||
'FROM '.$this->table.' L '.
|
||||
'INNER JOIN '.$this->core->prefix.'user U ON U.user_id = L.user_id '.
|
||||
'LEFT OUTER JOIN '.$this->table.'_cat C ON L.cat_id = C.cat_id ';
|
||||
|
||||
if (!empty($params['from'])) {
|
||||
$strReq .= $params['from'].' ';
|
||||
}
|
||||
|
||||
$strReq .= "WHERE L.blog_id = '".$this->blog."' ";
|
||||
|
||||
if (isset($params['link_type'])) {
|
||||
if (is_array($params['link_type']) && !empty($params['link_type'])) {
|
||||
$strReq .= 'AND L.link_type '.$this->con->in($params['link_type']);
|
||||
}
|
||||
elseif ($params['link_type'] != '') {
|
||||
$strReq .= "AND L.link_type = '".$this->con->escape($params['link_type'])."' ";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$strReq .= "AND L.link_type = 'cinecturlink' ";
|
||||
}
|
||||
|
||||
if (!empty($params['link_id'])) {
|
||||
if (is_array($params['link_id'])) {
|
||||
array_walk($params['link_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}'));
|
||||
}
|
||||
else {
|
||||
$params['link_id'] = array((integer) $params['link_id']);
|
||||
}
|
||||
$strReq .= 'AND L.link_id '.$this->con->in($params['link_id']);
|
||||
}
|
||||
|
||||
if (!empty($params['cat_id'])) {
|
||||
if (is_array($params['cat_id'])) {
|
||||
array_walk($params['cat_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}'));
|
||||
}
|
||||
else {
|
||||
$params['cat_id'] = array((integer) $params['cat_id']);
|
||||
}
|
||||
$strReq .= 'AND L.cat_id '.$this->con->in($params['cat_id']);
|
||||
}
|
||||
if (!empty($params['cat_title'])) {
|
||||
$strReq .= "AND C.cat_title = '".$this->con->escape($params['cat_title'])."' ";
|
||||
}
|
||||
|
||||
if (!empty($params['link_title'])) {
|
||||
$strReq .= "AND L.link_title = '".$this->con->escape($params['link_title'])."' ";
|
||||
}
|
||||
|
||||
if (!empty($params['link_lang'])) {
|
||||
$strReq .= "AND L.link_lang = '".$this->con->escape($params['link_lang'])."' ";
|
||||
}
|
||||
|
||||
if (!empty($params['sql'])) {
|
||||
$strReq .= $params['sql'].' ';
|
||||
}
|
||||
|
||||
if (!$count_only) {
|
||||
if (!empty($params['order'])) {
|
||||
$strReq .= 'ORDER BY '.$this->con->escape($params['order']).' ';
|
||||
}
|
||||
else {
|
||||
$strReq .= 'ORDER BY L.link_upddt DESC ';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$count_only && !empty($params['limit'])) {
|
||||
$strReq .= $this->con->limit($params['limit']);
|
||||
}
|
||||
|
||||
return $this->con->select($strReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add link
|
||||
*
|
||||
* @param cursor $cur cursor instance
|
||||
*/
|
||||
public function addLink(cursor $cur)
|
||||
{
|
||||
$this->con->writeLock($this->table);
|
||||
|
||||
try {
|
||||
if ($cur->link_title == '') {
|
||||
throw new Exception(__('No link title'));
|
||||
}
|
||||
if ($cur->link_desc == '') {
|
||||
throw new Exception(__('No link description'));
|
||||
}
|
||||
if ('' == $cur->link_note) {
|
||||
$cur->link_note = 10;
|
||||
}
|
||||
if (0 > $cur->link_note || $cur->link_note > 20) {
|
||||
$cur->link_note = 10;
|
||||
}
|
||||
|
||||
$cur->link_id = $this->getNextLinkId();
|
||||
$cur->blog_id = $this->blog;
|
||||
$cur->user_id = $this->core->auth->userID();
|
||||
$cur->link_creadt = date('Y-m-d H:i:s');
|
||||
$cur->link_upddt = date('Y-m-d H:i:s');
|
||||
$cur->link_pos = 0;
|
||||
$cur->link_count = 0;
|
||||
$cur->insert();
|
||||
$this->con->unlock();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->con->unlock();
|
||||
throw $e;
|
||||
}
|
||||
$this->trigger();
|
||||
|
||||
# --BEHAVIOR-- cinecturlink2AfterAddLink
|
||||
$this->core->callBehavior('cinecturlink2AfterAddLink', $cur);
|
||||
|
||||
return $cur->link_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update link
|
||||
*
|
||||
* @param integer $id Link ID
|
||||
* @param cursor $cur cursor instance
|
||||
* @param boolean $behavior Call related behaviors
|
||||
*/
|
||||
public function updLink($id, cursor $cur, $behavior=true)
|
||||
{
|
||||
$id = (integer) $id;
|
||||
|
||||
if (empty($id)) {
|
||||
throw new Exception(__('No such link ID'));
|
||||
}
|
||||
|
||||
$cur->link_upddt = date('Y-m-d H:i:s');
|
||||
|
||||
$cur->update("WHERE link_id = ".$id." AND blog_id = '".$this->blog."' ");
|
||||
$this->trigger();
|
||||
|
||||
if ($behavior) {
|
||||
# --BEHAVIOR-- cinecturlink2AfterUpdLink
|
||||
$this->core->callBehavior('cinecturlink2AfterUpdLink', $cur, $id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete link
|
||||
*
|
||||
* @param integer $id Link ID
|
||||
*/
|
||||
public function delLink($id)
|
||||
{
|
||||
$id = (integer) $id;
|
||||
|
||||
if (empty($id)) {
|
||||
throw new Exception(__('No such link ID'));
|
||||
}
|
||||
|
||||
# --BEHAVIOR-- cinecturlink2BeforeDelLink
|
||||
$this->core->callBehavior('cinecturlink2BeforeDelLink', $id);
|
||||
|
||||
$this->con->execute(
|
||||
'DELETE FROM '.$this->table.' '.
|
||||
'WHERE link_id = '.$id.' '.
|
||||
"AND blog_id = '".$this->blog."' "
|
||||
);
|
||||
|
||||
$this->trigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get next link ID
|
||||
*
|
||||
* @return integer Next link ID
|
||||
*/
|
||||
private function getNextLinkId()
|
||||
{
|
||||
return $this->con->select(
|
||||
'SELECT MAX(link_id) FROM '.$this->table.' '
|
||||
)->f(0) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get categories
|
||||
*
|
||||
* @param array $params Query params
|
||||
* @param boolean $count_only Count only result
|
||||
* @return record record instance
|
||||
*/
|
||||
public function getCategories($params=array(), $count_only=false)
|
||||
{
|
||||
if ($count_only) {
|
||||
$strReq = 'SELECT count(C.cat_id) ';
|
||||
}
|
||||
else {
|
||||
$content_req = '';
|
||||
if (!empty($params['columns']) && is_array($params['columns'])) {
|
||||
$content_req .= implode(', ', $params['columns']).', ';
|
||||
}
|
||||
|
||||
$strReq =
|
||||
'SELECT C.cat_id, C.blog_id, C.cat_title, C.cat_desc, '.
|
||||
$content_req.
|
||||
'C.cat_pos, C.cat_creadt, C.cat_upddt ';
|
||||
}
|
||||
|
||||
$strReq .= 'FROM '.$this->table.'_cat C ';
|
||||
|
||||
if (!empty($params['from'])) {
|
||||
$strReq .= $params['from'].' ';
|
||||
}
|
||||
|
||||
$strReq .= "WHERE C.blog_id = '".$this->blog."' ";
|
||||
|
||||
if (!empty($params['cat_id'])) {
|
||||
if (is_array($params['cat_id'])) {
|
||||
array_walk($params['cat_id'], create_function('&$v,$k', 'if($v!==null){$v=(integer)$v;}'));
|
||||
}
|
||||
else {
|
||||
$params['cat_id'] = array((integer) $params['cat_id']);
|
||||
}
|
||||
$strReq .= 'AND C.cat_id '.$this->con->in($params['cat_id']);
|
||||
}
|
||||
|
||||
if (!empty($params['cat_title'])) {
|
||||
$strReq .= "AND C.cat_title = '".$this->con->escape($params['cat_title'])."' ";
|
||||
}
|
||||
|
||||
if (!empty($params['sql'])) {
|
||||
$strReq .= $params['sql'].' ';
|
||||
}
|
||||
|
||||
if (!$count_only) {
|
||||
if (!empty($params['order'])) {
|
||||
$strReq .= 'ORDER BY '.$this->con->escape($params['order']).' ';
|
||||
}
|
||||
else {
|
||||
$strReq .= 'ORDER BY cat_pos ASC ';
|
||||
}
|
||||
}
|
||||
|
||||
if (!$count_only && !empty($params['limit'])) {
|
||||
$strReq .= $this->con->limit($params['limit']);
|
||||
}
|
||||
|
||||
return $this->con->select($strReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add category
|
||||
*
|
||||
* @param cursor $cur cursor instance
|
||||
* @return integer New category ID
|
||||
*/
|
||||
public function addCategory(cursor $cur)
|
||||
{
|
||||
$this->con->writeLock($this->table.'_cat');
|
||||
|
||||
try {
|
||||
if ($cur->cat_title == '') {
|
||||
throw new Exception(__('No category title'));
|
||||
}
|
||||
if ($cur->cat_desc == '') {
|
||||
throw new Exception(__('No category description'));
|
||||
}
|
||||
|
||||
$cur->cat_id = $this->getNextCatId();
|
||||
$cur->cat_pos = $this->getNextCatPos();
|
||||
$cur->blog_id = $this->blog;
|
||||
$cur->cat_creadt = date('Y-m-d H:i:s');
|
||||
$cur->cat_upddt = date('Y-m-d H:i:s');
|
||||
$cur->insert();
|
||||
$this->con->unlock();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->con->unlock();
|
||||
throw $e;
|
||||
}
|
||||
$this->trigger();
|
||||
|
||||
return $cur->cat_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update category
|
||||
*
|
||||
* @param integer $id Category ID
|
||||
* @param cursor $cur cursor instance
|
||||
*/
|
||||
public function updCategory($id, cursor $cur)
|
||||
{
|
||||
$id = (integer) $id;
|
||||
|
||||
if (empty($id)) {
|
||||
throw new Exception(__('No such category ID'));
|
||||
}
|
||||
|
||||
$cur->cat_upddt = date('Y-m-d H:i:s');
|
||||
|
||||
$cur->update("WHERE cat_id = ".$id." AND blog_id = '".$this->blog."' ");
|
||||
$this->trigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete category
|
||||
*
|
||||
* @param integer $id Category ID
|
||||
*/
|
||||
public function delCategory($id)
|
||||
{
|
||||
$id = (integer) $id;
|
||||
|
||||
if (empty($id)) {
|
||||
throw new Exception(__('No such category ID'));
|
||||
}
|
||||
|
||||
$this->con->execute(
|
||||
'DELETE FROM '.$this->table.'_cat '.
|
||||
'WHERE cat_id = '.$id.' '.
|
||||
"AND blog_id = '".$this->blog."' "
|
||||
);
|
||||
|
||||
# Update link cat to NULL
|
||||
$cur = $this->con->openCursor($this->table);
|
||||
$cur->cat_id = NULL;
|
||||
$cur->link_upddt = date('Y-m-d H:i:s');
|
||||
$cur->update("WHERE cat_id = ".$id." AND blog_id = '".$this->blog."' ");
|
||||
|
||||
$this->trigger();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get next category ID
|
||||
*
|
||||
* @return integer Next category ID
|
||||
*/
|
||||
private function getNextCatId()
|
||||
{
|
||||
return $this->con->select(
|
||||
'SELECT MAX(cat_id) FROM '.$this->table.'_cat '
|
||||
)->f(0) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get next category position
|
||||
*
|
||||
* @return integer Next category position
|
||||
*/
|
||||
private function getNextCatPos()
|
||||
{
|
||||
return $this->con->select(
|
||||
'SELECT MAX(cat_pos) FROM '.$this->table.'_cat '.
|
||||
"WHERE blog_id = '".$this->blog."' "
|
||||
)->f(0) + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trigger event
|
||||
*/
|
||||
private function trigger()
|
||||
{
|
||||
$this->core->blog->triggerBlog();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a directory exists and is writable
|
||||
*
|
||||
* @param string $root Root
|
||||
* @param string $folder Folder to create into root folder
|
||||
* @param boolean $throw Throw exception or not
|
||||
* @return boolean True if exists and writable
|
||||
*/
|
||||
public static function test_folder($root, $folder, $throw=false)
|
||||
{
|
||||
if (!is_dir($root.'/'.$folder)) {
|
||||
if (!is_dir($root) || !is_writable($root) || !mkdir($root.'/'.$folder)) {
|
||||
if ($throw) {
|
||||
throw new Exception(__('Failed to create public folder for images.'));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
92
inc/lib.cinecturlink2.activityreport.php
Normal file
92
inc/lib.cinecturlink2.activityreport.php
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
# This file is used with plugin activityReport
|
||||
$core->activityReport->addGroup('cinecturlink2', __('Plugin cinecturlink2'));
|
||||
|
||||
# from BEHAVIOR cinecturlink2AfterAddLink in cinecturlink2/inc/class.cinecturlink2.php
|
||||
$core->activityReport->addAction(
|
||||
'cinecturlink2',
|
||||
'create',
|
||||
__('link creation'),
|
||||
__('A new cineturlink named "%s" was added by "%s"'),
|
||||
'cinecturlink2AfterAddLink',
|
||||
array('cinecturlink2ActivityReportBehaviors', 'addLink')
|
||||
);
|
||||
# from BEHAVIOR cinecturlink2AfterUpdLink in cinecturlink2/inc/class.cinecturlink2.php
|
||||
$core->activityReport->addAction(
|
||||
'cinecturlink2',
|
||||
'update',
|
||||
__('updating link'),
|
||||
__('Cinecturlink named "%s" has been updated by "%s"'),
|
||||
'cinecturlink2AfterUpdLink',
|
||||
array('cinecturlink2ActivityReportBehaviors', 'updLink')
|
||||
);
|
||||
# from BEHAVIOR cinecturlink2BeforeDelLink in cinecturlink2/inc/class.cinecturlink2.php
|
||||
$core->activityReport->addAction(
|
||||
'cinecturlink2',
|
||||
'delete',
|
||||
__('link deletion'),
|
||||
__('Cinecturlink named "%s" has been deleted by "%s"'),
|
||||
'cinecturlink2BeforeDelLink',
|
||||
array('cinecturlink2ActivityReportBehaviors', 'delLink')
|
||||
);
|
||||
|
||||
class cinecturlink2ActivityReportBehaviors
|
||||
{
|
||||
public static function addLink($cur)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$logs = array(
|
||||
$cur->link_title,
|
||||
$core->auth->getInfo('user_cn')
|
||||
);
|
||||
|
||||
$core->activityReport->addLog('cinecturlink2', 'create', $logs);
|
||||
}
|
||||
|
||||
public static function updLink($cur, $id)
|
||||
{
|
||||
global $core;
|
||||
$C2 = new cinecturlink2($core);
|
||||
$rs = $C2->getLinks(array('link_id'=>$id));
|
||||
|
||||
$logs = array(
|
||||
$rs->link_title,
|
||||
$core->auth->getInfo('user_cn')
|
||||
);
|
||||
|
||||
$core->activityReport->addLog('cinecturlink2', 'update', $logs);
|
||||
}
|
||||
|
||||
public static function delLink($id)
|
||||
{
|
||||
global $core;
|
||||
$C2 = new cinecturlink2($core);
|
||||
$rs = $C2->getLinks(array('link_id'=>$id));
|
||||
|
||||
$logs = array(
|
||||
$rs->link_title,
|
||||
$core->auth->getInfo('user_cn')
|
||||
);
|
||||
|
||||
$core->activityReport->addLog('cinecturlink2', 'delete', $logs);
|
||||
}
|
||||
}
|
117
inc/lib.cinecturlink2.context.php
Normal file
117
inc/lib.cinecturlink2.context.php
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
class cinecturlink2Context
|
||||
{
|
||||
public static function PaginationNbPages()
|
||||
{
|
||||
global $_ctx;
|
||||
|
||||
if ($_ctx->c2_pagination === null) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$nb_posts = $_ctx->c2_pagination->f(0);
|
||||
$nb_per_page = $_ctx->c2_params['limit'][1];
|
||||
|
||||
$nb_pages = ceil($nb_posts/$nb_per_page);
|
||||
|
||||
return $nb_pages;
|
||||
}
|
||||
|
||||
public static function PaginationPosition($offset=0)
|
||||
{
|
||||
if (isset($GLOBALS['c2_page_number'])) {
|
||||
$p = $GLOBALS['c2_page_number'];
|
||||
}
|
||||
else {
|
||||
$p = 1;
|
||||
}
|
||||
|
||||
$p = $p+$offset;
|
||||
|
||||
$n = self::PaginationNbPages();
|
||||
if (!$n) {
|
||||
|
||||
return $p;
|
||||
}
|
||||
|
||||
return $p > $n || $p <= 0 ? 1 : $p;
|
||||
}
|
||||
|
||||
public static function PaginationStart()
|
||||
{
|
||||
if (isset($GLOBALS['c2_page_number'])) {
|
||||
|
||||
return self::PaginationPosition() == 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function PaginationEnd()
|
||||
{
|
||||
if (isset($GLOBALS['c2_page_number'])) {
|
||||
|
||||
return self::PaginationPosition() == self::PaginationNbPages();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function PaginationURL($offset=0)
|
||||
{
|
||||
$args = $_SERVER['URL_REQUEST_PART'];
|
||||
|
||||
$n = self::PaginationPosition($offset);
|
||||
|
||||
$args = preg_replace('#(^|/)c2page/([0-9]+)$#', '', $args);
|
||||
|
||||
$url = $GLOBALS['core']->blog->url.$args;
|
||||
|
||||
if ($n > 1) {
|
||||
$url = preg_replace('#/$#','',$url);
|
||||
$url .= '/c2page/'.$n;
|
||||
}
|
||||
|
||||
# If search param
|
||||
if (!empty($_GET['q'])) {
|
||||
$s = strpos($url,'?') !== false ? '&' : '?';
|
||||
$url .= $s.'q='.rawurlencode($_GET['q']);
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
public static function categoryCurrent()
|
||||
{
|
||||
global $_ctx;
|
||||
|
||||
if (!isset($_ctx->c2_page_params['cat_id']) && !isset($_ctx->c2_page_params['cat_title'])) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (isset($_ctx->c2_page_params['cat_id']) && $_ctx->c2_page_params['cat_id'] == $_ctx->c2_categories->cat_id) {
|
||||
|
||||
return true;
|
||||
}
|
||||
if (isset($_ctx->c2_page_params['cat_title']) && $_ctx->c2_page_params['cat_title'] == $_ctx->c2_categories->cat_title) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
102
inc/lib.cinecturlink2.list.php
Normal file
102
inc/lib.cinecturlink2.list.php
Normal file
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
class adminlistCinecturlink2 extends adminGenericList
|
||||
{
|
||||
public function display($page, $nb_per_page, $url)
|
||||
{
|
||||
if ($this->rs->isEmpty()) {
|
||||
echo '<p><strong>'.__('There is no link').'</strong></p>';
|
||||
}
|
||||
else {
|
||||
$pager = new pager($page, $this->rs_count, $nb_per_page,10);
|
||||
|
||||
$pager->base_url = $url;
|
||||
|
||||
$html_block =
|
||||
'<table class="clear">'.
|
||||
'<thead>'.
|
||||
'<tr>'.
|
||||
'<th class="nowrap" colspan="2">'.__('Title').'</th>'.
|
||||
'<th class="nowrap">'.__('Author').'</th>'.
|
||||
'<th class="maximal">'.__('Description').'</th>'.
|
||||
'<th class="maximal">'.__('Links').'</th>'.
|
||||
'<th class="nowrap">'.__('Category').'</th>'.
|
||||
'<th class="nowrap">'.__('My rating').'</th>'.
|
||||
'<th class="nowrap">'.__('Date').'</th>'.
|
||||
'</tr>'.
|
||||
'</thead>'.
|
||||
'<tbody>%s</tbody>'.
|
||||
'</table>';
|
||||
|
||||
echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
|
||||
$blocks = explode('%s',$html_block);
|
||||
echo $blocks[0];
|
||||
|
||||
$this->rs->index(((integer)$page - 1) * $nb_per_page);
|
||||
$iter = 0;
|
||||
while ($iter < $nb_per_page) {
|
||||
echo $this->linkLine($url,$iter);
|
||||
|
||||
if ($this->rs->isEnd())
|
||||
break;
|
||||
else
|
||||
$this->rs->moveNext();
|
||||
|
||||
$iter++;
|
||||
}
|
||||
echo $blocks[1];
|
||||
echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>';
|
||||
}
|
||||
}
|
||||
|
||||
private function linkLine($url, $loop)
|
||||
{
|
||||
return
|
||||
'<tr class="line">'."\n".
|
||||
'<td class="nowrap">'.
|
||||
form::checkbox(array('links[]'), $this->rs->link_id, 0).
|
||||
'</td>'.
|
||||
'<td class="nowrap">'.
|
||||
'<a href="plugin.php?p=cinecturlink2&link_id='.$this->rs->link_id.'#newlink" title="'.__('Edit').'">'.
|
||||
html::escapeHTML($this->rs->link_title).
|
||||
'</a>'.
|
||||
"</td>\n".
|
||||
'<td class="nowrap">'.
|
||||
html::escapeHTML($this->rs->link_author).
|
||||
"</td>\n".
|
||||
'<td class="maximal">'.
|
||||
html::escapeHTML($this->rs->link_desc).
|
||||
"</td>\n".
|
||||
'<td class="nowrap">'.
|
||||
'<a href="'.$this->rs->link_url.'" title="'.html::escapeHTML($this->rs->link_url).'">'.__('URL').'</a> '.
|
||||
'<a href="'.$this->rs->link_img.'" title="'.html::escapeHTML($this->rs->link_img).'">'.__('image').'</a> '.
|
||||
"</td>\n".
|
||||
'<td class="nowrap">'.
|
||||
html::escapeHTML($this->rs->cat_title).
|
||||
"</td>\n".
|
||||
'<td class="nowrap">'.
|
||||
html::escapeHTML($this->rs->link_note).'/20'.
|
||||
"</td>\n".
|
||||
'<td class="nowrap">'.
|
||||
dt::dt2str($GLOBALS['core']->blog->settings->system->date_format.', '.$GLOBALS['core']->blog->settings->system->time_format,$this->rs->link_upddt,$GLOBALS['core']->auth->getInfo('user_tz')).
|
||||
"</td>\n".
|
||||
'</tr>'."\n";
|
||||
}
|
||||
}
|
44
inc/lib.sitemaps.cinecturlink2.php
Normal file
44
inc/lib.sitemaps.cinecturlink2.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
class sitemapsCinecturlink2
|
||||
{
|
||||
public static function sitemapsDefineParts($map_parts)
|
||||
{
|
||||
$map_parts->offsetSet(__('Cinecturlink'), 'cinecturlink2');
|
||||
}
|
||||
|
||||
public static function sitemapsURLsCollect($sitemaps)
|
||||
{
|
||||
global $core;
|
||||
$core->blog->settings->addNamespace('sitemaps');
|
||||
|
||||
if ($core->plugins->moduleExists('cinecturlink2')
|
||||
&& $core->blog->settings->sitemaps->sitemaps_cinecturlink2_url) {
|
||||
|
||||
$freq = $sitemaps->getFrequency($core->blog->settings->sitemaps->sitemaps_cinecturlink2_fq);
|
||||
$prio = $sitemaps->getPriority($core->blog->settings->sitemaps->sitemaps_cinecturlink2_pr);
|
||||
$base = $core->blog->url.$core->url->getBase('cinecturlink2');
|
||||
|
||||
$sitemaps->addEntry($base, $prio, $freq);
|
||||
|
||||
$core->blog->settings->addNamespace('cinecturlink2');
|
||||
$C2 = new cinecturlink2($core);
|
||||
$cats = $C2->getCategories();
|
||||
while ($cats->fetch()) {
|
||||
$sitemaps->addEntry($base."/".$core->blog->settings->cinecturlink2->cinecturlink2_public_caturl.'/'.urlencode($cats->cat_title), $prio, $freq);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
679
index.php
Normal file
679
index.php
Normal file
|
@ -0,0 +1,679 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr http://jcd.lv
|
||||
#
|
||||
# Licensed under the GPL version 2.0 license.
|
||||
# A copy of this license is available in LICENSE file or at
|
||||
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
#
|
||||
# -- END LICENSE BLOCK ------------------------------------
|
||||
|
||||
if (!defined('DC_CONTEXT_ADMIN')) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
dcPage::check('contentadmin');
|
||||
|
||||
# Class
|
||||
$C2 = new cinecturlink2($core);
|
||||
require dirname(__FILE__).'/inc/lib.cinecturlink2.list.php';
|
||||
|
||||
# Queries
|
||||
$upd_link_id = isset($_REQUEST['link_id']) ? $_REQUEST['link_id'] : null;
|
||||
$new_title = isset($_POST['new_title']) ? $_POST['new_title'] : '';
|
||||
$new_desc = isset($_POST['new_desc']) ? $_POST['new_desc'] : '';
|
||||
$new_author = isset($_POST['new_author']) ? $_POST['new_author'] : '';
|
||||
$new_url = isset($_POST['new_url']) ? $_POST['new_url'] : '';
|
||||
$new_category = isset($_POST['new_category']) ? $_POST['new_category'] : '';
|
||||
$new_lang = isset($_POST['new_lang']) ? $_POST['new_lang'] : $core->auth->getInfo('user_lang');
|
||||
$new_image = isset($_POST['new_image']) ? $_POST['new_image'] : '';
|
||||
$new_note = isset($_POST['new_note']) ? $_POST['new_note'] : 10;
|
||||
$new_cattitle = isset($_POST['new_cattitle']) ? $_POST['new_cattitle'] : '';
|
||||
$new_catdesc = isset($_POST['new_catdesc']) ? $_POST['new_catdesc'] : '';
|
||||
$action = isset($_POST['action']) ? $_POST['action'] : '';
|
||||
|
||||
# Actions
|
||||
try {
|
||||
|
||||
# Update categories
|
||||
if ($action == 'update_categories') {
|
||||
|
||||
# Reorder categories
|
||||
if (empty($_POST['cats_order'])
|
||||
&& !empty($_POST['catpos'])
|
||||
) {
|
||||
$order = $_POST['catpos'];
|
||||
asort($order);
|
||||
$order = array_keys($order);
|
||||
}
|
||||
elseif (!empty($_POST['cats_order'])) {
|
||||
$order = explode(',', $_POST['cats_order']);
|
||||
}
|
||||
|
||||
if (!empty($order)) {
|
||||
|
||||
foreach ($order as $pos => $id) {
|
||||
|
||||
$pos = ((integer) $pos)+1;
|
||||
if (empty($pos) || empty($id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$cur = $core->con->openCursor($C2->table.'_cat');
|
||||
$cur->cat_pos = $pos;
|
||||
$C2->updCategory($id, $cur);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Categories successfully reordered.')
|
||||
);
|
||||
}
|
||||
|
||||
# Delete categories
|
||||
if (!empty($_POST['delcat'])) {
|
||||
|
||||
foreach($_POST['delcat'] as $cat_id) {
|
||||
$C2->delCategory($cat_id);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Categories successfully deleted.')
|
||||
);
|
||||
}
|
||||
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#cats' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
|
||||
# Create new category
|
||||
if ($action == 'create_category') {
|
||||
|
||||
if (empty($new_cattitle)) {
|
||||
throw new Exception(__('You must provide a title.'));
|
||||
}
|
||||
|
||||
$exists = $C2->getCategories(array('cat_title' => $new_cattitle), true)->f(0);
|
||||
if ($exists) {
|
||||
throw new Exception(__('Category with same name already exists.'));
|
||||
}
|
||||
|
||||
$cur = $core->con->openCursor($C2->table.'_cat');
|
||||
$cur->cat_title = $new_cattitle;
|
||||
$cur->cat_desc = $new_catdesc;
|
||||
|
||||
$C2->addCategory($cur);
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Category successfully created.')
|
||||
);
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#cats' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
|
||||
# Delete links
|
||||
if (!empty($_POST['links']) && $action == 'delete_links') {
|
||||
|
||||
foreach($_POST['links'] as $link_id) {
|
||||
$C2->delLink($link_id);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Links successfully deleted.')
|
||||
);
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#links' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
|
||||
# Move to right tab
|
||||
if (!empty($_POST['links']) && $action == 'moveto_change_links_category') {
|
||||
// Nothing to do: show links action page
|
||||
}
|
||||
|
||||
# Update category for a group of links
|
||||
if (!empty($_POST['links']) && $action == 'change_links_category') {
|
||||
|
||||
foreach($_POST['links'] as $link_id) {
|
||||
$cur = $core->con->openCursor($C2->table);
|
||||
$cur->cat_id = abs((integer) $_POST['upd_category']);
|
||||
$C2->updLink($link_id,$cur);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Links successfully updated.')
|
||||
);
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#links' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
|
||||
# Move to right tab
|
||||
if (!empty($_POST['links']) && $_POST['action'] == 'moveto_change_links_note') {
|
||||
// Nothing to do: show links action page
|
||||
}
|
||||
|
||||
# Update note for a group of links
|
||||
if (!empty($_POST['links']) && $action == 'change_links_note') {
|
||||
|
||||
foreach($_POST['links'] as $link_id) {
|
||||
$cur = $core->con->openCursor($C2->table);
|
||||
$cur->link_note = abs((integer) $_POST['upd_note']);
|
||||
$C2->updLink($link_id,$cur);
|
||||
}
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Links successfully updated.')
|
||||
);
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#links' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
|
||||
# Create or update link
|
||||
if (!empty($_POST['newlink'])) {
|
||||
|
||||
cinecturlink2::test_folder(
|
||||
DC_ROOT.'/'.$core->blog->settings->system->public_path,
|
||||
$core->blog->settings->cinecturlink2->cinecturlink2_folder
|
||||
);
|
||||
|
||||
if (empty($new_title)) {
|
||||
throw new Exception(__('You must provide a title.'));
|
||||
}
|
||||
if (empty($new_author)) {
|
||||
throw new Exception(__('You must provide an author.'));
|
||||
}
|
||||
if (!preg_match('/http:\/\/.+/',$new_image)) {
|
||||
throw new Exception(__('You must provide a link to an image.'));
|
||||
}
|
||||
|
||||
$cur = $core->con->openCursor($C2->table);
|
||||
$cur->link_title = $new_title;
|
||||
$cur->link_desc = $new_desc;
|
||||
$cur->link_author = $new_author;
|
||||
$cur->link_url = $new_url;
|
||||
$cur->cat_id = $new_category == '' ? null : $new_category;
|
||||
$cur->link_lang = $new_lang;
|
||||
$cur->link_img = $new_image;
|
||||
$cur->link_note = $new_note;
|
||||
|
||||
# Create link
|
||||
if (empty($upd_link_id)) {
|
||||
|
||||
$exists = $C2->getLinks(array('link_title'=>$new_title),true)->f(0);
|
||||
if ($exists) {
|
||||
throw new Exception(__('Link with same name already exists.'));
|
||||
}
|
||||
|
||||
$C2->addLink($cur);
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Link successfully created.')
|
||||
);
|
||||
}
|
||||
|
||||
# Update link
|
||||
else {
|
||||
|
||||
$exists = $C2->getLinks(array('link_id'=>$upd_link_id),true)->f(0);
|
||||
if (!$exists) {
|
||||
throw new Exception(__('Unknown link.'));
|
||||
}
|
||||
|
||||
$C2->updLink($upd_link_id,$cur);
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Link successfully updated.')
|
||||
);
|
||||
}
|
||||
|
||||
http::redirect(empty($_POST['redir']) ?
|
||||
$p_url.'#links' : $_POST['redir']
|
||||
);
|
||||
}
|
||||
}
|
||||
catch(Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
|
||||
# Construct lists
|
||||
$show_filters = false;
|
||||
$sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'link_upddt';
|
||||
$order = !empty($_GET['order']) ? $_GET['order'] : 'desc';
|
||||
$page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1;
|
||||
$nb_per_page = 30;
|
||||
if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) {
|
||||
if ($nb_per_page != $_GET['nb']) $show_filters = true;
|
||||
$nb_per_page = (integer) $_GET['nb'];
|
||||
}
|
||||
|
||||
$sortby_combo = array(
|
||||
__('Date') => 'link_upddt',
|
||||
__('Title') => 'link_title',
|
||||
__('Category') => 'cat_title',
|
||||
__('My rating') => 'link_note',
|
||||
);
|
||||
|
||||
$order_combo = array(
|
||||
__('Descending') => 'desc',
|
||||
__('Ascending') => 'asc'
|
||||
);
|
||||
|
||||
$params = array();
|
||||
$params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page);
|
||||
|
||||
if ($sortby != '' && in_array($sortby,$sortby_combo)) {
|
||||
if ($order != '' && in_array($order,$order_combo)) {
|
||||
$params['order'] = $sortby.' '.$order;
|
||||
}
|
||||
if ($sortby != 'link_upddt' || $order != 'desc') {
|
||||
$show_filters = true;
|
||||
}
|
||||
}
|
||||
|
||||
$categories = $C2->getCategories();
|
||||
|
||||
$categories_combo = array('-'=> '');
|
||||
while($categories->fetch()) {
|
||||
$cat_title = html::escapeHTML($categories->cat_title);
|
||||
$categories_combo[$cat_title] = $categories->cat_id;
|
||||
}
|
||||
|
||||
$medias_combo = $tmp_medias_combo = $dir = null;
|
||||
try {
|
||||
$allowed_medias = array('png','jpg','gif','bmp','jpeg');
|
||||
$core->media = new dcMedia($core);
|
||||
$core->media->chdir($core->blog->settings->cinecturlink2->cinecturlink2_folder);
|
||||
$core->media->getDir();
|
||||
$dir =& $core->media->dir;
|
||||
|
||||
foreach($dir['files'] as $file) {
|
||||
if (!in_array(files::getExtension($file->relname),$allowed_medias)) continue;
|
||||
$tmp_medias_combo[$file->media_title] = $file->file_url;
|
||||
}
|
||||
if (!empty($tmp_medias_combo)) {
|
||||
$medias_combo = array_merge(array('-'=>''),$tmp_medias_combo);
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
//$core->error->add($e->getMessage());
|
||||
}
|
||||
|
||||
$langs_combo = l10n::getISOcodes(true);
|
||||
$links_action_combo = array(
|
||||
__('delete') => 'delete_links',
|
||||
__('change category') => 'moveto_change_links_category',
|
||||
__('change my rating') => 'moveto_change_links_note'
|
||||
);
|
||||
$notes_combo = array();
|
||||
for ($i=0;$i<21;$i++) {
|
||||
$notes_combo[$i.'/20'] = $i;
|
||||
}
|
||||
|
||||
$pager_base_url = $p_url.
|
||||
'&sortby='.$sortby.
|
||||
'&order='.$order.
|
||||
'&nb='.$nb_per_page.
|
||||
'&page=%s';
|
||||
|
||||
try {
|
||||
$links = $C2->getLinks($params);
|
||||
$links_counter = $C2->getLinks($params,true)->f(0);
|
||||
$links_list = new adminListCinecturlink2($core,$links,$links_counter,$pager_base_url);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
|
||||
# Page headers
|
||||
echo
|
||||
'<html><head>'.
|
||||
'<title>'.__('Cinecturlink 2').'</title>'.
|
||||
dcPage::jsToolBar().
|
||||
dcPage::jsToolMan().
|
||||
dcPage::jsLoad('js/_posts_list.js').
|
||||
dcPage::jsLoad('index.php?pf=cinecturlink2/js/cinecturlink2.js').
|
||||
dcPage::jsPageTabs().
|
||||
"<script type=\"text/javascript\">
|
||||
//<![CDATA[\n".
|
||||
dcPage::jsVar('dotclear.msg.show_filters', $show_filters ? 'true':'false')."\n".
|
||||
dcPage::jsVar('dotclear.msg.filter_posts_list', __('Show filters and display options'))."\n".
|
||||
dcPage::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options'))."\n".
|
||||
"
|
||||
\$(function(){if(!document.getElementById){return;}
|
||||
\$('#newlinksearch').openGoogle('".$core->auth->getInfo('user_lang')."','#new_title');
|
||||
\$('#newimagesearch').openAmazon('".$core->auth->getInfo('user_lang')."','#new_title');
|
||||
\$('#newimageselect').fillLink('#new_image');
|
||||
});
|
||||
//]]>\n".
|
||||
"</script>\n".
|
||||
'</head>'.
|
||||
'<body>';
|
||||
|
||||
# Change category for links
|
||||
if (!empty($_POST['links']) && $action == 'moveto_change_links_category') {
|
||||
|
||||
echo
|
||||
dcPage::breadcrumb(
|
||||
array(
|
||||
html::escapeHTML($core->blog->name) => '',
|
||||
__('Cinecturlink 2') => $p_url.'&move=1#links',
|
||||
__('Change category of links') => ''
|
||||
)
|
||||
).
|
||||
dcPage::notices();
|
||||
|
||||
echo '
|
||||
<p class="nav_prevnext">
|
||||
<a title="'.__('Go back to links list').'" href="'.$p_url.'&move=1#links">« '.__('Back').'</a>
|
||||
</p>
|
||||
|
||||
<div id="changecatlinks">
|
||||
<form method="post" action="'.$p_url.'#links">
|
||||
<p>'.__('Change category for this selection :').'</p>';
|
||||
|
||||
foreach($_POST['links'] as $k => $link) {
|
||||
echo
|
||||
'<p><label class="classic" for="links'.$k.'">'.
|
||||
form::checkbox(array('links[]', 'links'.$k), $link, 1).' '.
|
||||
$C2->getLinks(array('link_id' => $link))->f('link_title').
|
||||
'</label></p>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<p><label for="upd_category">'.__('Select a category:').' '.
|
||||
form::combo('upd_category', $categories_combo, '', 'maximal').'
|
||||
</label></p><p>
|
||||
<input type="submit" name="updlinkcat" value="ok" />'.
|
||||
form::hidden(array('action'), 'change_links_category').
|
||||
$core->formNonce().'
|
||||
</p>
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
|
||||
# Change note for links
|
||||
elseif (!empty($_POST['links']) && $action == 'moveto_change_links_note')
|
||||
{
|
||||
echo dcPage::breadcrumb(
|
||||
array(
|
||||
html::escapeHTML($core->blog->name) => '',
|
||||
__('Cinecturlink 2') => $p_url.'&move=1#links',
|
||||
__('Change note of links') => ''
|
||||
)
|
||||
).
|
||||
dcPage::notices();
|
||||
|
||||
echo '
|
||||
<p class="nav_prevnext">
|
||||
<a title="'.__('Go back to links list').'" href="'.$p_url.'&move=1#links">« '.__('Back').'</a>
|
||||
</p>
|
||||
|
||||
<div id="changenotelinks">
|
||||
<form method="post" action="'.$p_url.'#links">
|
||||
<p>'.__('Change note for this selection :').'</p>';
|
||||
|
||||
foreach($_POST['links'] as $k => $link) {
|
||||
echo
|
||||
'<p><label class="classic" for="links'.$k.'">'.
|
||||
form::checkbox(array('links[]', 'links'.$k), $link, 1).' '.
|
||||
$C2->getLinks(array('link_id'=>$link))->f('link_title').
|
||||
'</label></p>';
|
||||
}
|
||||
|
||||
echo '
|
||||
<p><label for="upd_note">'.__('Select a rating:').' '.
|
||||
form::combo('upd_note',$notes_combo, 10, 'maximal').'
|
||||
</label></p><p>
|
||||
<input type="submit" name="updlinknote" value="ok" />'.
|
||||
form::hidden(array('action'), 'change_links_note').
|
||||
$core->formNonce().'
|
||||
</p>
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
|
||||
# All other tabs
|
||||
else {
|
||||
|
||||
echo dcPage::breadcrumb(
|
||||
array(
|
||||
html::escapeHTML($core->blog->name) => '',
|
||||
__('Cinecturlink 2') => ''
|
||||
)
|
||||
).
|
||||
dcPage::notices();
|
||||
|
||||
# List links
|
||||
echo '
|
||||
<div class="multi-part" id="links" title="'.__('Links').'">';
|
||||
|
||||
if ($links->isEmpty()) {
|
||||
echo '<p>'.__('There is no link').'</p>';
|
||||
}
|
||||
else {
|
||||
echo '
|
||||
<form action="'.$p_url.'#links" method="get" id="filters-form">
|
||||
<h3 class="out-of-screen-if-js">'.__('Show filters and display options').'</h3>
|
||||
|
||||
<div class="table">'.
|
||||
|
||||
'<div class="cell">'.
|
||||
'<p><label for="sortby" class="ib">'.__('Order by:').'</label> '.
|
||||
form::combo('sortby',$sortby_combo,$sortby).'</p>'.
|
||||
'</div><div class="cell">'.
|
||||
'<p><label for="order" class="ib">'.__('Sort:').'</label> '.
|
||||
form::combo('order',$order_combo,$order).'</p>'.
|
||||
'</div><div class="cell">'.
|
||||
'<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'.
|
||||
form::field('nb',3,3,$nb_per_page).' '.
|
||||
__('entries per page').'</label></p>'.
|
||||
'</div>'.
|
||||
'</div>'.
|
||||
|
||||
'<p><input type="submit" value="'.__('Apply filters and display options').'" />'.
|
||||
form::hidden(array('p'), 'cinecturlink2').
|
||||
'<br class="clear" /></p>'. //Opera sucks
|
||||
|
||||
'</form>
|
||||
|
||||
<form action="'.$p_url.'#links" method="post" id="form-actions">';
|
||||
|
||||
$links_list->display($page,$nb_per_page,$pager_base_url);
|
||||
|
||||
echo '
|
||||
<div class="two-cols">
|
||||
<p class="col checkboxes-helpers"></p>
|
||||
<p class="col right">'.__('Selected links action:').' '.
|
||||
form::combo(array('action'),$links_action_combo).'
|
||||
<input type="submit" value="'.__('ok').'" />'.
|
||||
form::hidden(array('sortby'),$sortby).
|
||||
form::hidden(array('order'),$order).
|
||||
form::hidden(array('page'),$page).
|
||||
form::hidden(array('nb'),$nb_per_page).
|
||||
$core->formNonce().'
|
||||
</p>
|
||||
</div>
|
||||
</form>';
|
||||
}
|
||||
echo '
|
||||
</div>';
|
||||
|
||||
# Create/edit link
|
||||
$title = __('New link');
|
||||
|
||||
if (null !== $upd_link_id) {
|
||||
|
||||
$upd_rs = $C2->getLinks(array('link_id' => $upd_link_id));
|
||||
$upd_link_id = null;
|
||||
if (!$upd_rs->isEmpty()) {
|
||||
$new_title = $upd_rs->link_title;
|
||||
$new_desc = $upd_rs->link_desc;
|
||||
$new_author = $upd_rs->link_author;
|
||||
$new_url = $upd_rs->link_url;
|
||||
$new_category = $upd_rs->cat_id;
|
||||
$new_lang = $upd_rs->link_lang;
|
||||
$new_image = $upd_rs->link_img;
|
||||
$new_note = $upd_rs->link_note;
|
||||
$upd_link_id = $upd_rs->link_id;
|
||||
$title = __('Edit link');
|
||||
}
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="multi-part" id="newlink" title="'.$title.'">
|
||||
<form id="newlinkform" method="post" action="'.$p_url.'#newlink">
|
||||
|
||||
<div class="two-cols clearfix">
|
||||
<div class="col70">
|
||||
|
||||
<p><label for="new_title">'.__('Title:').' '.
|
||||
form::field('new_title', 60, 255, $new_title, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_desc">'.__('Description:').' '.
|
||||
form::field('new_desc', 60, 255, $new_desc, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_author">'.__('Author:').' '.
|
||||
form::field('new_author', 60, 255, $new_author, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_url">'.__('Details URL:').' '.
|
||||
form::field('new_url', 60, 255, $new_url, 'maximal').'</label>'.
|
||||
'<a class="modal" href="http://google.com" id="newlinksearch">'.
|
||||
__('Search with Google').'</a>'.
|
||||
'</p>
|
||||
|
||||
<p><label for="new_image">'.__('Image URL:').' '.
|
||||
form::field('new_image', 60, 255, $new_image, 'maximal').'</label>'.
|
||||
'<a class="modal" href="http://amazon.com" id="newimagesearch">'.
|
||||
__('Search with Amazon').'</a>'.
|
||||
'</p>';
|
||||
|
||||
if (empty($medias_combo)) {
|
||||
echo
|
||||
'<p class="form-note">'.__('There is no image in cinecturlink media path.').'</p>';
|
||||
}
|
||||
else {
|
||||
echo '
|
||||
<p><label for="newimageselect">'.__('or select from repository:').' '.
|
||||
form::combo('newimageselect', $medias_combo, '', 'maximal').
|
||||
'</label></p>'.
|
||||
'<p class="form-note">'.__('Go to media manager to add image to cinecturlink path.').'</p>';
|
||||
}
|
||||
|
||||
echo '
|
||||
|
||||
</div>
|
||||
<div class="col30">
|
||||
|
||||
<p><label for="new_category">'.__('Category:').' '.
|
||||
form::combo('new_category', $categories_combo, $new_category, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_lang">'.__('Lang:').' '.
|
||||
form::combo('new_lang', $langs_combo, $new_lang, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_note">'.__('My rating:').' '.
|
||||
form::combo('new_note', $notes_combo, $new_note, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
</div></div>
|
||||
|
||||
<p>'.
|
||||
form::hidden(array('link_id'),$upd_link_id).
|
||||
form::hidden(array('action'),'create_link').
|
||||
$core->formNonce().'
|
||||
<input type="submit" name="newlink" value="'.($upd_link_id ? __('update link') : __('create link')).'" />
|
||||
</p>
|
||||
</form>
|
||||
</div>';
|
||||
|
||||
# List categories
|
||||
echo '<div class="multi-part" id="cats" title="'.__('Categories').'">';
|
||||
|
||||
if ($categories->isEmpty()) {
|
||||
echo '<p>'.__('There is no category').'</p>';
|
||||
}
|
||||
else {
|
||||
echo '
|
||||
<form method="post" action="'.$p_url.'#cats">
|
||||
<table class="maximal dragable">
|
||||
<thead><tr><th colspan="2">#</th><th>'.__('name').'</th><th>'.__('description').'</th></tr></thead>
|
||||
<tbody id="links-list-cat">';
|
||||
|
||||
$i = 0;
|
||||
while($categories->fetch()) {
|
||||
$i++;
|
||||
$id = $categories->cat_id;
|
||||
$title = html::escapeHTML($categories->cat_title);
|
||||
$desc = html::escapeHTML($categories->cat_desc);
|
||||
|
||||
echo '
|
||||
<tr class="line" id="l_'.$id.'">
|
||||
<td class="minimal handle">'.form::field(array('catpos['.$id.']'),2,5,$i).'</td>
|
||||
<td class="minimal">'.form::checkbox(array('delcat[]'),$id).'</td>
|
||||
<td class="nowrap">'.$title.'</td>
|
||||
<td class="maximal">'.$desc.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="form-note">'.__('Check to delete').'</p>
|
||||
<p>'.
|
||||
form::hidden('cats_order', '').
|
||||
form::hidden(array('action'), 'update_categories').
|
||||
$core->formNonce().'
|
||||
<input type="submit" name="updcats" value="'.__('update categories').'" />
|
||||
</p>
|
||||
</form>';
|
||||
}
|
||||
|
||||
echo '
|
||||
</div>';
|
||||
|
||||
# Create category
|
||||
echo '
|
||||
<div class="multi-part" id="newcat" title="'.__('New category').'">
|
||||
<form method="post" action="'.$p_url.'#newcat">
|
||||
|
||||
<p><label for="new_cattitle">'.__('Title:').' '.
|
||||
form::field('new_cattitle', 60, 64, $new_cattitle, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p><label for="new_catdesc">'.__('Description:').' '.
|
||||
form::field('new_catdesc', 60, 64, $new_catdesc, 'maximal').
|
||||
'</label></p>
|
||||
|
||||
<p>'.
|
||||
form::hidden(array('action'), 'create_category').
|
||||
$core->formNonce().'
|
||||
<input type="submit" name="newcat" value="'.__('save').'" />
|
||||
</p>
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
|
||||
dcPage::helpBlock('cinecturlink2');
|
||||
|
||||
# Page footer
|
||||
echo
|
||||
'<hr class="clear"/><p class="right modules">
|
||||
<a class="module-config" '.
|
||||
'href="plugins.php?module=cinecturlink2&conf=1&redir='.
|
||||
urlencode('plugin.php?p=cinecturlink2').'">'.__('Configuration').'</a> -
|
||||
cinecturlink2 - '.$core->plugins->moduleInfo('cinecturlink2', 'version').'
|
||||
<img alt="'.__('cinecturlink2').'" src="index.php?pf=cinecturlink2/icon.png" />
|
||||
</p>
|
||||
</body></html>';
|
102
js/cinecturlink2.js
Normal file
102
js/cinecturlink2.js
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
* This file is part of cinecturlink2, a plugin for Dotclear 2.
|
||||
*
|
||||
* Copyright (c) 2009-2010 JC Denis and contributors
|
||||
* jcdenis@gdwd.com
|
||||
*
|
||||
* Licensed under the GPL version 2.0 license.
|
||||
* A copy of this license is available in LICENSE file or at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* -- END LICENSE BLOCK ------------------------------------*/
|
||||
|
||||
;if(window.jQuery) (function($){
|
||||
$.fn.openGoogle = function(lang,target){
|
||||
return this.each(function(){
|
||||
$(this).click(function(){
|
||||
var val = $(target).attr('value');
|
||||
if (val!=''){
|
||||
searchwindow=window.open('http://www.google.com/search?hl='+lang+'&q='+val,'search','scrollbars=yes,width=800,height=600,resize=yes,toolbar=yes,menubar=yes');
|
||||
searchwindow.focus();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
$.fn.openAmazon = function(lang,target){
|
||||
return this.each(function(){
|
||||
$(this).click(function(){
|
||||
var val = $(target).attr('value');
|
||||
if (val!=''){
|
||||
searchwindow=window.open('http://www.amazon.fr/exec/obidos/external-search?keyword='+val+'&mode=blended','search','scrollbars=yes,width=800,height=600,resize=yes,toolbar=yes,menubar=yes');
|
||||
searchwindow.focus();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
$.fn.fillLink = function(target){
|
||||
return this.each(function(){
|
||||
$(this).change(function(){
|
||||
$(target).attr('value',$(this).attr('value'));
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
var dragsort = ToolMan.dragsort();
|
||||
$(function(){
|
||||
dragsort.makeTableSortable($('#links-list-cat').get(0),
|
||||
dotclear.sortable.setHandle,dotclear.sortable.saveOrder);
|
||||
});
|
||||
dotclear.sortable = {
|
||||
setHandle: function(item) {
|
||||
var handle = $(item).find('td.handle').get(0);
|
||||
while (handle.firstChild) {
|
||||
handle.removeChild(handle.firstChild);
|
||||
}
|
||||
item.toolManDragGroup.setHandle(handle);
|
||||
handle.className = handle.className+' handler';
|
||||
},
|
||||
saveOrder: function(item) {
|
||||
var group = item.toolManDragGroup;
|
||||
var order = document.getElementById('cats_order');
|
||||
group.register('dragend', function() {
|
||||
order.value = '';
|
||||
items = item.parentNode.getElementsByTagName('tr');
|
||||
for (var i=0; i<items.length; i++) {
|
||||
order.value += items[i].id.substr(2)+',';
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
$(function() {
|
||||
|
||||
$filtersform = $('#filters-form');
|
||||
$filtersform.before('<p><a id="filter-control" class="form-control" href="plugin.php?p=cinecturlink2" style="display:inline">'+dotclear.msg.filter_posts_list+'</a></p>')
|
||||
|
||||
if( dotclear.msg.show_filters == 'false' ) {
|
||||
$filtersform.hide();
|
||||
} else {
|
||||
$('#filter-control')
|
||||
.addClass('open')
|
||||
.text(dotclear.msg.cancel_the_filter);
|
||||
}
|
||||
|
||||
$('#filter-control').click(function() {
|
||||
if( $(this).hasClass('open') ) {
|
||||
if( dotclear.msg.show_filters == 'true' ) {
|
||||
return true;
|
||||
} else {
|
||||
$filtersform.hide();
|
||||
$(this).removeClass('open')
|
||||
.text(dotclear.msg.filter_posts_list);
|
||||
}
|
||||
} else {
|
||||
$filtersform.show();
|
||||
$(this).addClass('open')
|
||||
.text(dotclear.msg.cancel_the_filter);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
327
locales/fr/main.lang.php
Normal file
327
locales/fr/main.lang.php
Normal file
|
@ -0,0 +1,327 @@
|
|||
<?php
|
||||
// Language: Français
|
||||
// Module: cinecturlink2 - 0.7
|
||||
// Date: 2013-11-04 19:43:17
|
||||
// Translated with dcTranslater - 2013.05.11
|
||||
|
||||
#_admin.php:24
|
||||
#_admin.php:44
|
||||
#_public.php:195
|
||||
#_widgets.php:58
|
||||
#_widgets.php:66
|
||||
$GLOBALS['__l10n']['My cinecturlink'] = 'Mes cinecturlink';
|
||||
|
||||
#_config.php:55
|
||||
$GLOBALS['__l10n']['You must provide a specific folder for images.'] = 'Vous devez fournir un dossier spécifique pour les images.';
|
||||
|
||||
#_config.php:73
|
||||
$GLOBALS['__l10n']['Configuration has been successfully updated.'] = 'La configuration a été mise à jour avec succés.';
|
||||
|
||||
#_config.php:93
|
||||
$GLOBALS['__l10n']['Enable extension'] = 'Activer l\'extension';
|
||||
|
||||
#_config.php:95
|
||||
$GLOBALS['__l10n']['Maximum width of images (in pixel):'] = 'Largeur maximum des images (en pixels) :';
|
||||
|
||||
#_config.php:98
|
||||
$GLOBALS['__l10n']['Public folder of images (under public folder of blog):'] = 'Dossier publique des images (dans le répertoire "public" du blog) :';
|
||||
|
||||
#_config.php:108
|
||||
$GLOBALS['__l10n']['Update cache when use "Random" or "Number of view" order on widget (Need reload of widgets on change)'] = 'Mettre à jour le cache lors de l\'utilisation de l\'ordre "Aléatoire" ou "Nombre d\'affichages" dans le widget (Nécessite le rechargement du widget)';
|
||||
|
||||
#_config.php:109
|
||||
$GLOBALS['__l10n']['This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog.'] = 'Ceci augmente l\'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog.';
|
||||
|
||||
#_config.php:114
|
||||
$GLOBALS['__l10n']['Public page'] = 'Page publique';
|
||||
|
||||
#_config.php:118
|
||||
$GLOBALS['__l10n']['Enable public page'] = 'Activer la page publique';
|
||||
|
||||
#_config.php:119
|
||||
$GLOBALS['__l10n']['Public page has url: %s'] = 'La page publique à l\'URL: %s';
|
||||
|
||||
#_config.php:121
|
||||
$GLOBALS['__l10n']['Title of the public page:'] = 'Titre de la page publique :';
|
||||
|
||||
#_config.php:124
|
||||
$GLOBALS['__l10n']['Description of the public page:'] = 'Description de la page publique :';
|
||||
|
||||
#_config.php:127
|
||||
$GLOBALS['__l10n']['Limit number of entries per page on pulic page to:'] = 'Limiter le nombre d\'entrée par page sur la page public à :';
|
||||
|
||||
#_config.php:133
|
||||
$GLOBALS['__l10n']['Informations'] = 'Informations';
|
||||
|
||||
#_config.php:136
|
||||
$GLOBALS['__l10n']['Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar.'] = 'Une fois l\'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale.';
|
||||
|
||||
#_config.php:137
|
||||
$GLOBALS['__l10n']['In order to open links in new window you can use plugin %s.'] = 'Afin d\'ouvrir les liens dans une nouvelle page vous pouvez utiliser l\'extension %s.';
|
||||
|
||||
#_config.php:138
|
||||
$GLOBALS['__l10n']['In order to change URL of public page you can use plugin %s.'] = 'Afin de changer l\'URL de la page publique vous pouvez utiliser l\'extension %s.';
|
||||
|
||||
#_config.php:139
|
||||
$GLOBALS['__l10n']['You can add public pages of cinecturlink to the plugin %s.'] = 'Vous pouvez ajouter les pages publiques de cinecturlink à l\'extension %s.';
|
||||
|
||||
#_config.php:140
|
||||
#_config.php:141
|
||||
$GLOBALS['__l10n']['The plugin Cinecturlink2 is compatible with plugin %s.'] = 'L\'extension Cinecturlink2 est compatible avec l\'extension %s.';
|
||||
|
||||
#_widgets.php:45
|
||||
$GLOBALS['__l10n']['Update date'] = 'Date de mise à jour';
|
||||
|
||||
#_widgets.php:46
|
||||
#inc/lib.cinecturlink2.list.php:41
|
||||
#index.php:261
|
||||
$GLOBALS['__l10n']['My rating'] = 'Mon évaluation';
|
||||
|
||||
#_widgets.php:48
|
||||
$GLOBALS['__l10n']['Random'] = 'Aléatoire';
|
||||
|
||||
#_widgets.php:49
|
||||
$GLOBALS['__l10n']['Number of views'] = 'Nombre d\'affichages';
|
||||
|
||||
#_widgets.php:61
|
||||
$GLOBALS['__l10n']['Show selection of cinecturlinks'] = 'Afficher une selection de cinecturlink';
|
||||
|
||||
#_widgets.php:85
|
||||
$GLOBALS['__l10n']['Sort: (only for date, note and title)'] = 'Ordre: (seulement pour date, note et titre)';
|
||||
|
||||
#_widgets.php:92
|
||||
$GLOBALS['__l10n']['Limit:'] = 'Limite :';
|
||||
|
||||
#_widgets.php:98
|
||||
$GLOBALS['__l10n']['Enable link'] = 'Autoriser les liens';
|
||||
|
||||
#_widgets.php:104
|
||||
$GLOBALS['__l10n']['Show author'] = 'Afficher l\'auteur';
|
||||
|
||||
#_widgets.php:110
|
||||
$GLOBALS['__l10n']['Show my rating'] = 'Afficher mon évaluation';
|
||||
|
||||
#_widgets.php:116
|
||||
$GLOBALS['__l10n']['Show description'] = 'Afficher la description';
|
||||
|
||||
#_widgets.php:122
|
||||
$GLOBALS['__l10n']['Show a link to cinecturlink page'] = 'Afficher un lien vers la page publique';
|
||||
|
||||
#_widgets.php:143
|
||||
#_widgets.php:146
|
||||
$GLOBALS['__l10n']['List of categories of cinecturlink'] = 'Liste des catégories de cinecturlink';
|
||||
|
||||
#_widgets.php:151
|
||||
$GLOBALS['__l10n']['My cinecturlink by categories'] = 'Mes cinecturlink par catégories';
|
||||
|
||||
#_widgets.php:156
|
||||
$GLOBALS['__l10n']['Show number of links'] = 'Afficher le nombre de liens';
|
||||
|
||||
#_widgets.php:290
|
||||
#_widgets.php:321
|
||||
#default-templates/cinecturlink2.html:56
|
||||
#default-templates/cinecturlink2.html:56
|
||||
$GLOBALS['__l10n']['view all links'] = 'voir tous les liens';
|
||||
|
||||
#_widgets.php:290
|
||||
$GLOBALS['__l10n']['More links'] = 'Plus de liens';
|
||||
|
||||
#_widgets.php:321
|
||||
$GLOBALS['__l10n']['all links'] = 'tous les liens';
|
||||
|
||||
#_widgets.php:332
|
||||
$GLOBALS['__l10n']['view links of this category'] = 'voir les liens de cette catégorie';
|
||||
|
||||
#default-templates/cinecturlink2.html:31
|
||||
#default-templates/cinecturlink2.html:106
|
||||
$GLOBALS['__l10n']['previous links'] = 'liens précédents';
|
||||
|
||||
#default-templates/cinecturlink2.html:35
|
||||
#default-templates/cinecturlink2.html:108
|
||||
$GLOBALS['__l10n']['next links'] = 'liens suivants';
|
||||
|
||||
#default-templates/cinecturlink2.html:58
|
||||
$GLOBALS['__l10n']['These entries Atom feed'] = 'Fil atom de ces billets';
|
||||
|
||||
#default-templates/cinecturlink2.html:60
|
||||
$GLOBALS['__l10n']['Category\'s entries feed'] = 'Fil de cette catégorie';
|
||||
|
||||
#default-templates/cinecturlink2.html:86
|
||||
#default-templates/cinecturlink2.html:86
|
||||
$GLOBALS['__l10n']['link'] = 'lien';
|
||||
|
||||
#default-templates/cinecturlink2.html:87
|
||||
$GLOBALS['__l10n']['category'] = 'catégorie';
|
||||
|
||||
#inc/class.cinecturlink2.php:139
|
||||
$GLOBALS['__l10n']['No link title'] = 'Pas de titre de lien';
|
||||
|
||||
#inc/class.cinecturlink2.php:142
|
||||
$GLOBALS['__l10n']['No link description'] = 'Pas de description de lien';
|
||||
|
||||
#inc/class.cinecturlink2.php:178
|
||||
#inc/class.cinecturlink2.php:197
|
||||
$GLOBALS['__l10n']['No such link ID'] = 'ID de lien inconnu';
|
||||
|
||||
#inc/class.cinecturlink2.php:284
|
||||
$GLOBALS['__l10n']['No category title'] = 'Pas de titre de catégorie';
|
||||
|
||||
#inc/class.cinecturlink2.php:287
|
||||
$GLOBALS['__l10n']['No category description'] = 'Pas de description de catégorie';
|
||||
|
||||
#inc/class.cinecturlink2.php:312
|
||||
#inc/class.cinecturlink2.php:326
|
||||
$GLOBALS['__l10n']['No such category ID'] = 'ID de catégorie inconnu';
|
||||
|
||||
#inc/class.cinecturlink2.php:369
|
||||
$GLOBALS['__l10n']['Failed to create public folder for images.'] = 'Impossible de créer le repertoire publique pour les images.';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:21
|
||||
$GLOBALS['__l10n']['Plugin cinecturlink2'] = 'Extension cinecturlink 2';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:27
|
||||
$GLOBALS['__l10n']['link creation'] = 'Création de lien';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:28
|
||||
$GLOBALS['__l10n']['A new cineturlink named "%s" was added by "%s"'] = 'Un nouveau cinecturlink nommé "%s" a été ajouté par "%s"';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:36
|
||||
$GLOBALS['__l10n']['updating link'] = 'Mise à jour de lien';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:37
|
||||
$GLOBALS['__l10n']['Cinecturlink named "%s" has been updated by "%s"'] = 'Le cinecturlink nommé "%s" a été mis à jour par "%s"';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:45
|
||||
$GLOBALS['__l10n']['link deletion'] = 'Suppression de lien';
|
||||
|
||||
#inc/lib.cinecturlink2.activityreport.php:46
|
||||
$GLOBALS['__l10n']['Cinecturlink named "%s" has been deleted by "%s"'] = 'Le cinecturlink nommé "%s" a été effacé par "%s"';
|
||||
|
||||
#inc/lib.cinecturlink2.list.php:25
|
||||
#index.php:459
|
||||
$GLOBALS['__l10n']['There is no link'] = 'Il n\'y a pas de lien';
|
||||
|
||||
#inc/lib.cinecturlink2.list.php:89
|
||||
$GLOBALS['__l10n']['image'] = 'image';
|
||||
|
||||
#index.php:73
|
||||
$GLOBALS['__l10n']['Categories successfully reordered.'] = 'Catégories réordonnées.';
|
||||
|
||||
#index.php:85
|
||||
$GLOBALS['__l10n']['Categories successfully deleted.'] = 'Catégories effacées.';
|
||||
|
||||
#index.php:98
|
||||
#index.php:188
|
||||
$GLOBALS['__l10n']['You must provide a title.'] = 'Vous devez fournir un titre.';
|
||||
|
||||
#index.php:103
|
||||
$GLOBALS['__l10n']['Category with same name already exists.'] = 'Une catégorie portant le même nom existe déjà.';
|
||||
|
||||
#index.php:113
|
||||
$GLOBALS['__l10n']['Category successfully created.'] = 'Catégory créée.';
|
||||
|
||||
#index.php:128
|
||||
$GLOBALS['__l10n']['Links successfully deleted.'] = 'Liens effacés.';
|
||||
|
||||
#index.php:150
|
||||
#index.php:172
|
||||
$GLOBALS['__l10n']['Links successfully updated.'] = 'Liens mis à jour.';
|
||||
|
||||
#index.php:191
|
||||
$GLOBALS['__l10n']['You must provide an author.'] = 'Vous devez spécifier un auteur';
|
||||
|
||||
#index.php:194
|
||||
$GLOBALS['__l10n']['You must provide a link to an image.'] = 'Vous devez fournir un lien vers une image.';
|
||||
|
||||
#index.php:212
|
||||
$GLOBALS['__l10n']['Link with same name already exists.'] = 'Un lien avec le même titre existe déjà.';
|
||||
|
||||
#index.php:218
|
||||
$GLOBALS['__l10n']['Link successfully created.'] = 'Lien crée.';
|
||||
|
||||
#index.php:227
|
||||
$GLOBALS['__l10n']['Unknown link.'] = 'Lien inconnu.';
|
||||
|
||||
#index.php:233
|
||||
$GLOBALS['__l10n']['Link successfully updated.'] = 'Lien mis à jour.';
|
||||
|
||||
#index.php:312
|
||||
$GLOBALS['__l10n']['change category'] = 'lodifier la catégorie';
|
||||
|
||||
#index.php:313
|
||||
$GLOBALS['__l10n']['change my rating'] = 'Modifier mon évaluation';
|
||||
|
||||
#index.php:368
|
||||
$GLOBALS['__l10n']['Change category of links'] = 'Changer la catégorie des liens';
|
||||
|
||||
#index.php:375
|
||||
#index.php:416
|
||||
$GLOBALS['__l10n']['Go back to links list'] = 'Retourner à la liste des liens';
|
||||
|
||||
#index.php:380
|
||||
$GLOBALS['__l10n']['Change category for this selection :'] = 'Changer de catégorie pour la sélection :';
|
||||
|
||||
#index.php:391
|
||||
$GLOBALS['__l10n']['Select a category:'] = 'Selectionner une catégorie :';
|
||||
|
||||
#index.php:409
|
||||
$GLOBALS['__l10n']['Change note of links'] = 'Changer la note des liens';
|
||||
|
||||
#index.php:421
|
||||
$GLOBALS['__l10n']['Change note for this selection :'] = 'Changer de note pour la sélection :';
|
||||
|
||||
#index.php:432
|
||||
$GLOBALS['__l10n']['Select a rating:'] = 'Selectionner une note :';
|
||||
|
||||
#index.php:494
|
||||
$GLOBALS['__l10n']['Selected links action:'] = 'Action sur les liens selectionnés :';
|
||||
|
||||
#index.php:510
|
||||
$GLOBALS['__l10n']['New link'] = 'Nouveau lien';
|
||||
|
||||
#index.php:549
|
||||
$GLOBALS['__l10n']['Details URL:'] = 'Liens vers les détails :';
|
||||
|
||||
#index.php:552
|
||||
$GLOBALS['__l10n']['Search with Google'] = 'Rechercher avec Google';
|
||||
|
||||
#index.php:555
|
||||
$GLOBALS['__l10n']['Image URL:'] = 'Lien vers l\'image :';
|
||||
|
||||
#index.php:558
|
||||
$GLOBALS['__l10n']['Search with Amazon'] = 'Rechercher avec Amazon';
|
||||
|
||||
#index.php:563
|
||||
$GLOBALS['__l10n']['There is no image in cinecturlink media path.'] = 'Il n\'y a pas d\'image dans le chemin des média cinecturlink.';
|
||||
|
||||
#index.php:567
|
||||
$GLOBALS['__l10n']['or select from repository:'] = 'ou selectionner depuis le dépôt :';
|
||||
|
||||
#index.php:570
|
||||
$GLOBALS['__l10n']['Go to media manager to add image to cinecturlink path.'] = 'Aller dans le gestionnaire de média pour ajouter des images au chemin des cinecturlink.';
|
||||
|
||||
#index.php:586
|
||||
$GLOBALS['__l10n']['My rating:'] = 'Mon évaluation :';
|
||||
|
||||
#index.php:596
|
||||
$GLOBALS['__l10n']['update link'] = 'mettre à jour ce lien';
|
||||
|
||||
#index.php:596
|
||||
$GLOBALS['__l10n']['create link'] = 'créer ce lien';
|
||||
|
||||
#index.php:605
|
||||
$GLOBALS['__l10n']['There is no category'] = 'Il n\'y a pas de catégorie';
|
||||
|
||||
#index.php:611
|
||||
$GLOBALS['__l10n']['name'] = 'nom';
|
||||
|
||||
#index.php:611
|
||||
$GLOBALS['__l10n']['description'] = 'description';
|
||||
|
||||
#index.php:633
|
||||
$GLOBALS['__l10n']['Check to delete'] = 'Cocher pour supprimer';
|
||||
|
||||
#index.php:638
|
||||
$GLOBALS['__l10n']['update categories'] = 'mettre à jour les catégories';
|
||||
|
||||
?>
|
436
locales/fr/main.po
Normal file
436
locales/fr/main.po
Normal file
|
@ -0,0 +1,436 @@
|
|||
# Language: Français
|
||||
# Module: cinecturlink2 - 0.7
|
||||
# Date: 2013-11-04 19:43:18
|
||||
# Translated with translater 2013.05.11
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: cinecturlink2 0.7\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2013-11-04T19:43:18+00:00\n"
|
||||
"Last-Translator: Jean-Christian Denis\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: _admin.php:24
|
||||
#: _admin.php:44
|
||||
#: _public.php:195
|
||||
#: _widgets.php:58
|
||||
#: _widgets.php:66
|
||||
msgid "My cinecturlink"
|
||||
msgstr "Mes cinecturlink"
|
||||
|
||||
#: _config.php:55
|
||||
msgid "You must provide a specific folder for images."
|
||||
msgstr "Vous devez fournir un dossier spécifique pour les images."
|
||||
|
||||
#: _config.php:73
|
||||
msgid "Configuration has been successfully updated."
|
||||
msgstr "La configuration a été mise à jour avec succés."
|
||||
|
||||
#: _config.php:93
|
||||
msgid "Enable extension"
|
||||
msgstr "Activer l'extension"
|
||||
|
||||
#: _config.php:95
|
||||
msgid "Maximum width of images (in pixel):"
|
||||
msgstr "Largeur maximum des images (en pixels) :"
|
||||
|
||||
#: _config.php:98
|
||||
msgid "Public folder of images (under public folder of blog):"
|
||||
msgstr "Dossier publique des images (dans le répertoire \"public\" du blog) :"
|
||||
|
||||
#: _config.php:108
|
||||
msgid "Update cache when use \"Random\" or \"Number of view\" order on widget (Need reload of widgets on change)"
|
||||
msgstr "Mettre à jour le cache lors de l'utilisation de l'ordre \"Aléatoire\" ou \"Nombre d'affichages\" dans le widget (Nécessite le rechargement du widget)"
|
||||
|
||||
#: _config.php:109
|
||||
msgid "This increases the random effect, but updates the cache of the blog whenever the widget is displayed, which reduces the perfomances of your blog."
|
||||
msgstr "Ceci augmente l'effet aléatoire, mais met à jour le cache à chaque affichage du widget, ce qui diminue les performances du blog."
|
||||
|
||||
#: _config.php:114
|
||||
msgid "Public page"
|
||||
msgstr "Page publique"
|
||||
|
||||
#: _config.php:118
|
||||
msgid "Enable public page"
|
||||
msgstr "Activer la page publique"
|
||||
|
||||
#: _config.php:119
|
||||
msgid "Public page has url: %s"
|
||||
msgstr "La page publique à l'URL: %s"
|
||||
|
||||
#: _config.php:121
|
||||
msgid "Title of the public page:"
|
||||
msgstr "Titre de la page publique :"
|
||||
|
||||
#: _config.php:124
|
||||
msgid "Description of the public page:"
|
||||
msgstr "Description de la page publique :"
|
||||
|
||||
#: _config.php:127
|
||||
msgid "Limit number of entries per page on pulic page to:"
|
||||
msgstr "Limiter le nombre d'entrée par page sur la page public à :"
|
||||
|
||||
#: _config.php:133
|
||||
msgid "Informations"
|
||||
msgstr "Informations"
|
||||
|
||||
#: _config.php:136
|
||||
msgid "Once the extension has been configured and your links have been created, you can place one of the cinecturlink widgets in the sidebar."
|
||||
msgstr "Une fois l'extension configurée et vos liens créés, vous pouvez placer un des widgets cinecturlink dans la barre latérale."
|
||||
|
||||
#: _config.php:137
|
||||
msgid "In order to open links in new window you can use plugin %s."
|
||||
msgstr "Afin d'ouvrir les liens dans une nouvelle page vous pouvez utiliser l'extension %s."
|
||||
|
||||
#: _config.php:138
|
||||
msgid "In order to change URL of public page you can use plugin %s."
|
||||
msgstr "Afin de changer l'URL de la page publique vous pouvez utiliser l'extension %s."
|
||||
|
||||
#: _config.php:139
|
||||
msgid "You can add public pages of cinecturlink to the plugin %s."
|
||||
msgstr "Vous pouvez ajouter les pages publiques de cinecturlink à l'extension %s."
|
||||
|
||||
#: _config.php:140
|
||||
#: _config.php:141
|
||||
msgid "The plugin Cinecturlink2 is compatible with plugin %s."
|
||||
msgstr "L'extension Cinecturlink2 est compatible avec l'extension %s."
|
||||
|
||||
#: _widgets.php:45
|
||||
msgid "Update date"
|
||||
msgstr "Date de mise à jour"
|
||||
|
||||
#: _widgets.php:46
|
||||
#: inc/lib.cinecturlink2.list.php:41
|
||||
#: index.php:261
|
||||
msgid "My rating"
|
||||
msgstr "Mon évaluation"
|
||||
|
||||
#: _widgets.php:48
|
||||
msgid "Random"
|
||||
msgstr "Aléatoire"
|
||||
|
||||
#: _widgets.php:49
|
||||
msgid "Number of views"
|
||||
msgstr "Nombre d'affichages"
|
||||
|
||||
#: _widgets.php:61
|
||||
msgid "Show selection of cinecturlinks"
|
||||
msgstr "Afficher une selection de cinecturlink"
|
||||
|
||||
#: _widgets.php:85
|
||||
msgid "Sort: (only for date, note and title)"
|
||||
msgstr "Ordre: (seulement pour date, note et titre)"
|
||||
|
||||
#: _widgets.php:92
|
||||
msgid "Limit:"
|
||||
msgstr "Limite :"
|
||||
|
||||
#: _widgets.php:98
|
||||
msgid "Enable link"
|
||||
msgstr "Autoriser les liens"
|
||||
|
||||
#: _widgets.php:104
|
||||
msgid "Show author"
|
||||
msgstr "Afficher l'auteur"
|
||||
|
||||
#: _widgets.php:110
|
||||
msgid "Show my rating"
|
||||
msgstr "Afficher mon évaluation"
|
||||
|
||||
#: _widgets.php:116
|
||||
msgid "Show description"
|
||||
msgstr "Afficher la description"
|
||||
|
||||
#: _widgets.php:122
|
||||
msgid "Show a link to cinecturlink page"
|
||||
msgstr "Afficher un lien vers la page publique"
|
||||
|
||||
#: _widgets.php:143
|
||||
#: _widgets.php:146
|
||||
msgid "List of categories of cinecturlink"
|
||||
msgstr "Liste des catégories de cinecturlink"
|
||||
|
||||
#: _widgets.php:151
|
||||
msgid "My cinecturlink by categories"
|
||||
msgstr "Mes cinecturlink par catégories"
|
||||
|
||||
#: _widgets.php:156
|
||||
msgid "Show number of links"
|
||||
msgstr "Afficher le nombre de liens"
|
||||
|
||||
#: _widgets.php:290
|
||||
#: _widgets.php:321
|
||||
#: default-templates/cinecturlink2.html:56
|
||||
#: default-templates/cinecturlink2.html:56
|
||||
msgid "view all links"
|
||||
msgstr "voir tous les liens"
|
||||
|
||||
#: _widgets.php:290
|
||||
msgid "More links"
|
||||
msgstr "Plus de liens"
|
||||
|
||||
#: _widgets.php:321
|
||||
msgid "all links"
|
||||
msgstr "tous les liens"
|
||||
|
||||
#: _widgets.php:332
|
||||
msgid "view links of this category"
|
||||
msgstr "voir les liens de cette catégorie"
|
||||
|
||||
#: default-templates/cinecturlink2.html:31
|
||||
#: default-templates/cinecturlink2.html:106
|
||||
msgid "previous links"
|
||||
msgstr "liens précédents"
|
||||
|
||||
#: default-templates/cinecturlink2.html:35
|
||||
#: default-templates/cinecturlink2.html:108
|
||||
msgid "next links"
|
||||
msgstr "liens suivants"
|
||||
|
||||
#: default-templates/cinecturlink2.html:58
|
||||
msgid "These entries Atom feed"
|
||||
msgstr "Fil atom de ces billets"
|
||||
|
||||
#: default-templates/cinecturlink2.html:60
|
||||
msgid "Category's entries feed"
|
||||
msgstr "Fil de cette catégorie"
|
||||
|
||||
#: default-templates/cinecturlink2.html:86
|
||||
#: default-templates/cinecturlink2.html:86
|
||||
msgid "link"
|
||||
msgstr "lien"
|
||||
|
||||
#: default-templates/cinecturlink2.html:87
|
||||
msgid "category"
|
||||
msgstr "catégorie"
|
||||
|
||||
#: inc/class.cinecturlink2.php:139
|
||||
msgid "No link title"
|
||||
msgstr "Pas de titre de lien"
|
||||
|
||||
#: inc/class.cinecturlink2.php:142
|
||||
msgid "No link description"
|
||||
msgstr "Pas de description de lien"
|
||||
|
||||
#: inc/class.cinecturlink2.php:178
|
||||
#: inc/class.cinecturlink2.php:197
|
||||
msgid "No such link ID"
|
||||
msgstr "ID de lien inconnu"
|
||||
|
||||
#: inc/class.cinecturlink2.php:284
|
||||
msgid "No category title"
|
||||
msgstr "Pas de titre de catégorie"
|
||||
|
||||
#: inc/class.cinecturlink2.php:287
|
||||
msgid "No category description"
|
||||
msgstr "Pas de description de catégorie"
|
||||
|
||||
#: inc/class.cinecturlink2.php:312
|
||||
#: inc/class.cinecturlink2.php:326
|
||||
msgid "No such category ID"
|
||||
msgstr "ID de catégorie inconnu"
|
||||
|
||||
#: inc/class.cinecturlink2.php:369
|
||||
msgid "Failed to create public folder for images."
|
||||
msgstr "Impossible de créer le repertoire publique pour les images."
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:21
|
||||
msgid "Plugin cinecturlink2"
|
||||
msgstr "Extension cinecturlink 2"
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:27
|
||||
msgid "link creation"
|
||||
msgstr "Création de lien"
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:28
|
||||
msgid "A new cineturlink named \"%s\" was added by \"%s\""
|
||||
msgstr "Un nouveau cinecturlink nommé \"%s\" a été ajouté par \"%s\""
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:36
|
||||
msgid "updating link"
|
||||
msgstr "Mise à jour de lien"
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:37
|
||||
msgid "Cinecturlink named \"%s\" has been updated by \"%s\""
|
||||
msgstr "Le cinecturlink nommé \"%s\" a été mis à jour par \"%s\""
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:45
|
||||
msgid "link deletion"
|
||||
msgstr "Suppression de lien"
|
||||
|
||||
#: inc/lib.cinecturlink2.activityreport.php:46
|
||||
msgid "Cinecturlink named \"%s\" has been deleted by \"%s\""
|
||||
msgstr "Le cinecturlink nommé \"%s\" a été effacé par \"%s\""
|
||||
|
||||
#: inc/lib.cinecturlink2.list.php:25
|
||||
#: index.php:459
|
||||
msgid "There is no link"
|
||||
msgstr "Il n'y a pas de lien"
|
||||
|
||||
#: inc/lib.cinecturlink2.list.php:89
|
||||
msgid "image"
|
||||
msgstr "image"
|
||||
|
||||
#: index.php:73
|
||||
msgid "Categories successfully reordered."
|
||||
msgstr "Catégories réordonnées."
|
||||
|
||||
#: index.php:85
|
||||
msgid "Categories successfully deleted."
|
||||
msgstr "Catégories effacées."
|
||||
|
||||
#: index.php:98
|
||||
#: index.php:188
|
||||
msgid "You must provide a title."
|
||||
msgstr "Vous devez fournir un titre."
|
||||
|
||||
#: index.php:103
|
||||
msgid "Category with same name already exists."
|
||||
msgstr "Une catégorie portant le même nom existe déjà."
|
||||
|
||||
#: index.php:113
|
||||
msgid "Category successfully created."
|
||||
msgstr "Catégory créée."
|
||||
|
||||
#: index.php:128
|
||||
msgid "Links successfully deleted."
|
||||
msgstr "Liens effacés."
|
||||
|
||||
#: index.php:150
|
||||
#: index.php:172
|
||||
msgid "Links successfully updated."
|
||||
msgstr "Liens mis à jour."
|
||||
|
||||
#: index.php:191
|
||||
msgid "You must provide an author."
|
||||
msgstr "Vous devez spécifier un auteur"
|
||||
|
||||
#: index.php:194
|
||||
msgid "You must provide a link to an image."
|
||||
msgstr "Vous devez fournir un lien vers une image."
|
||||
|
||||
#: index.php:212
|
||||
msgid "Link with same name already exists."
|
||||
msgstr "Un lien avec le même titre existe déjà."
|
||||
|
||||
#: index.php:218
|
||||
msgid "Link successfully created."
|
||||
msgstr "Lien crée."
|
||||
|
||||
#: index.php:227
|
||||
msgid "Unknown link."
|
||||
msgstr "Lien inconnu."
|
||||
|
||||
#: index.php:233
|
||||
msgid "Link successfully updated."
|
||||
msgstr "Lien mis à jour."
|
||||
|
||||
#: index.php:312
|
||||
msgid "change category"
|
||||
msgstr "lodifier la catégorie"
|
||||
|
||||
#: index.php:313
|
||||
msgid "change my rating"
|
||||
msgstr "Modifier mon évaluation"
|
||||
|
||||
#: index.php:368
|
||||
msgid "Change category of links"
|
||||
msgstr "Changer la catégorie des liens"
|
||||
|
||||
#: index.php:375
|
||||
#: index.php:416
|
||||
msgid "Go back to links list"
|
||||
msgstr "Retourner à la liste des liens"
|
||||
|
||||
#: index.php:380
|
||||
msgid "Change category for this selection :"
|
||||
msgstr "Changer de catégorie pour la sélection :"
|
||||
|
||||
#: index.php:391
|
||||
msgid "Select a category:"
|
||||
msgstr "Selectionner une catégorie :"
|
||||
|
||||
#: index.php:409
|
||||
msgid "Change note of links"
|
||||
msgstr "Changer la note des liens"
|
||||
|
||||
#: index.php:421
|
||||
msgid "Change note for this selection :"
|
||||
msgstr "Changer de note pour la sélection :"
|
||||
|
||||
#: index.php:432
|
||||
msgid "Select a rating:"
|
||||
msgstr "Selectionner une note :"
|
||||
|
||||
#: index.php:494
|
||||
msgid "Selected links action:"
|
||||
msgstr "Action sur les liens selectionnés :"
|
||||
|
||||
#: index.php:510
|
||||
msgid "New link"
|
||||
msgstr "Nouveau lien"
|
||||
|
||||
#: index.php:549
|
||||
msgid "Details URL:"
|
||||
msgstr "Liens vers les détails :"
|
||||
|
||||
#: index.php:552
|
||||
msgid "Search with Google"
|
||||
msgstr "Rechercher avec Google"
|
||||
|
||||
#: index.php:555
|
||||
msgid "Image URL:"
|
||||
msgstr "Lien vers l'image :"
|
||||
|
||||
#: index.php:558
|
||||
msgid "Search with Amazon"
|
||||
msgstr "Rechercher avec Amazon"
|
||||
|
||||
#: index.php:563
|
||||
msgid "There is no image in cinecturlink media path."
|
||||
msgstr "Il n'y a pas d'image dans le chemin des média cinecturlink."
|
||||
|
||||
#: index.php:567
|
||||
msgid "or select from repository:"
|
||||
msgstr "ou selectionner depuis le dépôt :"
|
||||
|
||||
#: index.php:570
|
||||
msgid "Go to media manager to add image to cinecturlink path."
|
||||
msgstr "Aller dans le gestionnaire de média pour ajouter des images au chemin des cinecturlink."
|
||||
|
||||
#: index.php:586
|
||||
msgid "My rating:"
|
||||
msgstr "Mon évaluation :"
|
||||
|
||||
#: index.php:596
|
||||
msgid "update link"
|
||||
msgstr "mettre à jour ce lien"
|
||||
|
||||
#: index.php:596
|
||||
msgid "create link"
|
||||
msgstr "créer ce lien"
|
||||
|
||||
#: index.php:605
|
||||
msgid "There is no category"
|
||||
msgstr "Il n'y a pas de catégorie"
|
||||
|
||||
#: index.php:611
|
||||
msgid "name"
|
||||
msgstr "nom"
|
||||
|
||||
#: index.php:611
|
||||
msgid "description"
|
||||
msgstr "description"
|
||||
|
||||
#: index.php:633
|
||||
msgid "Check to delete"
|
||||
msgstr "Cocher pour supprimer"
|
||||
|
||||
#: index.php:638
|
||||
msgid "update categories"
|
||||
msgstr "mettre à jour les catégories"
|
||||
|
Loading…
Reference in a new issue