Initial commit
This commit is contained in:
commit
a214e4077b
14 changed files with 1648 additions and 0 deletions
17
CHANGELOG
Normal file
17
CHANGELOG
Normal file
|
@ -0,0 +1,17 @@
|
|||
2013.10.28
|
||||
===========================================================
|
||||
* Switch to Dotclear 2.6
|
||||
* Add french help
|
||||
|
||||
2013.07.12
|
||||
===========================================================
|
||||
* Enhanced template for search page
|
||||
|
||||
2013.06.30
|
||||
===========================================================
|
||||
* Fixed 404 template
|
||||
* Added options to disabled public filters
|
||||
|
||||
0.1 20100909
|
||||
===========================================================
|
||||
* 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.
|
29
README.md
Normal file
29
README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# README
|
||||
|
||||
## WHAT IS SABA ?
|
||||
|
||||
saba : Search Across Blog's Archive is a plugins for the open-source
|
||||
web publishing software called Dotclear.
|
||||
|
||||
It replaces public search page and 404 page by a custom page that
|
||||
show related entries to visitor.
|
||||
|
||||
## REQUIREMENTS
|
||||
|
||||
saba requires:
|
||||
|
||||
* administrator permissions
|
||||
* Dotclear 2.6
|
||||
* Custom templates if default theme is not used.
|
||||
|
||||
## USAGE
|
||||
|
||||
First install saba, mannualy from a zip package or from
|
||||
Dotaddict repository. (See Dotclear's documentation to know how do this)
|
||||
|
||||
Go to ''plugins manager'', expand saba information then
|
||||
go to ''configure plugin'', fill in form.
|
||||
|
||||
If you use a custom theme (not Dotclear's default theme)
|
||||
you must create custom templates that match yours.
|
||||
You can find exemple in saba/default-tempaltes.
|
142
_config.php
Normal file
142
_config.php
Normal file
|
@ -0,0 +1,142 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of saba, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr
|
||||
#
|
||||
# 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;
|
||||
}
|
||||
|
||||
# -- Get settings --
|
||||
$core->blog->settings->addNamespace('saba');
|
||||
$s = $core->blog->settings->saba;
|
||||
|
||||
$filters_list = array(
|
||||
'options',
|
||||
'orders',
|
||||
'ages',
|
||||
'categories',
|
||||
'authors',
|
||||
'types'
|
||||
);
|
||||
|
||||
$saba_active = (boolean) $s->active;
|
||||
$saba_filters = (string) $s->filters;
|
||||
|
||||
$saba_filters = @unserialize($saba_filters);
|
||||
if (!is_array($saba_filters)) {
|
||||
$saba_filters = array();
|
||||
}
|
||||
|
||||
# -- Set settings --
|
||||
if (!empty($_POST['save'])) {
|
||||
|
||||
try {
|
||||
$saba_active = !empty($_POST['saba_active']);
|
||||
$saba_filters = array();
|
||||
|
||||
foreach($filters_list as $filter) {
|
||||
if (!empty($_POST['saba_filter_'.$filter])) {
|
||||
$saba_filters[] = $filter;
|
||||
}
|
||||
}
|
||||
|
||||
$s->put(
|
||||
'active',
|
||||
$saba_active,
|
||||
'boolean',
|
||||
'Enable extension'
|
||||
);
|
||||
$s->put(
|
||||
'filters',
|
||||
serialize($saba_filters),
|
||||
'string',
|
||||
'Diabled filters'
|
||||
);
|
||||
|
||||
$core->blog->triggerBlog();
|
||||
|
||||
dcPage::addSuccessNotice(
|
||||
__('Configuration has been successfully updated.')
|
||||
);
|
||||
http::redirect(
|
||||
$list->getURL('module=saba&conf=1&redir='.
|
||||
$list->getRedir())
|
||||
);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$core->error->add($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
# -- Display form --
|
||||
echo '
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('Activate').'</h4>
|
||||
|
||||
<p><label class="classic" for="saba_active">'.
|
||||
form::checkbox(
|
||||
'saba_active',
|
||||
1,
|
||||
$saba_active
|
||||
).__('Enable extension on this blog').'</label></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="fieldset">
|
||||
<h4>'.__('Advanced search').'</h4>
|
||||
|
||||
<p><label class="classic" for="saba_filter_options">'.
|
||||
form::checkbox(
|
||||
'saba_filter_options',
|
||||
1,
|
||||
in_array('options', $saba_filters)
|
||||
).__('Disable filter on post options').'</label></p>
|
||||
|
||||
<p><label class="classic" for="saba_filter_orders">'.
|
||||
form::checkbox(
|
||||
'saba_filter_orders',
|
||||
1,
|
||||
in_array('orders', $saba_filters)
|
||||
).__('Disable filter on order').'</label></p>
|
||||
|
||||
<p><label class="classic" for="saba_filter_ages">'.
|
||||
form::checkbox(
|
||||
'saba_filter_ages',
|
||||
1,
|
||||
in_array('ages', $saba_filters)
|
||||
).__('Disable filter on age').'</label></p>
|
||||
|
||||
<p><label class="classic" for="saba_filter_categories">'.
|
||||
form::checkbox(
|
||||
'saba_filter_categories',
|
||||
1,
|
||||
in_array('categories', $saba_filters)
|
||||
).__('Disable filter on categories').'</label></p>
|
||||
|
||||
<p><label class="classic" for="saba_filter_authors">'.
|
||||
form::checkbox(
|
||||
'saba_filter_authors',
|
||||
1,
|
||||
in_array('authors', $saba_filters)
|
||||
).__('Disable filter on authors').'</label></p>
|
||||
|
||||
<p><label class="classic" for="saba_filter_types">'.
|
||||
form::checkbox(
|
||||
'saba_filter_types',
|
||||
1,
|
||||
in_array('types', $saba_filters)
|
||||
).__('Disable filter on post types').'</label></p>
|
||||
|
||||
</div>';
|
37
_define.php
Normal file
37
_define.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of saba, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr
|
||||
#
|
||||
# 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->registerModule(
|
||||
/* Name */
|
||||
"saba",
|
||||
/* Description*/
|
||||
"Search across blog's archive",
|
||||
/* Author */
|
||||
"Jean-Christian Denis",
|
||||
/* Version */
|
||||
'2013.10.29',
|
||||
/* Properies */
|
||||
array(
|
||||
'permissions' => 'admin',
|
||||
'type' => 'plugin',
|
||||
'dc_min' => '2.6',
|
||||
'support' => 'http://jcd.lv/q=saba',
|
||||
'details' => 'http://plugins.dotaddict.org/dc2/details/saba'
|
||||
)
|
||||
);
|
638
_public.php
Normal file
638
_public.php
Normal file
|
@ -0,0 +1,638 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of saba, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr
|
||||
#
|
||||
# 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;
|
||||
}
|
||||
|
||||
# Admin behaviors
|
||||
$core->blog->settings->addNamespace('saba');
|
||||
|
||||
if ($core->blog->settings->saba->active) {
|
||||
|
||||
# Register saba handler
|
||||
$core->url->register(
|
||||
'search',
|
||||
'search',
|
||||
'^search(/.+)?$',
|
||||
array('urlSaba', 'saba')
|
||||
);
|
||||
|
||||
# Add saba templates path
|
||||
$core->tpl->setPath(
|
||||
$core->tpl->getPath(),
|
||||
dirname(__FILE__).'/default-templates/'
|
||||
);
|
||||
|
||||
# templates
|
||||
$core->tpl->addBlock(
|
||||
'SabaIf',
|
||||
array('tplSaba', 'SabaIf')
|
||||
);
|
||||
$core->tpl->addBlock(
|
||||
'SabaEntries',
|
||||
array('tplSaba', 'SabaEntries')
|
||||
);
|
||||
$core->tpl->addBlock(
|
||||
'SabaFormIf',
|
||||
array('tplSaba', 'SabaFormIf')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormSearch',
|
||||
array('tplSaba', 'SabaFormSearch')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormOptions',
|
||||
array('tplSaba', 'SabaFormOptions')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormCategories',
|
||||
array('tplSaba', 'SabaFormCategories')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormTypes',
|
||||
array('tplSaba', 'SabaFormTypes')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormAges',
|
||||
array('tplSaba', 'SabaFormAges')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormOrders',
|
||||
array('tplSaba', 'SabaFormOrders')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaFormAuthors',
|
||||
array('tplSaba', 'SabaFormAuthors')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaPaginationURL',
|
||||
array('tplSaba', 'SabaPaginationURL')
|
||||
);
|
||||
$core->tpl->addValue(
|
||||
'SabaURL',
|
||||
array('tplSaba','SabaURL')
|
||||
);
|
||||
|
||||
# behavior
|
||||
$core->addBehavior(
|
||||
'templateCustomSortByAlias',
|
||||
array('pubSaba', 'templateCustomSortByAlias')
|
||||
);
|
||||
$core->addBehavior(
|
||||
'urlHandlerBeforeGetData',
|
||||
array('pubSaba', 'urlHandlerBeforeGetData')
|
||||
);
|
||||
$core->addBehavior(
|
||||
'corePostSearch',
|
||||
array('pubSaba', 'corePostSearch')
|
||||
);
|
||||
$core->url->registerError(array('urlSaba','error'));
|
||||
}
|
||||
|
||||
class pubSaba
|
||||
{
|
||||
public static function templateCustomSortByAlias($alias)
|
||||
{
|
||||
$alias['post'] = array(
|
||||
'title' => 'post_title',
|
||||
'selected' => 'post_selected',
|
||||
'author' => 'user_id',
|
||||
'date' => 'post_dt',
|
||||
'update' => 'post_upddt',
|
||||
'id' => 'post_id',
|
||||
'comment' => 'nb_comment',
|
||||
'trackback' => 'nb_trackback'
|
||||
);
|
||||
}
|
||||
|
||||
public static function urlHandlerBeforeGetData($_ctx)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$options = array(
|
||||
'q' => '',
|
||||
'q_opt' => array(),
|
||||
'q_cat' => array(),
|
||||
'q_age' => '0,0',
|
||||
'q_user' => array(),
|
||||
'q_order' => 'date',
|
||||
'q_rev' => '0',
|
||||
'q_type' => array()
|
||||
);
|
||||
|
||||
if (!empty($_GET['q']) && 1 < strlen($_GET['q'])) {
|
||||
# move to saba
|
||||
$_ctx->current_tpl = null;
|
||||
$_ctx->current_tpl = 'saba_search.html';
|
||||
|
||||
# retreive _GET
|
||||
$qs = $_SERVER['QUERY_STRING'];
|
||||
$qs = preg_replace('#(^|/)page/([0-9]+)#', '', $qs);
|
||||
parse_str($qs, $get);
|
||||
|
||||
$params = array(
|
||||
'sql'=>'',
|
||||
'post_type' => ''
|
||||
);
|
||||
|
||||
# search string
|
||||
$params['search'] = rawurldecode($_GET['q']);
|
||||
$options['q'] = rawurldecode($_GET['q']);
|
||||
|
||||
# options
|
||||
if (!empty($get['q_opt'])) {
|
||||
|
||||
if (in_array('selected', $get['q_opt'])) {
|
||||
$options['q_opt'][] = 'selected';
|
||||
$params['post_selected'] = 1;
|
||||
}
|
||||
if (in_array('comment', $get['q_opt'])) {
|
||||
$options['q_opt'][] = 'comment';
|
||||
$params['sql'] = "AND nb_comment > 0 ";
|
||||
}
|
||||
if (in_array('trackback', $get['q_opt'])) {
|
||||
$options['q_opt'][] = 'trackback';
|
||||
$params['sql'] = "AND nb_trackback > 0";
|
||||
}
|
||||
}
|
||||
|
||||
# categories
|
||||
if (!empty($get['q_cat'])) {
|
||||
$cats = array();
|
||||
foreach($get['q_cat'] as $v) {
|
||||
$v = abs((integer) $v);
|
||||
if (!$v) {
|
||||
continue;
|
||||
}
|
||||
$cats[] = "C.cat_id = '".$v."'";
|
||||
$options['q_cat'][] = $v;
|
||||
}
|
||||
if (!empty($cats)) {
|
||||
$params['sql'] .= 'AND ('.implode(' OR ', $cats).') ';
|
||||
}
|
||||
}
|
||||
|
||||
# post types
|
||||
if (!empty($get['q_type'])) {
|
||||
$types = $core->getPostTypes();
|
||||
foreach($get['q_type'] as $v) {
|
||||
if (!$types[$v]) {
|
||||
continue;
|
||||
}
|
||||
$options['q_type'][] = $v;
|
||||
$params['post_type'][] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
# age
|
||||
$ages = tplSaba::getSabaFormAges();
|
||||
if (!empty($get['q_age']) && in_array($get['q_age'], $ages)) {
|
||||
$age = explode(',', $get['q_age']);
|
||||
$ts = time();
|
||||
$options['q_age'] = $get['q_age'];
|
||||
|
||||
if ($age[0]) {
|
||||
$params['sql'] .= "AND P.post_dt < '".dt::str('%Y-%m-%d %H:%m:%S', $ts-$age[0])."' ";
|
||||
}
|
||||
if ($age[1]) {
|
||||
$params['sql'] .= "AND P.post_dt > '".dt::str('%Y-%m-%d %H:%m:%S', $ts-$age[1])."' ";
|
||||
}
|
||||
}
|
||||
|
||||
# user
|
||||
if (!empty($get['q_user'])) {
|
||||
$users = array();
|
||||
foreach($get['q_user'] as $v) {
|
||||
$users[] = "U.user_id = '".$core->con->escape($v)."'";
|
||||
$options['q_user'][] = $v;
|
||||
}
|
||||
if (!empty($users)) {
|
||||
$params['sql'] .= 'AND ('.implode(' OR ', $users).') ';
|
||||
}
|
||||
}
|
||||
|
||||
#order
|
||||
$sort = 'desc';
|
||||
if (!empty($get['q_rev'])) {
|
||||
$options['q_rev'] = '1';
|
||||
$sort = 'asc';
|
||||
}
|
||||
$orders = tplSaba::getSabaFormOrders();
|
||||
if (!empty($get['q_order']) && in_array($get['q_order'], $orders)) {
|
||||
|
||||
$options['q_order'] = $get['q_order'];
|
||||
$params['order'] = $core->tpl->getSortByStr(
|
||||
array('sortby'=>$get['q_order'], 'order'=>$sort),'post'); //?! post_type
|
||||
}
|
||||
|
||||
# count
|
||||
$GLOBALS['_search'] = rawurldecode($_GET['q']);
|
||||
if ($GLOBALS['_search']) {
|
||||
$GLOBALS['_search_count'] = $core->blog->getPosts($params, true)->f(0);
|
||||
}
|
||||
|
||||
# pagintaion
|
||||
$_page_number = !isset($GLOBALS['_page_number']) ? 1 : $GLOBALS['_page_number'];
|
||||
$params['limit'] = $_ctx->nb_entry_per_page;
|
||||
$params['limit'] = array((($_page_number-1)*$params['limit']), $params['limit']);
|
||||
|
||||
# get posts
|
||||
$_ctx->post_params = $params;
|
||||
$_ctx->posts = $core->blog->getPosts($params);
|
||||
unset($params);
|
||||
}
|
||||
$_ctx->saba_options = $options;
|
||||
}
|
||||
|
||||
# Ajouter la condition "ou" à la recherche
|
||||
public static function corePostSearch($core, $p)
|
||||
{
|
||||
$sentences = explode(',', $p[2]['search']);
|
||||
|
||||
$OR = array();
|
||||
foreach($sentences as $sentence)
|
||||
{
|
||||
$AND = array();
|
||||
$words = text::splitWords($sentence);
|
||||
foreach($words as $word) {
|
||||
$AND[] = "post_words LIKE '%".$core->con->escape($word)."%'";
|
||||
}
|
||||
if (!empty($AND)) {
|
||||
$OR[] = " (".implode (' AND ',$AND).") ";
|
||||
}
|
||||
}
|
||||
if (!empty($OR)) {
|
||||
$req = "AND (".implode (' OR ',$OR).") ";
|
||||
}
|
||||
|
||||
# Return
|
||||
if (!empty($req)) {
|
||||
$p[0] = '';
|
||||
$p[2]['sql'] = (isset($p[2]['sql']) ? $p[2]['sql'] : '').$req;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class urlSaba extends dcUrlHandlers
|
||||
{
|
||||
public static function error($args, $type, $e)
|
||||
{
|
||||
global $core, $_ctx;
|
||||
|
||||
if ($e->getCode() == 404) {
|
||||
$q = explode('/', $args);
|
||||
if (empty($q)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
# Clean URI
|
||||
$_GET['q'] = implode('%20', $q);
|
||||
$_SERVER['QUERY_STRING'] = '';
|
||||
|
||||
# Claim comes from 404
|
||||
$GLOBALS['_from_error'] = true;
|
||||
|
||||
# Serve saba
|
||||
self::serveDocument('saba_search.html');
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function saba($args)
|
||||
{
|
||||
$_ctx =& $GLOBALS['_ctx'];
|
||||
$core =& $GLOBALS['core'];
|
||||
|
||||
self::serveDocument('saba_search.html');
|
||||
}
|
||||
}
|
||||
|
||||
class tplSaba
|
||||
{
|
||||
public static function SabaEntries($a, $c)
|
||||
{
|
||||
return
|
||||
'<?php if ($_ctx->exists("posts")) : while ($_ctx->posts->fetch()) : ?>'.$c.'<?php endwhile; endif; ?>';
|
||||
}
|
||||
|
||||
public static function SabaFormSearch($a)
|
||||
{
|
||||
return '<?php echo html::escapeHTML($_ctx->saba_options["q"]); ?>';
|
||||
}
|
||||
|
||||
public static function SabaIf($a, $c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
$operator = isset($a['operator']) ? $GLOBALS['core']->tpl->getOperator($a['operator']) : '&&';
|
||||
|
||||
if (isset($a['has_search'])) {
|
||||
$sign = (boolean) $a['has_search'] ? '' : '!';
|
||||
$if[] = $sign.'isset($_search_count)';
|
||||
}
|
||||
|
||||
if (isset($a['from_error'])) {
|
||||
$sign = (boolean) $a['from_error'] ? '' : '!';
|
||||
$if[] = $sign.'isset($_from_error)';
|
||||
}
|
||||
|
||||
return !empty($if) ?
|
||||
'<?php if('.implode(' '.$operator.' ', $if).') : ?>'.$c.'<?php endif; ?>'
|
||||
: $c;
|
||||
}
|
||||
|
||||
public static function SabaURL($a)
|
||||
{
|
||||
$f = $GLOBALS['core']->tpl->getFilters($a);
|
||||
|
||||
return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("search")').'; ?>';
|
||||
}
|
||||
|
||||
public static function SabaFormIf($a,$c)
|
||||
{
|
||||
$if = array();
|
||||
|
||||
$operator = isset($a['operator']) ? $GLOBALS['core']->tpl->getOperator($a['operator']) : '&&';
|
||||
|
||||
$fl = self::getSabaFormFilters();
|
||||
foreach($fl as $filter) {
|
||||
if (isset($a['filter_'.$filter])) {
|
||||
$sign = (boolean) $a['filter_'.$filter] ? '' : '!';
|
||||
$if[] = $sign.'tplSaba::isSabaFormFilter(\''.$filter.'\')';
|
||||
}
|
||||
}
|
||||
|
||||
return !empty($if) ?
|
||||
'<?php if('.implode(' '.$operator.' ',$if).') : ?>'.$c.'<?php endif; ?>'
|
||||
: $c;
|
||||
}
|
||||
|
||||
public static function SabaFormOptions($a)
|
||||
{
|
||||
$dis = !empty($a['remove']) ? explode(',', $a['remove']) : array();
|
||||
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_opt[]" type="checkbox" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = self::getSabaFormOptions();
|
||||
foreach($rs as $k => $v) {
|
||||
if (in_array($v,$dis)) {
|
||||
continue;
|
||||
}
|
||||
$chk = '<?php echo in_array("'.$v.'",$_ctx->saba_options["q_opt"]) ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li, $v, $chk, html::escapeHTML($k));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
|
||||
return '<div class="saba_opt_otp"><h2>'.__('Filter options').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaFormOrders($a)
|
||||
{
|
||||
$dis = !empty($a['remove']) ? explode(',',$a['remove']) : array();
|
||||
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_order" type="radio" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = self::getSabaFormOrders($dis);
|
||||
foreach($rs as $k => $v) {
|
||||
if (in_array($v,$dis)) {
|
||||
continue;
|
||||
}
|
||||
$chk = '<?php echo "'.$v.'" == $_ctx->saba_options["q_order"] ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li, $v, $chk, html::escapeHTML($k));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
$chk = '<?php echo !empty($_ctx->saba_options["q_rev"]) ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= '<li><label><input name="q_rev" type="checkbox" value="1" '.$chk.'/> '.__('Reverse order').'</label></li>';
|
||||
|
||||
return '<div class="saba_opt_order"><h2>'.__('Filter order').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaFormCategories($a)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$dis = !empty($a['remove']) ? explode(',', $a['remove']) : array();
|
||||
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_cat[]" type="checkbox" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = $core->blog->getCategories();
|
||||
while ($rs->fetch()) {
|
||||
if (in_array($rs->cat_id,$dis) || in_array($rs->cat_url,$dis)) {
|
||||
continue;
|
||||
}
|
||||
$chk = '<?php echo in_array("'.$rs->cat_id.'",$_ctx->saba_options["q_cat"]) ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li,$rs->cat_id,$chk,html::escapeHTML($rs->cat_title));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
|
||||
return '<div class="saba_opt_cat"><h2>'.__('Filter by category').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaFormTypes($a)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$dis = !empty($a['remove']) ? explode(',',$a['remove']) : array();
|
||||
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_type[]" type="checkbox" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = self::getSabaFormTypes();
|
||||
foreach($rs as $k => $v) {
|
||||
if (in_array($v,$dis)) {
|
||||
continue;
|
||||
}
|
||||
$chk = '<?php echo in_array("'.$v.'",$_ctx->saba_options["q_type"]) ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li,$v,$chk,html::escapeHTML($k));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
|
||||
return '<div class="saba_opt_type"><h2>'.__('Filter by type').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaFormAges($a)
|
||||
{
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_age" type="radio" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = self::getSabaFormAges();
|
||||
foreach($rs as $k => $v) {
|
||||
$chk = '<?php echo "'.$v.'" == $_ctx->saba_options["q_age"] ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li, $v, $chk, html::escapeHTML($k));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
|
||||
return '<div class="saba_opt_age"><h2>'.__('Filter by age').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaFormAuthors($a)
|
||||
{
|
||||
global $core;
|
||||
|
||||
$dis = !empty($a['remove']) ? explode(',',$a['remove']) : array();
|
||||
|
||||
$res = '';
|
||||
$li = '<li><label><input name="q_user[]" type="checkbox" value="%s" %s/> %s</label></li>';
|
||||
|
||||
$rs = $core->blog->getPostsUsers();
|
||||
while ($rs->fetch()) {
|
||||
if (in_array($rs->user_id,$dis)) {
|
||||
continue;
|
||||
}
|
||||
$chk = '<?php echo in_array("'.$rs->user_id.'",$_ctx->saba_options["q_user"]) ? \'checked="checked" \' : ""; ?>';
|
||||
$res .= sprintf($li,$rs->user_id,$chk,html::escapeHTML(dcUtils::getUserCN($rs->user_id,$rs->user_name,$rs->user_firstname, $rs->user_displayname)));
|
||||
}
|
||||
|
||||
if (!empty($res)) {
|
||||
|
||||
return '<div class="saba_opt_user"><h2>'.__('Filter by author').'</h2><ul>'.$res.'</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
public static function SabaPaginationURL($attr)
|
||||
{
|
||||
$offset = 0;
|
||||
if (isset($attr['offset'])) {
|
||||
$offset = (integer) $attr['offset'];
|
||||
}
|
||||
|
||||
$f = $GLOBALS['core']->tpl->getFilters($attr);
|
||||
|
||||
return '<?php echo '.sprintf($f, "ctxSaba::PaginationURL(".$offset.")").'; ?>';
|
||||
}
|
||||
|
||||
public static function getSabaFormFilters()
|
||||
{
|
||||
return array(
|
||||
'options',
|
||||
'orders',
|
||||
'ages',
|
||||
'categories',
|
||||
'authors',
|
||||
'types'
|
||||
);
|
||||
}
|
||||
|
||||
public static function getSabaFormOptions()
|
||||
{
|
||||
return array(
|
||||
__('Selected entry') => 'selected',
|
||||
__('With comments') => 'comment',
|
||||
__('With trackbacks') => 'trackback'
|
||||
);
|
||||
}
|
||||
|
||||
public static function getSabaFormOrders()
|
||||
{
|
||||
return array(
|
||||
__('Title') => 'title',
|
||||
__('Selected entry') => 'selected',
|
||||
__('Author') => 'author',
|
||||
__('Date') => 'date',
|
||||
__('Update') => 'update',
|
||||
__('Comments count') => 'comment',
|
||||
__('Trackbacks count') => 'trackback'
|
||||
);
|
||||
}
|
||||
|
||||
public static function getSabaFormAges()
|
||||
{
|
||||
return array(
|
||||
__('All') => '0,0',
|
||||
__('Less than a month') => '0,2592000',
|
||||
__('From 1 to 6 month') => '2592000,15552000',
|
||||
__('From 6 to 12 month') => '15552000,31536000',
|
||||
__('More than a year') => '31536000,0'
|
||||
);
|
||||
}
|
||||
|
||||
public static function getSabaFormTypes()
|
||||
{
|
||||
$know = array(
|
||||
'post' => __('Entry'),
|
||||
'page' => __('Page'),
|
||||
'pollsfactory' => __('Poll'),
|
||||
'eventhandler' => __('Event')
|
||||
);
|
||||
|
||||
$rs = array();
|
||||
$types = $GLOBALS['core']->getPostTypes();
|
||||
|
||||
foreach($types as $k => $v) {
|
||||
if (!$v['public_url']) {
|
||||
continue;
|
||||
}
|
||||
$rs[isset($know[$k]) ? $know[$k] : __($k)] = $k;
|
||||
}
|
||||
|
||||
return $rs;
|
||||
}
|
||||
|
||||
public static function isSabaFormFilter($f)
|
||||
{
|
||||
$filters = (string) $GLOBALS['core']->blog->settings->saba->filters;
|
||||
$filters = @unserialize($filters);
|
||||
if (!is_array($filters)) {
|
||||
$filters = array();
|
||||
}
|
||||
|
||||
return !in_array($f,$filters);
|
||||
}
|
||||
}
|
||||
|
||||
class ctxSaba extends context
|
||||
{
|
||||
public static function PaginationURL($offset=0)
|
||||
{
|
||||
$args = $_SERVER['URL_REQUEST_PART'];
|
||||
|
||||
$n = self::PaginationPosition($offset);
|
||||
|
||||
$args = preg_replace('#(^|/)page/([0-9]+)$#', '', $args);
|
||||
|
||||
$url = $GLOBALS['core']->blog->url.$args;
|
||||
|
||||
if ($n > 1) {
|
||||
$url = preg_replace('#/$#', '', $url);
|
||||
$url .= '/page/'.$n;
|
||||
}
|
||||
|
||||
$qs = preg_replace('#(^|/)page/([0-9]+)(&?)#', '', $_SERVER['QUERY_STRING']);
|
||||
|
||||
# If search param
|
||||
if (!empty($_GET['q'])) {
|
||||
$s = strpos($url, '?') !== false ? '&' : '?';
|
||||
$url .= $s.$qs;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
}
|
14
default-templates/saba_post.html
Normal file
14
default-templates/saba_post.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="saba-post">
|
||||
<h2 id="p{{tpl:EntryID}}" class="post-title" lang="{{tpl:EntryLang}}" xml:lang="{{tpl:EntryLang}}"><a
|
||||
href="{{tpl:EntryURL}}" title="{{tpl:lang Read}} {{tpl:EntryTitle encode_html="1"}}">{{tpl:EntryTitle encode_html="1"}}</a></h2>
|
||||
|
||||
<p class="post-info">{{tpl:lang By}} {{tpl:EntryAuthorLink}} {{tpl:lang on}} {{tpl:EntryDate}}
|
||||
<tpl:EntryIf show_comments="1">
|
||||
- <a href="{{tpl:EntryURL}}#comments">{{tpl:EntryCommentCount}}</a>
|
||||
</tpl:EntryIf>
|
||||
<tpl:EntryIf show_pings="1">
|
||||
- <a href="{{tpl:EntryURL}}#pings">{{tpl:EntryPingCount}}</a></tpl:EntryIf>
|
||||
<tpl:EntryIf has_attachment="1">
|
||||
- <a href="{{tpl:EntryURL}}#attachments">{{tpl:EntryAttachmentCount}}</a></tpl:EntryIf>
|
||||
</p>
|
||||
</div>
|
133
default-templates/saba_search.html
Normal file
133
default-templates/saba_search.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" />
|
||||
<meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" />
|
||||
|
||||
<title>{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title>
|
||||
<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:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />
|
||||
<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="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" />
|
||||
<link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" />
|
||||
|
||||
{{tpl:include src="_head.html"}}
|
||||
</head>
|
||||
|
||||
<body class="dc-search<tpl:SabaIf from_error="1"> dc-404</tpl:SabaIf>">
|
||||
<div id="page">
|
||||
{{tpl:include src="_top.html"}}
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
|
||||
<div id="content-info">
|
||||
<tpl:SabaIf from_error="1">
|
||||
<h2>{{tpl:lang Document not found}}</h2>
|
||||
<p>{{tpl:lang URL you've tried has typos, or the page has been deleted or moved.}}</p>
|
||||
</tpl:SabaIf>
|
||||
<tpl:SabaIf has_search="1" from_error="0">
|
||||
<h2>{{tpl:lang Search across blog's archive}}</h2>
|
||||
<tpl:SysIf search_count="==0">
|
||||
<p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned no result."}}</p>
|
||||
</tpl:SysIf>
|
||||
<tpl:SysIf search_count="==1">
|
||||
<p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> result."}}</p>
|
||||
</tpl:SysIf>
|
||||
<tpl:SysIf search_count=">1">
|
||||
<p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> results."}}</p>
|
||||
</tpl:SysIf>
|
||||
</tpl:SabaIf>
|
||||
<tpl:SabaIf has_search="0" from_error="0">
|
||||
<form action="{{tpl:BlogURL}}" method="get" id="saba-form">
|
||||
|
||||
<div class="saba-opt-text">
|
||||
<h2><label for="q">{{tpl:lang Advanced search}}</label></h2>
|
||||
<p><input name="q" type="text" size="100" maxlength="255" value="{{tpl:SabaFormSearch}}" />
|
||||
<input type="submit" class="submit" value="ok" /></p>
|
||||
</div>
|
||||
|
||||
<tpl:SabaFormIf filter_options="1">{{tpl:SabaFormOptions}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_orders="1">{{tpl:SabaFormOrders remove="selected"}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_ages="1">{{tpl:SabaFormAges}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_categories="1">{{tpl:SabaFormCategories}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_authors="1">{{tpl:SabaFormAuthors}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_types="1">{{tpl:SabaFormTypes}}</tpl:SabaFormIf>
|
||||
|
||||
</form>
|
||||
</tpl:SabaIf>
|
||||
</div>
|
||||
|
||||
<div class="content-inner">
|
||||
<tpl:SabaEntries>
|
||||
<tpl:SabaIf from_error="1">
|
||||
<tpl:EntriesHeader>
|
||||
<h2>{{tpl:lang Suggested items}}</h2>
|
||||
</tpl:EntriesHeader>
|
||||
</tpl:SabaIf>
|
||||
{{tpl:include src="saba_post.html"}}
|
||||
|
||||
<tpl:EntriesFooter>
|
||||
<tpl:Pagination>
|
||||
<p class="pagination"><tpl:PaginationIf end="0"><a href="{{tpl:SabaPaginationURL offset="+1"}}" class="prev">«
|
||||
{{tpl:lang previous entries}}</a> - </tpl:PaginationIf>
|
||||
{{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}}
|
||||
<tpl:PaginationIf start="0"> - <a href="{{tpl:SabaPaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}}
|
||||
»</a></tpl:PaginationIf></p>
|
||||
</tpl:Pagination>
|
||||
</tpl:EntriesFooter>
|
||||
</tpl:SabaEntries>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- End #main -->
|
||||
|
||||
<div id="sidebar">
|
||||
<div id="blognav">
|
||||
|
||||
<tpl:SabaIf has_search="1" from_error="1" operator="or">
|
||||
|
||||
<form action="{{tpl:BlogURL}}" method="get" id="saba-form">
|
||||
|
||||
<div class="saba-opt-text">
|
||||
<h2><label for="q">{{tpl:lang Advanced search}}</label></h2>
|
||||
<p><input name="q" type="text" size="10" maxlength="255" value="{{tpl:SabaFormSearch}}" />
|
||||
<input type="submit" class="submit" value="ok" /></p>
|
||||
</div>
|
||||
|
||||
<tpl:SabaFormIf filter_options="1">{{tpl:SabaFormOptions}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_orders="1">{{tpl:SabaFormOrders remove="selected"}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_ages="1">{{tpl:SabaFormAges}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_categories="1">{{tpl:SabaFormCategories}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_authors="1">{{tpl:SabaFormAuthors}}</tpl:SabaFormIf>
|
||||
<tpl:SabaFormIf filter_types="1">{{tpl:SabaFormTypes}}</tpl:SabaFormIf>
|
||||
|
||||
</form>
|
||||
</tpl:SabaIf>
|
||||
{{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.2 KiB |
BIN
icon.png
Normal file
BIN
icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 638 B |
50
locales/fr/help/help.html
Normal file
50
locales/fr/help/help.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<!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="fr" lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>saba</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3>À propos</h3>
|
||||
<p>saba : Search Across Blog's Archive</p>
|
||||
<p>Cette extension remplace la page de recherche et la page d'erreur 404 par une page de suggestion d'articles.</p>
|
||||
<h3>Activer</h3>
|
||||
<dl>
|
||||
<dt>Activer l'extension sur ce blog</dt>
|
||||
<dd>Active ou non l'utilisation de page d'erreur et de recherche personnalisées sur le blog courant.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Recherche avancée</h3>
|
||||
<p>Cette partie permet de gérer de la liste des filtres de recherche avancée qui si ils sont activés sont présent dans le volet latéral de recherche avancée du blog public. Attention par défaut (case décochée) les filtres sont affichés.</p>
|
||||
<dl>
|
||||
<dt>Désactiver le filtre des options de billet</dt>
|
||||
<dd>Désactive les filtres tels que <em>Entrée sélectionnés, avec commentaires, etc...</em></dd>
|
||||
|
||||
<dt>Désactiver le filtre d'ordre</dt>
|
||||
<dd>Désactive le choix d'ordonnancement des résultats.</dd>
|
||||
|
||||
<dt>Désactiver le filtre de date</dt>
|
||||
<dd>Désactive la limitation à une période de recherche.</dd>
|
||||
|
||||
<dt>Désactiver le filtre de catégories</dt>
|
||||
<dd>Désactive la limitation de la recherche à des catégories.</dd>
|
||||
|
||||
<dt>Désactiver le filtre d'auteurs</dt>
|
||||
<dd>Désactive la limitation de la recherche à des auteurs.</dd>
|
||||
|
||||
<dt>Désactiver le filtre de type de billets</dt>
|
||||
<dd>Désactive la limitation de la recherche à des types de billets.</dd>
|
||||
</dl>
|
||||
|
||||
<h3>Support</h3>
|
||||
<p>Si vous souhaitez plus d'aide ou apporter votre contribution à cette extension, voici quelques liens utiles.</p>
|
||||
<ul>
|
||||
<li><a href="http://lab.dotclear.org/wiki/plugin/saba">Dépôt svn</a></li>
|
||||
<li><a href="https://bitbucket.org/JcDenis/saba">Dépôt hg</a></li>
|
||||
<li><a href="http://jcd.lv/saba">Billet dédié sur le blog de l'auteur</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
94
locales/fr/main.lang.php
Normal file
94
locales/fr/main.lang.php
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
// Language: Français
|
||||
// Module: saba - 2013.10.28
|
||||
// Date: 2013-10-29 08:06:52
|
||||
// Translated with dcTranslater - 2013.05.11
|
||||
|
||||
#_config.php:70
|
||||
$GLOBALS['__l10n']['Configuration has been successfully updated.'] = 'La configuration a été mise à jour avec succés.';
|
||||
|
||||
#_config.php:93
|
||||
$GLOBALS['__l10n']['Enable extension on this blog'] = 'Activer l\'extension sur ce blog';
|
||||
|
||||
#_config.php:98
|
||||
$GLOBALS['__l10n']['Advanced search'] = 'Recherche avancée';
|
||||
|
||||
#_config.php:105
|
||||
$GLOBALS['__l10n']['Disable filter on post options'] = 'Désactiver le filtre des options de billet';
|
||||
|
||||
#_config.php:112
|
||||
$GLOBALS['__l10n']['Disable filter on order'] = 'Désactiver le filtre d\'ordre';
|
||||
|
||||
#_config.php:119
|
||||
$GLOBALS['__l10n']['Disable filter on age'] = 'Désactiver le filtre de date';
|
||||
|
||||
#_config.php:126
|
||||
$GLOBALS['__l10n']['Disable filter on categories'] = 'Désactiver le filtre de catégories';
|
||||
|
||||
#_config.php:133
|
||||
$GLOBALS['__l10n']['Disable filter on authors'] = 'Désactiver le filtre d\'auteurs';
|
||||
|
||||
#_config.php:140
|
||||
$GLOBALS['__l10n']['Disable filter on post types'] = 'Désactiver le filtre de type de billets';
|
||||
|
||||
#_public.php:345
|
||||
$GLOBALS['__l10n']['Filter options'] = 'Options du filtre';
|
||||
|
||||
#_public.php:365
|
||||
$GLOBALS['__l10n']['Reverse order'] = 'Inverser l\'ordre';
|
||||
|
||||
#_public.php:367
|
||||
$GLOBALS['__l10n']['Filter order'] = 'Options de tri';
|
||||
|
||||
#_public.php:388
|
||||
$GLOBALS['__l10n']['Filter by category'] = 'Filter par catégorie';
|
||||
|
||||
#_public.php:409
|
||||
$GLOBALS['__l10n']['Filter by type'] = 'Filtrer par type';
|
||||
|
||||
#_public.php:425
|
||||
$GLOBALS['__l10n']['Filter by age'] = 'Filtrer par date';
|
||||
|
||||
#_public.php:446
|
||||
$GLOBALS['__l10n']['Filter by author'] = 'Filtrer par auteur';
|
||||
|
||||
#_public.php:477
|
||||
$GLOBALS['__l10n']['With comments'] = 'Avec commentaires';
|
||||
|
||||
#_public.php:478
|
||||
$GLOBALS['__l10n']['With trackbacks'] = 'Avec rétroliens';
|
||||
|
||||
#_public.php:490
|
||||
$GLOBALS['__l10n']['Comments count'] = 'Nombre de commentaires';
|
||||
|
||||
#_public.php:491
|
||||
$GLOBALS['__l10n']['Trackbacks count'] = 'Nombre de rétroliens';
|
||||
|
||||
#_public.php:498
|
||||
$GLOBALS['__l10n']['All'] = 'Tous';
|
||||
|
||||
#_public.php:499
|
||||
$GLOBALS['__l10n']['Less than a month'] = 'Moins d\'un mois';
|
||||
|
||||
#_public.php:500
|
||||
$GLOBALS['__l10n']['From 1 to 6 month'] = 'De 1 à 6 mois';
|
||||
|
||||
#_public.php:501
|
||||
$GLOBALS['__l10n']['From 6 to 12 month'] = 'De 6 à 12 mois';
|
||||
|
||||
#_public.php:502
|
||||
$GLOBALS['__l10n']['More than a year'] = 'Plus d\'un an';
|
||||
|
||||
#_public.php:511
|
||||
$GLOBALS['__l10n']['Poll'] = 'Sondage';
|
||||
|
||||
#_public.php:512
|
||||
$GLOBALS['__l10n']['Event'] = 'Événement';
|
||||
|
||||
$GLOBALS['__l10n']['Search across blog\'s archive'] = 'Rechercher dans les archives';
|
||||
|
||||
$GLOBALS['__l10n']['Please select a request and options to search on'] = 'Merci de formuler une requête et les options de recherche';
|
||||
|
||||
$GLOBALS['__l10n']['Suggested items'] = 'Articles suggérés';
|
||||
|
||||
?>
|
133
locales/fr/main.po
Normal file
133
locales/fr/main.po
Normal file
|
@ -0,0 +1,133 @@
|
|||
# Language: Français
|
||||
# Module: saba - 2013.10.28
|
||||
# Date: 2013-10-29 08:06:53
|
||||
# Translated with translater 2013.05.11
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: saba 2013.10.28\n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2013-10-29T08:06:53+00:00\n"
|
||||
"Last-Translator: Jean-Christian Denis\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: _config.php:70
|
||||
msgid "Configuration has been successfully updated."
|
||||
msgstr "La configuration a été mise à jour avec succés."
|
||||
|
||||
#: _config.php:93
|
||||
msgid "Enable extension on this blog"
|
||||
msgstr "Activer l'extension sur ce blog"
|
||||
|
||||
#: _config.php:98
|
||||
msgid "Advanced search"
|
||||
msgstr "Recherche avancée"
|
||||
|
||||
#: _config.php:105
|
||||
msgid "Disable filter on post options"
|
||||
msgstr "Désactiver le filtre des options de billet"
|
||||
|
||||
#: _config.php:112
|
||||
msgid "Disable filter on order"
|
||||
msgstr "Désactiver le filtre d'ordre"
|
||||
|
||||
#: _config.php:119
|
||||
msgid "Disable filter on age"
|
||||
msgstr "Désactiver le filtre de date"
|
||||
|
||||
#: _config.php:126
|
||||
msgid "Disable filter on categories"
|
||||
msgstr "Désactiver le filtre de catégories"
|
||||
|
||||
#: _config.php:133
|
||||
msgid "Disable filter on authors"
|
||||
msgstr "Désactiver le filtre d'auteurs"
|
||||
|
||||
#: _config.php:140
|
||||
msgid "Disable filter on post types"
|
||||
msgstr "Désactiver le filtre de type de billets"
|
||||
|
||||
#: _public.php:345
|
||||
msgid "Filter options"
|
||||
msgstr "Options du filtre"
|
||||
|
||||
#: _public.php:365
|
||||
msgid "Reverse order"
|
||||
msgstr "Inverser l'ordre"
|
||||
|
||||
#: _public.php:367
|
||||
msgid "Filter order"
|
||||
msgstr "Options de tri"
|
||||
|
||||
#: _public.php:388
|
||||
msgid "Filter by category"
|
||||
msgstr "Filter par catégorie"
|
||||
|
||||
#: _public.php:409
|
||||
msgid "Filter by type"
|
||||
msgstr "Filtrer par type"
|
||||
|
||||
#: _public.php:425
|
||||
msgid "Filter by age"
|
||||
msgstr "Filtrer par date"
|
||||
|
||||
#: _public.php:446
|
||||
msgid "Filter by author"
|
||||
msgstr "Filtrer par auteur"
|
||||
|
||||
#: _public.php:477
|
||||
msgid "With comments"
|
||||
msgstr "Avec commentaires"
|
||||
|
||||
#: _public.php:478
|
||||
msgid "With trackbacks"
|
||||
msgstr "Avec rétroliens"
|
||||
|
||||
#: _public.php:490
|
||||
msgid "Comments count"
|
||||
msgstr "Nombre de commentaires"
|
||||
|
||||
#: _public.php:491
|
||||
msgid "Trackbacks count"
|
||||
msgstr "Nombre de rétroliens"
|
||||
|
||||
#: _public.php:498
|
||||
msgid "All"
|
||||
msgstr "Tous"
|
||||
|
||||
#: _public.php:499
|
||||
msgid "Less than a month"
|
||||
msgstr "Moins d'un mois"
|
||||
|
||||
#: _public.php:500
|
||||
msgid "From 1 to 6 month"
|
||||
msgstr "De 1 à 6 mois"
|
||||
|
||||
#: _public.php:501
|
||||
msgid "From 6 to 12 month"
|
||||
msgstr "De 6 à 12 mois"
|
||||
|
||||
#: _public.php:502
|
||||
msgid "More than a year"
|
||||
msgstr "Plus d'un an"
|
||||
|
||||
#: _public.php:511
|
||||
msgid "Poll"
|
||||
msgstr "Sondage"
|
||||
|
||||
#: _public.php:512
|
||||
msgid "Event"
|
||||
msgstr "Événement"
|
||||
|
||||
msgid "Search across blog's archive"
|
||||
msgstr "Rechercher dans les archives"
|
||||
|
||||
msgid "Please select a request and options to search on"
|
||||
msgstr "Merci de formuler une requête et les options de recherche"
|
||||
|
||||
msgid "Suggested items"
|
||||
msgstr "Articles suggérés"
|
||||
|
22
locales/fr/resources.php
Normal file
22
locales/fr/resources.php
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
# -- BEGIN LICENSE BLOCK ----------------------------------
|
||||
#
|
||||
# This file is part of saba, a plugin for Dotclear 2.
|
||||
#
|
||||
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
|
||||
# contact@jcdenis.fr
|
||||
#
|
||||
# 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;
|
||||
}
|
||||
|
||||
if (!empty($_REQUEST['module']) && $_REQUEST['module'] == 'saba') {
|
||||
$__resources['help']['core_plugins_conf'] = dirname(__FILE__).'/help/help.html';
|
||||
}
|
Loading…
Reference in a new issue