diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03b3201 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# ignore os/app generated files +Thumbs.db +.DS_Store +*.esproj +*.project +*.sublime-project +*.sublime-workspace + +# ignore user .htaccess +/.htaccess + +# ignore user sitemap +/sitemap.xml + +# ignore user defines +/monstra/boot/defines.php + +# ignore debug and custom themes +/public/themes/* +/admin/themes/* +!/public/themes/default +!/admin/themes/default + +# ignore user plugins +/plugins/* +!/plugins/box +!/plugins/captcha +!/plugins/markitup +!/plugins/sandbox + +# ignore user files and folders +/backups/* +/public/* +/storage/* +/tmp/* \ No newline at end of file diff --git a/README.md b/README.md index d8e8703..d9a1478 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,39 @@ -Monstra CMS -============= +# Monstra CMS -Monstra - Fast and small content management system written in PHP! +Fast and small content management system written in PHP! + + +## System Requirements +- UNIX/Linux host +- PHP 5.2.0 or higher +- SimpleXML Module +- Apache Mod Rewrite +- Multibyte String + + +## Steps to Install +1. [Download the latest version.](http://monstra.org/download) +2. Unzip the contents to a new folder on your local computer. +3. Upload that whole folder with an FTP client to your host. +4. You may also need to recursively CHMOD the folder /storage/, /tmp/, /backups/ and /public/ to 755(or 777) if your host doesn't set it implicitly. +5. Also you may also need to recursively CHMOD the /install.php, /.htaccess and /sitemap.xml to 755(or 777) if your host doesn't set it implicitly. +6. Type http://example.org/install.php in the browser. + + +## Contributing +1. Help on the [Forum.](http://forum.monstra.org) +2. Donate to keep Monstra free. We will add you to Monstra [Sponsors Page.](http://monstra.org/about/sponsors) +3. Develop a new plugin. +4. Create a new theme. +5. Find and [report issues.](https://github.com/Awilum/monstra-cms/issues) +6. Link back to [Monstra](http://monstra.org). + + +## Links +- [Site](http://monstra.org) +- [Forum](http://forum.monstra.org) +- [Documentation](http://monstra.org/documentation) +- [Github Repository](https://github.com/Awilum/monstra-cms) -Site: http://monstra.org -Forum: http://forum.monstra.org Copyright (C) 2012 Romanenko Sergey / Awilum [awilum@msn.com] \ No newline at end of file diff --git a/admin/index.php b/admin/index.php index d963fb2..70d6be6 100644 --- a/admin/index.php +++ b/admin/index.php @@ -35,9 +35,6 @@ // Admin login if (Request::post('login_submit')) { - // Sleep MONSTRA_LOGIN_SLEEP seconds for blocking Brute Force Attacks - sleep(MONSTRA_LOGIN_SLEEP); - $user = $users->select("[login='" . trim(Request::post('login')) . "']", null); if (count($user) !== 0) { if ($user['login'] == Request::post('login')) { diff --git a/admin/themes/default/css/default.css b/admin/themes/default/css/default.css index 1f27d41..1c62640 100644 --- a/admin/themes/default/css/default.css +++ b/admin/themes/default/css/default.css @@ -91,6 +91,18 @@ h6 { text-transform: uppercase; } +input[type=text]:focus, +input[type=email]:focus, +input[type=url]:focus, +input[type=phone]:focus, +input[type=password]:focus, +select:focus, +textarea:focus { + border-color: #999; + box-shadow: none; +} + + /************************************** 2. HEADER *************************************/ @@ -113,8 +125,8 @@ h6 { .monstra-header h3 a, .monstra-header .brand { float: left; display: block; - padding-top:6px; - padding-left:1px; + padding-top:15px; + padding-left:10px; margin-left: 0px; color: #fdfdfd; font-family: arial; @@ -240,21 +252,22 @@ h6 { /************************************* 5. AUTHORIZATION *************************************/ - -.authorization-block { - margin: 0 auto; - float: none!important; -} - -.authorization-block-footer { - margin: 0 auto; - float: none!important; - margin-top:10px; - margin-bottom:10px; -} - .login-body { - background:#F2F2F2; + background-color: #f5f5f5; +} + +.form-signin { + max-width: 290px; + padding: 19px 29px 29px; + margin: 0 auto 20px; + background-color: #fff; + border: 1px solid #e5e5e5; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + -webkit-box-shadow: 0 1px 5px rgba(0,0,0,.15); + -moz-box-shadow: 0 1px 5px rgba(0,0,0,.15); + box-shadow: 0 1px 5px rgba(0,0,0,.15); } /************************************* @@ -450,4 +463,16 @@ td, th { .error-none {display:none;} .error-field {border:1px solid red!important;} .container-fluid {padding-left:0px;} -img {max-width:none;} \ No newline at end of file +img {max-width:none;} + +a.btn-expand{ + color: #333; + text-decoration: none; + padding-left:4px; + padding-right:4px; +} + +footer a , footer{ + color:#333; + font-size:10px; +} \ No newline at end of file diff --git a/admin/themes/default/index.template.php b/admin/themes/default/index.template.php index 71ec085..2e80f5e 100644 --- a/admin/themes/default/index.template.php +++ b/admin/themes/default/index.template.php @@ -33,7 +33,7 @@
- +

@@ -95,7 +95,13 @@ diff --git a/admin/themes/default/login.template.php b/admin/themes/default/login.template.php index 93b0476..1e52d39 100644 --- a/admin/themes/default/login.template.php +++ b/admin/themes/default/login.template.php @@ -50,71 +50,66 @@ - -
-
-
-
-
-
-


-
- - + +
-
- -
-
-
-


- -
- - - - -
-
- +
+

- +


+
+ + + + + +
+
+ +
+
+
+ +
+
+
+


+ +
+ + + + +
+
+ +
+
-
- +
+ © 2012 Monstra
diff --git a/boot/defines.php b/boot/defines.php new file mode 100644 index 0000000..498a4ee --- /dev/null +++ b/boot/defines.php @@ -0,0 +1,117 @@ +
- en | - it | - lt | - de | - ru + + +
-
+

@@ -372,7 +369,7 @@
  • '.__('PHP 5.2 or greater is required', 'system').'
  • '; } else { echo '
  • '.__('PHP Version', 'system').' '.PHP_VERSION.'
  • '; @@ -409,9 +406,9 @@ } if (is_writable(__FILE__)){ - echo '
  • '.__('Install script writable', 'system').'
  • '; + echo '
  • '.__('Install script writable', 'system').'
  • '; } else { - echo '
  • '.__('Install script not writable', 'system').'
  • '; + echo '
  • '.__('Install script not writable', 'system').'
  • '; } if (is_writable('sitemap.xml')){ @@ -443,11 +440,11 @@
    - + \ No newline at end of file diff --git a/license.txt b/license.txt index 239ade4..5bcefda 100644 --- a/license.txt +++ b/license.txt @@ -28,30 +28,30 @@ The precise terms and conditions for copying, distribution and modification foll TERMS AND CONDITIONS 0. Definitions. -This License refers to version 3 of the GNU General Public License. +�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. +�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. +�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. +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. +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 �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. +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. +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. +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. +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 �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� 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. @@ -78,10 +78,10 @@ You may charge any price or no price for each copy that you convey, and you may 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. +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. +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: @@ -93,9 +93,9 @@ d) Convey the object code by offering access from a designated place (gratis or 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. +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. +�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). @@ -104,7 +104,7 @@ The requirement to provide Installation Information does not include a requireme 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. +�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. @@ -116,7 +116,7 @@ c) Prohibiting misrepresentation of the origin of that material, or requiring th 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. +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. @@ -137,24 +137,24 @@ You are not required to accept this License in order to receive or run a copy of 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. +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� 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. +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. +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 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. +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. @@ -167,14 +167,14 @@ Notwithstanding any other provision of this License, you have permission to link 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. +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. +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. @@ -187,7 +187,7 @@ 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. +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. Copyright (C) @@ -204,6 +204,7 @@ To do so, attach the following notices to the program. It is safest to attach th You should have received a copy of the GNU General Public License along with this program. If not, see . + 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: @@ -213,8 +214,8 @@ If the program does terminal interaction, make it output a short notice like thi 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. +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 . +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 . 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 . \ No newline at end of file diff --git a/monstra/boot/hooks.php b/monstra/boot/actions.php similarity index 75% rename from monstra/boot/hooks.php rename to monstra/boot/actions.php index c7fc9e4..7001d8b 100644 --- a/monstra/boot/hooks.php +++ b/monstra/boot/actions.php @@ -4,4 +4,4 @@ * Set meta generator */ Action::add('theme_header', 'setMetaGenerator'); - function setMetaGenerator() { echo ''; } \ No newline at end of file + function setMetaGenerator() { echo ''; } \ No newline at end of file diff --git a/monstra/boot/defines.php b/monstra/boot/defines.php index 89dcb23..498a4ee 100644 --- a/monstra/boot/defines.php +++ b/monstra/boot/defines.php @@ -5,32 +5,6 @@ * Monstra CMS Defines */ - - /** - * Set gzip output - */ - define('MONSTRA_GZIP', false); - - /** - * Set gzip styles - */ - define('MONSTRA_GZIP_STYLES', false); - - /** - * Set Monstra version - */ - define('MONSTRA_VERSION', '2.0.1'); - - /** - * Set Monstra version id - */ - define('MONSTRA_VERSION_ID', 20001); - - /** - * Set Monstra site url - */ - define('MONSTRA_SITEURL', 'http://monstra.org'); - /** * The filesystem path to the 'monstra' folder */ @@ -109,11 +83,6 @@ * The filesystem path to the 'uploads' folder */ define('UPLOADS', ROOT . DS . 'public' . DS . 'uploads'); - - /** - * Set login sleep value - */ - define('MONSTRA_LOGIN_SLEEP', 1); /** * Set password salt @@ -136,13 +105,13 @@ define('CHECK_MONSTRA_VERSION', true); /** - * Monstra CMS mobile detection + * Set gzip output */ - define('MONSTRA_MOBILE', true); + define('MONSTRA_GZIP', false); /** * Monstra database settings */ - define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306'); - define('MONSTRA_DB_USER', 'root'); - define('MONSTRA_DB_PASSWORD', 'password'); \ No newline at end of file + //define('MONSTRA_DB_DSN', 'mysql:dbname=monstra;host=localhost;port=3306'); + //define('MONSTRA_DB_USER', 'root'); + //define('MONSTRA_DB_PASSWORD', 'password'); \ No newline at end of file diff --git a/monstra/boot/shortcodes.php b/monstra/boot/shortcodes.php new file mode 100644 index 0000000..c812995 --- /dev/null +++ b/monstra/boot/shortcodes.php @@ -0,0 +1,8 @@ + 'production', + 2 => 'staging', + 3 => 'testing', + 4 => 'development'); + + $root_defines = ROOT . DS . 'boot' . DS . 'defines.php'; + $environment_defines = ROOT . DS . 'boot' . DS . $environments[Core::$environment] . DS . 'defines.php'; + $monstra_defines = ROOT . DS . 'monstra' . DS . 'boot' . DS . 'defines.php'; + + + if (file_exists($root_defines)) { + include $root_defines; + } elseif(file_exists($environment_defines)) { + include $environment_defines; + } elseif(file_exists($monstra_defines)) { + include $monstra_defines; + } else { + throw new RuntimeException("The defines file does not exist."); + } + } + + + /** + * Load Pluggable + */ + protected static function loadPluggable() { + + $environments = array(1 => 'production', + 2 => 'staging', + 3 => 'testing', + 4 => 'development'); + + $root_pluggable = ROOT . DS . 'boot'; + $environment_pluggable = ROOT . DS . 'boot' . DS . $environments[Core::$environment]; + $monstra_pluggable = ROOT . DS . 'monstra' . DS . 'boot'; + + + if (file_exists($root_pluggable . DS . 'filters.php')) { + include $root_pluggable . DS . 'filters.php'; + } elseif(file_exists($environment_pluggable . DS . 'filters.php')) { + include $environment_pluggable . DS . 'filters.php'; + } elseif(file_exists($monstra_pluggable . DS . 'filters.php')) { + include $monstra_pluggable . DS . 'filters.php'; + } else { + throw new RuntimeException("The pluggable file does not exist."); + } + + if (file_exists($root_pluggable . DS . 'actions.php')) { + include $root_pluggable . DS . 'actions.php'; + } elseif(file_exists($environment_pluggable . DS . 'actions.php')) { + include $environment_pluggable . DS . 'actions.php'; + } elseif(file_exists($monstra_pluggable . DS . 'actions.php')) { + include $monstra_pluggable . DS . 'actions.php'; + } else { + throw new RuntimeException("The pluggable file does not exist."); + } + + if (file_exists($root_pluggable . DS . 'shortcodes.php')) { + include $root_pluggable . DS . 'shortcodes.php'; + } elseif(file_exists($environment_pluggable . DS . 'shortcodes.php')) { + include $environment_pluggable . DS . 'shortcodes.php'; + } elseif(file_exists($monstra_pluggable . DS . 'shortcodes.php')) { + include $monstra_pluggable . DS . 'shortcodes.php'; + } else { + throw new RuntimeException("The pluggable file does not exist."); + } + + } + + /** * Exception Handler * @@ -359,6 +471,7 @@ highlight_string('deleteWhere('[name="'.$option.'"]'); } + + /** + * Check if option exist + * + * + * if (Option::exists('pages_limit')) { + * // do something... + * } + * + * + * @param string $option Name of option to check. + * @return boolean + */ + public static function exists($option) { + + // Redefine vars + $option = (string) $option; + + // Check if option exists + return (count(Option::$options->select('[name="'.$option.'"]', null)) > 0) ? true : false; + } + } \ No newline at end of file diff --git a/monstra/engine/plugins.php b/monstra/engine/plugins.php index 1747027..c97ead2 100644 --- a/monstra/engine/plugins.php +++ b/monstra/engine/plugins.php @@ -951,50 +951,56 @@ // Sort stylesheets by priority $stylesheets = Arr::subvalSort(Stylesheet::$stylesheets, 'priority'); - // Build backend site stylesheets - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) { - if ( ! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) { - $backend_regenerate = true; - break; - } - } - } + if (BACKEND) { - // Regenerate site stylesheet - if ($backend_regenerate) { - foreach ($stylesheets as $stylesheet) { + // Build backend site stylesheets + foreach ($stylesheets as $stylesheet) { if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) { - $backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); - } + if ( ! file_exists($backend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($backend_site_css_path)) { + $backend_regenerate = true; + break; + } + } } - $backend_buffer = Stylesheet::parseVariables($backend_buffer); - file_put_contents($backend_site_css_path, Minify::css($backend_buffer)); - $backend_regenerate = false; - } - - // Build frontend site stylesheets - foreach ($stylesheets as $stylesheet) { - if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) { - if ( ! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) { - $frontend_regenerate = true; - break; + // Regenerate site stylesheet + if ($backend_regenerate) { + foreach ($stylesheets as $stylesheet) { + if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'backend') or ($stylesheet['load'] == 'both')) ) { + $backend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); + } } - } - } + $backend_buffer = Stylesheet::parseVariables($backend_buffer); + file_put_contents($backend_site_css_path, Minify::css($backend_buffer)); + $backend_regenerate = false; + } - // Regenerate site stylesheet - if ($frontend_regenerate) { - foreach ($stylesheets as $stylesheet) { + + } else { + + // Build frontend site stylesheets + foreach ($stylesheets as $stylesheet) { if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) { - $frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); - } + if ( ! file_exists($frontend_site_css_path) or filemtime(ROOT . DS . $stylesheet['file']) > filemtime($frontend_site_css_path)) { + $frontend_regenerate = true; + break; + } + } } - $frontend_buffer = Stylesheet::parseVariables($frontend_buffer); - file_put_contents($frontend_site_css_path, Minify::css($frontend_buffer)); - $frontend_regenerate = false; - } + + // Regenerate site stylesheet + if ($frontend_regenerate) { + foreach ($stylesheets as $stylesheet) { + if ((file_exists(ROOT . DS . $stylesheet['file'])) and (($stylesheet['load'] == 'frontend') or ($stylesheet['load'] == 'both')) ) { + $frontend_buffer .= file_get_contents(ROOT . DS . $stylesheet['file']); + } + } + $frontend_buffer = Stylesheet::parseVariables($frontend_buffer); + file_put_contents($frontend_site_css_path, Minify::css($frontend_buffer)); + $frontend_regenerate = false; + } + + } // Render if (BACKEND) { @@ -1089,47 +1095,53 @@ // Sort javascripts by priority $javascripts = Arr::subvalSort(Javascript::$javascripts, 'priority'); - // Build backend site javascript - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) { - if ( ! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) { - $backend_regenerate = true; - break; - } - } - } - // Regenerate site javascript - if ($backend_regenerate) { - foreach ($javascripts as $javascript) { + if (BACKEND) { + + // Build backend site javascript + foreach ($javascripts as $javascript) { if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) { - $backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']); - } + if ( ! file_exists($backend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($backend_site_js_path)) { + $backend_regenerate = true; + break; + } + } } - file_put_contents($backend_site_js_path, $backend_buffer); - $backend_regenerate = false; - } - - // Build frontend site javascript - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) { - if ( ! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) { - $frontend_regenerate = true; - break; - } - } - } - - // Regenerate site javascript - if ($frontend_regenerate) { - foreach ($javascripts as $javascript) { - if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) { - $frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']); + // Regenerate site javascript + if ($backend_regenerate) { + foreach ($javascripts as $javascript) { + if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'backend') or ($javascript['load'] == 'both')) ) { + $backend_buffer .= file_get_contents(ROOT . DS . $javascript['file']); + } } + file_put_contents($backend_site_js_path, $backend_buffer); + $backend_regenerate = false; } - file_put_contents($frontend_site_js_path, $frontend_buffer); - $frontend_regenerate = false; + + } else { + + // Build frontend site javascript + foreach ($javascripts as $javascript) { + if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) { + if ( ! file_exists($frontend_site_js_path) or filemtime(ROOT . DS . $javascript['file']) > filemtime($frontend_site_js_path)) { + $frontend_regenerate = true; + break; + } + } + } + + // Regenerate site javascript + if ($frontend_regenerate) { + foreach ($javascripts as $javascript) { + if ((file_exists(ROOT . DS . $javascript['file'])) and (($javascript['load'] == 'frontend') or ($javascript['load'] == 'both')) ) { + $frontend_buffer .= file_get_contents(ROOT . DS . $javascript['file']); + } + } + file_put_contents($frontend_site_js_path, $frontend_buffer); + $frontend_regenerate = false; + } + } // Render diff --git a/monstra/engine/shortcodes.php b/monstra/engine/shortcodes.php index 9222f28..74ab6d0 100644 --- a/monstra/engine/shortcodes.php +++ b/monstra/engine/shortcodes.php @@ -56,7 +56,7 @@ /** - * Add shortcode + * Add new shortcode * * * function returnSiteUrl() { @@ -79,6 +79,59 @@ if (is_callable($callback_function)) Shortcode::$shortcode_tags[$shortcode] = $callback_function; } + + /** + * Remove a specific registered shortcode. + * + * + * Shortcode::delete('shortcode_name'); + * + * + * @param string $shortcode Shortcode tag. + */ + public static function delete($shortcode) { + + // Redefine vars + $shortcode = (string) $shortcode; + + // Delete shortcode + if (Shortcode::exists($shortcode)) unset(Shortcode::$shortcode_tags[$shortcode]); + } + + + /** + * Remove all registered shortcodes. + * + * + * Shortcode::clear(); + * + * + */ + public static function clear() { + Shortcode::$shortcode_tags = array(); + } + + + /** + * Check if a shortcode has been registered. + * + * + * if (Shortcode::exists('shortcode_name')) { + * // do something... + * } + * + * + * @param string $shortcode Shortcode tag. + */ + public static function exists($shortcode) { + + // Redefine vars + $shortcode = (string) $shortcode; + + // Check shortcode + return array_key_exists($shortcode, Shortcode::$shortcode_tags); + } + /** * Parse a string, and replace any registered shortcodes within it with the result of the mapped callback. @@ -95,8 +148,8 @@ if ( ! Shortcode::$shortcode_tags) return $content; $shortcodes = implode('|', array_map('preg_quote', array_keys(Shortcode::$shortcode_tags))); - $pattern = "/(.?)\{($shortcodes)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s"; - + $pattern = "/(.?)\{([$shortcodes]+)(.*?)(\/)?\}(?(4)|(?:(.+?)\{\/\s*\\2\s*\}))?(.?)/s"; + return preg_replace_callback($pattern, 'Shortcode::_handle', $content); } @@ -127,7 +180,8 @@ } } - return $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix; + // Check if this shortcode realy exists then call user function else return empty string + return (isset(Shortcode::$shortcode_tags[$shortcode])) ? $prefix . call_user_func(Shortcode::$shortcode_tags[$shortcode], $attributes, $matches[5], $shortcode) . $suffix : ''; } } \ No newline at end of file diff --git a/monstra/engine/site.php b/monstra/engine/site.php index f46d901..9cdb7b8 100644 --- a/monstra/engine/site.php +++ b/monstra/engine/site.php @@ -96,12 +96,8 @@ * * @return string */ - public static function title() { - - // Get title - $title = call_user_func(ucfirst(Uri::command()).'::title'); - - return $title; + public static function title() { + return call_user_func(ucfirst(Uri::command()).'::title'); } @@ -114,16 +110,8 @@ * * @return string */ - public static function description() { - - // Get description - $description = call_user_func(ucfirst(Uri::command()).'::description'); - - if (trim($description) !== '') { - return Html::toText($description); - } else { - return Html::toText(Option::get('description')); - } + public static function description() { + return (trim(call_user_func(ucfirst(Uri::command()).'::description')) == '') ? Html::toText(Option::get('description')) : Html::toText($description); } @@ -137,16 +125,7 @@ * @return string */ public static function keywords() { - - // Get keywords - $keywords = call_user_func(ucfirst(Uri::command()).'::keywords'); - - if (trim($keywords) !== '') { - return Html::toText($keywords); - } else { - return Html::toText(Option::get('keywords')); - } - + return (trim(call_user_func(ucfirst(Uri::command()).'::keywords')) == '') ? Html::toText(Option::get('keywords')) : Html::toText($description); } @@ -173,12 +152,8 @@ * * @return string */ - public static function content() { - - // Get content - $content = call_user_func(ucfirst(Uri::command()).'::content'); - - return Filter::apply('content', $content); + public static function content() { + return Filter::apply('content', call_user_func(ucfirst(Uri::command()).'::content')); } @@ -189,12 +164,13 @@ * echo Site::template(); * * + * @param string $theme Theme name * @return mixed */ - public static function template() { + public static function template($theme = null) { - // Get current theme - $current_theme = Option::get('theme_site_name'); + // Get specific theme or current theme + $current_theme = ($theme == null) ? Option::get('theme_site_name') : $theme ; // Get template $template = call_user_func(ucfirst(Uri::command()).'::template'); @@ -246,12 +222,7 @@ * @return string */ public static function powered() { - return __('Powered by', 'system').' Monstra ' . MONSTRA_VERSION; + return __('Powered by', 'system').' Monstra ' . Core::VERSION; } - } - - - // Add new shortcode {siteurl} - Shortcode::add('siteurl', 'returnSiteUrl'); - function returnSiteUrl() { return Option::get('siteurl'); } \ No newline at end of file + } \ No newline at end of file diff --git a/monstra/engine/xmldb.php b/monstra/engine/xmldb.php index 48c877a..0d8f883 100644 --- a/monstra/engine/xmldb.php +++ b/monstra/engine/xmldb.php @@ -493,6 +493,34 @@ } + /** + * Check if field exist + * + * + * if ($users->existsField('field_name')) { + * // do something... + * } + * + * + * @param string $name Name of field to check. + * @return boolean + */ + public function existsField($name) { + + // Redefine vars + $name = (string) $name; + + // Get table + $table = $this->table; + + // Select field + $field = Table::_selectOne($this->table, "fields/{$name}"); + + // Return true or false + return ($field == null) ? false : true; + } + + /** * Add new record * @@ -626,31 +654,11 @@ // $users->select('[status="active"]', 'all'); // or // $users->select('[status="active"]'); - if ($row_count == 'all') { - - foreach ($tmp as $record) { - $data[] = $record; - } + foreach ($tmp as $record) { + $data[] = $record; + } - $_records = $data; - - } else { - - // Else select records like - // eg: $users->select(null, 2, 1); - - foreach($tmp as $record) { - $data[] = $record; - } - - // If offset is null slice array from end else from begin - if ($offset === null) { - $_records = array_slice($data, -$row_count, $row_count); - } else { - $_records = array_slice($data, $offset, $row_count); - } - - } + $_records = $data; } // If array of fields is exits then get records with this fields only @@ -665,7 +673,6 @@ $record_array[$count][$field] = (string)$record->$field; } - //$record_array[$count]['id'] = (int)$record['id']; $record_array[$count]['id'] = (int)$record->id; if ($order_by == 'id') { @@ -677,7 +684,17 @@ $count++; } - $records = Table::subvalSort($record_array, 'sort', $order); + + // Sort records + $records = Table::subvalSort($record_array, 'sort', $order); + + // Slice records array + if ($offset === null && is_int($row_count)) { + $records = array_slice($records, -$row_count, $row_count); + } elseif($offset !== null && is_int($row_count)) { + $records = array_slice($records, $offset, $row_count); + } + } } else { @@ -687,19 +704,41 @@ if ( ! $one_record) { $count = 0; foreach ($_records as $xml_objects) { + $vars = get_object_vars($xml_objects); + foreach ($vars as $key => $value) { - $records[$count][$key] = (string)$value; + $records[$count][$key] = (string)$value; + + if ($order_by == 'id') { + $records[$count]['sort'] = (int)$vars['id']; + } else { + $records[$count]['sort'] = (string)$value; + } } + + $count++; } + + // Sort records + $records = Table::subvalSort($records, 'sort', $order); + + // Slice records array + if ($offset === null && is_int($row_count)) { + $records = array_slice($records, -$row_count, $row_count); + } elseif($offset !== null && is_int($row_count)) { + $records = array_slice($records, $offset, $row_count); + } + } else { + + // Single record $vars = get_object_vars($_records[0]); foreach ($vars as $key => $value) { $records[$key] = (string)$value; } - } - + } } // Return records diff --git a/monstra/helpers/text.php b/monstra/helpers/text.php index 67cfdb4..4fad4b8 100644 --- a/monstra/helpers/text.php +++ b/monstra/helpers/text.php @@ -97,22 +97,20 @@ * echo Text::strpSlashes('some \ text \ here'); * * - * @param string $str String with slashes - * @return string + * @param mixed $str String or array of strings with slashes + * @return mixed */ public static function strpSlashes($str) { - // Redefine vars - $str = (string) $str; - if (is_array($str)) { foreach ($str as $key => $val) { - $str[$key] = stripslashes($val); + $result[$key] = stripslashes($val); } } else { - $str = stripslashes($str); + $result = stripslashes($str); } - return $str; + + return $result; } @@ -227,6 +225,26 @@ break; } } + + + /** + * Add's _1 to a string or increment the ending number to allow _2, _3, etc + * + * + * $str = Text::increment($str); + * + * + * @param string $str String to increment + * @param integer $first Start with + * @param string $separator Separator + * @return string + */ + public static function increment($str, $first = 1, $separator = '_') { + + preg_match('/(.+)'.$separator.'([0-9]+)$/', $str, $match); + + return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first; + } /** diff --git a/monstra/helpers/url.php b/monstra/helpers/url.php index 66a3d71..8e3581b 100644 --- a/monstra/helpers/url.php +++ b/monstra/helpers/url.php @@ -93,7 +93,8 @@ * @return string */ public static function find($url) { - $pos = strpos($url, 'http://'); + $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://'; + $pos = strpos($url, $https); if ($pos === false) { $url_output = Option::get('siteurl') . $url; } else { $url_output = $url; } return $url_output; } @@ -109,7 +110,7 @@ * @return string */ public static function base() { - return 'http://' . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/'); + $https = (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') ? 'https://' : 'http://'; + return $https . rtrim(rtrim($_SERVER['HTTP_HOST'], '\\/') . dirname($_SERVER['PHP_SELF']), '\\/'); } - } \ No newline at end of file diff --git a/plugins/box/backup/languages/lt.lang.php b/plugins/box/backup/languages/lt.lang.php index cd7657c..8221c34 100644 --- a/plugins/box/backup/languages/lt.lang.php +++ b/plugins/box/backup/languages/lt.lang.php @@ -2,10 +2,10 @@ return array( 'backup' => array( - 'Backups' => 'Atsarginės kopijos', + 'Backups' => 'Atsarginės kopijos', 'Backup date' => 'Atsarginės kopijos data', - 'Create backup' => 'Sukurti atsarginę kopiją', - 'Delete' => 'Ištrinti', + 'Create backup' => 'Sukurti atsarginę kopiją', + 'Delete' => 'Ištrinti', 'storage' => 'storage', 'public' => 'public', 'plugins' => 'plugins', @@ -14,4 +14,4 @@ 'Delete backup: :backup' => 'Ištrinti: :backup', 'Creating...' => 'Kuriama...', ) - ); \ No newline at end of file + ); \ No newline at end of file diff --git a/plugins/box/backup/languages/pt-br.lang.php b/plugins/box/backup/languages/pt-br.lang.php new file mode 100644 index 0000000..cd371e9 --- /dev/null +++ b/plugins/box/backup/languages/pt-br.lang.php @@ -0,0 +1,17 @@ + array( + 'Backups' => 'Backups', + 'Backup date' => 'Data do backup', + 'Create backup' => 'Criar', + 'Delete' => 'Deletar', + 'storage' => 'storage', + 'public' => 'public', + 'plugins' => 'plugins', + 'Size' => 'Tamanho', + 'Actions' => 'Ações', + 'Delete backup: :backup' => 'Deletar o backup: :backup', + 'Creating...' => 'Criando backup...', + ) + ); \ No newline at end of file diff --git a/plugins/box/backup/languages/uk.lang.php b/plugins/box/backup/languages/uk.lang.php new file mode 100644 index 0000000..8b0ddc0 --- /dev/null +++ b/plugins/box/backup/languages/uk.lang.php @@ -0,0 +1,17 @@ + array( + 'Backups' => 'Бекапи', + 'Backup date' => 'Бекап', + 'Create backup' => 'Зробити бекап', + 'Delete' => 'Видалити', + 'storage' => 'дані', + 'public' => 'публічна', + 'plugins' => 'плагіни', + 'Size' => 'Розмір', + 'Actions' => 'Дії', + 'Delete backup: :backup' => 'Видалити бекап: :backup', + 'Creating...' => 'Створення...', + ) + ); \ No newline at end of file diff --git a/plugins/box/blocks/blocks.admin.php b/plugins/box/blocks/blocks.admin.php index 683c6f1..27983fc 100755 --- a/plugins/box/blocks/blocks.admin.php +++ b/plugins/box/blocks/blocks.admin.php @@ -1,10 +1,14 @@ :name deleted' => 'Block :name gelöscht', 'Your changes to the block :name have been saved.' => 'Deine Änderungen für den Block :name wurden übernommen.', 'Delete block: :block' => 'Lösche Block: :block', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/en.lang.php b/plugins/box/blocks/languages/en.lang.php index ee38c64..aab5381 100644 --- a/plugins/box/blocks/languages/en.lang.php +++ b/plugins/box/blocks/languages/en.lang.php @@ -21,5 +21,9 @@ 'Block :name deleted' => 'Block :name deleted', 'Your changes to the block :name have been saved.' => 'Your changes to the block :name have been saved.', 'Delete block: :block' => 'Delete block: :block', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/it.lang.php b/plugins/box/blocks/languages/it.lang.php index 288f964..4acb2de 100644 --- a/plugins/box/blocks/languages/it.lang.php +++ b/plugins/box/blocks/languages/it.lang.php @@ -21,5 +21,9 @@ 'Block :name deleted' => 'Snippet :name è stato eliminato', 'Your changes to the block :name have been saved.' => 'Le modifiche al blocco: nome sono state salvate.', 'Delete block: :block' => 'Elimina blocco: :block', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/lt.lang.php b/plugins/box/blocks/languages/lt.lang.php index ce5b054..ec1bf94 100644 --- a/plugins/box/blocks/languages/lt.lang.php +++ b/plugins/box/blocks/languages/lt.lang.php @@ -20,5 +20,10 @@ 'Block content' => 'Bloko turinys', 'Block :name deleted' => 'Blokas :name ištrintas', 'Your changes to the block :name have been saved.' => 'Bloko :name pakeitimai išsaugoti.', + 'Delete block: :block' => 'Delete block: :block', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/pt-br.lang.php b/plugins/box/blocks/languages/pt-br.lang.php new file mode 100644 index 0000000..b02de89 --- /dev/null +++ b/plugins/box/blocks/languages/pt-br.lang.php @@ -0,0 +1,29 @@ + array( + 'Blocks' => 'Blocos', + 'Blocks manager' => 'Gerenciador de blocos', + 'Delete' => 'Deletar', + 'Edit' => 'Editar', + 'Name' => 'Nome', + 'Create new block' => 'Criar novo bloco', + 'New block' => 'Novo bloco', + 'Edit block' => 'Editar bloco', + 'Save' => 'Salvar', + 'Save and exit' => 'Salvar e sair', + 'Actions' => 'Ações', + 'Required field' => 'Campo requerido', + 'This block already exists' => 'Este bloco já existe', + 'This block does not exist' => 'Este bloco não existe', + 'Delete block: :block' => 'Deletar o bloco: :block', + 'Block content' => 'Conteúdo do bloco', + 'Block :name deleted' => 'Bloco :name deletado', + 'Your changes to the block :name have been saved.' => 'Suas mudanças no bloco :name foram salvas', + 'Delete block: :block' => 'Delete block: :block', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', + ) + ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/ru.lang.php b/plugins/box/blocks/languages/ru.lang.php index aaaa62d..ebc4bcf 100644 --- a/plugins/box/blocks/languages/ru.lang.php +++ b/plugins/box/blocks/languages/ru.lang.php @@ -21,5 +21,9 @@ 'Block :name deleted' => 'Сниппет :name удален', 'Your changes to the block :name have been saved.' => 'Ваши изменения к блоку :name были сохранены.', 'Delete block: :block' => 'Удалить блок: :block', + 'View Embed Code' => 'Код для вставки', + 'Embed Code' => 'Код для вставки', + 'Shortcode' => 'Шорткод', + 'PHP Code' => 'PHP код', ) ); \ No newline at end of file diff --git a/plugins/box/blocks/languages/uk.lang.php b/plugins/box/blocks/languages/uk.lang.php new file mode 100644 index 0000000..434e5e0 --- /dev/null +++ b/plugins/box/blocks/languages/uk.lang.php @@ -0,0 +1,29 @@ + array( + 'Blocks' => 'Блоки', + 'Blocks manager' => 'Менеджер блоків', + 'Delete' => 'Видалити', + 'Edit' => 'Редагувати', + 'New block' => 'Новий блок', + 'Create new block' => 'Створити новий блок', + 'Name' => 'Назва', + 'Edit block' => 'Редагування блоку', + 'Save' => 'Зберегти', + 'Actions' => 'Дії', + 'Save and exit' => 'Зберегти та вийти', + 'Required field' => 'Обов′язкове поле', + 'This block already exists' => 'Такий блок вже існує', + 'This block does not exist' => 'Такого блоку не існує', + 'Delete block: :block' => 'Видалити блок: :block', + 'Block content' => 'Вміст блоку', + 'Block :name deleted' => 'Сніппет :name вилучен', + 'Your changes to the block :name have been saved.' => 'Ваші зміни до блоку :name були збережені.', + 'Delete block: :block' => 'Видалити блок: :block', + 'View Embed Code' => 'Код для вставки', + 'Embed Code' => 'Код для вставки', + 'Shortcode' => 'Шорткод', + 'PHP Code' => 'PHP код', + ) + ); \ No newline at end of file diff --git a/plugins/box/blocks/views/backend/index.view.php b/plugins/box/blocks/views/backend/index.view.php index 3e7895b..d01c5af 100755 --- a/plugins/box/blocks/views/backend/index.view.php +++ b/plugins/box/blocks/views/backend/index.view.php @@ -14,21 +14,48 @@ - + + + + - - +
    - 'btn btn-actions')); ?> - 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')")); - ?> + +
    +
    + 'btn btn-actions')); ?> + + + 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete block: :block', 'blocks', array(':block' => basename($block, '.block.html')))."')")); + ?> +
    +
    - \ No newline at end of file + + + \ No newline at end of file diff --git a/plugins/box/editor/languages/pt-br.lang.php b/plugins/box/editor/languages/pt-br.lang.php new file mode 100644 index 0000000..961fba6 --- /dev/null +++ b/plugins/box/editor/languages/pt-br.lang.php @@ -0,0 +1,8 @@ + array( + 'Editor' => 'Editor', + 'Editor plugin' => 'Plugin do editor', + ) + ); \ No newline at end of file diff --git a/plugins/box/editor/languages/uk.lang.php b/plugins/box/editor/languages/uk.lang.php new file mode 100644 index 0000000..81e043f --- /dev/null +++ b/plugins/box/editor/languages/uk.lang.php @@ -0,0 +1,8 @@ + array( + 'Editor' => 'Редактор', + 'Editor plugin' => 'Редактор плагіну', + ) + ); \ No newline at end of file diff --git a/plugins/box/filesmanager/filesmanager.admin.php b/plugins/box/filesmanager/filesmanager.admin.php index 16c408e..817b24c 100755 --- a/plugins/box/filesmanager/filesmanager.admin.php +++ b/plugins/box/filesmanager/filesmanager.admin.php @@ -1,7 +1,7 @@ array( + 'Files' => 'Arquivos', + 'Files manager' => 'Gerenciador de arquivos', + 'Name' => 'Nome', + 'Actions' => 'Ações', + 'Delete' => 'Deletar', + 'Upload' => 'Upload', + 'directory' => 'directory', + 'Delete directory: :dir' => 'Deletar o diretório: :dir', + 'Delete file: :file' => 'Deletar o arquivo :file', + 'Extension' => 'Extensão', + 'Size' => 'Tamanho', + ) + ); \ No newline at end of file diff --git a/plugins/box/filesmanager/languages/uk.lang.php b/plugins/box/filesmanager/languages/uk.lang.php new file mode 100644 index 0000000..00eb895 --- /dev/null +++ b/plugins/box/filesmanager/languages/uk.lang.php @@ -0,0 +1,17 @@ + array( + 'Files' => 'Файли', + 'Files manager' => 'Менеджер файлів', + 'Name' => 'Назва', + 'Actions' => 'Дії', + 'Delete' => 'Видалити', + 'Upload' => 'Загрузити', + 'directory' => 'директорія', + 'Delete directory: :dir' => 'Видалити директорію: :dir', + 'Delete file: :file' => 'Видалити файл: :file', + 'Extension' => 'Розширення', + 'Size' => 'Розмір', + ) + ); \ No newline at end of file diff --git a/plugins/box/information/languages/de.lang.php b/plugins/box/information/languages/de.lang.php index 7ba7052..63f5152 100644 --- a/plugins/box/information/languages/de.lang.php +++ b/plugins/box/information/languages/de.lang.php @@ -16,8 +16,6 @@ 'DOM module' => 'DOM Modul', 'Installed' => 'Installiert', 'Not Installed' => 'Nicht Installiert', - 'System version' => 'System Version', - 'System version ID' => 'System Versions ID', 'Security check results' => 'Sicherheits-Check Ergebnisse', 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Die Konfigurationsdatei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte für defines.php auf Produktionssystemen zu entfernen.', @@ -29,5 +27,14 @@ 'Die Monstra index.php Datei wurde als beschreibbar entdeckt. Wir empfehlen alle Schreibrechte zu entfernen.
    Du kannst dies auf Unix-Systemen ganz einfach mit: chmod a-w :path erledigen.', 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Aufgrund der Art und Menge der Informationen kann ein Fehler Eindringlinge ergeben wenn Core::$environment = Core::DEVELOPMENT, wir raten dringend dazu folgendermaßen Core::PRODUCTION in Produktionssystemen einzustellen.', + 'Monstra version' => 'Monstra version', + 'Directory Permissions' => 'Directory Berechtigungen', + 'Directory' => 'Verzeichnis', + 'Writable' => 'Writable', + 'Unwritable' => 'Nicht beschreibbar', + 'Status' => 'Status', + 'PHP Built On' => 'PHP Built On', + 'Web Server' => 'Web Server', + 'WebServer to PHP Interface' => 'WebServer to PHP Interface', ) ); \ No newline at end of file diff --git a/plugins/box/information/languages/en.lang.php b/plugins/box/information/languages/en.lang.php index f264578..408d35f 100644 --- a/plugins/box/information/languages/en.lang.php +++ b/plugins/box/information/languages/en.lang.php @@ -16,8 +16,6 @@ 'DOM module' => 'DOM module', 'Installed' => 'Installed', 'Not Installed' => 'Not Installed', - 'System version' => 'System version', - 'System version ID' => 'System version ID', 'Security check results' => 'Security check results', 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.', @@ -29,5 +27,14 @@ 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path', 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.', + 'Monstra version' => 'Monstra version', + 'Directory Permissions' => 'Directory Permissions', + 'Directory' => 'Directory', + 'Writable' => 'Writable', + 'Unwritable' => 'Unwritable', + 'Status' => 'Status', + 'PHP Built On' => 'PHP Built On', + 'Web Server' => 'Web Server', + 'WebServer to PHP Interface' => 'WebServer to PHP Interface', ) ); \ No newline at end of file diff --git a/plugins/box/information/languages/it.lang.php b/plugins/box/information/languages/it.lang.php index 88671f1..689db73 100644 --- a/plugins/box/information/languages/it.lang.php +++ b/plugins/box/information/languages/it.lang.php @@ -16,8 +16,6 @@ 'DOM module' => 'Modulo DOM', 'Installed' => 'Installato', 'Not Installed' => 'Non installato', - 'System version' => 'Versione del sistema', - 'System version ID' => 'Versione del sistema ID', 'Security check results' => 'Risultato del controllo di sicurezza', 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Il file di configurazione è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per defines.php file sul sito funzionante.', @@ -29,5 +27,14 @@ 'Principale file index.php è scrivibile. Si consiglia di rimuovere le autorizzazioni di scrittura per il file principale index.php.
    È possibile eseguire questa operazione su sistemi UNIX così: chmod -R a-w :path', 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Il sistema opera con lo stato Core::DEVELOPMENT Si consiglia di impostare lo stato Core::PRODUCTION sul sito funzionante.', + 'Monstra version' => 'Monstra versione', + 'Directory Permissions' => 'Directory Autorizzazioni', + 'Directory' => 'Directory', + 'Writable' => 'Scrivibile', + 'Unwritable' => 'Non scrivibile', + 'Status' => 'Stato', + 'PHP Built On' => 'PHP Built On', + 'Web Server' => 'Web Server', + 'WebServer to PHP Interface' => 'WebServer to PHP Interface', ) ); \ No newline at end of file diff --git a/plugins/box/information/languages/lt.lang.php b/plugins/box/information/languages/lt.lang.php index b96fdcd..8d906f5 100644 --- a/plugins/box/information/languages/lt.lang.php +++ b/plugins/box/information/languages/lt.lang.php @@ -16,8 +16,6 @@ 'DOM module' => 'DOM modulis', 'Installed' => 'Įdiegta', 'Not Installed' => 'Neįdiegta', - 'System version' => 'Systemos versija', - 'System version ID' => 'Systemos versijos ID', 'Security check results' => 'Saugumo patikrinimo rezultatai', 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Leidžiama perrašyti nustatymų bylą. Siūlome pašalinti visus rašymo leidimus sistemos bylai defines.php.', @@ -29,5 +27,14 @@ 'Monstra index.php bylą galima perrašyti. Siūlome pašalinti visus rašymo leidimus.
    Tai galite padaryti Unix sistemoje su: chmod a-w :path', 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Dėl įsilaužimų grėsmės atvaiduojant klaidų pranešimus Core::$environment = Core::DEVELOPMENT veiksenoje, rekomenduojame naudoti Core::PRODUCTION nustatymą nuolatinėje tinklapio veiksenoje.', + 'Monstra version' => 'Monstra versija', + 'Directory Permissions' => 'Katalogo teisės', + 'Directory' => 'Katalogas', + 'Writable' => 'Rašomas', + 'Unwritable' => 'Nerašomas', + 'Status' => 'Būsena', + 'PHP Built On' => 'PHP veikia su', + 'Web Server' => 'Serverio prog. įranga', + 'WebServer to PHP Interface' => 'PHP naudoja šį SAPI', ) ); \ No newline at end of file diff --git a/plugins/box/information/languages/pt-br.lang.php b/plugins/box/information/languages/pt-br.lang.php new file mode 100644 index 0000000..69faa56 --- /dev/null +++ b/plugins/box/information/languages/pt-br.lang.php @@ -0,0 +1,40 @@ + array( + 'Information' => 'Informações', + 'Debugging' => 'Debug', + 'Name' => 'Nome', + 'Value' => 'Valor', + 'Security' => 'Segurança', + 'System' => 'Sistema', + 'on' => 'on', + 'off'=> 'off', + 'Server' => 'Servidor', + 'PHP version' => 'Versão do PHP', + 'SimpleXML module' => 'Módulo SimpleXML', + 'DOM module' => 'Módulo DOM', + 'Installed' => 'Instalado', + 'Not Installed' => 'Não instalado', + 'Security check results' => 'Resultados da verificação de segurança', + 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => + 'O arquivo de configuração está com permissões de escrita. Para melhor segurança, você deve remover as permissões de escrita do arquivo defines.php em sistemas de produções.', + 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => + 'O diretório núcleo do Monstra (":path") e/ou arquivos dentro do diretório estão com permissões de escrita. Para melhor segurança, você deve remover as permissões de escritas.
    Você pode fazer isso em sistemas UNIX com: chmod -R a-w :path', + 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => + 'O arquivo .htaccess da pasta de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas.
    Você pode fazer isso em sistemas UNIX com: chmod a-w :path', + 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => + 'O arquivo index.php do diretório de instalação do Monstra está com permissões de escrita. Para sua melhor segurança, você deve remover as permissões de escritas.
    Vocês pode fazer isso em sistemas UNIX com: chmod a-w :path', + 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => + 'Devide ao tipo e quantidade de informações, um erro pode trazer possíveis intrusos se a variável Core::$environment for igual à Core::DEVELOPMENT, para isso nós recomendamos fortemente que você sete a variável para o seguinte valor: Core::PRODUCTION em sistemas de produção.', + 'Monstra version' => 'Monstra versão', + 'Directory Permissions' => 'Permissões de Diretório', + 'Directory' => 'Diretório', + 'Writable' => 'Gravável', + 'Unwritable' => 'Unwritable', + 'Status' => 'Estado', + 'PHP Built On' => 'PHP Built On', + 'Web Server' => 'Web Server', + 'WebServer to PHP Interface' => 'WebServer to PHP Interface', + ) + ); \ No newline at end of file diff --git a/plugins/box/information/languages/ru.lang.php b/plugins/box/information/languages/ru.lang.php index 4b7c7c5..eadd566 100644 --- a/plugins/box/information/languages/ru.lang.php +++ b/plugins/box/information/languages/ru.lang.php @@ -3,7 +3,7 @@ return array( 'information' => array( 'Information' => 'Информация', - 'Debuging' => 'Дебаггинг', + 'Debugging' => 'Дебаггинг', 'Name' => 'Название', 'Value' => 'Значение', 'Security' => 'Безопасность', @@ -16,8 +16,6 @@ 'DOM module' => 'DOM модуль', 'Installed' => 'Установлен', 'Not Installed' => 'Не установлен', - 'System version' => 'Версия системы', - 'System version ID' => 'Версия системы ID', 'Security check results' => 'Результаты проверки безопасности', 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => 'Конфигурационный файл доступен для записи. Мы рекомендуем вам удалить права записи на файл defines.php на живом сайте.', @@ -29,5 +27,14 @@ 'Главный index.php файл доступен для записи. Мы рекомендуем вам удалить права записи на главный index.php файл.
    Вы можете сделать это на UNIX системах так: chmod -R a-w :path', 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => 'Система работает в режиме Core::DEVELOPMENT Мы рекомендуем вам установить режим Core::PRODUCTION на живом сайте.', + 'Monstra version' => 'Monstra Версия', + 'Directory Permissions' => 'Права доступа', + 'Directory' => 'Каталог', + 'Writable' => 'Доступна для записи', + 'Unwritable' => 'Недоступна для записи', + 'Status' => 'Статус', + 'PHP Built On' => 'PHP построен на', + 'Web Server' => 'Веб сервер', + 'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса', ) ); \ No newline at end of file diff --git a/plugins/box/information/languages/uk.lang.php b/plugins/box/information/languages/uk.lang.php new file mode 100644 index 0000000..a536e48 --- /dev/null +++ b/plugins/box/information/languages/uk.lang.php @@ -0,0 +1,39 @@ + array( + 'Information' => 'Інформація', + 'Debugging' => 'Дебаггінг', + 'Name' => 'Назва', + 'Value' => 'Значення', + 'Security' => 'Безпека', + 'System' => 'Система', + 'on' => 'включений', + 'off'=> 'вимкнено', + 'Server' => 'Сервер', + 'PHP version' => 'Версія PHP', + 'SimpleXML module' => 'SimpleXML модуль', + 'DOM module' => 'DOM модуль', + 'Installed' => 'Встановлено', + 'Not Installed' => 'Не встановлено', + 'Security check results' => 'Результати перевірки безпеки', + 'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' => + 'Конфігураційний файл доступен для запису. Ми рекомендуємо вам видалити права запису на файл defines.php на живому сайті.', + 'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod -R a-w :path' => + 'Директорія Monstra (":path") доступна для запису. Ми рекомендуємо вам видалити права запису на директорію (":path") на живому сайті.
    Ви можете зробити це на UNIX системах так: chmod -R a-w :path', + 'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => + 'Головный .htaccess доступен для запису. Ми рекомендуємо вам видалити права запису на головний .htaccess файл.
    Ви можете зробити це на UNIX системах так: chmod -R a-w :path', + 'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions.
    You can do this on unix systems with: chmod a-w :path' => + 'Головный index.php файл доступен для запису. Ми рекомендуємо вам видалити права запису на головний index.php файл.
    Ви можете зробити це на UNIX системах так: chmod -R a-w :path', + 'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' => + 'Система працює в режимі Core::DEVELOPMENT Ми рекомендуємо вам встановити режим Core::PRODUCTION на живому сайті.', + 'Monstra version' => 'Monstra Версія', + 'Directory Permissions' => 'Права Доступу', + 'Directory' => 'Каталог', + 'Writable' => 'Доступна для запису', + 'Unwritable' => 'Недоступна для запису', + 'Status' => 'Статус', + 'PHP Built On' => 'PHP построен на', + 'Web Server' => 'Веб сервер', + 'WebServer to PHP Interface' => 'Веб сервер для PHP интерфейса', ) + ); \ No newline at end of file diff --git a/plugins/box/information/views/backend/index.view.php b/plugins/box/information/views/backend/index.view.php index 2dc3be2..c549d22 100644 --- a/plugins/box/information/views/backend/index.view.php +++ b/plugins/box/information/views/backend/index.view.php @@ -5,6 +5,7 @@ @@ -20,13 +21,9 @@ - - - - - - - + + + @@ -55,6 +52,18 @@ + + + + + + + + + + + + @@ -80,6 +89,49 @@
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
@@ -91,12 +143,6 @@ - - - ! - - - ! diff --git a/plugins/box/menu/js/menu.js b/plugins/box/menu/js/menu.js new file mode 100644 index 0000000..958ba06 --- /dev/null +++ b/plugins/box/menu/js/menu.js @@ -0,0 +1,23 @@ +if (typeof $.monstra == 'undefined') $.monstra = {}; + +$.monstra.menu = { + + init: function() { }, + + selectPage: function (slug, title) { + $('input[name=menu_item_link]').val(slug); + $('input[name=menu_item_name]').val(title); + $('#selectPageModal').modal('hide'); + }, + + selectCategory: function (name) { + $('input[name=menu_item_category]').val(name); + $('#selectCategoryModal').modal('hide'); + } + +}; + + +$(document).ready(function(){ + $.monstra.menu.init(); +}); \ No newline at end of file diff --git a/plugins/box/menu/languages/it.lang.php b/plugins/box/menu/languages/it.lang.php index 7ee4a8f..93b1b70 100644 --- a/plugins/box/menu/languages/it.lang.php +++ b/plugins/box/menu/languages/it.lang.php @@ -13,7 +13,7 @@ 'New item' => 'Nuova voce', 'Item name' => 'Nome', 'Item order' => 'Ordine', - 'Item target' => 'Scopo', + 'Item target' => 'Target', 'Item link' => 'Collegamento', 'Item category' => 'Categoria', 'Save' => 'Salva', diff --git a/plugins/box/menu/languages/pt-br.lang.php b/plugins/box/menu/languages/pt-br.lang.php new file mode 100644 index 0000000..65a1c58 --- /dev/null +++ b/plugins/box/menu/languages/pt-br.lang.php @@ -0,0 +1,27 @@ + array( + 'Menu' => 'Menu', + 'Menu manager' => 'Gerenciador do menu', + 'Edit' => 'Editar', + 'Name' => 'Nome', + 'Delete' => 'Deletar', + 'Order' => 'Ordem', + 'Actions' => 'Ações', + 'Create new item' => 'Criar novo item', + 'New item' => 'Novo item', + 'Item name' => 'Nome do item', + 'Item order' => 'ordem do item', + 'Item target' => 'Target do item (atributo HTML)', + 'Item link' => 'Link do item', + 'Item category' => 'Categoria do item', + 'Save' => 'Salvar', + 'Edit item' => 'Editar item', + 'Delete item :name' => 'Deletar o item :name', + 'Select page' => 'Selecionar página', + 'Category' => 'Categoria', + 'Select category' => 'Selecionar categoria', + 'Required field' => 'Campo requerido', + ) + ); \ No newline at end of file diff --git a/plugins/box/menu/languages/uk.lang.php b/plugins/box/menu/languages/uk.lang.php new file mode 100644 index 0000000..739560e --- /dev/null +++ b/plugins/box/menu/languages/uk.lang.php @@ -0,0 +1,27 @@ + array( + 'Menu' => 'Меню', + 'Menu manager' => 'Менеджер меню', + 'Edit' => 'Редагувати', + 'Name' => 'Назва', + 'Delete' => 'Видалити', + 'Order' => 'Порядок', + 'Actions' => 'Дії', + 'Create new item' => 'Створити новий пункт меню', + 'New item' => 'Новий пункт меню', + 'Item name' => 'Назва', + 'Item order' => 'Порядок', + 'Item target' => 'Ціль', + 'Item link' => 'Ссылка', + 'Item category' => 'Категорія', + 'Save' => 'Зберегти', + 'Edit item' => 'Редагування пункту меню', + 'Delete item :name' => 'Видалити пункт меню :name', + 'Select page' => 'Вибрати сторінку', + 'Category' => 'Категорія', + 'Select category' => 'Вибрати категорію', + 'Required field' => 'Обов’язкове поле', + ) + ); \ No newline at end of file diff --git a/plugins/box/menu/menu.admin.php b/plugins/box/menu/menu.admin.php index db19b7f..ac97225 100644 --- a/plugins/box/menu/menu.admin.php +++ b/plugins/box/menu/menu.admin.php @@ -1,9 +1,10 @@ - function selectPage(slug, title) { - $('input[name=menu_item_link]').val(slug); - $('input[name=menu_item_name]').val(title); - $('#selectPageModal').modal('hide'); - } - - function selectCategory(name) { - $('input[name=menu_item_category]').val(name); - $('#selectCategoryModal').modal('hide'); - } - - "); - } - - public static function main() { // Get menu table @@ -97,11 +80,12 @@ // Update menu item if (count($errors) == 0) { - MenuAdmin::$menu->update(Request::get('item_id'), array('name' => Request::post('menu_item_name'), - 'link' => Request::post('menu_item_link'), - 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), - 'target' => Request::post('menu_item_target'), - 'order' => Request::post('menu_item_order'))); + MenuAdmin::$menu->update(Request::get('item_id'), + array('name' => Request::post('menu_item_name'), + 'link' => Request::post('menu_item_link'), + 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), + 'target' => Request::post('menu_item_target'), + 'order' => Request::post('menu_item_order'))); Request::redirect('index.php?id=menu'); } @@ -121,7 +105,7 @@ ->assign('menu_item_order_array', $menu_item_order_array) ->assign('errors', $errors) ->assign('categories', MenuAdmin::getCategories()) - ->assign('pages_list', $pages->select('[slug!="error404" and parent=""]')) + ->assign('pages_list', MenuAdmin::getPages()) ->assign('components_list', MenuAdmin::getComponents()) ->display(); @@ -157,11 +141,11 @@ // Insert new menu item if (count($errors) == 0) { - MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'), - 'link' => Request::post('menu_item_link'), - 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), - 'target' => Request::post('menu_item_target'), - 'order' => Request::post('menu_item_order'))); + MenuAdmin::$menu->insert(array('name' => Request::post('menu_item_name'), + 'link' => Request::post('menu_item_link'), + 'category' => Security::safeName(Request::post('menu_item_category'), '-', true), + 'target' => Request::post('menu_item_target'), + 'order' => Request::post('menu_item_order'))); Request::redirect('index.php?id=menu'); } @@ -181,7 +165,7 @@ ->assign('menu_item_order_array', $menu_item_order_array) ->assign('errors', $errors) ->assign('categories', MenuAdmin::getCategories()) - ->assign('pages_list', $pages->select('[slug!="error404" and parent=""]')) + ->assign('pages_list', MenuAdmin::getPages()) ->assign('components_list', MenuAdmin::getComponents()) ->display(); @@ -223,6 +207,59 @@ } + /** + * Get pages + */ + protected static function getPages() { + + // Init vars + $pages_array = array(); + $count = 0; + + // Get pages table + $pages = new Table('pages'); + + // Get Pages List + $pages_list = $pages->select('[slug!="error404" and status="published"]'); + + foreach ($pages_list as $page) { + + $pages_array[$count]['title'] = Html::toText($page['title']); + $pages_array[$count]['parent'] = $page['parent']; + $pages_array[$count]['date'] = $page['date']; + $pages_array[$count]['author'] = $page['author']; + $pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ; + + if (isset($page['parent'])) { + $c_p = $page['parent']; + } else { + $c_p = ''; + } + + if ($c_p != '') { + $_page = $pages->select('[slug="'.$page['parent'].'"]', null); + + if (isset($_page['title'])) { + $_title = $_page['title']; + } else { + $_title = ''; + } + $pages_array[$count]['sort'] = $_title . ' ' . $page['title']; + } else { + $pages_array[$count]['sort'] = $page['title']; + } + $_title = ''; + $count++; + } + + // Sort pages + $_pages_list = Arr::subvalSort($pages_array, 'sort'); + + // return + return $_pages_list; + } + + /** * Get components */ @@ -232,7 +269,7 @@ if (count(Plugin::$components) > 0) { foreach (Plugin::$components as $component) { - if ($component !== 'pages' && $component !== 'sitemap') $components[] = ucfirst($component); + if ($component !== 'pages' && $component !== 'sitemap') $components[] = Text::lowercase($component); } } diff --git a/plugins/box/menu/views/backend/add.view.php b/plugins/box/menu/views/backend/add.view.php index e875d01..6abccf3 100644 --- a/plugins/box/menu/views/backend/add.view.php +++ b/plugins/box/menu/views/backend/add.view.php @@ -58,10 +58,10 @@

    0) foreach($pages_list as $page) { ?> -
  • +
  • 0) foreach($components_list as $component) { ?> -
  • +

@@ -77,7 +77,7 @@

    0) foreach($categories as $category) { ?> -
  • +

diff --git a/plugins/box/menu/views/backend/edit.view.php b/plugins/box/menu/views/backend/edit.view.php index bcba540..42f597d 100644 --- a/plugins/box/menu/views/backend/edit.view.php +++ b/plugins/box/menu/views/backend/edit.view.php @@ -58,10 +58,10 @@

    0) foreach($pages_list as $page) { ?> -
  • +
  • 0) foreach($components_list as $component) { ?> -
  • +

@@ -78,7 +78,7 @@

    0) foreach($categories as $category) { ?> -
  • +

diff --git a/plugins/box/pages/js/.htaccess b/plugins/box/pages/js/.htaccess new file mode 100644 index 0000000..b9f48ac --- /dev/null +++ b/plugins/box/pages/js/.htaccess @@ -0,0 +1,2 @@ +Options -Indexes +Allow from all \ No newline at end of file diff --git a/plugins/box/pages/js/pages.js b/plugins/box/pages/js/pages.js new file mode 100644 index 0000000..52aa4e4 --- /dev/null +++ b/plugins/box/pages/js/pages.js @@ -0,0 +1,36 @@ +if (typeof $.monstra == 'undefined') $.monstra = {}; + +$.monstra.pages = { + + init: function() { + this.pagesExpandProcess(); + }, + + pageExpand: function(slug, expand, token) { + $.ajax({ + type:"post", + data:"slug="+slug+"&expand="+expand+"&token="+token, + url: $('form input[name="siteurl"]').val() + }); + }, + + pagesExpandProcess: function() { + $(".parent").click(function() { + if ($(this).html() == "-") { + $('[rel="children_' + $(this).attr('rel')+'"]').hide(); + $(this).html("+"); + $.monstra.pages.pageExpand($(this).attr("rel"), "1", $(this).attr("token")); + } else { + $('[rel="children_' + $(this).attr('rel')+'"]').show(); + $(this).html("-"); + $.monstra.pages.pageExpand($(this).attr("rel"), "0", $(this).attr("token")); + } + }); + } + +}; + + +$(document).ready(function(){ + $.monstra.pages.init(); +}); \ No newline at end of file diff --git a/plugins/box/pages/languages/de.lang.php b/plugins/box/pages/languages/de.lang.php index cd73b9b..9f91190 100644 --- a/plugins/box/pages/languages/de.lang.php +++ b/plugins/box/pages/languages/de.lang.php @@ -44,8 +44,11 @@ 'Page :page deleted' => 'Seite :page wurde gelöscht', 'Search Engines Robots' => 'Suchmaschinen-Roboter', 'Page' => 'Seite', - 'SEO' => 'SEO', + 'Metadata' => 'Metadata', 'Settings' => 'Einstellungen', 'Required field' => 'Pflichtfeld', + 'Access' => 'Zugriff', + 'Public' => 'Öffentlichkeit', + 'Registered' => 'Eingetragen', ) ); \ No newline at end of file diff --git a/plugins/box/pages/languages/en.lang.php b/plugins/box/pages/languages/en.lang.php index eba9d93..5fc2951 100644 --- a/plugins/box/pages/languages/en.lang.php +++ b/plugins/box/pages/languages/en.lang.php @@ -44,8 +44,11 @@ 'Page :page deleted' => 'Page :page deleted', 'Search Engines Robots' => 'Search Engines Robots', 'Page' => 'Page', - 'SEO' => 'SEO', + 'Metadata' => 'Metadata', 'Settings' => 'Settings', 'Required field' => 'Required field', + 'Access' => 'Access', + 'Public' => 'Public', + 'Registered' => 'Registered', ) ); \ No newline at end of file diff --git a/plugins/box/pages/languages/it.lang.php b/plugins/box/pages/languages/it.lang.php index aae1769..3264a8c 100644 --- a/plugins/box/pages/languages/it.lang.php +++ b/plugins/box/pages/languages/it.lang.php @@ -40,12 +40,15 @@ 'Published' => 'Pubblicato', 'Draft' => 'Bozza', 'Published on' => 'Pubblicato il', - 'Edit 404 page' => 'Modifica la pagina 404', + 'Edit 404 page' => 'Modifica pagina 404', 'Page :page deleted' => 'Pagina :page è stata cancellata', 'Search Engines Robots' => 'Robot dei motori di ricerca', 'Page' => 'Pagina', - 'SEO' => 'SEO', + 'Metadata' => 'Metadata', 'Settings' => 'Impostazioni', 'Required field' => 'Campo obbligatorio', + 'Access' => 'Accesso', + 'Public' => 'Pubblico', + 'Registered' => 'Registrato', ), ); \ No newline at end of file diff --git a/plugins/box/pages/languages/lt.lang.php b/plugins/box/pages/languages/lt.lang.php index e92a83e..2c6b33c 100644 --- a/plugins/box/pages/languages/lt.lang.php +++ b/plugins/box/pages/languages/lt.lang.php @@ -44,8 +44,11 @@ 'Page :page deleted' => 'Puslapis :page ištrintas', 'Search Engines Robots' => 'Paieškos variklių robotai', 'Page' => 'Puslapis', - 'SEO' => 'SEO', + 'Metadata' => 'Metadata', 'Settings' => 'Nustatymai', 'Required field' => 'Privalomas laukas', + 'Access' => 'Prieiga', + 'Public' => 'Viešas', + 'Registered' => 'Registruotas', ) ); \ No newline at end of file diff --git a/plugins/box/pages/languages/pt-br.lang.php b/plugins/box/pages/languages/pt-br.lang.php new file mode 100644 index 0000000..53003e8 --- /dev/null +++ b/plugins/box/pages/languages/pt-br.lang.php @@ -0,0 +1,54 @@ + array( + 'Pages' => 'Páginas', + 'Pages manager' => 'Gerenciador de páginas', + 'Content' => 'Conteúdo', + 'Create new page' => 'Criar nova página', + 'New page' => 'Nova página', + 'Edit page' => 'Editar página', + 'Date' => 'Data', + 'Clone' => 'Clonar', + 'Edit' => 'Editar', + 'Delete' => 'Deletar', + 'Delete page: :page' => 'Deletar a página: :page', + 'Title' => 'Título', + 'Name' => 'Nome', + 'Author' => 'Autor', + 'Name (slug)' => 'Nome (slug)', + 'Description' => 'Descrição', + 'Keywords' => 'Keywords', + 'Parent' => 'Parente', + 'Template' => 'Template', + 'Year' => 'Ano', + 'Day' => 'Dia', + 'Month' => 'Mês', + 'Hour' => 'Hora', + 'Minute' => 'Minuto', + 'Second' => 'Segundo', + 'This field should not be empty' => 'Este arquivo não deve ser vazio', + 'This page already exists' => 'Esta página já existe', + 'Extra' => 'Extra', + 'Save' => 'Salvar', + 'Save and exit' => 'Salvar e sair', + 'Your changes to the page :page have been saved.' => 'Suas alterações na página :page foram salvas.', + 'The page :page cloned.' => 'Página :page clonada.', + 'Status' => 'Status', + 'Actions' => 'Ações', + 'Add' => 'Adicionar', + 'Published' => 'Publicado', + 'Draft' => 'Rascunho', + 'Published on' => 'Publicada em', + 'Edit 404 page' => 'Editar página de erro 404', + 'Page :page deleted' => 'Página :page deletada', + 'Search Engines Robots' => 'Crawlers de sistemas de buscas.', + 'Page' => 'Página', + 'Metadata' => 'Metadata', + 'Settings' => 'Configurações', + 'Required field' => 'Campo requerido', + 'Access' => 'Acesso', + 'Public' => 'Público', + 'Registered' => 'Registrado', + ) + ); \ No newline at end of file diff --git a/plugins/box/pages/languages/ru.lang.php b/plugins/box/pages/languages/ru.lang.php index 427bd42..c1bcf72 100644 --- a/plugins/box/pages/languages/ru.lang.php +++ b/plugins/box/pages/languages/ru.lang.php @@ -44,8 +44,11 @@ 'Page :page deleted' => 'Страница :page удалена', 'Search Engines Robots' => 'Поисковые роботы', 'Page' => 'Страница', - 'SEO' => 'SEO', + 'Metadata' => 'Метаданные', 'Settings' => 'Настройки', 'Required field' => 'Обязательное поле', + 'Access' => 'Доступ', + 'Public' => 'Публичный', + 'Registered' => 'Зарегистрированным', ), ); \ No newline at end of file diff --git a/plugins/box/pages/languages/uk.lang.php b/plugins/box/pages/languages/uk.lang.php new file mode 100644 index 0000000..d159f78 --- /dev/null +++ b/plugins/box/pages/languages/uk.lang.php @@ -0,0 +1,54 @@ + array( + 'Pages' => 'Сторінки', + 'Pages manager' => 'Менеджер сторінок', + 'Content' => 'Контент', + 'Create new page' => 'Створити нову сторінку', + 'New page' => 'Нова сторінка', + 'Edit page' => 'Редагування сторінки', + 'Date' => 'Дата', + 'Clone' => 'Клонувати', + 'Edit' => 'Редагувати', + 'Delete' => 'Видалити', + 'Delete page: :page' => 'Видалити сторінку: :page', + 'Title' => 'Заголовок', + 'Name' => 'Назва', + 'Author' => 'Автор', + 'Name (slug)' => 'Назва (slug)', + 'Description' => 'Опис', + 'Keywords' => 'Ключові слова', + 'Parent' => 'Родитель', + 'Template' => 'Шаблон', + 'Year' => 'Рік', + 'Day' => 'День', + 'Month' => 'Місяц', + 'Hours' => 'Час', + 'Minute' => 'Мінута', + 'Second' => 'Секунда', + 'This field should not be empty' => 'Це поле не може бути пустим', + 'This page already exists' => 'Така сторінка вже існує', + 'Extra' => 'Додатково', + 'Save' => 'Зберегти', + 'Save and exit' => 'Зберегти и вийти', + 'Your changes to the page :page have been saved.' => 'Ваші зміни до сторінки :page були збережені.', + 'The page :page cloned.' => 'Сторінка :page клонована.', + 'Status' => 'Статус', + 'Actions' => 'Дії', + 'Add' => 'Додати', + 'Published' => 'Опубліковано', + 'Draft' => 'Чернетка', + 'Published on' => 'Опубліковано', + 'Edit 404 page' => 'Редагувати сторінку 404', + 'Page :page deleted' => 'Сторінка :page видалена', + 'Search Engines Robots' => 'Пошукові роботи', + 'Page' => 'Сторінка', + 'Metadata' => 'Метадані', + 'Settings' => 'Налаштування', + 'Required field' => 'Обов’язкове поле', + 'Access' => 'Доступ', + 'Public' => 'Публічний', + 'Registered' => 'Зареєстрованим', + ), + ); \ No newline at end of file diff --git a/plugins/box/pages/pages.admin.php b/plugins/box/pages/pages.admin.php index 5dff735..83ffc1d 100755 --- a/plugins/box/pages/pages.admin.php +++ b/plugins/box/pages/pages.admin.php @@ -1,10 +1,38 @@ updateWhere('[slug="'.Request::post('slug').'"]', array('expand' => Request::post('expand'))); + Request::shutdown(); + } else { die('csrf detected!'); } + } + } + /** * Pages admin function @@ -19,26 +47,31 @@ $errors = array(); $pages = new Table('pages'); - $users = new Table('users'); + PagesAdmin::$pages = $pages; + $users = new Table('users'); $user = $users->select('[id='.Session::get('user_id').']', null); $user['firstname'] = Html::toText($user['firstname']); $user['lastname'] = Html::toText($user['lastname']); // Page author - if (isset($user['firstname']) && trim($user['firstname']) !== '') { - if (trim($user['lastname']) !== '') $lastname = ' '.$user['lastname']; else $lastname = ''; - $author = $user['firstname'] . $lastname; + if ( ! empty($user['firstname'])) { + $author = (empty($user['lastname'])) ? $user['firstname'] : $user['firstname'].' '.$user['lastname']; } else { $author = Session::get('user_login'); } - + // Status array $status_array = array('published' => __('Published', 'pages'), 'draft' => __('Draft', 'pages')); + + // Access array + $access_array = array('public' => __('Public', 'pages'), + 'registered' => __('Registered', 'pages')); + // Check for get actions // --------------------------------------------- @@ -61,6 +94,9 @@ // Get original page $orig_page = $pages->select('[slug="'.Request::get('name').'"]', null); + // Generate rand page title + $rand_page_title = $orig_page['title'].' [copy]'; + // Clone page if ($pages->insert(array('slug' => $rand_page_name, 'template' => $orig_page['template'], @@ -68,7 +104,9 @@ 'robots_index' => $orig_page['robots_index'], 'robots_follow'=> $orig_page['robots_follow'], 'status' => $orig_page['status'], - 'title' => $rand_page_name, + 'access' => (isset($orig_page['access'])) ? $orig_page['access'] : 'public', + 'expand' => (isset($orig_page['expand'])) ? $orig_page['expand'] : '0', + 'title' => $rand_page_title, 'description' => $orig_page['description'], 'keywords' => $orig_page['keywords'], 'date' => $orig_page['date'], @@ -133,10 +171,12 @@ if (count($errors) == 0) { // Insert new page - if($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true), + if ($pages->insert(array('slug' => Security::safeName(Request::post('page_name'), '-', true), 'template' => Request::post('templates'), 'parent' => $parent_page, 'status' => Request::post('status'), + 'access' => Request::post('access'), + 'expand' => '0', 'robots_index' => $robots_index, 'robots_follow'=> $robots_follow, 'title' => Request::post('page_title'), @@ -190,6 +230,8 @@ if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = ''; if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = ''; if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index'; + if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published'; + if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public'; if (Request::post('pages')) $parent_page = Request::post('pages'); else if(Request::get('parent_page')) $parent_page = Request::get('parent_page'); else $parent_page = ''; if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false; if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false; @@ -212,7 +254,10 @@ ->assign('parent_page', $parent_page) ->assign('templates_array', $templates_array) ->assign('post_template', $post_template) + ->assign('post_status', $post_status) + ->assign('post_access', $post_access) ->assign('status_array', $status_array) + ->assign('access_array', $access_array) ->assign('date', $date) ->assign('post_robots_index', $post_robots_index) ->assign('post_robots_follow', $post_robots_follow) @@ -253,6 +298,8 @@ if (Request::post('page_description')) $post_description = Request::post('page_description'); else $post_description = ''; if (Request::post('editor')) $post_content = Request::post('editor'); else $post_content = ''; if (Request::post('templates')) $post_template = Request::post('templates'); else $post_template = 'index'; + if (Request::post('status')) $post_status = Request::post('status'); else $post_status = 'published'; + if (Request::post('access')) $post_access = Request::post('access'); else $post_access = 'public'; if (Request::post('robots_index')) $post_robots_index = true; else $post_robots_index = false; if (Request::post('robots_follow')) $post_robots_follow = true; else $post_robots_follow = false; //-------------- @@ -284,6 +331,7 @@ 'robots_index' => $robots_index, 'robots_follow'=> $robots_follow, 'status' => Request::post('status'), + 'access' => Request::post('ascess'), 'date' => $date, 'author' => $author))) { @@ -306,6 +354,7 @@ 'robots_index' => $robots_index, 'robots_follow'=> $robots_follow, 'status' => Request::post('status'), + 'access' => Request::post('access'), 'date' => $date, 'author' => $author))) { @@ -368,7 +417,7 @@ if (Request::post('page_keywords')) $keywords_to_edit = Request::post('page_keywords'); else $keywords_to_edit = $page['keywords']; if (Request::post('editor')) $to_edit = Request::post('editor'); else $to_edit = Text::toHtml($page_content); - if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false; + if (Request::post('robots_index')) $post_robots_index = true; else if ($page['robots_index'] == 'noindex') $post_robots_index = true; else $post_robots_index = false; if (Request::post('robots_follow')) $post_robots_follow = true; else if ($page['robots_follow'] == 'nofollow') $post_robots_follow = true; else $post_robots_follow = false; if (Request::post('pages')) { @@ -385,9 +434,10 @@ } if (Request::post('templates')) $template = Request::post('templates'); else $template = $page['template']; if (Request::post('status')) $status = Request::post('status'); else $status = $page['status']; + if (Request::post('access')) $access = Request::post('access'); else $access = (isset($page['access'])) ? $page['access'] : 'public'; // Generate date - $date = Date::format(time(), 'Y-m-d H:i:s'); + $date = Request::post('date') ? Request::post('date') : Date::format($page['date'], 'Y-m-d H:i:s'); Notification::setNow('page', 'page'); @@ -404,7 +454,9 @@ ->assign('templates_array', $templates_array) ->assign('template', $template) ->assign('status_array', $status_array) + ->assign('access_array', $access_array) ->assign('status', $status) + ->assign('access', $access) ->assign('date', $date) ->assign('post_robots_index', $post_robots_index) ->assign('post_robots_follow', $post_robots_follow) @@ -428,7 +480,15 @@ // Delete page and update fields if ($pages->deleteWhere('[slug="'.$page['slug'].'" ]')) { - $pages->updateWhere('[parent="'.$page['slug'].'"]', array('parent' => '')); + + $_pages = $pages->select('[parent="'.$page['slug'].'"]'); + + if ( ! empty($_pages)) { + foreach($_pages as $_page) { + $pages->updateWhere('[slug="'.$_page['slug'].'"]', array('parent' => '')); + } + } + File::delete(STORAGE . DS . 'pages' . DS . $page['id'] . '.page.txt'); Notification::set('success', __('Page :page deleted', 'pages', array(':page' => Html::toText($page['title'])))); } @@ -458,7 +518,7 @@ $count = 0; // Get pages - $pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'parent')); + $pages_list = $pages->select(null, 'all', null, array('slug', 'title', 'status', 'date', 'author', 'expand', 'access', 'parent')); // Loop foreach ($pages_list as $page) { @@ -466,8 +526,10 @@ $pages_array[$count]['title'] = $page['title']; $pages_array[$count]['parent'] = $page['parent']; $pages_array[$count]['status'] = $status_array[$page['status']]; + $pages_array[$count]['access'] = isset($access_array[$page['access']]) ? $access_array[$page['access']] : $access_array['public']; // hack for old Monstra Versions $pages_array[$count]['date'] = $page['date']; $pages_array[$count]['author'] = $page['author']; + $pages_array[$count]['expand'] = $page['expand']; $pages_array[$count]['slug'] = $page['slug']; if (isset($page['parent'])) { diff --git a/plugins/box/pages/pages.plugin.php b/plugins/box/pages/pages.plugin.php index be16c2e..af16b29 100644 --- a/plugins/box/pages/pages.plugin.php +++ b/plugins/box/pages/pages.plugin.php @@ -62,14 +62,9 @@ /** * Main function */ - public static function main() { - if (BACKEND == false) { - $pages = new Table('pages'); - Pages::$pages = $pages; - - $page = Pages::pageLoader(); - Pages::$page = $page; - } + public static function main() { + Pages::$pages = new Table('pages'); + Pages::$page = Pages::pageLoader(); } @@ -116,16 +111,36 @@ $c_p = ''; } } + + // Hack For old Monstra + $child_page['access'] = (isset($child_page['access'])) ? $child_page['access'] : 'public' ; // Check is child_parent -> request parent if ($c_p == $data[0]) { - // Checking only for the parent and one child, the remaining issue 404 - if (count($data) < 3) { - $id = $data[1]; // Get real request page + + if (count($data) < 3) { // Checking only for the parent and one child, the remaining issue 404 + + if ((($child_page['status'] == 'published') or + (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and + ($child_page['access'] == 'public')) { + + $id = $data[1]; + + } elseif (($child_page['access'] == 'registered') and + (Session::exists('user_id')) and + ($child_page['status'] == 'published')) { + + $id = $data[1]; + + } else { + $id = 'error404'; + Response::status(404); + } } else { $id = 'error404'; Response::status(404); } + } else { $id = 'error404'; Response::status(404); @@ -134,6 +149,7 @@ $id = 'error404'; Response::status(404); } + } else { // Only parent page come if(empty($data[0])) { @@ -144,8 +160,11 @@ // Get current page $current_page = Pages::$pages->select('[slug="'.$data[0].'"]', null); + // Hack For old Monstra + $current_page['access'] = (isset($current_page['access'])) ? $current_page['access'] : 'public' ; + if (count($current_page) != 0) { - if ($current_page['parent'] != '') { + if ( ! empty($current_page['parent'])) { $c_p = $current_page['parent']; } else { $c_p = ''; @@ -156,14 +175,26 @@ // Check if this page has parent if ($c_p !== '') { + if ($c_p == $data[0]) { - if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) { - if (($current_page['status'] == 'published') or (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) { + if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) { + + if ((($current_page['status'] == 'published') or + (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and + ($current_page['access'] == 'public')) { + $id = $data[0]; + + } elseif (($current_page['access'] == 'registered') and + (Session::exists('user_id')) and + ($current_page['status'] == 'published')) { + + $id = $data[0]; + } else { $id = 'error404'; Response::status(404); - } + } } else { $id = 'error404'; Response::status(404); @@ -173,9 +204,20 @@ Response::status(404); } } else { + if (count(Pages::$pages->select('[slug="'.$data[0].'"]', null)) != 0) { - if (($current_page['status'] == 'published') or (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) { + if ((($current_page['status'] == 'published') or + (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin', 'editor')))) and + ($current_page['access'] == 'public')) { + $id = $data[0]; + + } elseif (($current_page['access'] == 'registered') and + (Session::exists('user_id')) and + ($current_page['status'] == 'published')) { + + $id = $data[0]; + } else { $id = 'error404'; Response::status(404); @@ -387,7 +429,16 @@ * */ public static function robots() { - return (Pages::$page !== null) ? Pages::$page['robots_index'].', '.Pages::$page['robots_follow'] : ''; + + if (Pages::$page !== null) { + $_index = (isset(Pages::$page['robots_index'])) ? Pages::$page['robots_index'] : ''; + $_follow = (isset(Pages::$page['robots_follow'])) ? Pages::$page['robots_follow'] : ''; + $robots = ( ! empty($_index) && ! empty($_follow)) ? $_index.', '.$_follow : ''; + } else { + $robots = ''; + } + + return $robots; } } \ No newline at end of file diff --git a/plugins/box/pages/views/backend/add.view.php b/plugins/box/pages/views/backend/add.view.php index b3c23d5..196ca5d 100644 --- a/plugins/box/pages/views/backend/add.view.php +++ b/plugins/box/pages/views/backend/add.view.php @@ -15,7 +15,7 @@ @@ -39,7 +39,7 @@ ?>
-
+
-
+
-
+
-
+
+
+
+
diff --git a/plugins/box/pages/views/backend/edit.view.php b/plugins/box/pages/views/backend/edit.view.php index 7150e9d..6e7976f 100644 --- a/plugins/box/pages/views/backend/edit.view.php +++ b/plugins/box/pages/views/backend/edit.view.php @@ -18,7 +18,7 @@ @@ -50,7 +50,7 @@ if (isset($errors['pages_exists'])) echo Html::nbsp(3).''.$errors['pages_exists'].''; ?>
-
+
-
+
-
+
@@ -103,7 +103,7 @@ echo Form::hidden('status', $status); } else { ?> -
+
+ +
+ +
+
diff --git a/plugins/box/pages/views/backend/index.view.php b/plugins/box/pages/views/backend/index.view.php index bcb59cb..756b912 100755 --- a/plugins/box/pages/views/backend/index.view.php +++ b/plugins/box/pages/views/backend/index.view.php @@ -1,14 +1,11 @@
-


- - __('Create new page', 'pages'), 'class' => 'btn default btn-small')). Html::nbsp(3). @@ -16,15 +13,16 @@ ); ?> -

+ + @@ -35,21 +33,30 @@ foreach ($pages as $page) { if ($page['parent'] != '') { $dash = Html::arrow('right').'  '; } else { $dash = ""; } ?> - - + select('[slug="'.(string)$page['parent'].'"]', null); + if ($page['parent'] !== '' && isset($expand['expand']) && $expand['expand'] == '1') { $visibility = 'style="display:none;"'; } else { $visibility = ''; } + ?> + rel="children_" > + + @@ -79,6 +89,7 @@ +
+ select('[parent="'.(string)$page['slug'].'"]', 'all')) > 0) { + if (isset($page['expand']) && $page['expand'] == '1') { + echo '+'; + } else { + echo '-'; + } + } + ?> + '_blank', 'rel' => 'children_'.$_parent)); ?> - - '_blank')); ?> @@ -57,6 +64,9 @@ + +
+ + + +
\ No newline at end of file diff --git a/plugins/box/plugins/languages/en.lang.php b/plugins/box/plugins/languages/en.lang.php index 804a02f..f4d8585 100644 --- a/plugins/box/plugins/languages/en.lang.php +++ b/plugins/box/plugins/languages/en.lang.php @@ -10,7 +10,7 @@ 'Install New' => 'Install New', 'Delete' => 'Delete', 'Delete plugin :plugin' => 'Delete plugin :plugin', - 'This plugins does not exist' => 'This plugins does not exist', + 'This plugin does not exist' => 'This plugin does not exist', 'Version' => 'Version', 'Author' => 'Author', 'Get More Plugins' => 'Get More Plugins', diff --git a/plugins/box/plugins/languages/it.lang.php b/plugins/box/plugins/languages/it.lang.php index 22c6d53..6298628 100644 --- a/plugins/box/plugins/languages/it.lang.php +++ b/plugins/box/plugins/languages/it.lang.php @@ -10,7 +10,7 @@ 'Description' => 'Descrizione', 'Delete' => 'Elimina', 'Delete plugin :plugin' => 'Elimina plugin :plugin', - 'This plugins does not exist' => 'Tale plugin non esiste', + 'This plugin does not exist' => 'Tale plugin non esiste', 'Version' => 'Versione', 'Author' => 'Autore', 'Get More Plugins' => 'Scarica altri plugin', diff --git a/plugins/box/plugins/languages/pt-br.lang.php b/plugins/box/plugins/languages/pt-br.lang.php new file mode 100644 index 0000000..a772af8 --- /dev/null +++ b/plugins/box/plugins/languages/pt-br.lang.php @@ -0,0 +1,20 @@ + array( + 'Plugins' => 'Plugins', + 'Name' => 'Nome', + 'Actions' => 'Ações', + 'Description' => 'Descrição', + 'Installed' => 'Instalado', + 'Install New' => 'Instalar novo', + 'Delete' => 'Deletar', + 'Delete plugin :plugin' => 'Deletar o plugin :plugin', + 'This plugins does not exist' => 'Estes plugins não existem', + 'Version' => 'Versão', + 'Author' => 'Autor', + 'Get More Plugins' => 'Ver mais plugins', + 'Install' => 'Instalar', + 'Uninstall' => 'Desinstalar', + ) + ); \ No newline at end of file diff --git a/plugins/box/plugins/languages/ru.lang.php b/plugins/box/plugins/languages/ru.lang.php index a0cd8c7..2f2d0b8 100644 --- a/plugins/box/plugins/languages/ru.lang.php +++ b/plugins/box/plugins/languages/ru.lang.php @@ -10,7 +10,7 @@ 'Description' => 'Описание', 'Delete' => 'Удалить', 'Delete plugin :plugin' => 'Удалить плагин :plugin', - 'This plugins does not exist' => 'Такой плагин не существует', + 'This plugin does not exist' => 'Такого плагина не существует', 'Version' => 'Версия', 'Author' => 'Автор', 'Get More Plugins' => 'Скачать другие плагины', diff --git a/plugins/box/plugins/languages/uk.lang.php b/plugins/box/plugins/languages/uk.lang.php new file mode 100644 index 0000000..9cc404e --- /dev/null +++ b/plugins/box/plugins/languages/uk.lang.php @@ -0,0 +1,20 @@ + array( + 'Plugins' => 'Плагіни', + 'Installed' => 'Установлені', + 'Install New' => 'Установити нові', + 'Actions' => 'Дії', + 'Name' => 'Назва', + 'Description' => 'Опис', + 'Delete' => 'Видалити', + 'Delete plugin :plugin' => 'Видалити плагін :plugin', + 'This plugin does not exist' => 'Такого плагіна не існує', + 'Version' => 'Версія', + 'Author' => 'Автор', + 'Get More Plugins' => 'Завантажити інші плагіни', + 'Install' => 'Установити', + 'Uninstall' => 'Видалити', + ) + ); \ No newline at end of file diff --git a/plugins/box/plugins/plugins.admin.php b/plugins/box/plugins/plugins.admin.php index 8dea782..180e1ca 100755 --- a/plugins/box/plugins/plugins.admin.php +++ b/plugins/box/plugins/plugins.admin.php @@ -40,6 +40,9 @@ include PLUGINS . DS . $plugin_name . DS . 'install' . DS . $plugin_name . '.uninstall.php'; } + // Cleanup minify + if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file); + // Clean i18n cache Cache::clean('i18n'); @@ -69,6 +72,9 @@ 'status' => (string)$plugin_xml->plugin_status, 'priority' => (int)$plugin_xml->plugin_priority)); + // Cleanup minify + if (count($files = File::scan(MINIFY, array('css', 'js', 'php'))) > 0) foreach ($files as $file) File::delete(MINIFY . DS . $file); + // Clean i18n cache Cache::clean('i18n'); diff --git a/plugins/box/sitemap/languages/pt-br.lang.php b/plugins/box/sitemap/languages/pt-br.lang.php new file mode 100644 index 0000000..917ffc2 --- /dev/null +++ b/plugins/box/sitemap/languages/pt-br.lang.php @@ -0,0 +1,7 @@ + array( + 'Sitemap' => 'Mapa do site', + ) + ); \ No newline at end of file diff --git a/plugins/box/sitemap/languages/uk.lang.php b/plugins/box/sitemap/languages/uk.lang.php new file mode 100644 index 0000000..f543d01 --- /dev/null +++ b/plugins/box/sitemap/languages/uk.lang.php @@ -0,0 +1,7 @@ + array( + 'Sitemap' => 'Карта сайту', + ) + ); \ No newline at end of file diff --git a/plugins/box/sitemap/sitemap.plugin.php b/plugins/box/sitemap/sitemap.plugin.php index 468c237..4747dbe 100644 --- a/plugins/box/sitemap/sitemap.plugin.php +++ b/plugins/box/sitemap/sitemap.plugin.php @@ -22,15 +22,27 @@ 'sitemap', 'box'); - + // Add actions Action::add('admin_pages_action_add', 'Sitemap::create'); Action::add('admin_pages_action_edit', 'Sitemap::create'); Action::add('admin_pages_action_clone', 'Sitemap::create'); Action::add('admin_pages_action_delete', 'Sitemap::create'); + + /** + * Sitemap + */ class Sitemap extends Frontend { + /** + * Forbidden components + * + * @var array + */ + public static $forbidden_components = array('pages', 'sitemap'); + + /** * Sitemap Title * @@ -54,6 +66,53 @@ */ public static function content() { + // Display view + return View::factory('box/sitemap/views/frontend/index') + ->assign('pages_list', Sitemap::getPages()) + ->assign('components', Sitemap::getComponents()) + ->render(); + } + + + /** + * Create sitemap + */ + public static function create() { + + // Get pages list + $pages_list = Sitemap::getPages(); + + // Create sitemap content + $map = ''."\n"; + $map .= ''."\n"; + foreach ($pages_list as $page) { + if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; } + $map .= "\t".''."\n\t\t".''.Option::get('siteurl').$parent.$page['slug'].''."\n\t\t".''.date("Y-m-d", (int)$page['date']).''."\n\t\t".'weekly'."\n\t\t".''.$priority.''."\n\t".''."\n"; + } + + // Get list of components + $components = Sitemap::getComponents(); + + // Add components to sitemap + if (count($components) > 0) { + foreach ($components as $component) { + $map .= "\t".''."\n\t\t".''.Option::get('siteurl').Text::lowercase($component).''."\n\t\t".''.date("Y-m-d", time()).''."\n\t\t".'weekly'."\n\t\t".'1.0'."\n\t".''."\n"; + } + } + + // Close sitemap + $map .= ''; + + // Save sitemap + return File::setContent(ROOT . DS . 'sitemap.xml', $map); + } + + + /** + * Get pages + */ + protected static function getPages() { + // Init vars $pages_array = array(); $count = 0; @@ -70,7 +129,7 @@ $pages_array[$count]['parent'] = $page['parent']; $pages_array[$count]['date'] = $page['date']; $pages_array[$count]['author'] = $page['author']; - $pages_array[$count]['slug'] = $page['slug']; + $pages_array[$count]['slug'] = ($page['slug'] == Option::get('defaultpage')) ? '' : $page['slug'] ; if (isset($page['parent'])) { $c_p = $page['parent']; @@ -97,48 +156,8 @@ // Sort pages $_pages_list = Arr::subvalSort($pages_array, 'sort'); - // Display view - return View::factory('box/sitemap/views/frontend/index') - ->assign('pages_list', $_pages_list) - ->assign('components', Sitemap::getComponents()) - ->render(); - } - - - /** - * Create sitemap - */ - public static function create() { - - // Get pages table - $pages = new Table('pages'); - - // Get pages list - $pages_list = $pages->select('[slug!="error404" and status="published"]'); - - // Create sitemap content - $map = ''."\n"; - $map .= ''."\n"; - foreach ($pages_list as $page) { - if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '2'; } else { $parent = ''; $priority = '1'; } - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').$parent.$page['slug'].''."\n\t\t".''.date("Y-m-d", (int)$page['date']).''."\n\t\t".'weekly'."\n\t\t".''.$priority.''."\n\t".''."\n"; - } - - // Get list of components - $components = Sitemap::getComponents(); - - // Add components to sitemap - if (count($components) > 0) { - foreach ($components as $component) { - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').Text::lowercase($component).''."\n\t\t".''.date("Y-m-d", time()).''."\n\t\t".'weekly'."\n\t\t".'1'."\n\t".''."\n"; - } - } - - // Close sitemap - $map .= ''; - - // Save sitemap - return File::setContent(ROOT . DS . 'sitemap.xml', $map); + // return + return $_pages_list; } @@ -151,7 +170,7 @@ if (count(Plugin::$components) > 0) { foreach (Plugin::$components as $component) { - if ($component !== 'pages' && $component !== 'sitemap') $components[] = ucfirst($component); + if ( ! in_array($component, Sitemap::$forbidden_components)) $components[] = Text::lowercase($component); } } diff --git a/plugins/box/sitemap/views/frontend/index.view.php b/plugins/box/sitemap/views/frontend/index.view.php index 17d751c..ba6e899 100644 --- a/plugins/box/sitemap/views/frontend/index.view.php +++ b/plugins/box/sitemap/views/frontend/index.view.php @@ -18,7 +18,7 @@ if (count($components) > 0) { if (count($pages_list) == 0) { echo ''; diff --git a/plugins/box/snippets/js/.htaccess b/plugins/box/snippets/js/.htaccess new file mode 100644 index 0000000..b9f48ac --- /dev/null +++ b/plugins/box/snippets/js/.htaccess @@ -0,0 +1,2 @@ +Options -Indexes +Allow from all \ No newline at end of file diff --git a/plugins/box/snippets/js/snippets.js b/plugins/box/snippets/js/snippets.js new file mode 100644 index 0000000..6cdf9d3 --- /dev/null +++ b/plugins/box/snippets/js/snippets.js @@ -0,0 +1,18 @@ +if (typeof $.monstra == 'undefined') $.monstra = {}; + +$.monstra.snippets = { + + init: function() { }, + + showEmbedCodes: function(name) { + $('#shortcode').html('{snippet get="'+name+'"}'); + $('#phpcode').html('<?php echo Snippet::get("'+name+'"); ?>'); + $('#embedCodes').modal(); + } + +}; + + +$(document).ready(function(){ + $.monstra.snippets.init(); +}); \ No newline at end of file diff --git a/plugins/box/snippets/languages/de.lang.php b/plugins/box/snippets/languages/de.lang.php index 36f7cf8..cf12611 100644 --- a/plugins/box/snippets/languages/de.lang.php +++ b/plugins/box/snippets/languages/de.lang.php @@ -22,5 +22,9 @@ 'Your changes to the snippet :name have been saved.' => 'Deine Änerungen für das Snippet :name wurden gespeichert.', 'Delete snippet: :snippet' => 'Lösche Snippet: :snippet', 'Required field' => 'Pflichtfeld', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/en.lang.php b/plugins/box/snippets/languages/en.lang.php index 52c96e8..d3e1ac7 100644 --- a/plugins/box/snippets/languages/en.lang.php +++ b/plugins/box/snippets/languages/en.lang.php @@ -13,7 +13,6 @@ 'Edit snippet' => 'Edit snippet', 'Save' => 'Save', 'Save and exit' => 'Save and exit', - 'This field should not be empty' => 'This field should not be empty', 'This snippet already exists' => 'This snippet already exists', 'This snippet does not exist' => 'This snippet does not exist', 'Delete snippet: :snippet' => 'Delete snippet: :snippet', @@ -22,5 +21,9 @@ 'Your changes to the snippet :name have been saved.' => 'Your changes to the snippet :name have been saved.', 'Delete snippet: :snippet' => 'Delete snippet: :snippet', 'Required field' => 'Required field', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/it.lang.php b/plugins/box/snippets/languages/it.lang.php index 5c476d7..d04a14a 100644 --- a/plugins/box/snippets/languages/it.lang.php +++ b/plugins/box/snippets/languages/it.lang.php @@ -13,7 +13,6 @@ 'Edit snippet' => 'Modifica snippet', 'Save' => 'Salva', 'Save and exit' => 'Salva ed esci', - 'This field should not be empty' => 'Campo obbligatorio', 'This snippet already exists' => 'Tale snippet già esistente', 'This snippet does not exist' => 'Tale snippet non esiste', 'Delete snippet: :block' => 'Elimina snippet: :snippet', @@ -22,5 +21,9 @@ 'Your changes to the snippet :name have been saved.' => 'Le modifiche al snippet :name sono state salvate.', 'Delete snippet: :snippet' => 'Elimina snippet: :snippet', 'Required field' => 'Campo obbligatorio', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/lt.lang.php b/plugins/box/snippets/languages/lt.lang.php index 5e78114..0d14a8d 100644 --- a/plugins/box/snippets/languages/lt.lang.php +++ b/plugins/box/snippets/languages/lt.lang.php @@ -20,5 +20,9 @@ 'Snippet content' => 'Fragmento turinys', 'Snippet :name deleted' => 'Fragmentas :name ištrintas', 'Your changes to the snippet :name have been saved.' => 'Fragmento :name pakeitimai išsaugoti.', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', ) ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/pt-br.lang.php b/plugins/box/snippets/languages/pt-br.lang.php new file mode 100644 index 0000000..9ddddb0 --- /dev/null +++ b/plugins/box/snippets/languages/pt-br.lang.php @@ -0,0 +1,30 @@ + array( + 'Snippets' => 'Códigos', + 'Snippets manager' => 'Gerenciador de códigos', + 'Actions' => 'Ações', + 'Delete' => 'Deletar', + 'Edit' => 'Editar', + 'Name' => 'Nome', + 'Create new snippet' => 'Criar novo código', + 'New snippet' => 'Novo código', + 'Edit snippet' => 'Editar código', + 'Save' => 'Salvar', + 'Save and exit' => 'Salvar e sair', + 'This field should not be empty' => 'Este campo não pode estar vazio', + 'This snippet already exists' => 'Este código já existe', + 'This snippet does not exist' => 'Este código não existe', + 'Delete snippet: :snippet' => 'Deletar o código: :snippet', + 'Snippet content' => 'Conteúdo do código', + 'Snippet :name deleted' => 'Código :name deletado', + 'Your changes to the snippet :name have been saved.' => 'Suas alterações no código :name foram salvas', + 'Delete snippet: :snippet' => 'Deletar o código: :snippet', + 'Required field' => 'Campo requerido', + 'View Embed Code' => 'View Embed Code', + 'Embed Code' => 'Embed Code', + 'Shortcode' => 'Shortcode', + 'PHP Code' => 'PHP Code', + ) + ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/ru.lang.php b/plugins/box/snippets/languages/ru.lang.php index 709bae4..e61d0b4 100644 --- a/plugins/box/snippets/languages/ru.lang.php +++ b/plugins/box/snippets/languages/ru.lang.php @@ -13,7 +13,6 @@ 'Edit snippet' => 'Редактирование сниппета', 'Save' => 'Сохранить', 'Save and exit' => 'Сохранить и выйти', - 'This field should not be empty' => 'Это поле не должно быть пустым', 'This snippet already exists' => 'Такой сниппет уже существует', 'This snippet does not exist' => 'Такого сниппета не существует', 'Delete snippet: :block' => 'Удалить сниппет: :snippet', @@ -22,5 +21,9 @@ 'Your changes to the snippet :name have been saved.' => 'Ваши изменения к сниппету :name были сохранены.', 'Delete snippet: :snippet' => 'Удалить сниппет: :snippet', 'Required field' => 'Обязательное поле', + 'View Embed Code' => 'Код для вставки', + 'Embed Code' => 'Код для вставки', + 'Shortcode' => 'Шорткод', + 'PHP Code' => 'PHP код', ) ); \ No newline at end of file diff --git a/plugins/box/snippets/languages/uk.lang.php b/plugins/box/snippets/languages/uk.lang.php new file mode 100644 index 0000000..95d8f0e --- /dev/null +++ b/plugins/box/snippets/languages/uk.lang.php @@ -0,0 +1,29 @@ + array( + 'Snippets' => 'Сніппети', + 'Snippets manager' => 'Менеджер сніппетів', + 'Actions' => 'Дії', + 'Delete' => 'Видалити', + 'Edit' => 'Редагувати', + 'New snippet' => 'Новий сніппет', + 'Create new snippet' => 'Створити новий сніппет', + 'Name' => 'Назва', + 'Edit snippet' => 'Редагування сніппета', + 'Save' => 'Зберегти', + 'Save and exit' => 'Зберегти та вийти', + 'This snippet already exists' => 'Такий сніппет вже існує', + 'This snippet does not exist' => 'Такого сніппета не існує', + 'Delete snippet: :block' => 'Видалити сніппет: :snippet', + 'Snippet content' => 'Вміст сніппета', + 'Snippet :name deleted' => 'Сніппет :name видалено', + 'Your changes to the snippet :name have been saved.' => 'Ваші зміни до сниппету :name були збережені.', + 'Delete snippet: :snippet' => 'Видалити сніппет: :snippet', + 'Required field' => 'Обов’язкове поле', + 'View Embed Code' => 'Код для вставки', + 'Embed Code' => 'Код для вставки', + 'Shortcode' => 'Шорткод', + 'PHP Code' => 'PHP код', + ) + ); \ No newline at end of file diff --git a/plugins/box/snippets/snippets.admin.php b/plugins/box/snippets/snippets.admin.php index eb65067..c933af6 100755 --- a/plugins/box/snippets/snippets.admin.php +++ b/plugins/box/snippets/snippets.admin.php @@ -1,7 +1,11 @@ + * echo Snippet::get('snippetname'); + * echo Snippet::get('snippetname', array('message' => 'Hello World')); + * + * + * @param string $name Snippet file name + * @param string $vars Vars + * @return string */ - public static function get($name) { - return Snippet::_content(array('get' => $name)); + public static function get($name, $vars = array()) { + $vars['get'] = $name; + return Snippet::_content($vars); } /** * Returns snippet content for shortcode {snippet get="snippetname"} * - * @param array $attributes snippet filename + * + * {snippet get="snippetname"} + * {snippet get="snippetname" message="Hello World"} + * + * + * @param array $attributes Array of attributes + * @return string */ public static function _content($attributes) { - - if (isset($attributes['get'])) $name = (string)$attributes['get']; else $name = ''; - + + // Extracst attributes + extract($attributes); + + // Get snippet name + $name = (isset($get)) ? (string)$get : ''; + + // Get snippet path $snippet_path = STORAGE . DS . 'snippets' . DS . $name . '.snippet.php'; + // Get snippet content if (File::exists($snippet_path)) { + + // Turn on output buffering ob_start(); + + // Include view file include $snippet_path; - $snippet_contents = ob_get_contents(); - ob_end_clean(); - return $snippet_contents; + + // Output... + return ob_get_clean(); + } else { if (Session::exists('admin') && Session::get('admin') == true) { return __('Snippet :name is not found!', 'snippets', array(':name' => $name)); diff --git a/plugins/box/snippets/views/backend/index.view.php b/plugins/box/snippets/views/backend/index.view.php index eb7936c..41d9422 100755 --- a/plugins/box/snippets/views/backend/index.view.php +++ b/plugins/box/snippets/views/backend/index.view.php @@ -1,7 +1,7 @@


- + - + -
- 'btn btn-actions')); ?> - 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')")); - ?> + +
+
+ 'btn btn-actions')); ?> + + + 'btn btn-actions', 'onclick' => "return confirmDelete('".__('Delete snippet: :snippet', 'snippets', array(':snippet' => basename($snippet, '.snippet.php')))."')")); + ?> +
+
- \ No newline at end of file + + + \ No newline at end of file diff --git a/plugins/box/system/languages/de.lang.php b/plugins/box/system/languages/de.lang.php index 3289f97..0af5f2e 100644 --- a/plugins/box/system/languages/de.lang.php +++ b/plugins/box/system/languages/de.lang.php @@ -75,5 +75,7 @@ 'Sitemap file not writable' => 'Sitemap-Datei ist nicht beschreibbar', 'Main .htaccess file writable' => 'Haupt .htaccess-Datei ist beschreibbar', 'Main .htaccess file not writable' => 'Haupt .htaccess-Datei ist nicht beschreibbar', + 'Official Support Forum' => 'Official Support Forum', + 'Documentation' => 'Documentation', ) ); \ No newline at end of file diff --git a/plugins/box/system/languages/en.lang.php b/plugins/box/system/languages/en.lang.php index d76496e..85a69c8 100644 --- a/plugins/box/system/languages/en.lang.php +++ b/plugins/box/system/languages/en.lang.php @@ -50,6 +50,7 @@ 'Send New Password' => 'Send New Password', 'This user does not exist' => 'This user does not exist', 'Version' => 'Version', + 'Plugin does not exist' => 'Plugin does not exist', 'Install script writable' => 'Install script writable', 'Install script not writable' => 'Install script not writable', @@ -75,5 +76,7 @@ 'Sitemap file not writable' => 'Sitemap file not writable', 'Main .htaccess file writable' => 'Main .htaccess file writable', 'Main .htaccess file not writable' => 'Main .htaccess file not writable', + 'Official Support Forum' => 'Official Support Forum', + 'Documentation' => 'Documentation', ) ); \ No newline at end of file diff --git a/plugins/box/system/languages/it.lang.php b/plugins/box/system/languages/it.lang.php index f52843a..2abbc3d 100644 --- a/plugins/box/system/languages/it.lang.php +++ b/plugins/box/system/languages/it.lang.php @@ -15,8 +15,8 @@ 'Site settings' => 'Impostazioni del sito', 'System settings' => 'Impostazioni di sistema', 'Site name' => 'Nome del sito', - 'Site description' => 'Descrizione del sito', - 'Site keywords' => 'Parole chiavi del sito', + 'Site description' => 'Descrizione', + 'Site keywords' => 'Parole chiavi', 'Site slogan' => 'Slogan', 'Default page' => 'Pagina predefinita', 'Time zone' => 'Fuso orario', @@ -24,7 +24,7 @@ 'Save' => 'Salva', 'Site' => 'Sito', 'System version' => 'Versione del sistema', - 'System version ID' => 'Versione del sistema ID', + 'System version ID' => 'ID del sistema', 'GZIP' => 'Compressione GZIP', 'Debugging' => 'Debugging', 'Plugin API' => 'Plugin API', @@ -52,8 +52,8 @@ 'Version' => 'Versione', - 'Install script writable' => 'Lo script d’installazione è scrivibile', - 'Install script not writable' => 'Lo script d’installazione non è scrivibile', + 'Install script writable' => 'Script d’installazione è scrivibile', + 'Install script not writable' => 'Script d’installazione non è scrivibile', 'Directory: :dir writable' => 'Directory :dir è scrivibile', 'Directory: :dir not writable' => 'Directory :dir non è scrivibile', 'PHP Version' => 'Versione PHP', @@ -76,5 +76,7 @@ 'Sitemap file not writable' => 'Sitemap file non è scrivibile', 'Main .htaccess file writable' => 'Principale file .htaccess è scrivibile', 'Main .htaccess file not writable' => 'Principale file .htaccess non è scrivibile', + 'Official Support Forum' => 'Official Support Forum', + 'Documentation' => 'Documentation', ) ); \ No newline at end of file diff --git a/plugins/box/system/languages/lt.lang.php b/plugins/box/system/languages/lt.lang.php index 26419fd..89b0225 100644 --- a/plugins/box/system/languages/lt.lang.php +++ b/plugins/box/system/languages/lt.lang.php @@ -75,5 +75,7 @@ 'Sitemap file not writable' => 'Negalima rašyti į sitemap bylą', 'Main .htaccess file writable' => 'Galima rašyti į pagrindinę .htaccess bylą', 'Main .htaccess file not writable' => 'Negalima rašyti į pagrindinę .htaccess bylą', + 'Official Support Forum' => 'Pagalbos forumas', + 'Documentation' => 'Dokumentacija', ) ); \ No newline at end of file diff --git a/plugins/box/system/languages/pt-br.lang.php b/plugins/box/system/languages/pt-br.lang.php new file mode 100644 index 0000000..b1bb78b --- /dev/null +++ b/plugins/box/system/languages/pt-br.lang.php @@ -0,0 +1,80 @@ + array( + 'System' => 'Sistema', + 'Published a new version of the :monstra' => 'Foi publicada uma nova versão do :monstra', + 'Sitemap created' => 'Mapa do site criado', + 'Create sitemap' => 'Criar mapa do site', + 'on' => 'on', + 'off'=> 'off', + 'Site url' => 'URL do site', + 'Maintenance Mode' => 'Modo de manutenção', + 'Maintenance Mode On' => 'Modo de manutenção online', + 'Maintenance Mode Off' => 'Modo de manutenção offline', + 'Site settings' => 'Configurações do site', + 'System settings' => 'Configurações do sistema', + 'Site name' => 'Nome do site', + 'Site description' => 'Descrição do site', + 'Site keywords' => 'Keywords do site', + 'Site slogan' => 'Slogan do site', + 'Default page' => 'Página padrão', + 'Time zone' => 'Timezone padrão', + 'Language' => 'Linguagem', + 'Save' => 'Salvar', + 'Site' => 'Site', + 'System version' => 'Versão do sistema', + 'System version ID' => 'ID (longo) da versão do sistema', + 'GZIP' => 'GZIP', + 'Debugging' => 'Debugando', + 'Plugin API' => 'API do Plugin', + 'Plugins active' => 'Plugins ativos', + 'Actions registered' => 'Ações registradas', + 'Filters registered' => 'Filtros registrados', + 'logout' => 'Sair', + 'site' => 'site', + 'Core' => 'Núcleo', + 'Delete temporary files' => 'Deletar arquivo temporário', + 'Download the latest version' => 'Baixar a última versão', + 'Powered by' => 'Feito com', + 'Administration' => 'Administração', + 'Settings' => 'Configurações', + 'Temporary files deleted' => 'Arquivos temporários deletados', + 'Extends' => 'Extender', + 'View site' => 'Ver site', + 'Welcome, :username' => 'Olá, :username', + 'Reset Password' => 'Resetar senha', + '< Back to Website' => '< Voltar para o site', + 'Forgot your password? >' => 'Esqueceu sua senha? >', + 'Administration >' => 'Administração >', + 'Send New Password' => 'Enviar nova senha', + 'This user does not exist' => 'Este usuário não existe', + 'Version' => 'Versão', + 'Install script writable' => 'Script de instalação com permissões de escrita', + 'Install script not writable' => 'Script de instalação sem permissões de escrita', + 'Directory: :dir writable' => 'Diretório: :dir com permissões de escrita', + 'Directory: :dir not writable' => 'Diretório: :dir sem permissões de escrita', + 'PHP Version' => 'Versão do PHP', + 'Module DOM is installed' => 'O módulo DOM está instalado', + 'Module DOM is required' => 'O módulo DOM é necessário', + 'Module Mod Rewrite is installed' => 'O módulo mod_rewrite está instalado', + 'Module SimpleXML is installed' => 'O module SimpleXML está instalado', + 'PHP 5.2 or greater is required' => 'A versão do PHP precisa ser acima da 5.2.*', + 'Apache Mod Rewrite is required' => 'O módulo mod_rewrite do apache é requerido', + 'SimpleXML module is required' => 'o módulo SimpleXML é requerido', + 'Field "Site name" is empty' => 'O campo "Nome do site" está vazio', + 'Field "Email" is empty' => 'O campo "Email" está vazio', + 'Field "Username" is empty' => 'O campo "Usuário" está vazio', + 'Field "Password" is empty' => 'O campo "Senha" está vazio', + 'Field "Site url" is empty' => 'O campo "URL do site" está vazio', + 'Email not valid' => 'Email inválido', + 'Install' => 'Instalar', + '...Monstra says...' => '... O Monstra diz ...', + 'Sitemap file writable' => 'O arquivo \'sitemap.xml\' tem permissões de escrita', + 'Sitemap file not writable' => 'O arquivo \'sitemap.xml\' não tem permissões de escrita', + 'Main .htaccess file writable' => 'O arquivo .htaccess principal tem permissões de escrita', + 'Main .htaccess file not writable' => 'O arquivo .htacces principal não tem permissões de escrita', + 'Official Support Forum' => 'Official Support Forum', + 'Documentation' => 'Documentation', + ) + ); \ No newline at end of file diff --git a/plugins/box/system/languages/ru.lang.php b/plugins/box/system/languages/ru.lang.php index 8ad6e57..6cabd47 100644 --- a/plugins/box/system/languages/ru.lang.php +++ b/plugins/box/system/languages/ru.lang.php @@ -16,8 +16,8 @@ 'System settings' => 'Настройки системы', 'Site name' => 'Название сайта', 'Site description' => 'Описание сайта', - 'Site keywords' => 'Ключевые слова сайта', - 'Site slogan' => 'Слоган сайта', + 'Site keywords' => 'Ключевые слова', + 'Site slogan' => 'Слоган', 'Default page' => 'Страница по умолчанию', 'Time zone' => 'Временная зона', 'Language' => 'Язык', @@ -44,13 +44,13 @@ 'View site' => 'Сайт', 'Welcome, :username' => 'Добро пожаловать, :username', 'Reset Password' => 'Сброс пароля', - '< Back to Website' => '< Обратно на сайт', + '< Back to Website' => '< Вернуться на сайт', 'Forgot your password? >' => 'Забыли пароль? >', 'Administration >' => 'Администрирование >', - 'Send New Password' => 'Выслать новый пароль', - 'This user does not exist' => 'Нет такого пользователя', + 'Send New Password' => 'Отправить новый пароль', + 'This user does not exist' => 'Такого пользователя не существует', 'Version' => 'Версия', - + 'Plugin does not exist' => 'Такого плагина не существует', 'Install script writable' => 'Установочный скрипт доступен для записи', 'Install script not writable' => 'Установочный скрипт не доступен для записи', @@ -64,17 +64,19 @@ 'PHP 5.2 or greater is required' => 'PHP 5.2 или высше', 'Apache Mod Rewrite is required' => 'Требуется Apache Mod Rewrite', 'SimpleXML module is required' => 'Требуется SimpleXML модуль', - 'Field "Site name" is empty' => 'Поле "Название сайта" пустое', - 'Field "Email" is empty' => 'Поле "Емейл" пустое', - 'Field "Username" is empty' => 'Поле "Имя пользователя" пустое', - 'Field "Password" is empty' => 'Поле "Пароль" пустое', - 'Field "Site url" is empty' => 'Поле "Адрес сайта" пустое', - 'Email not valid' => 'Емейл недействительный', + 'Field "Site name" is empty' => 'Поле "Название сайта" не заполнено', + 'Field "Email" is empty' => 'Поле "Эл. почта" не заполнено', + 'Field "Username" is empty' => 'Поле "Имя пользователя" не заполнено', + 'Field "Password" is empty' => 'Поле "Пароль" не заполнено', + 'Field "Site url" is empty' => 'Поле "Адрес сайта" не заполнено', + 'Email not valid' => 'Эл. почта недействительна', 'Install' => 'Установить', '...Monstra says...' => '...Monstra говорит...', 'Sitemap file writable' => 'Карта сайта доступна для записи', 'Sitemap file not writable' => 'Карта сайта не доступна для записи', 'Main .htaccess file writable' => 'Главный .htaccess файл доступен для записи', 'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи', + 'Official Support Forum' => 'Официальный Форум Поддержки', + 'Documentation' => 'Документация', ) ); \ No newline at end of file diff --git a/plugins/box/system/languages/uk.lang.php b/plugins/box/system/languages/uk.lang.php new file mode 100644 index 0000000..97a4698 --- /dev/null +++ b/plugins/box/system/languages/uk.lang.php @@ -0,0 +1,82 @@ + array( + 'System' => 'Система', + 'Published a new version of the :monstra' => 'Опублікована нова версія :monstra', + 'Sitemap created' => 'Карта сайту створена', + 'Create sitemap' => 'Створити карту сайту', + 'on' => 'включено', + 'off'=> 'вимкнено', + 'Site url' => 'Адреса сайту', + 'Maintenance Mode' => 'Тех. обслуговування', + 'Maintenance Mode On' => 'Включити тех. обслуговування', + 'Maintenance Mode Off' => 'Включити тех. обслуговування', + 'Site settings' => 'Налаштування сайту', + 'System settings' => 'Налаштування системи', + 'Site name' => 'Назва сайту', + 'Site description' => 'Опис сайту', + 'Site keywords' => 'Ключові слова', + 'Site slogan' => 'Слоган (гасло)', + 'Default page' => 'Сторінка по умовчанню', + 'Time zone' => 'Тимчасова зона', + 'Language' => 'Мова', + 'Save' => 'Зберегти', + 'Site' => 'Сайт', + 'System version' => 'Версія системи', + 'System version ID' => 'Версія системи ID', + 'GZIP' => 'Стиснення GZIP', + 'Debugging' => 'Дебаггінг', + 'Plugin API' => 'Плагін API', + 'Plugins active' => 'Підключені плагіни', + 'Actions registered' => 'Зареєстровані екшени', + 'Filters registered' => 'Зареєстровані фітри', + 'logout' => 'вихід', + 'site' => 'Сайт', + 'Core' => 'Ядро', + 'Delete temporary files' => 'Видалити тимчасові файли', + 'Download the latest version' => 'Завантажити останню версію', + 'Powered by' => 'Працює на', + 'Administration' => 'Адміністрування', + 'Settings' => 'Налаштування', + 'Temporary files deleted' => 'Тимчасові файли видалені', + 'Extends' => 'Розширення', + 'View site' => 'Сайт', + 'Welcome, :username' => 'Ласкаво просимо, :username', + 'Reset Password' => 'Скидання пароля', + '< Back to Website' => '< Повернутися на сайт', + 'Forgot your password? >' => 'Не пам’ятаєте пароль? >', + 'Administration >' => 'Адміністрування >', + 'Send New Password' => 'Надіслати новий пароль', + 'This user does not exist' => 'Такого користувача не існує', + 'Version' => 'Версія', + 'Plugin does not exist' => 'Такого плагіна не існує', + + 'Install script writable' => 'Інсталяційний скрипт доступний для запису', + 'Install script not writable' => 'Інсталяційний скрипт не доступний для запису', + 'Directory: :dir writable' => 'Директорія :dir доступна для запису', + 'Directory: :dir not writable' => 'Директорія :dir не доступна для запису', + 'PHP Version' => 'Версія PHP', + 'Module DOM is installed' => 'Модуль DOM встановлено', + 'Module DOM is required' => 'Потрібен DOM модуль', + 'Module Mod Rewrite is installed' => 'Модуль Mod Rewrite встановлено', + 'Module SimpleXML is installed' => 'Модуль SimpleXML встановлено', + 'PHP 5.2 or greater is required' => 'PHP 5.2 або вище', + 'Apache Mod Rewrite is required' => 'Потрібен Apache Mod Rewrite', + 'SimpleXML module is required' => 'Потрібен SimpleXML модуль', + 'Field "Site name" is empty' => 'Поле "Назва сайту" не заповнено', + 'Field "Email" is empty' => 'Поле "Эл. пошта" не заповнено', + 'Field "Username" is empty' => 'Поле "Ім’я користувача" не заповнено', + 'Field "Password" is empty' => 'Поле "Пароль" не заповнено', + 'Field "Site url" is empty' => 'Поле "Адреса сайту" не заповнено', + 'Email not valid' => 'Эл. пошта недійсна', + 'Install' => 'Інсталювати', + '...Monstra says...' => '... Monstra каже ...', + 'Sitemap file writable' => 'Карта сайту доступна для запису', + 'Sitemap file not writable' => 'Карта сайту не доступна для запису', + 'Main .htaccess file writable' => 'Головний .htaccess файл - доступний для запису', + 'Main .htaccess file not writable' => 'Головний .htaccess файл - не доступний для запису', + 'Official Support Forum' => 'Офіційний Форум Підтримки', + 'Documentation' => 'Документація', + ) + ); \ No newline at end of file diff --git a/plugins/box/system/system.admin.php b/plugins/box/system/system.admin.php index 44bf110..42f809c 100755 --- a/plugins/box/system/system.admin.php +++ b/plugins/box/system/system.admin.php @@ -12,11 +12,11 @@ function checkMonstraVersion() { echo (' - '); - } - - /** * Users admin */ @@ -90,8 +76,8 @@ if ($user_login == '') $errors['users_empty_login'] = __('Required field', 'users'); if ($user_password == '') $errors['users_empty_password'] = __('Required field', 'users'); if ($user_email == '') $errors['users_empty_email'] = __('Required field', 'users'); - if ($users->select("[login='".$user_login."']")) $errors['users_this_user_alredy_exists'] = __('This user alredy exist', 'users'); - if ($users->select("[email='".$user_email."']")) $errors['users_this_email_alredy_exists'] = __('This email alredy exist', 'users'); + if ($users->select("[login='".$user_login."']")) $errors['users_this_user_already_exists'] = __('This user already exists', 'users'); + if ($users->select("[email='".$user_email."']")) $errors['users_this_email_already_exists'] = __('This email already exists', 'users'); if (count($errors) == 0) { $users->insert(array('login' => Security::safeName($user_login), diff --git a/plugins/box/users/users.plugin.php b/plugins/box/users/users.plugin.php index b34bcf8..daf9f9e 100644 --- a/plugins/box/users/users.plugin.php +++ b/plugins/box/users/users.plugin.php @@ -242,7 +242,7 @@ } Notification::set('success', __('Your changes have been saved.', 'users')); - Request::redirect(Site::url().'users/'.$user['id'].'/edit'); + Request::redirect(Site::url().'users/'.$user['id']); } } else { } @@ -393,11 +393,11 @@ Session::set('user_role', (string)$user['role']); Request::redirect(Site::url().'users/'.Session::get('user_id')); } else { - Notification::setNow('error', __('Wrong login or password', 'users')); + Notification::setNow('error', __('Wrong username or password', 'users')); } } } else { - Notification::setNow('error', __('Wrong login or password', 'users')); + Notification::setNow('error', __('Wrong username or password', 'users')); } } else { die('csrf detected!'); } @@ -416,12 +416,12 @@ */ public static function title(){ switch (Users::route()) { - case 'list': return __('Users'); break; - case 'profile': return __('Users - Profile'); break; - case 'edit': return __('Users - Edit Profile'); break; - case 'login': return __('Users - Login'); break; - case 'registration': return __('Users - Registration'); break; - case 'password-reset': return __('Users - Password Recover'); break; + case 'list': return __('Users', 'users'); break; + case 'profile': return __('Users - Profile', 'users'); break; + case 'edit': return __('Users - Edit Profile', 'users'); break; + case 'login': return __('Users - Login', 'users'); break; + case 'registration': return __('Users - Registration', 'users'); break; + case 'password-reset': return __('Users - Password Recover', 'users'); break; } } diff --git a/plugins/box/users/views/frontend/profile.view.php b/plugins/box/users/views/frontend/profile.view.php index 4800fe8..1f6c404 100644 --- a/plugins/box/users/views/frontend/profile.view.php +++ b/plugins/box/users/views/frontend/profile.view.php @@ -9,7 +9,7 @@ : : : -: +:
diff --git a/plugins/captcha/languages/pt-br.lang.php b/plugins/captcha/languages/pt-br.lang.php new file mode 100644 index 0000000..33124d6 --- /dev/null +++ b/plugins/captcha/languages/pt-br.lang.php @@ -0,0 +1,9 @@ + array( + 'Captcha' => 'Captcha', + 'Captcha plugin for Monstra' => 'Plugin de captcha para o Monstra CMS', + 'Captcha code is wrong' => 'O Captcha está errado', + ) + ); \ No newline at end of file diff --git a/plugins/captcha/languages/uk.lang.php b/plugins/captcha/languages/uk.lang.php new file mode 100644 index 0000000..c1882a0 --- /dev/null +++ b/plugins/captcha/languages/uk.lang.php @@ -0,0 +1,9 @@ + array( + 'Captcha' => 'Каптча', + 'Captcha plugin for Monstra' => 'Каптча плагін для Monstra', + 'Captcha code is wrong' => 'Код каптчі невірний', + ) + ); \ No newline at end of file diff --git a/plugins/markitup/markitup.plugin.php b/plugins/markitup/markitup.plugin.php index f7b5ffc..ea3322b 100644 --- a/plugins/markitup/markitup.plugin.php +++ b/plugins/markitup/markitup.plugin.php @@ -18,8 +18,7 @@ __('MarkItUp! universal markup jQuery editor', 'markitup'), '1.0.0', 'Awilum', - 'http://monstra.org/', - null); + 'http://monstra.org/'); // Add hooks @@ -34,7 +33,7 @@ */ public static function headers() { echo (' - + @@ -44,15 +43,7 @@ '); - echo (' - - '); + echo (''); } } \ No newline at end of file diff --git a/plugins/markitup/markitup/jquery.markitup.js b/plugins/markitup/markitup/jquery.markitup.js index ef34603..2f4eb78 100644 --- a/plugins/markitup/markitup/jquery.markitup.js +++ b/plugins/markitup/markitup/jquery.markitup.js @@ -1 +1 @@ -(function($){$.fn.markItUp=function(settings,extraSettings){var options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;options={id:"",nameSpace:"",root:"",previewInWindow:"",previewAutoRefresh:true,previewPosition:"after",previewTemplatePath:"~/templates/preview.html",previewParser:false,previewParserPath:"",previewParserVar:"data",resizeHandle:true,beforeInsert:"",afterInsert:"",onEnter:{},onShiftEnter:{},onCtrlEnter:{},onTab:{},markupSet:[{}]};$.extend(options,settings,extraSettings);if(!options.root){$("script").each(function(a,b){miuScript=$(b).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);if(miuScript!==null){options.root=miuScript[1]}})}return this.each(function(){function keyPressed(a){shiftKey=a.shiftKey;altKey=a.altKey;ctrlKey=!(a.altKey&&a.ctrlKey)?a.ctrlKey||a.metaKey:false;if(a.type==="keydown"){if(ctrlKey===true){li=$('a[accesskey="'+String.fromCharCode(a.keyCode)+'"]',header).parent("li");if(li.length!==0){ctrlKey=false;setTimeout(function(){li.triggerHandler("mouseup")},1);return false}}if(a.keyCode===13||a.keyCode===10){if(ctrlKey===true){ctrlKey=false;markup(options.onCtrlEnter);return options.onCtrlEnter.keepDefault}else if(shiftKey===true){shiftKey=false;markup(options.onShiftEnter);return options.onShiftEnter.keepDefault}else{markup(options.onEnter);return options.onEnter.keepDefault}}if(a.keyCode===9){if(shiftKey==true||ctrlKey==true||altKey==true){return false}if(caretOffset!==-1){get();caretOffset=$$.val().length-caretOffset;set(caretOffset,0);caretOffset=-1;return false}else{markup(options.onTab);return options.onTab.keepDefault}}}}function writeInPreview(a){if(previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(b){sp=0}previewWindow.document.open();previewWindow.document.write(a);previewWindow.document.close();previewWindow.document.documentElement.scrollTop=sp}}function renderPreview(){var a;if(options.previewParser&&typeof options.previewParser==="function"){var b=options.previewParser($$.val());writeInPreview(localize(b,1))}else if(options.previewParserPath!==""){$.ajax({type:"POST",dataType:"text",global:false,url:options.previewParserPath,data:options.previewParserVar+"="+encodeURIComponent($$.val()),success:function(a){writeInPreview(localize(a,1))}})}else{if(!template){$.ajax({url:options.previewTemplatePath,dataType:"text",global:false,success:function(a){writeInPreview(localize(a,1).replace(//g,$$.val()))}})}}return false}function refreshPreview(){renderPreview()}function preview(){if(!previewWindow||previewWindow.closed){if(options.previewInWindow){previewWindow=window.open("","preview",options.previewInWindow);$(window).unload(function(){previewWindow.close()})}else{iFrame=$('');if(options.previewPosition=="after"){iFrame.insertAfter(footer)}else{iFrame.insertBefore(header)}previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]}}else if(altKey===true){if(iFrame){iFrame.remove()}else{previewWindow.close()}previewWindow=iFrame=false}if(!options.previewAutoRefresh){refreshPreview()}if(options.previewInWindow){previewWindow.focus()}}function get(){textarea.focus();scrollPosition=textarea.scrollTop;if(document.selection){selection=document.selection.createRange().text;if($.browser.msie){var a=document.selection.createRange(),b=a.duplicate();b.moveToElementText(textarea);caretPosition=-1;while(b.inRange(a)){b.moveStart("character");caretPosition++}}else{caretPosition=textarea.selectionStart}}else{caretPosition=textarea.selectionStart;selection=textarea.value.substring(caretPosition,textarea.selectionEnd)}return selection}function set(a,b){if(textarea.createTextRange){if($.browser.opera&&$.browser.version>=9.5&&b==0){return false}range=textarea.createTextRange();range.collapse(true);range.moveStart("character",a);range.moveEnd("character",b);range.select()}else if(textarea.setSelectionRange){textarea.setSelectionRange(a,a+b)}textarea.scrollTop=scrollPosition;textarea.focus()}function insert(a){if(document.selection){var b=document.selection.createRange();b.text=a}else{textarea.value=textarea.value.substring(0,caretPosition)+a+textarea.value.substring(caretPosition+selection.length,textarea.value.length)}}function fixIeBug(a){if($.browser.msie){return a.length-a.replace(/\r*/g,"").length}return 0}function fixOperaBug(a){if($.browser.opera){return a.length-a.replace(/\n*/g,"").length}return 0}function markup(a){var b,c,d,e;hash=clicked=a;get();$.extend(hash,{line:"",root:options.root,textarea:textarea,selection:selection||"",caretPosition:caretPosition,ctrlKey:ctrlKey,shiftKey:shiftKey,altKey:altKey});prepare(options.beforeInsert);prepare(clicked.beforeInsert);if(ctrlKey===true&&shiftKey===true||a.multiline===true){prepare(clicked.beforeMultiInsert)}$.extend(hash,{line:1});if(ctrlKey===true&&shiftKey===true){lines=selection.split(/\r?\n/);for(c=0,d=lines.length,e=0;e"),i=0;$("li:hover > ul",ul).css("display","block");$.each(markupSet,function(){var button=this,t="",title,li,j;title=button.key?(button.name||"")+" [Ctrl+"+button.key+"]":button.name||"";key=button.key?'accesskey="'+button.key+'"':"";if(button.separator){li=$('
  • '+(button.separator||"")+"
  • ").appendTo(ul)}else{i++;for(j=levels.length-1;j>=0;j--){t+=levels[j]+"-"}li=$('
  • '+(button.name||"")+"
  • ").bind("contextmenu",function(){return false}).click(function(){return false}).bind("focusin",function(){$$.focus()}).mouseup(function(){if(button.call){eval(button.call)()}setTimeout(function(){markup(button)},1);return false}).hover(function(){$("> ul",this).show();$(document).one("click",function(){$("ul ul",header).hide()})},function(){$("> ul",this).hide()}).appendTo(ul);if(button.dropMenu){levels.push(i);$(li).addClass("markItUpDropMenu").append(dropMenus(button.dropMenu))}}});levels.pop();return ul}function init(){id="";nameSpace="";if(options.id){id='id="'+options.id+'"'}else if($$.attr("id")){id='id="markItUp'+$$.attr("id").substr(0,1).toUpperCase()+$$.attr("id").substr(1)+'"'}if(options.nameSpace){nameSpace='class="'+options.nameSpace+'"'}$$.wrap("
    ");$$.wrap("
    ');$$.wrap('
    ');$$.addClass("markItUpEditor");header=$('
    ').insertBefore($$);$(dropMenus(options.markupSet)).appendTo(header);footer=$('
    ').insertAfter($$);if(options.resizeHandle===true&&$.browser.safari!==true){resizeHandle=$('
    ').insertAfter($$).bind("mousedown",function(a){var b=$$.height(),c=a.clientY,d,e;d=function(a){$$.css("height",Math.max(20,a.clientY+b-c)+"px");return false};e=function(a){$("html").unbind("mousemove",d).unbind("mouseup",e);return false};$("html").bind("mousemove",d).bind("mouseup",e)});footer.append(resizeHandle)}$$.keydown(keyPressed).keyup(keyPressed);$$.bind("insertion",function(a,b){if(b.target!==false){get()}if(textarea===$.markItUp.focused){markup(b)}});$$.focus(function(){$.markItUp.focused=this})}function localize(a,b){if(b){return a.replace(/("|')~\//g,"$1"+options.root)}return a.replace(/^~\//,options.root)}var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;$$=$(this);textarea=this;levels=[];abort=false;scrollPosition=caretPosition=0;caretOffset=-1;options.previewParserPath=localize(options.previewParserPath);options.previewTemplatePath=localize(options.previewTemplatePath);init()})};$.fn.markItUpRemove=function(){return this.each(function(){var a=$(this).unbind().removeClass("markItUpEditor");a.parent("div").parent("div.markItUp").parent("div").replaceWith(a)})};$.markItUp=function(a){var b={target:false};$.extend(b,a);if(b.target){return $(b.target).each(function(){$(this).focus();$(this).trigger("insertion",[b])})}else{$("textarea").trigger("insertion",[b])}}})(jQuery) \ No newline at end of file +(function($){$.fn.markItUp=function(settings,extraSettings){var method,params,options,ctrlKey,shiftKey,altKey;ctrlKey=shiftKey=altKey=false;if(typeof settings=="string"){method=settings;params=extraSettings}options={id:"",nameSpace:"",root:"",previewHandler:false,previewInWindow:"",previewInElement:"",previewAutoRefresh:true,previewPosition:"after",previewTemplatePath:"~/templates/preview.html",previewParser:false,previewParserPath:"",previewParserVar:"data",resizeHandle:true,beforeInsert:"",afterInsert:"",onEnter:{},onShiftEnter:{},onCtrlEnter:{},onTab:{},markupSet:[{}]};$.extend(options,settings,extraSettings);if(!options.root){$("script").each(function(e,t){miuScript=$(t).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/);if(miuScript!==null){options.root=miuScript[1]}})}return this.each(function(){function localize(e,t){if(t){return e.replace(/("|')~\//g,"$1"+options.root)}return e.replace(/^~\//,options.root)}function init(){id="";nameSpace="";if(options.id){id='id="'+options.id+'"'}else if($$.attr("id")){id='id="markItUp'+$$.attr("id").substr(0,1).toUpperCase()+$$.attr("id").substr(1)+'"'}if(options.nameSpace){nameSpace='class="'+options.nameSpace+'"'}$$.wrap("
    ");$$.wrap("
    ');$$.wrap('
    ');$$.addClass("markItUpEditor");header=$('
    ').insertBefore($$);$(dropMenus(options.markupSet)).appendTo(header);footer=$('
    ').insertAfter($$);if(options.resizeHandle===true&&$.browser.safari!==true){resizeHandle=$('
    ').insertAfter($$).bind("mousedown.markItUp",function(e){var t=$$.height(),n=e.clientY,r,i;r=function(e){$$.css("height",Math.max(20,e.clientY+t-n)+"px");return false};i=function(e){$("html").unbind("mousemove.markItUp",r).unbind("mouseup.markItUp",i);return false};$("html").bind("mousemove.markItUp",r).bind("mouseup.markItUp",i)});footer.append(resizeHandle)}$$.bind("keydown.markItUp",keyPressed).bind("keyup",keyPressed);$$.bind("insertion.markItUp",function(e,t){if(t.target!==false){get()}if(textarea===$.markItUp.focused){markup(t)}});$$.bind("focus.markItUp",function(){$.markItUp.focused=this});if(options.previewInElement){refreshPreview()}}function dropMenus(markupSet){var ul=$("
      "),i=0;$("li:hover > ul",ul).css("display","block");$.each(markupSet,function(){var button=this,t="",title,li,j;title=button.key?(button.name||"")+" [Ctrl+"+button.key+"]":button.name||"";key=button.key?'accesskey="'+button.key+'"':"";if(button.separator){li=$('
    • '+(button.separator||"")+"
    • ").appendTo(ul)}else{i++;for(j=levels.length-1;j>=0;j--){t+=levels[j]+"-"}li=$('
    • '+(button.name||"")+"
    • ").bind("contextmenu.markItUp",function(){return false}).bind("click.markItUp",function(){return false}).bind("focusin.markItUp",function(){$$.focus()}).bind("mouseup",function(){if(button.call){eval(button.call)()}setTimeout(function(){markup(button)},1);return false}).bind("mouseenter.markItUp",function(){$("> ul",this).show();$(document).one("click",function(){$("ul ul",header).hide()})}).bind("mouseleave.markItUp",function(){$("> ul",this).hide()}).appendTo(ul);if(button.dropMenu){levels.push(i);$(li).addClass("markItUpDropMenu").append(dropMenus(button.dropMenu))}}});levels.pop();return ul}function magicMarkups(e){if(e){e=e.toString();e=e.replace(/\(\!\(([\s\S]*?)\)\!\)/g,function(e,t){var n=t.split("|!|");if(altKey===true){return n[1]!==undefined?n[1]:n[0]}else{return n[1]===undefined?"":n[0]}});e=e.replace(/\[\!\[([\s\S]*?)\]\!\]/g,function(e,t){var n=t.split(":!:");if(abort===true){return false}value=prompt(n[0],n[1]?n[1]:"");if(value===null){abort=true}return value});return e}return""}function prepare(e){if($.isFunction(e)){e=e(hash)}return magicMarkups(e)}function build(e){var t=prepare(clicked.openWith);var n=prepare(clicked.placeHolder);var r=prepare(clicked.replaceWith);var i=prepare(clicked.closeWith);var s=prepare(clicked.openBlockWith);var o=prepare(clicked.closeBlockWith);var u=clicked.multiline;if(r!==""){block=t+r+i}else if(selection===""&&n!==""){block=t+n+i}else{e=e||selection;var a=[e],f=[];if(u===true){a=e.split(/\r?\n/)}for(var l=0;l=9.5&&t==0){return false}range=textarea.createTextRange();range.collapse(true);range.moveStart("character",e);range.moveEnd("character",t);range.select()}else if(textarea.setSelectionRange){textarea.setSelectionRange(e,e+t)}textarea.scrollTop=scrollPosition;textarea.focus()}function get(){textarea.focus();scrollPosition=textarea.scrollTop;if(document.selection){selection=document.selection.createRange().text;if($.browser.msie){var e=document.selection.createRange(),t=e.duplicate();t.moveToElementText(textarea);caretPosition=-1;while(t.inRange(e)){t.moveStart("character");caretPosition++}}else{caretPosition=textarea.selectionStart}}else{caretPosition=textarea.selectionStart;selection=textarea.value.substring(caretPosition,textarea.selectionEnd)}return selection}function preview(){if(typeof options.previewHandler==="function"){previewWindow=true}else if(options.previewInElement){previewWindow=$(options.previewInElement)}else if(!previewWindow||previewWindow.closed){if(options.previewInWindow){previewWindow=window.open("","preview",options.previewInWindow);$(window).unload(function(){previewWindow.close()})}else{iFrame=$('');if(options.previewPosition=="after"){iFrame.insertAfter(footer)}else{iFrame.insertBefore(header)}previewWindow=iFrame[iFrame.length-1].contentWindow||frame[iFrame.length-1]}}else if(altKey===true){if(iFrame){iFrame.remove()}else{previewWindow.close()}previewWindow=iFrame=false}if(!options.previewAutoRefresh){refreshPreview()}if(options.previewInWindow){previewWindow.focus()}}function refreshPreview(){renderPreview()}function renderPreview(){var e;if(options.previewHandler&&typeof options.previewHandler==="function"){options.previewHandler($$.val())}else if(options.previewParser&&typeof options.previewParser==="function"){var t=options.previewParser($$.val());writeInPreview(localize(t,1))}else if(options.previewParserPath!==""){$.ajax({type:"POST",dataType:"text",global:false,url:options.previewParserPath,data:options.previewParserVar+"="+encodeURIComponent($$.val()),success:function(e){writeInPreview(localize(e,1))}})}else{if(!template){$.ajax({url:options.previewTemplatePath,dataType:"text",global:false,success:function(e){writeInPreview(localize(e,1).replace(//g,$$.val()))}})}}return false}function writeInPreview(e){if(options.previewInElement){$(options.previewInElement).html(e)}else if(previewWindow&&previewWindow.document){try{sp=previewWindow.document.documentElement.scrollTop}catch(t){sp=0}previewWindow.document.open();previewWindow.document.write(e);previewWindow.document.close();previewWindow.document.documentElement.scrollTop=sp}}function keyPressed(e){shiftKey=e.shiftKey;altKey=e.altKey;ctrlKey=!(e.altKey&&e.ctrlKey)?e.ctrlKey||e.metaKey:false;if(e.type==="keydown"){if(ctrlKey===true){li=$('a[accesskey="'+(e.keyCode==13?"\\n":String.fromCharCode(e.keyCode))+'"]',header).parent("li");if(li.length!==0){ctrlKey=false;setTimeout(function(){li.triggerHandler("mouseup")},1);return false}}if(e.keyCode===13||e.keyCode===10){if(ctrlKey===true){ctrlKey=false;markup(options.onCtrlEnter);return options.onCtrlEnter.keepDefault}else if(shiftKey===true){shiftKey=false;markup(options.onShiftEnter);return options.onShiftEnter.keepDefault}else{markup(options.onEnter);return options.onEnter.keepDefault}}if(e.keyCode===9){if(shiftKey==true||ctrlKey==true||altKey==true){return false}if(caretOffset!==-1){get();caretOffset=$$.val().length-caretOffset;set(caretOffset,0);caretOffset=-1;return false}else{markup(options.onTab);return options.onTab.keepDefault}}}}function remove(){$$.unbind(".markItUp").removeClass("markItUpEditor");$$.parent("div").parent("div.markItUp").parent("div").replaceWith($$);$$.data("markItUp",null)}var $$,textarea,levels,scrollPosition,caretPosition,caretOffset,clicked,hash,header,footer,previewWindow,template,iFrame,abort;$$=$(this);textarea=this;levels=[];abort=false;scrollPosition=caretPosition=0;caretOffset=-1;options.previewParserPath=localize(options.previewParserPath);options.previewTemplatePath=localize(options.previewTemplatePath);if(method){switch(method){case"remove":remove();break;case"insert":markup(params);break;default:$.error("Method "+method+" does not exist on jQuery.markItUp")}return}init()})};$.fn.markItUpRemove=function(){return this.each(function(){$(this).markItUp("remove")})};$.markItUp=function(e){var t={target:false};$.extend(t,e);if(t.target){return $(t.target).each(function(){$(this).focus();$(this).trigger("insertion",[t])})}else{$("textarea").trigger("insertion",[t])}}})(jQuery) \ No newline at end of file diff --git a/plugins/markitup/markitup/sets/html/images/image.png b/plugins/markitup/markitup/sets/html/images/image.png deleted file mode 100644 index a428b64..0000000 Binary files a/plugins/markitup/markitup/sets/html/images/image.png and /dev/null differ diff --git a/plugins/markitup/markitup/sets/html/images/table-col.png b/plugins/markitup/markitup/sets/html/images/table-col.png deleted file mode 100644 index 054c6ac..0000000 Binary files a/plugins/markitup/markitup/sets/html/images/table-col.png and /dev/null differ diff --git a/plugins/markitup/markitup/sets/html/images/table-row.png b/plugins/markitup/markitup/sets/html/images/table-row.png deleted file mode 100644 index e834bd1..0000000 Binary files a/plugins/markitup/markitup/sets/html/images/table-row.png and /dev/null differ diff --git a/plugins/markitup/markitup/sets/html/images/table.png b/plugins/markitup/markitup/sets/html/images/table.png deleted file mode 100644 index 479ffaf..0000000 Binary files a/plugins/markitup/markitup/sets/html/images/table.png and /dev/null differ diff --git a/plugins/sandbox/languages/pt-br.lang.php b/plugins/sandbox/languages/pt-br.lang.php new file mode 100644 index 0000000..9642439 --- /dev/null +++ b/plugins/sandbox/languages/pt-br.lang.php @@ -0,0 +1,10 @@ + array( + 'Sandbox' => 'Caixa de Areia', + 'Sandbox plugin for Monstra' => 'Plugin Caixa de Areia para o Monstra CMS', + 'Sandbox template' => 'Template da caixa de areia', + 'Save' => 'Salvar', + ) + ); \ No newline at end of file diff --git a/plugins/sandbox/languages/uk.lang.php b/plugins/sandbox/languages/uk.lang.php new file mode 100644 index 0000000..ef55ee5 --- /dev/null +++ b/plugins/sandbox/languages/uk.lang.php @@ -0,0 +1,10 @@ + array( + 'Sandbox' => 'Пісочниця', + 'Sandbox plugin for Monstra' => 'Плагін пісочниця для Monstra', + 'Sandbox template' => 'Шаблон пісочниці', + 'Save' => 'Зберегти', + ) + ); \ No newline at end of file diff --git a/plugins/sandbox/sandbox.admin.php b/plugins/sandbox/sandbox.admin.php index 5ca9538..1c65a41 100644 --- a/plugins/sandbox/sandbox.admin.php +++ b/plugins/sandbox/sandbox.admin.php @@ -77,16 +77,16 @@ $_templates = Themes::getTemplates(); foreach($_templates as $template) { - $templates[] = basename($template, '.template.php'); + $templates[basename($template, '.template.php')] = basename($template, '.template.php'); } echo ( Form::open(). Form::hidden('csrf', Security::token()). - Form::label('sandbox_form_template', __('Sandbox template')). + Form::label('sandbox_form_template', __('Sandbox template', 'sandbox')). Form::select('sandbox_form_template', $templates, Option::get('sandbox_template')). Html::br(). - Form::submit('sandbox_component_save', __('Save'), array('class' => 'btn')). + Form::submit('sandbox_component_save', __('Save', 'sandbox'), array('class' => 'btn')). Form::close() ); } diff --git a/public/assets/css/bootstrap-responsive.css b/public/assets/css/bootstrap-responsive.css index 9259d26..82fa9ca 100644 --- a/public/assets/css/bootstrap-responsive.css +++ b/public/assets/css/bootstrap-responsive.css @@ -1,5 +1,5 @@ /*! - * Bootstrap Responsive v2.1.1 + * Bootstrap Responsive v2.2.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -215,6 +215,9 @@ .row-fluid [class*="span"]:first-child { margin-left: 0; } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -562,6 +565,9 @@ .row-fluid [class*="span"]:first-child { margin-left: 0; } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -814,6 +820,7 @@ margin-left: 0; } [class*="span"], + .uneditable-input[class*="span"], .row-fluid [class*="span"] { display: block; float: none; @@ -830,6 +837,9 @@ -moz-box-sizing: border-box; box-sizing: border-box; } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } .input-large, .input-xlarge, .input-xxlarge, @@ -862,8 +872,11 @@ width: auto; margin: 0; } + .modal.fade { + top: -100px; + } .modal.fade.in { - top: auto; + top: 20px; } } @@ -895,6 +908,16 @@ padding-right: 10px; padding-left: 10px; } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } .modal { top: 10px; right: 10px; @@ -979,6 +1002,10 @@ .nav-collapse .dropdown-menu a:hover { background-color: #f2f2f2; } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } .navbar-inverse .nav-collapse .nav > li > a:hover, .navbar-inverse .nav-collapse .dropdown-menu a:hover { background-color: #111111; @@ -991,7 +1018,7 @@ position: static; top: auto; left: auto; - display: block; + display: none; float: none; max-width: none; padding: 0; @@ -1005,6 +1032,9 @@ -moz-box-shadow: none; box-shadow: none; } + .nav-collapse .open > .dropdown-menu { + display: block; + } .nav-collapse .dropdown-menu:before, .nav-collapse .dropdown-menu:after { display: none; diff --git a/public/assets/css/bootstrap.css b/public/assets/css/bootstrap.css index a68e473..1b519e2 100644 --- a/public/assets/css/bootstrap.css +++ b/public/assets/css/bootstrap.css @@ -1,5 +1,5 @@ /*! - * Bootstrap v2.1.1 + * Bootstrap v2.2.1 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 @@ -75,7 +75,8 @@ img { -ms-interpolation-mode: bicubic; } -#map_canvas img { +#map_canvas img, +.google-maps img { max-width: none; } @@ -101,7 +102,7 @@ input::-moz-focus-inner { } button, -input[type="button"], +html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; @@ -355,6 +356,10 @@ a:hover { margin-left: 0; } +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; @@ -614,18 +619,34 @@ cite { color: #c09853; } +a.text-warning:hover { + color: #a47e3c; +} + .text-error { color: #b94a48; } +a.text-error:hover { + color: #953b39; +} + .text-info { color: #3a87ad; } +a.text-info:hover { + color: #2d6987; +} + .text-success { color: #468847; } +a.text-success:hover { + color: #356635; +} + h1, h2, h3, @@ -635,7 +656,7 @@ h6 { margin: 10px 0; font-family: inherit; font-weight: bold; - line-height: 1; + line-height: 20px; color: inherit; text-rendering: optimizelegibility; } @@ -651,42 +672,42 @@ h6 small { color: #999999; } -h1 { - font-size: 36px; +h1, +h2, +h3 { line-height: 40px; } +h1 { + font-size: 38.5px; +} + h2 { - font-size: 30px; - line-height: 40px; + font-size: 31.5px; } h3 { - font-size: 24px; - line-height: 40px; + font-size: 24.5px; } h4 { - font-size: 18px; - line-height: 20px; + font-size: 17.5px; } h5 { font-size: 14px; - line-height: 20px; } h6 { - font-size: 12px; - line-height: 20px; + font-size: 11.9px; } h1 small { - font-size: 24px; + font-size: 24.5px; } h2 small { - font-size: 18px; + font-size: 17.5px; } h3 small { @@ -779,7 +800,8 @@ hr { border-bottom: 1px solid #ffffff; } -abbr[title] { +abbr[title], +abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } @@ -968,13 +990,14 @@ input[type="color"], display: inline-block; height: 20px; padding: 4px 6px; - margin-bottom: 9px; + margin-bottom: 10px; font-size: 14px; line-height: 20px; color: #555555; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; } input, @@ -1128,14 +1151,14 @@ textarea::-webkit-input-placeholder { .radio, .checkbox { - min-height: 18px; - padding-left: 18px; + min-height: 20px; + padding-left: 20px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; - margin-left: -18px; + margin-left: -20px; } .controls > .radio:first-child, @@ -1302,10 +1325,16 @@ textarea.span1, clear: both; } -.controls-row [class*="span"] { +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { float: left; } +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + input[disabled], select[disabled], textarea[disabled], @@ -1540,6 +1569,17 @@ select:focus:required:invalid:focus { white-space: nowrap; } +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu { + font-size: 14px; +} + .input-append input, .input-prepend input, .input-append select, @@ -1549,11 +1589,10 @@ select:focus:required:invalid:focus { position: relative; margin-bottom: 0; *margin-left: 0; - font-size: 14px; vertical-align: top; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .input-append input:focus, @@ -1604,29 +1643,38 @@ select:focus:required:invalid:focus { .input-prepend .add-on:first-child, .input-prepend .btn:first-child { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } .input-append input, .input-append select, .input-append .uneditable-input { - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn, +.input-append select + .btn-group .btn, +.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .input-append .add-on, -.input-append .btn { +.input-append .btn, +.input-append .btn-group { margin-left: -1px; } .input-append .add-on:last-child, .input-append .btn:last-child { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; } .input-prepend.input-append input, @@ -1637,20 +1685,32 @@ select:focus:required:invalid:focus { border-radius: 0; } +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; } input.search-query { @@ -1944,7 +2004,7 @@ table { .table-bordered colgroup + tbody tr:first-child td:last-child { -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; - -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; } .table-striped tbody tr:nth-child(odd) td, @@ -1957,157 +2017,99 @@ table { background-color: #f5f5f5; } -table [class*=span], -.row-fluid table [class*=span] { +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { display: table-cell; float: none; margin-left: 0; } -.table .span1 { +.table td.span1, +.table th.span1 { float: none; width: 44px; margin-left: 0; } -.table .span2 { +.table td.span2, +.table th.span2 { float: none; width: 124px; margin-left: 0; } -.table .span3 { +.table td.span3, +.table th.span3 { float: none; width: 204px; margin-left: 0; } -.table .span4 { +.table td.span4, +.table th.span4 { float: none; width: 284px; margin-left: 0; } -.table .span5 { +.table td.span5, +.table th.span5 { float: none; width: 364px; margin-left: 0; } -.table .span6 { +.table td.span6, +.table th.span6 { float: none; width: 444px; margin-left: 0; } -.table .span7 { +.table td.span7, +.table th.span7 { float: none; width: 524px; margin-left: 0; } -.table .span8 { +.table td.span8, +.table th.span8 { float: none; width: 604px; margin-left: 0; } -.table .span9 { +.table td.span9, +.table th.span9 { float: none; width: 684px; margin-left: 0; } -.table .span10 { +.table td.span10, +.table th.span10 { float: none; width: 764px; margin-left: 0; } -.table .span11 { +.table td.span11, +.table th.span11 { float: none; width: 844px; margin-left: 0; } -.table .span12 { +.table td.span12, +.table th.span12 { float: none; width: 924px; margin-left: 0; } -.table .span13 { - float: none; - width: 1004px; - margin-left: 0; -} - -.table .span14 { - float: none; - width: 1084px; - margin-left: 0; -} - -.table .span15 { - float: none; - width: 1164px; - margin-left: 0; -} - -.table .span16 { - float: none; - width: 1244px; - margin-left: 0; -} - -.table .span17 { - float: none; - width: 1324px; - margin-left: 0; -} - -.table .span18 { - float: none; - width: 1404px; - margin-left: 0; -} - -.table .span19 { - float: none; - width: 1484px; - margin-left: 0; -} - -.table .span20 { - float: none; - width: 1564px; - margin-left: 0; -} - -.table .span21 { - float: none; - width: 1644px; - margin-left: 0; -} - -.table .span22 { - float: none; - width: 1724px; - margin-left: 0; -} - -.table .span23 { - float: none; - width: 1804px; - margin-left: 0; -} - -.table .span24 { - float: none; - width: 1884px; - margin-left: 0; -} - .table tbody tr.success td { background-color: #dff0d8; } @@ -2149,7 +2151,7 @@ table [class*=span], *margin-right: .3em; line-height: 14px; vertical-align: text-top; - background-image: url("@site_urlpublic/assets/img/glyphicons-halflings.png"); + background-image: url("../img/glyphicons-halflings.png"); background-position: 14px 14px; background-repeat: no-repeat; } @@ -2157,8 +2159,6 @@ table [class*=span], /* White icons with optional class, or on hover/active states of certain elements */ .icon-white, -.nav-tabs > .active > a > [class^="icon-"], -.nav-tabs > .active > a > [class*=" icon-"], .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], @@ -2168,7 +2168,9 @@ table [class*=span], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], -.dropdown-menu > .active > a > [class*=" icon-"] { +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"] { background-image: url("../img/glyphicons-halflings-white.png"); } @@ -2806,7 +2808,7 @@ table [class*=span], border-bottom: 1px solid #ffffff; } -.dropdown-menu a { +.dropdown-menu li > a { display: block; padding: 3px 20px; clear: both; @@ -2821,7 +2823,6 @@ table [class*=span], .dropdown-submenu:hover > a { color: #ffffff; text-decoration: none; - background-color: #0088cc; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); @@ -2829,23 +2830,22 @@ table [class*=span], background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .active > a, .dropdown-menu .active > a:hover { - color: #ffffff; + color: #333333; text-decoration: none; - background-color: #0088cc; background-color: #0081c2; - background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; outline: 0; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .disabled > a, @@ -2857,6 +2857,7 @@ table [class*=span], text-decoration: none; cursor: default; background-color: transparent; + background-image: none; } .open { @@ -2904,6 +2905,16 @@ table [class*=span], display: block; } +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + .dropdown-submenu > a:after { display: block; float: right; @@ -2922,6 +2933,18 @@ table [class*=span], border-left-color: #ffffff; } +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + .dropdown .dropdown-menu .nav-header { padding-right: 20px; padding-left: 20px; @@ -3023,7 +3046,7 @@ button.close { .btn { display: inline-block; *display: inline; - padding: 4px 14px; + padding: 4px 12px; margin-bottom: 0; *margin-left: .3em; font-size: 14px; @@ -3036,22 +3059,22 @@ button.close { cursor: pointer; background-color: #f5f5f5; *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); - background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #bbbbbb; *border: 0; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #a2a2a2; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); *zoom: 1; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); @@ -3121,32 +3144,37 @@ button.close { } .btn-large { - padding: 9px 14px; - font-size: 16px; - line-height: normal; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; } -.btn-large [class^="icon-"] { +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { margin-top: 2px; } .btn-small { - padding: 3px 9px; - font-size: 12px; - line-height: 18px; + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } -.btn-small [class^="icon-"] { +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { margin-top: 0; } .btn-mini { - padding: 2px 6px; - font-size: 11px; - line-height: 17px; + padding: 1px 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; } .btn-block { @@ -3188,16 +3216,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); - background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-primary:hover, @@ -3220,16 +3248,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #faa732; *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -webkit-linear-gradient(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); - background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-warning:hover, @@ -3252,16 +3280,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #da4f49; *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); - background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-repeat: repeat-x; border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-danger:hover, @@ -3284,16 +3312,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -webkit-linear-gradient(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(to bottom, #62c462, #51a351); - background-image: -moz-linear-gradient(top, #62c462, #51a351); background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-success:hover, @@ -3316,16 +3344,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); - background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-info:hover, @@ -3348,16 +3376,16 @@ input[type="button"].btn-block { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #363636; *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -webkit-linear-gradient(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); background-image: linear-gradient(to bottom, #444444, #222222); - background-image: -moz-linear-gradient(top, #444444, #222222); background-repeat: repeat-x; border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-inverse:hover, @@ -3437,10 +3465,13 @@ input[type="submit"].btn.btn-mini { .btn-group { position: relative; + display: inline-block; + *display: inline; *margin-left: .3em; font-size: 0; white-space: nowrap; vertical-align: middle; + *zoom: 1; } .btn-group:first-child { @@ -3457,14 +3488,6 @@ input[type="submit"].btn.btn-mini { font-size: 0; } -.btn-toolbar .btn-group { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; -} - .btn-toolbar .btn + .btn, .btn-toolbar .btn-group + .btn, .btn-toolbar .btn + .btn-group { @@ -3633,8 +3656,7 @@ input[type="submit"].btn.btn-mini { } .dropup .btn-large .caret { - border-top: 0; - border-bottom: 5px solid #000000; + border-bottom-width: 5px; } .btn-primary .caret, @@ -3807,7 +3829,8 @@ input[type="submit"].btn.btn-mini { background-color: #0088cc; } -.nav-list [class^="icon-"] { +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { margin-right: 2px; } @@ -4165,7 +4188,7 @@ input[type="submit"].btn.btn-mini { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); *zoom: 1; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); @@ -4189,6 +4212,7 @@ input[type="submit"].btn.btn-mini { .nav-collapse.collapse { height: auto; + overflow: visible; } .navbar .brand { @@ -4305,7 +4329,6 @@ input[type="submit"].btn.btn-mini { .navbar-static-top { position: static; - width: 100%; margin-bottom: 0; } @@ -4354,9 +4377,9 @@ input[type="submit"].btn.btn-mini { .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1), 0 1px 10px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } .navbar-fixed-bottom { @@ -4364,9 +4387,9 @@ input[type="submit"].btn.btn-mini { } .navbar-fixed-bottom .navbar-inner { - -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1); + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); } .navbar .nav { @@ -4426,16 +4449,16 @@ input[type="submit"].btn.btn-mini { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #ededed; *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); - background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-repeat: repeat-x; border-color: #e5e5e5 #e5e5e5 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); @@ -4572,7 +4595,7 @@ input[type="submit"].btn.btn-mini { background-image: linear-gradient(to bottom, #222222, #111111); background-repeat: repeat-x; border-color: #252525; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); } .navbar-inverse .brand, @@ -4674,16 +4697,16 @@ input[type="submit"].btn.btn-mini { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e0e0e; *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -webkit-linear-gradient(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); background-image: linear-gradient(to bottom, #151515, #040404); - background-image: -moz-linear-gradient(top, #151515, #040404); background-repeat: repeat-x; border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); - filter: progid:dximagetransform.microsoft.gradient(enabled=false); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .navbar-inverse .btn-navbar:hover, @@ -4728,7 +4751,6 @@ input[type="submit"].btn.btn-mini { } .pagination { - height: 40px; margin: 20px 0; } @@ -4737,9 +4759,9 @@ input[type="submit"].btn.btn-mini { *display: inline; margin-bottom: 0; margin-left: 0; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; *zoom: 1; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); @@ -4753,8 +4775,8 @@ input[type="submit"].btn.btn-mini { .pagination ul > li > a, .pagination ul > li > span { float: left; - padding: 0 14px; - line-height: 38px; + padding: 4px 12px; + line-height: 20px; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; @@ -4784,16 +4806,22 @@ input[type="submit"].btn.btn-mini { .pagination ul > li:first-child > a, .pagination ul > li:first-child > span { border-left-width: 1px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; } .pagination ul > li:last-child > a, .pagination ul > li:last-child > span { - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; } .pagination-centered { @@ -4804,6 +4832,68 @@ input[type="submit"].btn.btn-mini { text-align: right; } +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 1px 6px; + font-size: 10.5px; +} + .pager { margin: 20px 0; text-align: center; @@ -4826,8 +4916,8 @@ input[type="submit"].btn.btn-mini { display: inline; } -.pager a, -.pager span { +.pager li > a, +.pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; @@ -4837,44 +4927,29 @@ input[type="submit"].btn.btn-mini { border-radius: 15px; } -.pager a:hover { +.pager li > a:hover { text-decoration: none; background-color: #f5f5f5; } -.pager .next a, -.pager .next span { +.pager .next > a, +.pager .next > span { float: right; } -.pager .previous a { +.pager .previous > a, +.pager .previous > span { float: left; } -.pager .disabled a, -.pager .disabled a:hover, -.pager .disabled span { +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > span { color: #999999; cursor: default; background-color: #fff; } -.modal-open .modal .dropdown-menu { - z-index: 2050; -} - -.modal-open .modal .dropdown.open { - *z-index: 2050; -} - -.modal-open .modal .popover { - z-index: 2060; -} - -.modal-open .modal .tooltip { - z-index: 2080; -} - .modal-backdrop { position: fixed; top: 0; @@ -4902,7 +4977,6 @@ input[type="submit"].btn.btn-mini { z-index: 1050; width: 560px; margin: -250px 0 0 -280px; - overflow: auto; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); @@ -4910,6 +4984,7 @@ input[type="submit"].btn.btn-mini { -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; + outline: none; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); @@ -4989,6 +5064,10 @@ input[type="submit"].btn.btn-mini { margin-left: -1px; } +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + .tooltip { position: absolute; z-index: 1030; @@ -5096,7 +5175,7 @@ input[type="submit"].btn.btn-mini { } .popover.top { - margin-bottom: 10px; + margin-top: -10px; } .popover.right { @@ -5108,7 +5187,7 @@ input[type="submit"].btn.btn-mini { } .popover.left { - margin-right: 10px; + margin-left: -10px; } .popover-title { @@ -5272,8 +5351,47 @@ a.thumbnail:hover { color: #555555; } +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media .pull-left { + margin-right: 10px; +} + +.media .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + .label, .badge { + display: inline-block; + padding: 2px 4px; font-size: 11.844px; font-weight: bold; line-height: 14px; @@ -5285,14 +5403,14 @@ a.thumbnail:hover { } .label { - padding: 1px 4px 2px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { - padding: 1px 9px 2px; + padding-right: 9px; + padding-left: 9px; -webkit-border-radius: 9px; -moz-border-radius: 9px; border-radius: 9px; @@ -5425,7 +5543,7 @@ a.badge:hover { -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); @@ -5446,7 +5564,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(to bottom, #149bdf, #0480be); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); @@ -5495,7 +5613,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } .progress-danger.progress-striped .bar, @@ -5517,7 +5635,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(to bottom, #62c462, #57a957); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } .progress-success.progress-striped .bar, @@ -5539,7 +5657,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(to bottom, #5bc0de, #339bb9); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } .progress-info.progress-striped .bar, @@ -5561,7 +5679,7 @@ a.badge:hover { background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; - filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); } .progress-warning.progress-striped .bar, @@ -5728,6 +5846,10 @@ a.badge:hover { .hero-unit { padding: 60px; margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; background-color: #eeeeee; -webkit-border-radius: 6px; -moz-border-radius: 6px; @@ -5742,11 +5864,8 @@ a.badge:hover { color: inherit; } -.hero-unit p { - font-size: 18px; - font-weight: 200; +.hero-unit li { line-height: 30px; - color: inherit; } .pull-right { diff --git a/public/assets/img/monstra-logo-black.png b/public/assets/img/monstra-logo-black.png deleted file mode 100644 index ae4d7e2..0000000 Binary files a/public/assets/img/monstra-logo-black.png and /dev/null differ diff --git a/public/assets/img/monstra-logo.png b/public/assets/img/monstra-logo.png new file mode 100644 index 0000000..039f4aa Binary files /dev/null and b/public/assets/img/monstra-logo.png differ diff --git a/public/assets/js/bootstrap.js b/public/assets/js/bootstrap.js index f73fcb8..c753bd6 100644 --- a/public/assets/js/bootstrap.js +++ b/public/assets/js/bootstrap.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.1.1 + * bootstrap-transition.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. @@ -20,14 +20,14 @@ !function ($) { + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + $(function () { - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - $.support.transition = (function () { var transitionEnd = (function () { @@ -58,7 +58,7 @@ }) }(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.1.1 + * bootstrap-alert.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. @@ -142,12 +142,10 @@ /* ALERT DATA-API * ============== */ - $(function () { - $('body').on('click.alert.data-api', dismiss, Alert.prototype.close) - }) + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) }(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.1.1 + * bootstrap-button.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. @@ -233,16 +231,14 @@ /* BUTTON DATA-API * =============== */ - $(function () { - $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') }) }(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.1.1 + * bootstrap-carousel.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. @@ -337,9 +333,7 @@ , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this - , e = $.Event('slide', { - relatedTarget: $next[0] - }) + , e this.sliding = true @@ -347,6 +341,10 @@ $next = $next.length ? $next : this.$element.find('.item')[fallback]() + e = $.Event('slide', { + relatedTarget: $next[0] + }) + if ($next.hasClass('active')) return if ($.support.transition && this.$element.hasClass('slide')) { @@ -406,18 +404,16 @@ /* CAROUSEL DATA-API * ================= */ - $(function () { - $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) - $target.carousel(options) - e.preventDefault() - }) + $(document).on('click.carousel.data-api', '[data-slide]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() }) }(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.1.1 + * bootstrap-collapse.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. @@ -561,20 +557,18 @@ /* COLLAPSIBLE DATA-API * ==================== */ - $(function () { - $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) }) }(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.1.1 + * bootstrap-dropdown.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -675,8 +669,9 @@ } function clearMenus() { - getParent($(toggle)) - .removeClass('open') + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) } function getParent($this) { @@ -713,17 +708,14 @@ /* APPLY TO STANDARD DROPDOWN ELEMENTS * =================================== */ - $(function () { - $('html') - .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) - $('body') - .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) - .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) - }) + $(document) + .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) }(window.jQuery);/* ========================================================= - * bootstrap-modal.js v2.1.1 + * bootstrap-modal.js v2.2.1 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. @@ -773,8 +765,6 @@ if (this.isShown || e.isDefaultPrevented()) return - $('body').addClass('modal-open') - this.isShown = true this.escape() @@ -796,13 +786,12 @@ that.$element .addClass('in') .attr('aria-hidden', false) - .focus() that.enforceFocus() transition ? - that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) : - that.$element.trigger('shown') + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') }) } @@ -820,8 +809,6 @@ this.isShown = false - $('body').removeClass('modal-open') - this.escape() $(document).off('focusin.modal') @@ -891,9 +878,11 @@ this.$backdrop = $('