Permalink
Browse files

Initial import

  • Loading branch information...
0 parents commit d9df04f485fffaad80ddf8059086378f338e170f Portu media & communications committed Aug 31, 2011
Showing with 19,192 additions and 0 deletions.
  1. +25 −0 .gitignore
  2. +674 −0 COPYING
  3. +135 −0 DEPSLIST
  4. +7 −0 Makefile
  5. +1 −0 Makefile.PL
  6. +56 −0 NEWS
  7. +25 −0 README
  8. +7 −0 TODO
  9. +340 −0 cronjobs/lixuz_cron_daily.pl
  10. +15 −0 cronjobs/lixuz_cron_hourly.pl
  11. BIN data/StayPuft.ttf
  12. +2 −0 data/StayPuft.ttf.README
  13. +54 −0 docs/URLs.pod
  14. +202 −0 docs/installation.pod
  15. +125 −0 docs/templateExamples/commentSubmission.html
  16. +87 −0 docs/templates.pod
  17. +1 −0 docs/templates/EmailTemplates.pod
  18. +618 −0 docs/templates/WebTemplates.pod
  19. +20 −0 i18n/aliases.conf
  20. +1,342 −0 i18n/lixuz-js.pot
  21. +1,963 −0 i18n/lixuz.pot
  22. BIN i18n/messages.mo
  23. +1,514 −0 i18n/nb-js.po
  24. +2,275 −0 i18n/nb.po
  25. +1,503 −0 i18n/nn-js.po
  26. +2,273 −0 i18n/nn.po
  27. +139 −0 lib/LIXUZ.pm
  28. +188 −0 lib/LIXUZ/Controller/Admin.pm
  29. +39 −0 lib/LIXUZ/Controller/Admin/ACL.pm
  30. +922 −0 lib/LIXUZ/Controller/Admin/Articles.pm
  31. +421 −0 lib/LIXUZ/Controller/Admin/Articles/JSON.pm
  32. +941 −0 lib/LIXUZ/Controller/Admin/Articles/Submit.pm
  33. +152 −0 lib/LIXUZ/Controller/Admin/Articles/Trash.pm
  34. +438 −0 lib/LIXUZ/Controller/Admin/Articles/Workflow.pm
  35. +457 −0 lib/LIXUZ/Controller/Admin/Categories.pm
  36. +114 −0 lib/LIXUZ/Controller/Admin/Dashboard.pm
  37. +247 −0 lib/LIXUZ/Controller/Admin/Dictionary.pm
  38. +256 −0 lib/LIXUZ/Controller/Admin/Files.pm
  39. +132 −0 lib/LIXUZ/Controller/Admin/Files/Classes.pm
  40. +261 −0 lib/LIXUZ/Controller/Admin/Files/Edit.pm
  41. +131 −0 lib/LIXUZ/Controller/Admin/Files/ImgEdit.pm
  42. +247 −0 lib/LIXUZ/Controller/Admin/Files/Upload.pm
  43. +127 −0 lib/LIXUZ/Controller/Admin/Login.pm
  44. +355 −0 lib/LIXUZ/Controller/Admin/Newsletter.pm
  45. +361 −0 lib/LIXUZ/Controller/Admin/RSSImport.pm
Sorry, we could not display the entire diff because too many files (1,616) changed.
25 .gitignore
@@ -0,0 +1,25 @@
+*~
+*.swp
+*.swo
+*.xml
+.swecpwd
+lixuzUpgrade.log
+lixuz.yml
+sql/lixuz_livedummy.sql
+sql/resetdb
+sql/massReassign
+nytprof*
+scheduler.state
+db-upgrade.log
+lixuz-dbupgrade-dump*.sql
+packages/
+root/livedata
+lib/LIXUZ/Controller/SiteHacks.pm
+lib/LIXUZ/Controller/SiteHacks/
+
+# Built JS files
+root/js
+# Built CSS
+root/css/lixuz.css
+# Built MO files
+i18n/locale
674 COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. 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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. 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.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey 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;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU 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 that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ 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.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+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.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ 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
+state 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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program 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, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU 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. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
135 DEPSLIST
@@ -0,0 +1,135 @@
+#!/usr/bin/perl
+# This file contains a list of all dependencies Lixuz has. You can read it by hand
+# or just run "perl DEPSLIST list" to get a quick list. "perl DEPSLIST check" or
+# "perl DEPSLIST verbosecheck" checks for missing dependencies.
+use strict;use warnings;use 5.010;
+my %deps = (
+ 'Carp' => 0,
+ 'Catalyst' => 0,
+ 'Catalyst::Authentication::Store::DBIx::Class' => 0,
+ 'Catalyst::Controller::FormBuilder' => 0,
+ 'Catalyst::Controller::REST' => 0,
+ 'Catalyst::Plugin::Authentication' => 0,
+ 'Catalyst::Plugin::Cache' => 0,
+ 'Catalyst::Plugin::ConfigLoader' => 0,
+ 'Catalyst::Plugin::Session' => 0,
+ 'Catalyst::Plugin::Session::State::Cookie' => 0,
+ 'Catalyst::Plugin::Session::Store::FastMmap' => 0,
+ 'Catalyst::Plugin::Static::Simple' => 0,
+ 'Catalyst::Plugin::Unicode::Encoding' => 0,
+ 'Catalyst::View::JSON' => 0,
+ 'Catalyst::View::Mason' => 0,
+ 'Cache::Memcached::Fast' => 0,
+ 'Config::Any' => 0,
+ 'Cwd' => 0,
+ 'Data::Dumper' => 0,
+ 'DBI' => 0,
+ 'Digest::MD5' => 0,
+ 'Digest::SHA' => 0,
+ 'Encode' => 0,
+ 'Exporter' => 0,
+ 'Fatal' => 0,
+ 'FCGI::ProcManager' => 0,
+ 'File::Basename' => 0,
+ 'File::Copy' => 0,
+ 'File::MMagic::XS' => 0,
+ 'File::Path' => 0,
+ 'File::stat' => 0,
+ 'File::Temp' => 0,
+ 'FindBin' => 0,
+ 'Getopt::Long' => 0,
+ 'Graphics::Magick' => 0,
+ 'Hash::Merge' => 0,
+ 'HTML::Entities' => 0,
+ 'HTML::Mason' => 0,
+ 'HTML::Mason::Interp' => 0,
+ 'HTML::Normalize' => 0,
+ 'HTML::Scrubber' => 0,
+ 'IO::File' => 0,
+ 'IO::Socket::INET' => 0,
+ 'JSON::Any' => 0,
+ 'JSON::XS' => 0,
+ 'JSON::DWIW' => 0,
+ 'KinoSearch1' => 0,
+ 'KinoSearch1::Analysis::PolyAnalyzer' => 0,
+ 'KinoSearch1::Index::Term' => 0,
+ 'KinoSearch1::InvIndexer' => 0,
+ 'KinoSearch1::QueryParser::QueryParser' => 0,
+ 'KinoSearch1::Searcher' => 0,
+ 'KinoSearch1::Search::PhraseQuery' => 0,
+ 'KinoSearch1::Search::QueryFilter' => 0,
+ 'List::MoreUtils' => 0,
+ 'Mail::RFC822::Address' => 0,
+ 'Math::Int2Base' => 0,
+ 'MIME::Lite' => 0,
+ 'Moose' => 0,
+ 'Moose::Role' => 0,
+ 'MooseX::NonMoose' => 0,
+ 'namespace::autoclean' => 0,
+ 'Paranoid::Lockfile' => 0,
+ 'POSIX' => 0,
+ 'Regexp::Common' => 0,
+ 'Scalar::Util' => 0,
+ 'SMS::CPAGateway' => 0,
+ 'Test::MockClass' => 0,
+ 'Text::Aspell' => 0,
+ 'Text::FromAny' => 0,
+ 'Try::Tiny' => 0,
+ 'URI::Escape' => 0,
+ 'XML::FeedPP' => 0,
+);
+
+my $pkgNo = 0;
+$ARGV[0] //= '';
+
+given($ARGV[0])
+{
+ when('list')
+ {
+ print "$_ " foreach(sort keys %deps);
+ print "\b\n"
+ }
+
+ when(/check/)
+ {
+ $| = 1;
+ my @missing;
+ print 'Performing dependencies check...';
+ foreach (sort keys %deps)
+ {
+ print '.';
+ eval
+ {
+ $pkgNo++;
+ my $pkg = $_;
+ $pkg =~ s/::/_/g;
+ $pkg = 'lzDepsList_testPkg_'.$pkgNo.'_'.int(rand(9999)).'_'.$pkg;
+ if(not eval('package '.$pkg.'; use '.$_.';1;'))
+ {
+ push(@missing,$_);
+ }
+ };
+ }
+ if (@missing)
+ {
+ say 'done';
+ print 'Found missing libs:';
+ print " $_" foreach(@missing);
+ print "\n";
+ exit(1);
+ }
+ else
+ {
+ say 'done - all dependencies are present';
+ exit(0);
+ }
+ }
+
+ default
+ {
+ say "Usage: perl $0 ACTION";
+ say " where ACTION is one of:";
+ say " list - quickly list all deps";
+ say " check - check for missing deps";
+ }
+}
7 Makefile
@@ -0,0 +1,7 @@
+SHELL:=/bin/bash
+include ./script/Makefiles/header
+include ./script/Makefiles/minify
+include ./script/Makefiles/utils
+include ./script/Makefiles/tests
+include ./script/Makefiles/build
+include ./script/Makefiles/distrib
1 Makefile.PL
@@ -0,0 +1 @@
+die("Use the real Makefile\n");
56 NEWS
@@ -0,0 +1,56 @@
+0.2
+- Added support for additional fields of the 'date' type (same as datetime
+ minus the time)
+- Added support for file classes
+- Added a fallback message template
+
+0.1.12
+- Fixed a crash that would occur when deleting articles from the trash
+- Fixed a potential crash in our index searcher
+
+0.1.11
+- Added Norwegian Nynorsk language support
+
+0.1.10
+- Fixed a bug that could cause the article field editor to edit fields
+ for the wrong folder if the current revision of the article had a
+ different primary folder from the first revision of the article
+
+0.1.9
+- Fixed a crash that would occur when uploading new files
+
+0.1.8
+- Added the ability to move a file to another folder from the «edit file»
+ page
+
+0.1.7
+- Fixed a bug that caused folder filtering in the files section to fail
+
+0.1.6
+- Fixed a bug causing secondary fields to not get copied to a new revision
+ if the secondary fields section was not loaded
+
+0.1.5
+- Fixed a bug causing a flood of server requests when the folder tree was
+ being initialized
+- Fixed an object caching problem that could cause invalid results for
+ searches that were using the indexer
+
+0.1.4
+- Fixed a bug causing «add to body/lead» not to work
+- Turned the «view other versions» link in the files section into a button
+- Fixed a problem where Lixuz would throw a 503 error instead of 404 when
+ an invalid UID is used in /files/get
+
+0.1.3
+- Fixed a bug causing some file identifiers to be generated as numeric-only
+
+0.1.2
+- Fixed a bug causing old image captions to be used in articles
+
+0.1.1
+- Fixed a problem where requests for data from templates for articles
+ with extra or overridden live statuses could return duplicate data
+
+0.1
+- Initial release
25 README
@@ -0,0 +1,25 @@
+LIXUZ - Content management system
+---------------------------------
+
+This is the git repository of the Lixuz content management system.
+
+Installation documentation, as well as template API documentation can
+be found in the docs/ directory.
+
+Run make help to get a list of the most common make targets.
+
+License/copyright notice:
+Copyright (C) Utrop A/S Portu media & Communications 2008-2011
+
+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 3 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, see <http://www.gnu.org/licenses/>.
7 TODO
@@ -0,0 +1,7 @@
+(incomplete) TODO list for Lixuz
+- Improve code documentation
+- Add automated failover for cdn-hosted libs
+- Add support for proper (non-SiteHacks) plugins
+- Rewrite ACL permissions (currently we store each path
+ as either permitted or denied, rather use symbolic names
+ that maps to sets of paths to simplify upgrades)
340 cronjobs/lixuz_cron_daily.pl
@@ -0,0 +1,340 @@
+#!/usr/bin/perl
+# Daily cronjob for Lixuz
+
+# -- INIT --
+use strict;
+use warnings;
+use 5.010;
+use POSIX qw(nice); nice(10); # Be nice
+use FindBin;
+use File::stat;
+use DBI;
+use Cwd;
+use Try::Tiny;
+use constant {
+ true => 1,
+ false => 0
+};
+use lib $FindBin::RealBin.'/../lib/';
+
+my $verbosity = 0;
+my $runAll = 0;
+foreach (@ARGV)
+{
+ given($_)
+ {
+ when('--verbose')
+ {
+ $verbosity++;
+ }
+
+ when('--runall')
+ {
+ $runAll++;
+ }
+
+ default
+ {
+ warn("Unknown parameter: $_\n");
+ }
+ }
+}
+
+# Lixuz doesn't like not being in its own dir when initializing
+chdir($FindBin::RealBin.'/..');
+my $title = 'LIXUZ_Daily_Cron ['.getcwd.']';
+title('init');
+require LIXUZ;
+use LIXUZ::HelperModules::Scripts qw(fakeC);
+use LIXUZ::HelperModules::Indexer;
+
+my $fakeC = fakeC();
+
+if(ref($fakeC->config->{'Model::LIXUZDB'}->{'connect_info'}) eq 'ARRAY')
+{
+ die("Old-style config. Unable to continue.\n");
+}
+my $DBSTR = $fakeC->config->{'Model::LIXUZDB'}->{'connect_info'}->{dsn};
+my $DBUser = $fakeC->config->{'Model::LIXUZDB'}->{'connect_info'}->{user};
+my $DBPwd = $fakeC->config->{'Model::LIXUZDB'}->{'connect_info'}->{password};
+my $dbh = DBI->connect($DBSTR,$DBUser,$DBPwd);
+
+my (undef,undef,undef,$mday,undef,undef,$wday,undef,undef) = localtime;
+
+sub title
+{
+ $0 = $title .' - '.$_[0];
+ if ($verbosity)
+ {
+ print $0."\n";
+ }
+}
+
+# Clean up captchas
+{
+ title('captcha cleaning');
+ $dbh->do('DELETE FROM lz_live_captcha WHERE UNIX_TIMESTAMP() > (UNIX_TIMESTAMP(created_date)+7400);');
+}
+
+# Clean up old cached files
+{
+ title('imgcache cleaning');
+ my $path = $fakeC->config->{LIXUZ}->{file_path};
+ while(my $f = glob($path.'/*.imgcache'))
+ {
+ my $stat = stat $f;
+ if(defined $stat->atime && $stat->atime > $stat->mtime)
+ {
+ my $oneWeekAgo = time() - (86_500*7);
+ if ($stat->atime < $oneWeekAgo)
+ {
+ unlink($f);
+ }
+ }
+ }
+}
+
+# ---
+# Clean up errors in the DB
+# ---
+
+# Self-referencing relationships
+{
+ title('self-ref relationship cleaning');
+ $dbh->do('DELETE FROM lz_article_relations WHERE article_id=related_article_id;');
+}
+
+# Missing statuses
+{
+ title('missing statuses');
+ $dbh->do('UPDATE lz_article SET status_id=4 WHERE status_id IS NULL;');
+}
+
+# Folders without a single field
+{
+ title('missing fields');
+ my $rootFolders = $dbh->selectall_arrayref('SELECT folder_id FROM lz_folder WHERE parent IS NULL');
+ foreach my $folder (@{$rootFolders})
+ {
+ $folder = $folder->[0];
+ my $content = $dbh->selectall_arrayref('SELECT object_id from lz_field_module WHERE object_id='.$folder.' AND module="folders"');
+ if ($content && @{$content})
+ {
+ next;
+ }
+ my @fields = qw(title lead author body publish_time expiry_time status_id folder template_id);
+ my $fno = 0;
+ foreach my $field (@fields)
+ {
+ $fno++;
+
+ my $id = $dbh->selectall_arrayref('SELECT field_id FROM lz_field WHERE inline="'.$field.'"');
+ next if not $id || not $id->[0];
+ $id = $id->[0]->[0];
+ $dbh->do('INSERT INTO lz_field_module (field_id,module,object_id,position,enabled) VALUES ('.$id.',"folders",'.$folder.','.$fno.',1)');
+ }
+ }
+}
+# Missing STATUSCHANGE_*
+{
+ title('missing statuschange entries');
+ my $statuses = $dbh->selectall_arrayref('SELECT status_id FROM lz_status');
+ foreach my $status (@{$statuses})
+ {
+ $status = $status->[0];
+ my $existing = $dbh->selectall_arrayref('SELECT action_id FROM lz_action WHERE action_path="STATUSCHANGE_'.$status.'"');
+ if ($existing && @{$existing})
+ {
+ next;
+ }
+ $dbh->do('INSERT INTO lz_action (action_path) VALUES ("STATUSCHANGE_'.$status.'")');
+ }
+}
+# Missing WORKFLOW_REASSIGN_TO_ROLE_*
+{
+ title('missing workflow-reassign ACL entries');
+ my $roles = $dbh->selectall_arrayref('SELECT role_id FROM lz_role');
+ foreach my $role (@{$roles})
+ {
+ $role = $role->[0];
+ my $existing = $dbh->selectall_arrayref('SELECT action_id FROM lz_action WHERE action_path="WORKFLOW_REASSIGN_TO_ROLE_'.$role.'"');
+ if ($existing && @{$existing})
+ {
+ next;
+ }
+ $dbh->do('INSERT INTO lz_action (action_path) VALUES ("WORKFLOW_REASSIGN_TO_ROLE_'.$role.'")');
+ }
+}
+# Article issues
+{
+ title('article issues');
+ my %seen;
+ my $folders = $fakeC->model('LIXUZDB::LzArticleFolder')->search({ primary_folder => 1});
+ while(my $f = $folders->next)
+ {
+ my $id = $f->article_id.'-'.$f->revision;
+ if ($seen{$id})
+ {
+ $f->set_column('primary_folder',0);
+ $f->update();
+ }
+ else
+ {
+ $seen{$id} = 1;
+ }
+ }
+}
+
+# ---
+# Make sure the search index is up to date
+# ---
+{
+ title('indexing (init)');
+
+ my $internalIndexer = LIXUZ::HelperModules::Indexer->new(config => $fakeC->config->{'LIXUZ'}->{'indexer'}, mode => 'internal', c => $fakeC);
+ my $liveIndexer = LIXUZ::HelperModules::Indexer->new(config => $fakeC->config->{'LIXUZ'}->{'indexer'}, mode => 'external', c => $fakeC);
+
+ title('indexing (articles)');
+ my $allArts = $fakeC->model('LIXUZDB::LzArticle')->page(1);
+ my $pager = $allArts->pager;
+ foreach my $page ($pager->first_page..$pager->last_page)
+ {
+ my $arts = $allArts->page($page);
+ while(my $art = $arts->next)
+ {
+ if ($art->status_id == 2)
+ {
+ $liveIndexer->add_ifmissing($art);
+ }
+ $internalIndexer->add_ifmissing($art);
+ }
+ # Commit changes now to avoid using too much memory This might be
+ # somewhat slower than bulk committing everything at the end, but it
+ # ensures somewhat consistent memory usage, no matter the size of the
+ # DB
+ $liveIndexer->commit_ifneeded;
+ $internalIndexer->commit_ifneeded;
+ }
+
+ title('indexing (files)');
+ my $allFiles = $fakeC->model('LIXUZDB::LzFile')->page(1);
+ $pager = $allFiles->pager;
+ my $added = 0;
+ foreach my $page ($pager->first_page..$pager->last_page)
+ {
+ my $files = $allFiles->page($page);
+ while(my $file = $files->next)
+ {
+ if ($internalIndexer->add_ifmissing($file))
+ {
+ $added++;
+ }
+ }
+ if ($added > 20)
+ {
+ # Commit changes now to avoid using too much memory This might be
+ # somewhat slower than bulk committing everything at the end, but it
+ # ensures somewhat consistent memory usage, no matter the size of the
+ # DB
+ $internalIndexer->commit_ifneeded;
+ $added = 0;
+ }
+ }
+
+ title('indexing (committing)');
+ # Commit, and tell the indexer to optimize the index while we're at it
+ $liveIndexer->commit(1);
+ $internalIndexer->commit(1);
+}
+
+# ===
+# Weekly chunk
+# ===
+if ($wday == 1 || $runAll)
+{
+ $title =~ s/Daily/Weekly/g;
+ {
+ title('Article sanitychecks');
+ my $arts = $fakeC->model('LIXUZDB::LzArticle');
+ while(my $art = $arts->next)
+ {
+ # Articles without workflows will be sort of lost within the system
+ if(not $art->workflow)
+ {
+ my $wf = $fakeC->model('LIXUZDB::LzWorkflow')->create({
+ article_id => $art->article_id,
+ revision => $art->revision,
+ assigned_by => 1,
+ assigned_to_user => 1,
+ });
+ $wf->update();
+ }
+ # Articles without revision control metadata will not be editable
+ if(not $art->revisionMeta)
+ {
+ my $isLatest = 0;
+ try
+ {
+ my $latest = $fakeC->model('LIXUZDB::LzArticle')->search({ article_id => $art->article_id }, { order_by => 'publish_time DESC' });
+ if ($latest->first->revision == $art->revision)
+ {
+ $isLatest = 1;
+ }
+ };
+ my $rm = $fakeC->model('LIXUZDB::LzRevision')->create({
+ type => 'article',
+ type_revision => $art->revision,
+ type_id => $art->article_id,
+ committer => 1,
+ is_latest => $isLatest,
+ });
+ $rm->update();
+ }
+ # Articles without a primary folder won't list the neccessary fields
+ if(not $art->primary_folder)
+ {
+ if ($art->folders && $art->folders->count)
+ {
+ my $newpr = $art->folders->first;
+ $newpr->set_column('primary_folder',1);
+ $newpr->update();
+ }
+ else
+ {
+ my $f;
+ try
+ {
+ $f = $fakeC->model('LIXUZDB::LzFolder')->search(undef, { order_by => 'folder_id ASC' })->first;
+ my $newpr = $fakeC->model('LIXUZDB::LzArticleFolder')->create({
+ article_id => $art->article_id,
+ revision => $art->revision,
+ folder_id => $f->folder_id,
+ primary_folder => 1
+ });
+ $newpr->update;
+ }
+ catch
+ {
+ my $first = $_;
+ try
+ {
+ warn("Failed to create LzArticleFolder for article ".$art->article_id.'/'.$art->revision." and folder_id ".$f->folder_id.': '.$_);
+ }
+ catch
+ {
+ warn("Crash during LzArticleFolder creation: $first\n$_");
+ };
+ };
+ }
+ }
+ }
+ }
+}
+
+# ===
+# Monthly chunk
+# ===
+if ($mday == 1 || $runAll)
+{
+ $title =~ s/(Daily|Weekly)/Monthly/g;
+}
15 cronjobs/lixuz_cron_hourly.pl
@@ -0,0 +1,15 @@
+#!/usr/bin/perl
+# Hourly cronjob for Lixuz
+
+exit(0); # Unused for now
+
+# -- INIT --
+use strict;
+use warnings;
+use POSIX qw(nice); nice(19); # Be very nice
+use FindBin;
+use lib $FindBin::RealBin.'/../lib/';
+# Lixuz doesn't like not being in its own dir when initializing
+chdir($FindBin::RealBin.'/..');
+require LIXUZ;
+
BIN data/StayPuft.ttf
Binary file not shown.
2 data/StayPuft.ttf.README
@@ -0,0 +1,2 @@
+StayPuft from http://www.thibault.org/fonts/staypuft/
+Used under the GNU LGPL version 2
54 docs/URLs.pod
@@ -0,0 +1,54 @@
+# LIXUZ content management system
+# Copyright (C) Utrop A/S Portu media & Communications 2008-2011
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+=head1 LIXUZ URL MANUAL
+
+Lixuz has customizable URLs, defined by the I<template_url> and I<category_url>
+settings in lixuz.yml. These settings can be used to define how Lixuz generates
+URLs.
+
+All URLs are made absolute by Lixuz (ie. prefixed with /).
+
+=head2 CATEGORY URLs
+
+Category URLs can not be customized yet. You can only use the B<%c> placeholder, and
+optionally prefix it with some pre-determined text.
+
+=head2 ARTICLE URLs
+
+Article URLs can be customized in any way you like. The default is: "%c/%a". Another
+useful setting could be "%c/%A-%a". The bare minumum would be simply "%a".
+
+=head2 URL PLACEHOLDERS
+
+These are the URL placeholders that can be used in the above settings:
+
+=over
+
+=item B<%c>
+
+Category name list. This generates a tree-like string, in the form: category1/subcat/subcat.
+This is currently the only setting available for use in category URLs.
+
+=item B<%a>
+
+The article ID. B<MUST> be the last entry in any article URL.
+
+=item B<%A>
+
+The article title, cleaned for use in URLs.
+
+=back
202 docs/installation.pod
@@ -0,0 +1,202 @@
+# LIXUZ content management system
+# Copyright (C) Utrop A/S Portu media & Communications 2008-2011
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+=head1 LIXUZ INSTALLATION MANUAL
+
+This is the Lixuz installation manual.
+
+=head1 REQUIREMENTS
+
+Lixuz runs on top of Catalyst and Mason. It also needs a few other perl
+modules. To find out if you have any deps missing, run
+
+ make depscheck
+
+within a Lixuz source tree. It will then check all of the Lixuz dependencies
+and tell you which are missing.
+
+=head2 VIDEO
+
+Lixuz can convert uploaded videos to FLV for use on the website, however
+to do this it needs to have some utilities available, namely I<ffmpeg>.
+The codecs Lixuz can convert from then depends upon which are installed
+for ffmpeg.
+
+=head3 DEBIAN/UBUNTU
+
+These packages in Debian/Ubuntu (or similarly named, unstripped, packages)
+will give most of the codec support that Lixuz might need. For Ubuntu
+these come from the Medibuntu repository.
+
+ libavcodec-unstripped-51 libavdevice-unstripped-52
+ libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51
+ libswscale-unstripped-0 libamrnb3 libamrwb3
+
+=head1 INITIAL SETUP
+
+=head2 CREATING THE DATABASE
+
+Before you can proceed to the installation, you need to create the database
+and the database user for your new installation of Lixuz. Skip this section
+if you have already done so.
+
+In the following commands, replace [NAME] with the name of the database, [USER]
+with the database username you want to use and [PWD] with the database password
+you want to use. You may generate a random password with this command if you
+need to:
+
+ perl -le 'print map { (a..z,A..Z,0..9)[rand 62] } 0..pop' 10
+
+Get a mysql console logged in as an admin user. Then enter the following commands.
+
+Create the database:
+ CREATE DATABASE [NAME];
+
+Create the user:
+ CREATE USER '[NAME]'@'localhost' IDENTIFIED BY '[PWD]';
+
+Grant the user access:
+ GRANT ALL PRIVILEGES ON [NAME].* TO '[NAME]'@'localhost';
+
+All done. You can now proceed to the next step. Keep the information here
+in mind, as the installation script will prompt you for this information.
+
+=head2 INSTALLATION
+
+Most of the initial setup (including copying files and configuration) can be
+automated. Simply run the I<./scripts/lixuz_install.pl> script and follow the
+instructions. The following sections will outline what needs to be done
+manually.
+
+B<Note on HTTP servers:> as Lixuz uses FastCGI, you do not need to use any of
+the web servers listed as examples here, you can just follow the instructions
+for setting up fastcgi, and then configure whichever websever you're using to
+serve Lixuz via the FastCGI instance.
+
+=head3 SETTING UP FASTCGI
+
+The easiest way to set up FastCGI is to use the L<fcgim(1)> utility from
+I<http://random.zerodogg.org/fcgim>. If you want to configure it manually,
+refer to the Catalyst docs, we will assume you're using fcgim here.
+
+Relevant fcgim documentation for a generic Lixuz app:
+
+ "lixuz": {
+ // The root directory that the app is installed at
+ "path":"/var/www/lixuz/",
+ // Supports: Catalyst, PHP
+ // Case sensitive.
+ "type":"Catalyst",
+ // The max number of processes to use for this app
+ "processes":4,
+ // The location of the server process file
+ "serverFile":"/tmp/lixuz.socket",
+ // Any environment variables you want set in the environment of
+ // this application
+ "ENV": {},
+ },
+
+Modify the number of processes to suit the load for your site.
+
+If you're using L<local::lib> to mange the perl modules for Lixuz, set the
+PERL5LIB environment variable from local::lib for it in the config:
+
+ "ENV": {
+ "PERL5LIB":"/usr/local/lixuzModules/perl5/lib/perl5:/usr/local/lixuzModules/perl5/lib/perl5/i486-linux-gnu-thread-multi"
+ },
+
+Once these are set up you can use the normal fcgim commands to mange the app.
+I<fcgim lixuz start> to start it, I<fcgim lixuz stop> to stop, etc. Lixuz
+also works fine with the fcgim sanitycheck feature.
+
+=head3 APACHE2
+
+First follow the instructions to set up the FastCGI instance.
+
+Here is an example of an apache config file configured to talk to Lixuz FastCGI.
+
+ <VirtualHost *:80>
+ ServerAdmin youruser@example.org
+ ServerName example.org
+ ServerAlias stage.example.org www.example.org
+
+ DocumentRoot /var/www/example.org/root
+ <Directory /var/www/example.org/root>
+ Options -Indexes FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+ </Directory>
+
+ ErrorLog /var/log/apache2/www.example.org-error.log
+ CustomLog /var/log/apache2/www.example.org-access.log combined
+ LogLevel warn
+ ServerSignature On
+
+ # You should define some location for these error pages, as they will
+ # be displayed should the fcgi server for some reason go down
+ Alias /_errors /var/www/default/
+ ErrorDocument 500 /_errors/index.html
+ ErrorDocument 502 /_errors/index.html
+
+ # Static data that the web server can serve itself
+ Alias /css /var/www/lixuz/root/css
+ Alias /js /var/www/lixuz/root/js
+ Alias /livedata /var/www/lixuz/root/livedata
+ Alias /static /var/www/lixuz/root/static
+ Alias /swf /var/www/lixuz/root/swf
+
+ # Connect to the Lixuz FastCGI instance
+ FastCgiExternalServer /tmp/lixuz.fcgi -socket /tmp/lixuz.socket
+ Alias / /tmp/lixuz.fcgi/
+ </VirtualHost>
+
+Put it in ie. /etc/apache2/sites-available/mysite.conf - and possibly symlink it into
+/etc/apache2/sites-enabled/
+
+=head2 CRONJOBS
+
+Lixuz has two different cronjob types in use. One lives within the Lixuz
+engine, the other ones are standalone, both should be added.
+
+=head3 BUILTIN
+
+Lixuz has some builtin cronjobs for operations that need full
+access to every part of the Lixuz engine (not just the parts that are
+available from standalone scripts). These cronjobs need to be explicitly
+triggered by submitting a request to the webserver.
+
+B<Daily>
+
+Request the cron handler (/cron) of your Lixuz install with the parameter
+schedule_trigger=lixuz_daily_cron - ie.:
+
+ wget -O/dev/null -q http://example.org/cron/?schedule_trigger=lixuz_daily_cron
+
+Needless to say, this should be run daily.
+
+B<Second daily>
+
+There is also a second daily cronjob, this should be run twelve hours
+after the above cronjob. It is triggered by "lixuz_daily_cron_two". Ie.:
+
+ wget -O/dev/null -q http://example.org/cron/?schedule_trigger=lixuz_daily_cron_two
+
+=head3 EXTERNAL
+
+The external cronjobs can be found in the cronjobs/ subdirectory.
+Their names should be self-explanatory and you can simply symlink them into
+the respective /etc/cron.* directories.
125 docs/templateExamples/commentSubmission.html
@@ -0,0 +1,125 @@
+<%args>
+$comment_list => undef
+$comment_subject => ''
+$comment_author_name => ''
+$comment_body => ''
+$comment_message => ''
+$comment_message_error => undef
+$captcha_id
+$article
+</%args>
+<br />
+<div id="comments">
+<script type="text/javascript">
+function validateCommentSubmission ()
+{
+ if (!$)
+ {
+ var $ = function (id) { return document.getElementById(id);};
+ }
+ var notFilledIn = new Array();
+ if (!$('comment_author_name_input').value || $('comment_author_name_input').value.length < 2 || ! $('comment_author_name_input').value.match(/\S/))
+ {
+ notFilledIn.push('your name');
+ }
+ if (!$('comment_subject_input').value || $('comment_subject_input').value.length < 2 || ! $('comment_subject_input').value.match(/\S/))
+ {
+ notFilledIn.push('subject');
+ }
+ if (!$('comment_body_input').value || $('comment_body_input').value.length < 2 || ! $('comment_body_input').value.match(/\S/))
+ {
+ notFilledIn.push('comment');
+ }
+ if (!$('comment_captcha_input').value || $('comment_captcha_input').value.length != 6 || ! $('comment_captcha_input').value.match(/\S/))
+ {
+ notFilledIn.push('visual validation code (captcha)');
+ }
+ if(notFilledIn.length > 0)
+ {
+ if(notFilledIn.length > 1)
+ {
+ var list = '';
+ for(var i = 0; i < notFilledIn.length; i++)
+ {
+ list = ' - '+notFilledIn[i]+"\n"+list;
+ }
+ alert("You have not filled in:\n"+list);
+ }
+ else
+ {
+ alert("You have not filled in "+notFilledIn[0]+".");
+ }
+ return false;
+ }
+ return true;
+}
+</script>
+<h2>Kommentér denne artikkelen</h2>
+% # --- New comment ---
+<form name="newComment" method="post">
+<input type="hidden" name="_lz_artCommentSubmitted" value="1" />
+<input type="hidden" name="captcha_id" value="<%$captcha_id%>" />
+<table border="0">
+<tr>
+
+%if($comment_message) {
+<td colspan="2"><b>
+<% $comment_message_error ? '<font color="#FF0000">' : '' |n%>
+<%$comment_message|n%>
+<% $comment_message_error ? '</font>' : '' |n%>
+</b></td>
+</tr><tr>
+<td colspan="2">&nbsp;</td>
+</tr><tr>
+%}
+
+<td style="min-width: 110px"><b>Name:</b></td><td><input size="40" id="comment_author_name_input" name="author_name" type="text" value="<%$comment_author_name%>" /></td>
+</tr><tr>
+<td><b>Subject:</b></td><td><input id="comment_subject_input" size="40" name="subject" type="text" value="<%$comment_subject%>" /></td>
+</tr><tr>
+<td colspan="2"><b>Comment:</b> (only text, HTML not permitted)</td>
+</tr><tr>
+<td colspan="2"><textarea name="body" rows="8" cols="45" id="comment_body_input"><% $comment_body %></textarea></td>
+</tr><tr>
+<td colspan="2">&nbsp;</td>
+</tr><tr>
+<td><img src="<% $c->uri_for('/files/captcha/'.$captcha_id) %>" align="middle" /></td><td><b>Enter the text from the image:</b> <input id="comment_captcha_input" name="captcha" type="text" size="10" /></td>
+</tr><tr>
+<td colspan="2">&nbsp;</td>
+</tr><tr>
+<td colspan="2"><input type="submit" value="Send inn kommentar" onclick="return validateCommentSubmission();" /></td>
+</tr>
+</table>
+</form>
+<br /><br />
+<a name="comments">&nbsp;</a>
+<h3>Comments</h3>
+% # --- /New comment ---
+% # --- Comments ---
+% my $no = 0;
+%while(defined($comment_list) && (my $comment = $comment_list->next)) {
+% $no++;
+<div class="<% ($no % 2 == 0) ? 'item1' : 'item2' %>">
+<b><a name="<% $article->article_id + $comment->comment_id %>"><% $comment->subject |n %></a></b><br />
+by <% $comment->author_name|n%> <% datetime_from_SQL($comment->created_date) %>
+<p class="commentBody">
+<% $comment->body |n%>
+</p>
+</div>
+%}
+%# --- /Comments ---
+</div>
+
+<%perl>
+# BEGIN LIXUZ_INFOBLOCK
+# TEMPLATE_VERSION=0.1
+# TEMPLATE_NAME=Lixuz live comments example
+# TEMPLATE_LICENSE=GPLv3
+# TEMPLATE_APIVERSION=1
+# TEMPLATE_TYPE=include
+# TEMPLATE_UNIQUEID=org.lixuz.example.liveComments
+# END LIXUZ_INFOBLOCK
+</%perl>
+<%init>
+use LIXUZ::HelperModules::Calendar qw(datetime_from_SQL);
+</%init>
87 docs/templates.pod
@@ -0,0 +1,87 @@
+# LIXUZ content management system
+# Copyright (C) Utrop A/S Portu media & Communications 2008-2011
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+=head1 LIXUZ TEMPLATE MANUAL - INTRODUCTION
+
+This is the Lixuz template manual. It serves as an introduction and reference
+for the Lixuz template system.
+
+The version described here is version B<1> of the Lixuz template API.
+
+=head2 Conventions used
+
+Whenever the word "{as}" (without the quotes) appear, what is meant is the
+value supplied to the as= parameter to a needinfo source.
+
+=head1 BASIC FORMAT
+
+At the base of the Liuxz template format lies Mason (HTML::Mason) and Catalyst.
+Anything you can do with mason, you can do with a Lixuz template, and you also
+have access to the $c catalyst object. Lixuz leaves all of the actual code
+parsing to Mason, but requires an additional data block to be present
+in all templates that lets Lixuz know things about the template.
+
+A block can look like this (all options are not required, see the section on
+INFOBLOCK DATA for more information on the various settings):
+
+ <%perl>
+ # BEGIN LIXUZ_INFOBLOCK
+ # TEMPLATE_VERSION=0.1
+ # TEMPLATE_NAME=Lixuz basic article page
+ # TEMPLATE_LICENSE=Proprietary
+ # TEMPLATE_APIVERSION=1
+ # TEMPLATE_TYPE=article
+ # TEMPLATE_NEEDSINFO=article_get_[artid=url,as=article,includeRelations=1,includeComments=1,handleComments=1]
+ # TEMPLATE_FILESPOT=[type=image,name=Primary image,as=primaryImage,id=1]
+ # TEMPLATE_INCLUDES=no.lixuz.header no.lixuz.footer no.lixuz.subscribeNewsletter
+ # TEMPLATE_UNIQUEID=no.lixuz.basicArticle
+ # END LIXUZ_INFOBLOCK
+ </%perl>
+
+Any template can only have one infoblock and Lixuz will stop processing the file
+when it hits the first END LIXUZ_INFOBLOCK. You can have comments inside
+an infoblock by using ## at the start of the line instead of just #.
+
+=head1 VALIDATION AND DEBUGGING
+
+As Lixuz templates are primarily mason templates, the first thing you
+should do if you experience issues is to try to validate that the
+Mason template is valid. This can for instance be done with the
+./tools/masontest.pl file included with Lixuz. This program is an
+approximate equivalent to 'perl -c' for mason templates.
+
+Secondly, consult the list of required infoblock data above. If you have
+forgotten an entry, it will not render the template.
+
+Thirdly, check the Lixuz logfile. If something goes wrong while rendering
+the template, that's where the error information will be available.
+
+=head2 UPDATING LIVE TEMPLATES MANUALLY
+
+Lixuz has a builtin template replacement function, but for quick updates
+it is often much easier to upload it manually (ie. using rsync or scp) to
+the server than to enter the Lixuz web UI. The templates can be found in
+the directory defined by LIXUZ:template_path in the Lixuz config file.
+Here the files are named with both their template_id (at the beginning
+of the filename) and their uniqueid, so it should be simple to find the
+one you want to replace. Once you have found it you can simply overwrite
+it with your new version. If you did not change the infoblock then you
+can just reload the page that is not working to see if your changes
+are now working (checking the logfile for whining). If you did change
+the infoblock then you will have to empty memcached. It's not recommended
+that you do that on a live server so you ought to have a debugging server.
+Emptying memcached can be done either from within the Lixuz web UI on
+the templates page, or by restarting memcached.
1 docs/templates/EmailTemplates.pod
@@ -0,0 +1 @@
+TODO - Document
618 docs/templates/WebTemplates.pod
@@ -0,0 +1,618 @@
+# LIXUZ content management system
+# Copyright (C) Utrop A/S Portu media & Communications 2008-2011
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+=head1 LIXUZ TEMPLATE MANUAL
+
+This is the Lixuz template manual for web templates.
+
+This file describes version B<1> of the Lixuz template API.
+
+B<Note>: the text in this file assumes you have already read the general
+template introduction found in doc/templates.pod of the Lixuz source tree.
+
+=head1 A NOTE ABOUT SITEHACKS
+
+You can put site-specific controllers into either lib/LIXUZ/Controller/SiteHacks.pm
+or anything under lib/LIXUZ/Controller/SiteHacks/. These will be preserved upon upgrade,
+and allows you to add any controller you need into a Lixuz instance, the former
+being useful for a collection of random minor handlers, and the latter for
+inserting more complex handlers, possibly adding functionality to the admin UI.
+
+The syntax of the files is the standard syntax for Catalyst controllers.
+
+=head1 INFOBLOCK DATA
+
+The Lixuz infoblock can contain various pieces of information. The entries that
+are required to be present are: TEMPLATE_NAME TEMPLATE_LICENSE TEMPLATE_VERSION
+TEMPLATE_TYPE TEMPLATE_APIVERSION and TEMPLATE_UNIQUEID. ALL other entries
+are optional, and you should use them as you see fit.
+
+Here follows a list of all possible infoblock entries, and their permitted
+values and syntax.
+
+=over
+
+=item B<TEMPLATE_VERSION>
+
+This option should contain the version number of your template. This is
+mostly present to let you track versions yourself, but might also be used
+by Lixuz in the future. It accepts any string and is required.
+
+=item B<TEMPLATE_NAME>
+
+This option should contain the human-readable name of the template. This
+is the string that will be displayed within the Lixuz interface. It accepts
+any string and is required.
+
+=item B<TEMPLATE_LICENSE>
+
+This option should contain the license of your template. Like TEMPLATE_VERSION
+this is mostly present to let you track which license a template has yourself
+and to let you find out if you can redistribute that nice template you have.
+It accepts any string and is required.
+
+=item B<TEMPLATE_APIVERSION>
+
+This option must contain the Lixuz template API version the template is written
+for, as of this document that version is 1. This will make sure that Lixuz does
+not accept templates for newer versions than the one installed, and might also
+allow it to activate a compatibility mode in the future for templates that
+are using an old api version. It accepts a single integer and is required.
+
+=item B<TEMPLATE_TYPE>
+
+This option determines which type of template it is, and thus also
+what kind of pages and data Lixuz will use it for. The allowed settings
+are:
+
+=over
+
+=item list
+
+A list of articles, such as the front page of a news site.
+
+=item search
+
+The results of a search query.
+
+=item article
+
+An article, with lead, body, author, comments and anything else needed.
+
+=item include
+
+A template that is to be included in other templates. Lixuz will
+never use it directly.
+
+=item message
+
+A template that displays either a message from lixuz, or an error
+(either a standard error form Lixuz, or a customized error message).
+This template will always recieve a $lz_message and $lz_message_type
+variable. The lz_message_type contains which type of message it is,
+allowing you to display your own message if you recognize it,
+and just fall back to the value of $lz_message if you do not. $lz_message_type
+is usually the HTTP error code being displayed (ie. 404).
+
+It MIGHT recieve a $lz_message_intMsg - which is an internal Lixuz
+message from the method that triggered the message to be displayed.
+If this is set then it will contain technical information about why
+it failed. You should not display this message to users in either case,
+but it might make it easier to troubleshoot issues if you output this
+inside a HTML comment block when it is present, so that it can be
+seen by viewing the HTML source.
+
+=item rssimport
+
+A template that displays data from the Lixuz RSS Import module.
+This is quite similar to list, except that it gets data in a slightly
+different format (and is not used by Lixuz directly right now, it needs
+a handler in SiteHacks.pm).
+
+=back
+
+This option is required, and only accepts one of the values listed above.
+
+=item B<TEMPLATE_UNIQUEID>
+
+This is a unique identifier for this template. This is used both internally
+by Lixuz, and is the means that other templates have for referreing to
+Lixuz templates it wants to include. It can contain any string (without
+spaces), but the recommended format is:
+
+ TLD.MYDOMAIN.descriptiveCamelCaseName
+
+Where TLD is the top-level domain you have (for instance "com", "org" or "no"),
+MYDOMAIN is your domain name (for instance "example" or "lixuz") and
+descriptiveCamelCaseName is some descriptive string explaining
+the template.
+
+So for instance if you are using the domain "example.org" and have just
+written a basic article template, its uniqueid might be:
+
+ org.example.basicArticle
+
+This option is required, and must never contain spaces (and should
+be in the form explained above).
+
+=item B<TEMPLATE_FILESPOT>
+
+This is a space-separated list of file spots available in the template.
+Each spot is defined by a pair of values inside brackets ([]). Inside
+the brackets you define the settings for a single spot. The following
+settings can be used:
+
+=over
+
+=item type
+
+Required. Defines what kind of spot it is. One of: video, image, flash, multi
+
+=item accepts
+
+Required IF type=multi. Ignored if type is not multi. A space separated list
+of the kind of files this spot accepts. One or more of: video, image, flash
+
+=item name
+
+Required. Defines a human-readable name for the spot. Feel free to include any
+characters except I<=,]>.
+
+=item as
+
+Required. Defines the variable that the image object will get assigned
+to in the stash. The image object is a LzArticleFile, you can get the
+LzFile by calling ->file on it.
+
+=item id
+
+Required. Used internally to pair files to spots. Must be an integer.
+Note that this must not conflict with any other spot (of any type) or
+includes' spots, if any. In general though, includes have hardcoded images (no
+spots) so it should normally not be a problem.
+
+=item default
+
+Optional, integer. This setting marks the spot as a default spot for the
+type it defined. The number sets its priority. A default value of 1 will
+assign the first image added to an article to this spot, 2 will assign
+the second and so on.
+
+It is important to note that although you can not have several default settings
+with the same value, that only applies to the type selected. So it is possible
+to have a default=1 for video and another for images, but not two for
+either of them.
+
+=back
+
+Example:
+
+ TEMPLATE_FILESPOT=[name=Primary image,as=primaryImage,id=1]
+
+This option is optional, can contain spaces separating [] blocks as well
+as spaces supplied to the name= parameter. The other parameters can
+not contain spaces.
+
+=item B<TEMPLATE_INCLUDES>
+
+This is a space separated list of the uniqueids of templates that this
+template will include (using $m->comp() or <& &>). Lixuz will resolve
+all NEEDSINFO requirements for those templates and stash them inside
+a $templateFileMap hashref that you have access to (ie. put it in <%args>).
+This hashref contains a map of uniqueid => filenames that will allow you
+to include any template without needing to have hardcoded filenames (that
+will most likely not work in Lixuz anyway, as the filenames are dynamically
+generated during upload based upon a number of factors).
+
+For example, if you have the template org.example.basicArticle that needs
+to include org.example.basicHeader you set
+TEMPLATE_INCLUDES=org.example.basicHeader and then include the header where
+you want it using <& $templateFileMap->{'org.example.basicHeader'} &>.
+
+If you wish you may have several TEMPLATE_INCLUDES= settings, or you may
+have a single one that contains a space-separated list.
+
+All templates listed in this are hard deps, so the template will not
+be allowed to render if the includes do not exist. This option is optional.
+
+=item B<TEMPLATE_NEEDSINFO>
+
+This is the most advanced and also the most powerful entry you
+can have. This is how you tell Lixuz what kind of data your template wants.
+Lixuz will then look up the data and prepare it for use for you. The various
+data sources are explained in detail in the DATA SOURCES section below, here
+we will only explain the syntax. This setting can, like TEMPLATE_INCLUDES,
+contain a space separated list of settings, or you can have several
+TEMPLATE_NEEDSINFO= entries, Lixuz does not care which one you use (or even if
+you mix the two).
+
+The basic syntax is:
+
+ SOURCE_ACTION_[KEY=VALUE]
+
+Where SOURCE is the source of the data, this can for instance be 'article'
+or 'rssimport'. ACTION determines the type of data you want, for instance
+'list' (to get a list of articles) or 'get' (to get a single article).
+
+[KEY=VALUE] contains a comma-separated list of key=value pairs that can
+set a vareiety of settings determining how data is looked up and what
+is returned. Most NEEDSINFO settings requires at least one key=value pair,
+namely [as=something], as= sets the name of the variable that the data
+returned will be stashed in. Keys can only contain alphanumeric characters,
+values can contain anything except ], and space. If you need a space then
+you can use %20 and Lixuz will convert it for you before retrieving the
+data.
+
+This option is not required, but anything listed in it is a hard dependency
+and the template will not be allowed to render if the action does not
+return any data (or can not be performed).
+
+=back
+
+=head1 DATA SOURCES
+
+=head2 Article
+
+The article data source provides single articles or lists of articles,
+and lets you retrieve them by ID or automatically depending on the URL.
+
+=head3 B<Parameters usable on any article action>
+
+=over
+
+=item B<extraLiveStatus>
+
+This is a list of extra status_id's that should count the same as the core
+live one. The IDs should be separated by +.
+
+Ie:
+ extraLiveStatus=5
+ extraLiveStatus=5+7
+
+This setting affects listing and fetching articles.
+
+=item B<overrideLiveStatus>
+
+This is similar to I<extraLiveStatus>, however instead of appending, this will
+replace the original live status.
+
+Ie.
+ overrideLiveStatus=5
+
+Will make Lixuz consider 5 to be the live status_id, rather than whatever the id
+of the core 'live' status is. This is useful if you need to fetch articles from
+other statuses and wish to filter out those that are already considered live.
+
+Unlike extraLiveStatus this does not take more than one status, though you can
+combine them for the same effect.
+
+=back
+
+=head3 B<list>
+
+The list action provides a list of articles (in a DBIx::Class::ResultSet),
+optionally paginated or from a specific category.
+
+Options:
+
+=over
+
+=item B<as>
+
+This determines the primary name of the variable that the list will
+be stored in. Any legal perl variable name is allowed.
+
+=item B<catid>
+
+This determines the category ID the data will be pulled from. It must
+either be a Lixuz category number (int) or the string "url" (without the
+quotes). If it is "url" or "arturl" then Lixuz will fetch the article from the
+URL (this is probably the most common use for this option in list templates).
+The difference between "url" and "arturl" is that "arturl" expects the URL
+to point to an article, and fetches the category accordingly, while
+"url" expects the URL to point to a category.
+
+If you omit this parameter then Lixuz will fetch ALL articles that match
+the other parameters, regardless of category. Any article that is live will
+be returned.
+
+=item B<root_catid>
+
+This sets the 'root' category ID. This is the category ID that Lixuz
+falls back to when the url does not contain a category path (ie. when it is
+simply /).
+
+=item B<soft>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value Lixuz will not automatically go to a 404 error if the query failed
+to return anything.
+
+=item B<includePager>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value then a pager will be included as {as}_pager. If it is zero, or not
+present then the pager will not be present (and the option allowPaging
+will do nothing).
+
+=item B<allowPaging>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value then it will look for the parameter "page" (without the quotes) in
+either GET or POST parameters, if found and it is an integer then that will
+be the page from the pager that gets returned in {as}. This option has
+no effect whatsoever if includePager is missing or zero.
+
+=item B<ignoreDupes>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value then it will exclude the article mentioned in the URL from
+being included in the returned object. This only has an effect on
+article pages that utilize artid=url (see below).
+
+=back
+
+=head3 B<get>
+
+The get action provides a single article object, optionally including
+various optional metadata about the article.
+
+Options:
+
+=over
+
+=item B<as>
+
+This determines the primary name of the variable that the article will
+be stored in. Any legal perl variable name is allowed.
+
+=item B<artid>
+
+This determines the article ID of the article. It must either be a Lixuz
+article number (int) or the string "url" (without the quotes). If it is "url"
+then Lixuz will fetch the article from the URL (this is probably the most
+common use for this option in article templates).
+
+If you do not provide it then a 404 will be displayed instead, because Lixuz
+does not know which article to fetch.
+
+=item B<handleComments>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value and the article has live comments enabled, Lixuz will handle comment
+submissions for the article.
+
+=item B<includeComments>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero value
+and the article has live comments enabled, Lixuz will retrieve any comments
+the article has and stash it in a DBIx::Class::ResultSet with the name
+"comment_list" (without the quotes, and because the name is hardcoded, only
+one includeComments article can be on any single page). This contains a list of
+all comments the article has.
+
+=item B<includeRelations>
+
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value Lixuz will retrieve relationships the article has. These will be
+retrieved in three separate variables: {as}_prevArt {as}_relArt and
+{as}_nextArt.
+
+{as}_prevArt contains a DBIx::Class::ResultSet of articles that the
+author of the current article has marked as 'previous' related articles
+for this one.
+
+{as}_nextArt contains a DBIx::Class::ResultSet of articles that has
+marked this article as a 'previous' article.
+
+{as}_relArt contains a DBIx::Class::ResultSet of articles that the author
+of this article has marked as related (but not previous/next).
+
+=back
+
+=head2 Comments
+
+=head3 list
+
+The list action provides a list of comments (in a DBIx::Class::ResultSet).
+Currently it only returns the latest comments (how many is defined by limit).
+
+Options:
+
+=over
+
+=item B<as>
+
+This determines the primary name of the variable that the comment list will
+be stored in. Any legal perl variable name is allowed.
+
+=item B<limit>
+
+This is an integer and it sets how many comments are returned in the ResultSet.
+If it is not set then the number returned will be 10.
+
+=back
+
+=head2 RSSImport
+
+=head3 list
+
+The list action provides a list of the latest RSSImport entries (in a
+DBIx::Class::ResultSet), optionally paginated. RSSImport objects have
+an API very similar to that of an article.
+
+Options:
+
+=over
+
+=item B<as>
+
+This determines the primary name of the variable that the RSSImport list will
+be stored in. Any legal perl variable name is allowed.
+
+=item B<limit>
+
+This is an integer and it sets how many RSSImport entries are returned in the
+ResultSet. If it is not set then the number returned will be 10.
+
+=item B<allowPagination>
+
+This option works like the article "allowPaging" and "includePager" together.
+This is a numeric boolean (1=true, 0=false). If it is set to any nonzero
+value then it will look for the parameter "page" (without the quotes) in
+either GET or POST parameters, if found and it is an integer then that will
+be the page from the pager that gets returned in {as}. It will also
+return a {as}_pager variable containing the pager object.
+
+=back
+
+=head2 Search
+
+=head3 results
+
+The list action provides a paginated list of the articles (in a
+DBIx::Class::ResultSet), matching the search query submitted to the
+page as query=. It also honors the page= parameter as well as category=
+if there is any.
+
+Options:
+
+=over
+
+=item B<as>
+
+This determines the primary name of the variable that the search results will
+be stored in. Any legal perl variable name is allowed.
+
+=item B<extraLiveStatus>
+
+This is a list of extra status_id's that should count the same as the core
+live one. The IDs should be separated by +.
+
+Ie:
+ extraLiveStatus=5
+ extraLiveStatus=5+7
+
+This setting affects listing and fetching articles.
+
+=item B<overrideLiveStatus>
+
+This is similar to I<extraLiveStatus>, however instead of appending, this will
+replace the original live status.
+
+Ie.
+ overrideLiveStatus=5
+
+Will make Lixuz consider 5 to be the live status_id, rather than whatever the id
+of the core 'live' status is. This is useful if you need to fetch articles from
+other statuses and wish to filter out those that are already considered live.
+
+Unlike extraLiveStatus this does not take more than one status, though you can
+combine them for the same effect.
+
+=back
+
+=head2 Utils
+
+This pprovides various simple utility functions that does not fit into any of
+the other livehandlers.
+
+=head3 captcha
+
+This provides you with a captcha ID. This ID can be used to generate a
+captcha image. Example:
+
+ <img src="<% $c->uri_for('/files/captcha/'.$captcha_id) %>" align="middle" />
+ <br /><b>Enter the text from the image:</b> <input id="mycaptcha" name="captcha" type="text" size="10" />
+ <input type="hidden" name="captcha_id" value="<% $captcha_id %>" />
+
+=over
+
+=item B<as>
+
+This determines the name of the variable that the captcha id will be stored
+in. Any legal perl variable name is allowed.
+
+=back
+
+=head2 EXAMPLES
+
+This section contains several examples of NEEDSINFO values, along
+with explanations of what they would do.
+
+=over
+
+=item B<article_get_[artid=url,as=article,includeRelations=1,includeComments=1,handleComments=1]>
+
+This will fetch a single article object as the variable $article. It fetches
+the article ID from the URL. It will include relationships in
+$article_prevArt, $article_nextArt and $article_relArt. It will also include a
+comment list as $comment_list. If Lixuz recieves a submitted comment for the
+article, handleComments=1 tells it to handle it, saving it if needed.
+
+=item B<article_list_[root_catid=14,catid=url,limit=35,as=articles,includePager=1]>
+
+This will fetch a list of articles in a category in $articles. It will fetch
+articles from the category in the URL, or, if the URL is / then it will fetch
+articles from the category 14. It will return at most 35 articles and include
+a pager object (as $articles_pager).
+
+=item B<article_list_[catid=6,limit=1,as=hilighted]>
+
+This will fetch a list of a single article (that means it will be a
+DBIx::Class::ResultSet containing a single result) from the category 6 as
+$hilighted. This will be the latest published article in that category
+as the results are sorted by date.
+
+=item B<comment_list_[limit=5,as=lastComments]>
+
+This will fetch a list of the five most recently submitted comments
+as $lastComments. The resultSet contains I<LIXUZ::Schema::LzComment>s.
+
+=item B<RSSImport_list_[limit=10,as=imported]>
+
+This will fetch a list of the ten most recently imported RSS entries as
+$imported. The resultSet contains I<LIXUZ::Schema::LzRssArticle>s.
+
+=item B<RSSImport_list_[limit=31,as=articles,allowPagination=1]>
+
+Fetches 31 RSSImport entries as $articles. It will allow and honor
+pagination parameters (page= GET or POST parameter).
+
+=item B<search_results_[as=results]>
+
+Returns the results of a search query as $results. This automatically
+honors any pagination parameter (page=) as well as a category= parameter
+if there is any. The returned variable is a ResultSet of articles.
+
+=back
+
+=head1 FEATURE SUPPORT
+
+Lixuz contains builtin support for various features, such as video.
+This support requires external javascript files to be loaded and run
+on your pages. To take advantage of these features you will need to include
+the following in your <head>:
+
+ <& $ARGS{lixuzHeader} &>
+
+If it finds something to do (ie. a video) then it will pull in any
+extra javascript files automatically using DOM objects. The core Lixuz
+JS also contains some helper functions that you may use inside your templates.
+See the file I<root/js/live/core.js> within the Lixuz tree.
+
+Note that this includes jQuery (version will vary with each Lixuz release,
+as usually we track upstream), but not jQuery UI.
20 i18n/aliases.conf
@@ -0,0 +1,20 @@
+# File based upon aliases.conf from the Day Planner project.
+# Licensed under the GNU General Public License version 3
+#
+# This file contains a list of aliases for certain locales.
+#
+# The syntax is simply:
+# basename = aliases
+# where basename is the name of the locale used in the po-filename, and aliases is a space
+# seperated list of aliases
+nb = nb_NO nb_NO.UTF-8 nb_NO.ISO-8859-15 no_NO no_NO.ISO-8859-1 no_NO.ISO-8859-15 no_NO.UTF-8
+nn = nn nn_NO nn_NO.ISO-8859-15 nn_NO.UTF-8
+
+# We don't need these for LIXUZ /now/, but left in here commented out so they can
+# be used later.
+#cs = cs_CZ czech cs_CZ.ISO-8859-2
+#sk = sk_SK slovak sk_SK.UTF-8 sk_SK.ISO-8859-2
+#sv = sv_SE sv_SE.ISO-8859-1 sv_SE.ISO-8859-15 sv_SE.UTF-8 sv_FI sv_FI.ISO-8859-1 sv_FI.ISO-8859-15 sv_FI.UTF-8
+#it = it_IT it_IT.UTF-8 it_IT.ISO-8859-1
+#nl = nl
+#de = de_DE de_DE.UTF-8 de_DE.ISO-8859-15
1,342 i18n/lixuz-js.pot
@@ -0,0 +1,1342 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-06-06 08:40+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ./root/source-js/files/fileSelector.js:16 ./root/source-js/files/fileSelector.js:29
+msgid "File selector"
<