Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
829384a56b | |||
0cd5660141 | |||
082196378b | |||
319944db68 | |||
52f7737f5c | |||
05160b499f | |||
07f9344265 | |||
e63441531b | |||
33f3bb5652 | |||
ecb3ab5af9 | |||
8fbd4f8701 | |||
b8311078ac | |||
f8d5145af9 | |||
a7e641b499 | |||
675ecece84 | |||
f76587361b | |||
2f9e54e371 | |||
53cf534664 | |||
5567ca6856 | |||
7546e9aceb | |||
f09fd06ddc | |||
2004b8d91c |
122
README.md
122
README.md
@ -1,44 +1,122 @@
|
||||
# Component Builder (2.1.12)
|
||||
# Component Builder (2.2.5)
|
||||
|
||||
This is a [Joomla 3.x] (http://www.joomla.org/) component.
|
||||
This is a [Joomla 3.x](http://www.joomla.org/) component.
|
||||
|
||||
![Component Builder image] (https://raw.githubusercontent.com/vdm-io/Joomla-Component-Builder/master/admin/assets/images/component-300.png "The Component Builder")
|
||||

|
||||
|
||||
The Component Builder for Joomla that is highly advanced, truly able to build extremely complex components in a fraction of the time.
|
||||
The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanced, truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
> **You can purchase demo content inside Component Builder:**
|
||||
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
+ **Development Version** ([get this demo set](https://www.vdm.io/joomla-component-builder))
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.5) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
*Help View Integration*
|
||||
Once installed upgrades are quick and easy via the default Joomla upgrade area.
|
||||
|
||||
*Demo Component* see the build on [github] (https://github.com/namibia/demo-joomla-3-component)
|
||||
# Some of the Features
|
||||
|
||||
+ **Dev + Howtos Version** ([get this demo set](https://www.vdm.io/joomla-component-builder))
|
||||
+ Adding mySQL Dump to any View/Table.
|
||||
+ Grab existing Table data and build a dynamic dump.
|
||||
+ Unlimited Joomla Components.
|
||||
+ Unlimited Tables/Views.
|
||||
+ Reusing Views and Fields.
|
||||
+ Runs on Your Own Joomla Install.
|
||||
+ Add Dynamic/custom back-end views that uses Table and Chart result sets.
|
||||
+ Build data query of extreme complex nature to use in Dynamic/custom views.
|
||||
+ Highly Dynamic/custom Front-end Structures.
|
||||
+ Dynamically setup templates and layouts for Front-end design.
|
||||
+ Integration of the excellent UIKIT lib.
|
||||
+ Integration of the excellent FOOTABLE lib.
|
||||
+ All Joomla Standard Field Types (including repeatable fields).
|
||||
+ Strong Implementation of all Joomla Form Security.
|
||||
+ Load data via ajax with ease.
|
||||
+ You can add an Update Server to Components you build.
|
||||
+ Build advanced Dynamic front-end forms.
|
||||
+ Dynamic data queries from multiple tables.
|
||||
+ Place in local GIT folder, and publish to sales server.
|
||||
+ Include any amount of custom files and folders during build.
|
||||
+ Static helper class with smart methods already included.
|
||||
+ Static helper methods Can easily be added.
|
||||
+ Direct install from complier view.
|
||||
+ Integrative with native Joomla Categories and Tags.
|
||||
+ Fully Dynamic Search Friendly URL Auto Implementation.
|
||||
+ Custom scripting options all over the MVC structure.
|
||||
+ Permission implementation down to each view, item and field.
|
||||
+ Easy extendible to include other libraries.
|
||||
+ Can include SQL and visioning update link to distribute your component updates via Joomla default upgrade of components.
|
||||
+ Easy Export & Import addon to all backend-tables.
|
||||
+ Overriding ability of import concepts in all backend-tables.
|
||||
+ The Batch and Filter implementation on all backend-list views.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
*All the above*
|
||||
# Just Imagine
|
||||
|
||||
*Sermon Distributor* see the build on [github] (https://github.com/SermonDistributor/Joomla-3-Component)
|
||||
+ Your Component Back-end can be more advanced then the Joomla Article Manager.
|
||||
+ Your Code as Perfectly Unified to the strict Joomla Standards.
|
||||
+ Adding Custom Scripting almost anywhere in the MVC structure.
|
||||
+ Import and export feature to all backend-views.
|
||||
+ Batch copy and move/update feature for all backend-views.
|
||||
+ History tracking per/change made on any back-end item.
|
||||
+ Dynamic field control, to show and hide fields in amazing ways.
|
||||
+ Front-end freedom of design that allows for any library to be used.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
*Training & Help Videos* tutorials in the component included.
|
||||
# You are in Control
|
||||
|
||||
+ You can change the licensing template for your components.
|
||||
+ You can change/improve existing field types and add more.
|
||||
+ Line numbers to show where in compiler was the code build.
|
||||
+ You can improve the component since all code are open-source.
|
||||
+ Free updates for the lifetime of the project.
|
||||
+ You can dynamically add internal help structures to all component.
|
||||
+ There is no limitations on how big or how much you want to build (server limitation only).
|
||||
+ This is a complete factory kind of component that functions like a deployment hub.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
# Get Access to Video Tutorials
|
||||
|
||||
> **You can purchase more demo content for Component Builder including access to training & help video tutorials:**
|
||||
|
||||
+ Demo Component* see the build on [github](https://github.com/namibia/demo-joomla-3-component)
|
||||
+ Sermon Distributor* see the build on [github](https://github.com/SermonDistributor/Joomla-3-Component)
|
||||
+ Help View Integration*
|
||||
+ Training & Help Videos* tutorials in the component included.
|
||||
|
||||
[**GET ACCESS NOW!**](http://vdm.bz/component-builder)
|
||||
|
||||
# gitHub Support
|
||||
|
||||
Would you require more help please open and issue here on [gitHub today](https://github.com/vdm-io/Joomla-Component-Builder/issues)!
|
||||
|
||||
# WHY GIVE IT AWAY LIKE THIS?
|
||||
|
||||
> I am an Open Source Enthusiast
|
||||
> Who Support the Joomla Community
|
||||
|
||||
My idea was to almost let this tool serve as a cheat sheet to how things can be done... and with the help of other developers (more advanced then me) end up formulating the way how things not only can, but must be done to insure secure, stable, scalable and maintainable code is produced.
|
||||
|
||||
# MAKING IT BETTER!
|
||||
|
||||
Component Builder is mapped as a component in itself on my local development environment. So I am improving it like you would any other component in it. I am looking for developers with the **skill** and the **desire** to really join me... and then I will possible give them access to this, so we can all help improve this simple, yet advanced tool.
|
||||
|
||||
# Build Details
|
||||
|
||||
+ *Company*: [Vast Development Method] (https://www.vdm.io/joomla-component-builder)
|
||||
+ *Author*: [Llewellyn van der Merwe] (mailto:info@vdm.io)
|
||||
+ *Name*: [Component Builder] (https://www.vdm.io/joomla-component-builder)
|
||||
+ *Company*: [Vast Development Method](http://vdm.bz/component-builder)
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
|
||||
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 3rd June, 2016
|
||||
+ *Version*: 2.1.12
|
||||
+ *Last Build*: 22nd December, 2016
|
||||
+ *Version*: 2.2.5
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **83152**
|
||||
+ *File count*: **505**
|
||||
+ *Folder count*: **98**
|
||||
+ *Line count*: **86690**
|
||||
+ *File count*: **542**
|
||||
+ *Folder count*: **99**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder] (https://www.vdm.io/joomla-component-builder).
|
||||
> Developed by [Llewellyn van der Merwe] (mailto:joomla@vdm.io)
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
|
||||
## Donations
|
||||
|
||||
Come on buy me a coffee :)
|
||||
* PayPal: pay@vdm.io
|
||||
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3
|
122
admin/README.txt
Normal file
122
admin/README.txt
Normal file
@ -0,0 +1,122 @@
|
||||
# Component Builder (2.2.5)
|
||||
|
||||
This is a [Joomla 3.x](http://www.joomla.org/) component.
|
||||
|
||||

|
||||
|
||||
The Component Builder for [Joomla](http://www.joomla.org/) that is highly advanced, truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
Whether you're a seasoned [Joomla](http://www.joomla.org/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.2.5) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
Once installed upgrades are quick and easy via the default Joomla upgrade area.
|
||||
|
||||
# Some of the Features
|
||||
|
||||
+ Adding mySQL Dump to any View/Table.
|
||||
+ Grab existing Table data and build a dynamic dump.
|
||||
+ Unlimited Joomla Components.
|
||||
+ Unlimited Tables/Views.
|
||||
+ Reusing Views and Fields.
|
||||
+ Runs on Your Own Joomla Install.
|
||||
+ Add Dynamic/custom back-end views that uses Table and Chart result sets.
|
||||
+ Build data query of extreme complex nature to use in Dynamic/custom views.
|
||||
+ Highly Dynamic/custom Front-end Structures.
|
||||
+ Dynamically setup templates and layouts for Front-end design.
|
||||
+ Integration of the excellent UIKIT lib.
|
||||
+ Integration of the excellent FOOTABLE lib.
|
||||
+ All Joomla Standard Field Types (including repeatable fields).
|
||||
+ Strong Implementation of all Joomla Form Security.
|
||||
+ Load data via ajax with ease.
|
||||
+ You can add an Update Server to Components you build.
|
||||
+ Build advanced Dynamic front-end forms.
|
||||
+ Dynamic data queries from multiple tables.
|
||||
+ Place in local GIT folder, and publish to sales server.
|
||||
+ Include any amount of custom files and folders during build.
|
||||
+ Static helper class with smart methods already included.
|
||||
+ Static helper methods Can easily be added.
|
||||
+ Direct install from complier view.
|
||||
+ Integrative with native Joomla Categories and Tags.
|
||||
+ Fully Dynamic Search Friendly URL Auto Implementation.
|
||||
+ Custom scripting options all over the MVC structure.
|
||||
+ Permission implementation down to each view, item and field.
|
||||
+ Easy extendible to include other libraries.
|
||||
+ Can include SQL and visioning update link to distribute your component updates via Joomla default upgrade of components.
|
||||
+ Easy Export & Import addon to all backend-tables.
|
||||
+ Overriding ability of import concepts in all backend-tables.
|
||||
+ The Batch and Filter implementation on all backend-list views.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
# Just Imagine
|
||||
|
||||
+ Your Component Back-end can be more advanced then the Joomla Article Manager.
|
||||
+ Your Code as Perfectly Unified to the strict Joomla Standards.
|
||||
+ Adding Custom Scripting almost anywhere in the MVC structure.
|
||||
+ Import and export feature to all backend-views.
|
||||
+ Batch copy and move/update feature for all backend-views.
|
||||
+ History tracking per/change made on any back-end item.
|
||||
+ Dynamic field control, to show and hide fields in amazing ways.
|
||||
+ Front-end freedom of design that allows for any library to be used.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
# You are in Control
|
||||
|
||||
+ You can change the licensing template for your components.
|
||||
+ You can change/improve existing field types and add more.
|
||||
+ Line numbers to show where in compiler was the code build.
|
||||
+ You can improve the component since all code are open-source.
|
||||
+ Free updates for the lifetime of the project.
|
||||
+ You can dynamically add internal help structures to all component.
|
||||
+ There is no limitations on how big or how much you want to build (server limitation only).
|
||||
+ This is a complete factory kind of component that functions like a deployment hub.
|
||||
+ This and much much more are all possible with this component builder!
|
||||
|
||||
# Get Access to Video Tutorials
|
||||
|
||||
> **You can purchase more demo content for Component Builder including access to training & help video tutorials:**
|
||||
|
||||
+ Demo Component* see the build on [github](https://github.com/namibia/demo-joomla-3-component)
|
||||
+ Sermon Distributor* see the build on [github](https://github.com/SermonDistributor/Joomla-3-Component)
|
||||
+ Help View Integration*
|
||||
+ Training & Help Videos* tutorials in the component included.
|
||||
|
||||
[**GET ACCESS NOW!**](http://vdm.bz/component-builder)
|
||||
|
||||
# gitHub Support
|
||||
|
||||
Would you require more help please open and issue here on [gitHub today](https://github.com/vdm-io/Joomla-Component-Builder/issues)!
|
||||
|
||||
# WHY GIVE IT AWAY LIKE THIS?
|
||||
|
||||
> I am an Open Source Enthusiast
|
||||
> Who Support the Joomla Community
|
||||
|
||||
My idea was to almost let this tool serve as a cheat sheet to how things can be done... and with the help of other developers (more advanced then me) end up formulating the way how things not only can, but must be done to insure secure, stable, scalable and maintainable code is produced.
|
||||
|
||||
# MAKING IT BETTER!
|
||||
|
||||
Component Builder is mapped as a component in itself on my local development environment. So I am improving it like you would any other component in it. I am looking for developers with the **skill** and the **desire** to really join me... and then I will possible give them access to this, so we can all help improve this simple, yet advanced tool.
|
||||
|
||||
# Build Details
|
||||
|
||||
+ *Company*: [Vast Development Method](http://vdm.bz/component-builder)
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:info@vdm.io)
|
||||
+ *Name*: [Component Builder](http://vdm.bz/component-builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 22nd December, 2016
|
||||
+ *Version*: 2.2.5
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **86690**
|
||||
+ *File count*: **542**
|
||||
+ *Folder count*: **99**
|
||||
|
||||
> This **component** was build with a Joomla [Automated Component Builder](http://vdm.bz/component-builder).
|
||||
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||
|
||||
## Donations
|
||||
|
||||
Come on buy me a coffee :)
|
||||
* PayPal: pay@vdm.io
|
||||
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_view.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_views.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage component.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage components.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_view.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_views.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dashboard.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_get.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_gets.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage field.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fields.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtype.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtypes.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_document.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_documents.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layout.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layouts.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_view.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_views.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippet.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippets.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage template.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage templates.css
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
BIN
admin/assets/images/component-300.jpg
Normal file
BIN
admin/assets/images/component-300.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 126 KiB |
@ -33,7 +33,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
* ###Component### component helper.
|
||||
*/
|
||||
abstract class ###Component###Helper
|
||||
{###ADMIN_GLOBAL_EVENT_HELPER### ###CUSTOM_HELPER_SCRIPT###
|
||||
{###ADMIN_GLOBAL_EVENT_HELPER### ###CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
**/
|
||||
@ -102,9 +102,15 @@ abstract class ###Component###Helper
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select($db->quoteName(array($what)));
|
||||
$query->from($db->quoteName('#__'.$main.'_'.$table));
|
||||
if (empty($table))
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main.'_'.$table));
|
||||
}
|
||||
if (is_numeric($where))
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);
|
||||
@ -259,7 +265,7 @@ abstract class ###Component###Helper
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_###component###.'.$view.'.' . (int) $record->id);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission) // TODO removed && !is_null($permission)
|
||||
{
|
||||
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
|
||||
{
|
||||
@ -480,7 +486,7 @@ abstract class ###Component###Helper
|
||||
|
||||
if (!$asset->check() || !$asset->store())
|
||||
{
|
||||
JError::raiseWarning(500, $asset->getError());
|
||||
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -594,10 +600,22 @@ abstract class ###Component###Helper
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function checkArray($array)
|
||||
public static function checkArray($array, $removeEmptyString = false)
|
||||
{
|
||||
if (isset($array) && is_array($array) && count($array) > 0)
|
||||
{
|
||||
// also make sure the empty strings are removed
|
||||
if ($removeEmptyString)
|
||||
{
|
||||
foreach ($array as $key => $string)
|
||||
{
|
||||
if (empty($string))
|
||||
{
|
||||
unset($array[$key]);
|
||||
}
|
||||
}
|
||||
return self::checkArray($array, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -234,13 +234,13 @@ abstract class ###Component###Email
|
||||
$numReplyTo = count($mailreply);
|
||||
for ($i=0; $i < $numReplyTo; $i++)
|
||||
{
|
||||
$mail->addReplyTo( array($mailreply[$i], $replyname[$i]) );
|
||||
$mail->addReplyTo($mailreply[$i], $replyname[$i]);
|
||||
}
|
||||
}
|
||||
elseif (!empty($mailreply))
|
||||
{
|
||||
$mail->ClearReplyTos();
|
||||
$mail->addReplyTo( array( $mailreply, $replyname ) );
|
||||
$mail->addReplyTo($mailreply, $replyname);
|
||||
}
|
||||
|
||||
// check if we can add the DKIM to email
|
||||
@ -268,6 +268,12 @@ abstract class ###Component###Email
|
||||
@unlink($tmp);
|
||||
}
|
||||
|
||||
if (method_exists('###Component###Helper','storeMessage'))
|
||||
{
|
||||
// store the massage if the method is set
|
||||
###Component###Helper::storeMessage($sendmail, $recipient, $subject, $body, $textonly, $mode, 'email');
|
||||
}
|
||||
|
||||
return $sendmail;
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
* ###Component### component helper
|
||||
*/
|
||||
abstract class ###Component###Helper
|
||||
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT###
|
||||
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
@ -171,7 +171,7 @@ abstract class ###Component###Helper
|
||||
|
||||
if (!$asset->check() || !$asset->store())
|
||||
{
|
||||
JError::raiseWarning(500, $asset->getError());
|
||||
JFactory::getApplication()->enqueueMessage($asset->getError(), 'warning');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -276,9 +276,15 @@ abstract class ###Component###Helper
|
||||
$db = JFactory::getDbo();
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select($db->quoteName(array($what)));
|
||||
$query->from($db->quoteName('#__'.$main.'_'.$table));
|
||||
$query->select($db->quoteName(array($what)));
|
||||
if (empty($table))
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main));
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->from($db->quoteName('#__'.$main.'_'.$table));
|
||||
}
|
||||
if (is_numeric($where))
|
||||
{
|
||||
$query->where($db->quoteName($whereString) . ' '.$operator.' '.(int) $where);
|
||||
@ -402,7 +408,7 @@ abstract class ###Component###Helper
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise($action->name, 'com_###component###.'.$view.'.' . (int) $record->id);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission) // TODO removed && !is_null($permission)
|
||||
{
|
||||
if ($action->name == 'core.edit' || $action->name == $view.'.edit')
|
||||
{
|
||||
@ -586,10 +592,22 @@ abstract class ###Component###Helper
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function checkArray($array)
|
||||
public static function checkArray($array, $removeEmptyString = false)
|
||||
{
|
||||
if (isset($array) && is_array($array) && count($array) > 0)
|
||||
{
|
||||
// also make sure the empty strings are removed
|
||||
if ($removeEmptyString)
|
||||
{
|
||||
foreach ($array as $key => $string)
|
||||
{
|
||||
if (empty($string))
|
||||
{
|
||||
unset($array[$key]);
|
||||
}
|
||||
}
|
||||
return self::checkArray($array, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -50,7 +50,7 @@ class ###Component###Controller###View### extends JControllerForm
|
||||
{
|
||||
$this->view_list = '###Views###'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
|
@ -63,9 +63,9 @@ class ###Component###ControllerAjax extends JControllerLegacy
|
||||
}
|
||||
else
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode(false).");";
|
||||
echo $callback."(".json_encode(false).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -63,9 +63,9 @@ class ###Component###ControllerAjax extends JControllerLegacy
|
||||
}
|
||||
else
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode(false).");";
|
||||
echo $callback."(".json_encode(false).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
public function getTable($type = '###view###', $prefix = '###Component###Table', $config = array())
|
||||
{
|
||||
return JTable::getInstance($type, $prefix, $config);
|
||||
}
|
||||
}###ADMIN_CUSTOM_BUTTONS_METHOD###
|
||||
|
||||
/**
|
||||
* Method to get a single record.
|
||||
@ -181,7 +181,7 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function prepareTable($table)
|
||||
{
|
||||
{###LICENSE_TABLE_LOCKED_CHECK###
|
||||
$date = JFactory::getDate();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
@ -267,6 +267,26 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to change the published state of one or more records.
|
||||
*
|
||||
* @param array &$pks A list of the primary keys to change.
|
||||
* @param integer $value The value of the published state.
|
||||
*
|
||||
* @return boolean True on success.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function publish(&$pks, $value = 1)
|
||||
{###JMODELADMIN_BEFORE_PUBLISH###
|
||||
if (!parent::publish($pks, $value))
|
||||
{
|
||||
return false;
|
||||
}###JMODELADMIN_AFTER_PUBLISH###
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to perform batch operations on an item or a set of items.
|
||||
|
@ -181,7 +181,7 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function prepareTable($table)
|
||||
{
|
||||
{###LICENSE_TABLE_LOCKED_CHECK###
|
||||
$date = JFactory::getDate();
|
||||
$user = JFactory::getUser();
|
||||
|
||||
|
@ -97,9 +97,10 @@ class ###Component###Model###SView### extends JModelItem
|
||||
// check if this user has permission to access item
|
||||
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
|
||||
{
|
||||
JError::raiseWarning(500, JText::_('Not authorised!'));
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct (TODO for now we go to default view)
|
||||
JFactory::getApplication()->redirect('index.php?option=com_###component###');
|
||||
$app->redirect('index.php?option=com_###component###');
|
||||
return false;
|
||||
}
|
||||
$this->userId = $this->user->get('id');
|
||||
@ -126,7 +127,7 @@ class ###Component###Model###SView### extends JModelItem
|
||||
if ($e->getCode() == 404)
|
||||
{
|
||||
// Need to go thru the error handler to allow Redirect to work.
|
||||
JError::raiseError(404, $e->getMessage());
|
||||
JError::raiseWaring(404, $e->getMessage());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -99,9 +99,10 @@ class ###Component###Model###SView### extends JModelItem
|
||||
// check if this user has permission to access item
|
||||
if (!$this->user->authorise('site.###sview###.access', 'com_###component###'))
|
||||
{
|
||||
JError::raiseWarning(500, JText::_('Not authorised!'));
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct (TODO for now we go to default view)
|
||||
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
|
||||
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
|
||||
return false;
|
||||
}
|
||||
$this->userId = $this->user->get('id');
|
||||
@ -128,7 +129,7 @@ class ###Component###Model###SView### extends JModelItem
|
||||
if ($e->getCode() == 404)
|
||||
{
|
||||
// Need to go thru the error handler to allow Redirect to work.
|
||||
JError::raiseError(404, $e->getMessage());
|
||||
JError::raiseWaring(404, $e->getMessage());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -201,7 +201,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$input = JFactory::getApplication()->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -209,21 +210,21 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// Make sure that file uploads are enabled in php
|
||||
if (!(bool) ini_get('file_uploads'))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// If there is no uploaded file, we have a problem...
|
||||
if (!is_array($userfile))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if there was a problem uploading the file.
|
||||
if ($userfile['error'] || $userfile['size'] < 1)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -261,7 +262,8 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -269,7 +271,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// Did you give us a valid path?
|
||||
if (!file_exists($p_dir))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -279,7 +281,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// Did you give us a valid package?
|
||||
if (!$type)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
|
||||
}
|
||||
|
||||
// check the extention
|
||||
@ -290,7 +292,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
break;
|
||||
|
||||
default:
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@ -310,15 +312,16 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
|
||||
// Did you give us a URL?
|
||||
if (!$url)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -328,7 +331,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// Was the package downloaded?
|
||||
if (!$p_file)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -349,6 +352,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -362,7 +366,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
default:
|
||||
// Cleanup the import files
|
||||
$this->remove($archivename);
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$input = JFactory::getApplication()->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@ -99,21 +100,21 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
// Make sure that file uploads are enabled in php
|
||||
if (!(bool) ini_get('file_uploads'))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// If there is no uploaded file, we have a problem...
|
||||
if (!is_array($userfile))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if there was a problem uploading the file.
|
||||
if ($userfile['error'] || $userfile['size'] < 1)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -151,7 +152,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@ -159,7 +161,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
// Did you give us a valid path?
|
||||
if (!file_exists($p_dir))
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -169,7 +171,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
// Did you give us a valid package?
|
||||
if (!$type)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
|
||||
}
|
||||
|
||||
// check the extention
|
||||
@ -180,7 +182,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
break;
|
||||
|
||||
default:
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@ -200,7 +202,8 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$input = JFactory::getApplication()->input;
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
@ -208,7 +211,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
// Did you give us a URL?
|
||||
if (!$url)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -218,7 +221,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
// Was the package downloaded?
|
||||
if (!$p_file)
|
||||
{
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -239,6 +242,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
@ -252,7 +256,7 @@ class ###Component###Model###View### extends JModelLegacy
|
||||
default:
|
||||
// Cleanup the import files
|
||||
$this->remove($archivename);
|
||||
JError::raiseWarning('', JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'));
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ class ###Component###Model###Views### extends JModelList
|
||||
public function getItems()
|
||||
{###LICENSE_LOCKED_CHECK### ###CHECKINCALL###
|
||||
// load parent items
|
||||
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX### ###SELECTIONTRANSLATIONFIX###
|
||||
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX### ###SELECTIONTRANSLATIONFIX### ###GET_ITEMS_METHOD_AFTER_ALL###
|
||||
|
||||
// return items
|
||||
return $items;
|
||||
|
@ -81,9 +81,10 @@ class ###Component###Model###SViews### extends JModelList
|
||||
// check if this user has permission to access items
|
||||
if (!$user->authorise('###sviews###.access', 'com_###component###'))
|
||||
{
|
||||
JError::raiseWarning(500, JText::_('Not authorised!'));
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct (TODO for now we go to default view)
|
||||
JFactory::getApplication()->redirect('index.php?option=com_###component###');
|
||||
$app->redirect('index.php?option=com_###component###');
|
||||
return false;
|
||||
}###LICENSE_LOCKED_CHECK### ###CUSTOM_ADMIN_BEFORE_GET_ITEMS###
|
||||
// load parent items
|
||||
|
@ -81,9 +81,10 @@ class ###Component###Model###SViews### extends JModelList
|
||||
// check if this user has permission to access items
|
||||
if (!$user->authorise('site.###sview###.access', 'com_###component###'))
|
||||
{
|
||||
JError::raiseWarning(500, JText::_('Not authorised!'));
|
||||
$app = JFactory::getApplication();
|
||||
$app->enqueueMessage(JText::_('Not authorised!'), 'error');
|
||||
// redirect away if not a correct (TODO for now we go to default view)
|
||||
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
|
||||
$app->redirect(JRoute::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###'));
|
||||
return false;
|
||||
}###LICENSE_LOCKED_CHECK### ###SITE_BEFORE_GET_ITEMS###
|
||||
// load parent items
|
||||
|
1
admin/compiler/joomla_3/README.txt
Normal file
1
admin/compiler/joomla_3/README.txt
Normal file
@ -0,0 +1 @@
|
||||
###README###
|
@ -55,7 +55,8 @@ class ###Component###ControllerAjax extends JControllerLegacy
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($user->id != 0 && $token == $call_token){
|
||||
if($user->id != 0 && $token == $call_token)
|
||||
{
|
||||
$task = $this->getTask();
|
||||
switch($task){
|
||||
case 'fieldRequired':
|
||||
@ -73,26 +74,37 @@ class ###Component###ControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET)){
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
} else {
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET)){
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
} else {
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if(array_key_exists('callback',$_GET)){
|
||||
echo $_GET['callback']."(".json_encode(false).");";
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode(false).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode(false).");";
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@
|
||||
<filename>config.xml</filename>
|
||||
<filename>controller.php</filename>###ENCRYPT_FILE###
|
||||
<filename>index.html</filename>
|
||||
<filename>###component###.php</filename>
|
||||
<filename>###component###.php</filename>###EXSTRA_ADMIN_FILES###
|
||||
<folder>assets</folder>
|
||||
<folder>controllers</folder>
|
||||
<folder>helpers</folder>
|
||||
|
@ -32,7 +32,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_###component###'))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
};
|
||||
|
||||
// Load cms libraries
|
||||
|
@ -35,20 +35,9 @@ JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == '###sview###.back') {
|
||||
parent.history.back();
|
||||
return false;
|
||||
} else {
|
||||
var form = document.getElementById('adminForm');
|
||||
form.task.value = task;
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_costbenefitprojection&view=###sview###&id='.$this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
|
||||
<?php $urlId = (isset($this->item->id)) ? '&id='. (int) $this->item->id : ''; ?>
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&view=###sview###'.$urlId); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<input type="hidden" name="task" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>###CUSTOM_ADMIN_BODY###
|
||||
|
@ -32,6 +32,7 @@ defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
JHtml::_('jquery.framework');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('script', 'system/core.js', false, true);
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList)) : ?>
|
||||
|
@ -32,4 +32,5 @@ defined('_JEXEC') or die('Restricted access');###LICENSE_LOCKED_DEFINED###
|
||||
JHtml::_('jquery.framework');
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
JHtml::_('script', 'system/core.js', false, true);
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>###IMPORT_DEFAULT_VIEW_CUSTOM###
|
||||
|
@ -35,19 +35,7 @@ JHtml::_('behavior.formvalidation');
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
?>
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>
|
||||
<script type="text/javascript">
|
||||
Joomla.submitbutton = function(task) {
|
||||
if (task == '###sview###.back') {
|
||||
parent.history.back();
|
||||
return false;
|
||||
} else {
|
||||
var form = document.getElementById('adminForm');
|
||||
form.task.value = task;
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&view=###sviews###'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
<input type="hidden" name="task" value="" />###HIDDEN_INPUT_VALUES###
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
|
@ -127,16 +127,10 @@ class ###Component###Router extends JComponentRouterBase
|
||||
* @since 3.3
|
||||
*/
|
||||
public function parse(&$segments)
|
||||
{
|
||||
//var_dump($segments);
|
||||
//$app = JFactory::getApplication();
|
||||
//$menu = $app->getMenu();
|
||||
//$item = $menu->getActive();
|
||||
|
||||
{
|
||||
$count = count($segments);
|
||||
$vars = array();
|
||||
|
||||
//var_dump($item->query['view']);
|
||||
|
||||
//Handle View and Identifier
|
||||
switch($segments[0])
|
||||
{###ROUTER_PARSE_SWITCH###
|
||||
@ -145,7 +139,7 @@ class ###Component###Router extends JComponentRouterBase
|
||||
return $vars;
|
||||
}
|
||||
|
||||
protected function getVar($table, $where = null, $whereString = 'user', $what = 'id', $operator = '=', $main = '###component###')
|
||||
protected function getVar($table, $where = null, $whereString = 'user', $what = 'id', $category = false, $operator = '=', $main = '###component###')
|
||||
{
|
||||
if(!$where)
|
||||
{
|
||||
@ -157,7 +151,7 @@ class ###Component###Router extends JComponentRouterBase
|
||||
$query = $db->getQuery(true);
|
||||
|
||||
$query->select($db->quoteName(array($what)));
|
||||
if ('categories' == $table || 'category' == $table)
|
||||
if ('categories' == $table || 'category' == $table || $category)
|
||||
{
|
||||
$query->from($db->quoteName('#__categories'));
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ class com_###component###InstallerScript
|
||||
/**
|
||||
* method to install the component
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function install($parent)
|
||||
@ -81,18 +80,28 @@ class com_###component###InstallerScript
|
||||
*/
|
||||
function preflight($type, $parent)
|
||||
{
|
||||
// get application
|
||||
$app = JFactory::getApplication();
|
||||
// is redundant ...hmmm
|
||||
if ($type == 'uninstall')
|
||||
{
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
// the default for both install and update
|
||||
$jversion = new JVersion();
|
||||
if (!$jversion->isCompatible('3.4.1'))
|
||||
if (!$jversion->isCompatible('3.6.0'))
|
||||
{
|
||||
$app->enqueueMessage('Please upgrade to at least Joomla! 3.4.1 before continuing!', 'error');
|
||||
$app->enqueueMessage('Please upgrade to at least Joomla! 3.6.0 before continuing!', 'error');
|
||||
return false;
|
||||
}
|
||||
// do any updates needed
|
||||
if ($type == 'update')
|
||||
{###PREUPDATESCRIPT###
|
||||
}
|
||||
// do any install needed
|
||||
if ($type == 'install')
|
||||
{###PREINSTALLSCRIPT###
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -104,11 +113,11 @@ class com_###component###InstallerScript
|
||||
{
|
||||
// set the default component settings
|
||||
if ($type == 'install')
|
||||
{###INSTALLSCRIPT###
|
||||
{###POSTINSTALLSCRIPT###
|
||||
}
|
||||
// do any updates needed
|
||||
if ($type == 'update')
|
||||
{###UPDATESCRIPT###
|
||||
{###POSTUPDATESCRIPT###
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -193,6 +193,12 @@
|
||||
"rename": false,
|
||||
"type": "file"
|
||||
},
|
||||
"README.txt": {
|
||||
"naam":"README.txt",
|
||||
"path": "c0mp0n3nt/admin",
|
||||
"rename": false,
|
||||
"type": "file"
|
||||
},
|
||||
"README.md": {
|
||||
"naam":"README.md",
|
||||
"path": "c0mp0n3nt/",
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage componentbuilder.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -30,7 +29,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_componentbuilder'))
|
||||
{
|
||||
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
};
|
||||
|
||||
// Load cms libraries
|
||||
|
265
admin/config.xml
265
admin/config.xml
@ -85,271 +85,6 @@
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
/>
|
||||
<field type="spacer" name="spacerContributor1" hr="true" />
|
||||
<field name="contributor1"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_ONE"
|
||||
/>
|
||||
<field name="titleContributor1"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default="My Wife"
|
||||
/>
|
||||
<field name="nameContributor1"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Roline van der Merwe"
|
||||
/>
|
||||
<field name="emailContributor1"
|
||||
type="email"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="info@vdm.io"
|
||||
/>
|
||||
<field name="linkContributor1"
|
||||
type="url"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default="http://www.vdm.io/"
|
||||
/>
|
||||
<field name="useContributor1"
|
||||
type="list"
|
||||
default="2"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor1"
|
||||
type="list"
|
||||
default="3"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor2" hr="true" />
|
||||
<field name="contributor2"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TWO"
|
||||
/>
|
||||
<field name="titleContributor2"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor2"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor2"
|
||||
type="email"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor2"
|
||||
type="url"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor2"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor2"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor3" hr="true" />
|
||||
<field name="contributor3"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_THREE"
|
||||
/>
|
||||
<field name="titleContributor3"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor3"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor3"
|
||||
type="email"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor3"
|
||||
type="url"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor3"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor3"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor4" hr="true" />
|
||||
<field name="contributor4"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_FOUR"
|
||||
/>
|
||||
<field name="titleContributor4"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor4"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor4"
|
||||
type="email"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor4"
|
||||
type="url"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor4"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor4"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerContributor5" hr="true" />
|
||||
<field name="contributor5"
|
||||
type="spacer"
|
||||
class="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_FIVE"
|
||||
/>
|
||||
<field name="titleContributor5"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_TITLE_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="nameContributor5"
|
||||
type="text"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_NAME_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="emailContributor5"
|
||||
type="email"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="linkContributor5"
|
||||
type="url"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_LINK_DESC"
|
||||
size="60"
|
||||
default=""
|
||||
/>
|
||||
<field name="useContributor5"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_EMAIL</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_USE_WWW</option>
|
||||
</field>
|
||||
<field name="showContributor5"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_DESC">
|
||||
<option value="0">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_NONE</option>
|
||||
<option value="1">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_BACK</option>
|
||||
<option value="2">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_FRONT</option>
|
||||
<option value="3">COM_COMPONENTBUILDER_CONFIG_CONTRIBUTOR_SHOW_ALL</option>
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="uikit_config"
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage controller.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_view.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.admin_view.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.admin_view.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage admin_views.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage ajax.json.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -43,6 +42,8 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
JResponse::setHeader('Content-Disposition','attachment;filename="getajax.json"');
|
||||
JResponse::setHeader("Access-Control-Allow-Origin", "*");
|
||||
// load the tasks
|
||||
$this->registerTask('isNew', 'ajax');
|
||||
$this->registerTask('isRead', 'ajax');
|
||||
$this->registerTask('tableColumns', 'ajax');
|
||||
$this->registerTask('fieldSelectOptions', 'ajax');
|
||||
$this->registerTask('getImportScripts', 'ajax');
|
||||
@ -68,6 +69,82 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'isNew':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->isNew($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'isRead':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$noticeValue = $jinput->get('notice', NULL, 'STRING');
|
||||
if($noticeValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->isRead($noticeValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($result).");";
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'tableColumns':
|
||||
try
|
||||
{
|
||||
@ -81,9 +158,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -96,9 +173,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -119,9 +196,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -134,9 +211,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -157,9 +234,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -172,9 +249,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -195,9 +272,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -210,9 +287,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -233,9 +310,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -248,9 +325,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -271,9 +348,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -286,9 +363,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -310,9 +387,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -325,9 +402,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -348,9 +425,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -363,9 +440,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -388,9 +465,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -403,9 +480,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -428,9 +505,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -443,9 +520,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -466,9 +543,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
{
|
||||
$result = false;
|
||||
}
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback'] . "(".json_encode($result).");";
|
||||
echo $callback . "(".json_encode($result).");";
|
||||
}
|
||||
elseif($returnRaw)
|
||||
{
|
||||
@ -481,9 +558,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode($e).");";
|
||||
echo $callback."(".json_encode($e).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -495,9 +572,9 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
}
|
||||
else
|
||||
{
|
||||
if(array_key_exists('callback',$_GET))
|
||||
if($callback = $jinput->get('callback', null, 'CMD'))
|
||||
{
|
||||
echo $_GET['callback']."(".json_encode(false).");";
|
||||
echo $callback."(".json_encode(false).");";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage compiler.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage component.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -86,7 +85,7 @@ class ComponentbuilderControllerComponent extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.component.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.component.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage componentbuilder.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage components.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_view.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerCustom_admin_view extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.custom_admin_view.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.custom_admin_view.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage custom_admin_views.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_get.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerDynamic_get extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('dynamic_get.edit', 'com_componentbuilder.dynamic_get.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('dynamic_get.edit.own', 'com_componentbuilder.dynamic_get.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage dynamic_gets.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage field.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -118,7 +117,7 @@ class ComponentbuilderControllerField extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('field.edit', 'com_componentbuilder.field.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('field.edit.own', 'com_componentbuilder.field.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fields.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtype.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -118,7 +117,7 @@ class ComponentbuilderControllerFieldtype extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('fieldtype.edit', 'com_componentbuilder.fieldtype.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('fieldtype.edit.own', 'com_componentbuilder.fieldtype.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage fieldtypes.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_document.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerHelp_document extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('help_document.edit', 'com_componentbuilder.help_document.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('help_document.edit.own', 'com_componentbuilder.help_document.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage help_documents.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage import.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layout.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerLayout extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.layout.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.layout.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage layouts.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_view.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerSite_view extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.site_view.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.site_view.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage site_views.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippet.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerSnippet extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.snippet.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.snippet.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage snippets.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage template.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -100,7 +99,7 @@ class ComponentbuilderControllerTemplate extends JControllerForm
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_componentbuilder.template.' . (int) $recordId);
|
||||
if (!$permission && !is_null($permission))
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_componentbuilder.template.' . $recordId))
|
||||
{
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.1.12
|
||||
@build 3rd June, 2016
|
||||
@version 2.2.5
|
||||
@build 22nd December, 2016
|
||||
@created 30th April, 2015
|
||||
@package Component Builder
|
||||
@subpackage templates.php
|
||||
@author Llewellyn van der Merwe <https://www.vdm.io/joomla-component-builder>
|
||||
@my wife Roline van der Merwe <http://www.vdm.io/>
|
||||
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
|
BIN
admin/custom/ajax.gif
Normal file
BIN
admin/custom/ajax.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
216
admin/custom/base64.js
Normal file
216
admin/custom/base64.js
Normal file
@ -0,0 +1,216 @@
|
||||
/*
|
||||
Copyright (c) 2008 Fred Palmer fred.palmer_at_gmail.com
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
function StringBuffer()
|
||||
{
|
||||
this.buffer = [];
|
||||
}
|
||||
|
||||
StringBuffer.prototype.append = function append(string)
|
||||
{
|
||||
this.buffer.push(string);
|
||||
return this;
|
||||
};
|
||||
|
||||
StringBuffer.prototype.toString = function toString()
|
||||
{
|
||||
return this.buffer.join("");
|
||||
};
|
||||
|
||||
var Base64 =
|
||||
{
|
||||
codex : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
encode : function (input)
|
||||
{
|
||||
var output = new StringBuffer();
|
||||
|
||||
var enumerator = new Utf8EncodeEnumerator(input);
|
||||
while (enumerator.moveNext())
|
||||
{
|
||||
var chr1 = enumerator.current;
|
||||
|
||||
enumerator.moveNext();
|
||||
var chr2 = enumerator.current;
|
||||
|
||||
enumerator.moveNext();
|
||||
var chr3 = enumerator.current;
|
||||
|
||||
var enc1 = chr1 >> 2;
|
||||
var enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
var enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
var enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2))
|
||||
{
|
||||
enc3 = enc4 = 64;
|
||||
}
|
||||
else if (isNaN(chr3))
|
||||
{
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output.append(this.codex.charAt(enc1) + this.codex.charAt(enc2) + this.codex.charAt(enc3) + this.codex.charAt(enc4));
|
||||
}
|
||||
|
||||
return output.toString();
|
||||
},
|
||||
|
||||
decode : function (input)
|
||||
{
|
||||
var output = new StringBuffer();
|
||||
|
||||
var enumerator = new Base64DecodeEnumerator(input);
|
||||
while (enumerator.moveNext())
|
||||
{
|
||||
var charCode = enumerator.current;
|
||||
|
||||
if (charCode < 128)
|
||||
output.append(String.fromCharCode(charCode));
|
||||
else if ((charCode > 191) && (charCode < 224))
|
||||
{
|
||||
enumerator.moveNext();
|
||||
var charCode2 = enumerator.current;
|
||||
|
||||
output.append(String.fromCharCode(((charCode & 31) << 6) | (charCode2 & 63)));
|
||||
}
|
||||
else
|
||||
{
|
||||
enumerator.moveNext();
|
||||
var charCode2 = enumerator.current;
|
||||
|
||||
enumerator.moveNext();
|
||||
var charCode3 = enumerator.current;
|
||||
|
||||
output.append(String.fromCharCode(((charCode & 15) << 12) | ((charCode2 & 63) << 6) | (charCode3 & 63)));
|
||||
}
|
||||
}
|
||||
|
||||
return output.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Utf8EncodeEnumerator(input)
|
||||
{
|
||||
this._input = input;
|
||||
this._index = -1;
|
||||
this._buffer = [];
|
||||
}
|
||||
|
||||
Utf8EncodeEnumerator.prototype =
|
||||
{
|
||||
current: Number.NaN,
|
||||
|
||||
moveNext: function()
|
||||
{
|
||||
if (this._buffer.length > 0)
|
||||
{
|
||||
this.current = this._buffer.shift();
|
||||
return true;
|
||||
}
|
||||
else if (this._index >= (this._input.length - 1))
|
||||
{
|
||||
this.current = Number.NaN;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var charCode = this._input.charCodeAt(++this._index);
|
||||
|
||||
// "\r\n" -> "\n"
|
||||
//
|
||||
if ((charCode == 13) && (this._input.charCodeAt(this._index + 1) == 10))
|
||||
{
|
||||
charCode = 10;
|
||||
this._index += 2;
|
||||
}
|
||||
|
||||
if (charCode < 128)
|
||||
{
|
||||
this.current = charCode;
|
||||
}
|
||||
else if ((charCode > 127) && (charCode < 2048))
|
||||
{
|
||||
this.current = (charCode >> 6) | 192;
|
||||
this._buffer.push((charCode & 63) | 128);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.current = (charCode >> 12) | 224;
|
||||
this._buffer.push(((charCode >> 6) & 63) | 128);
|
||||
this._buffer.push((charCode & 63) | 128);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Base64DecodeEnumerator(input)
|
||||
{
|
||||
this._input = input;
|
||||
this._index = -1;
|
||||
this._buffer = [];
|
||||
}
|
||||
|
||||
Base64DecodeEnumerator.prototype =
|
||||
{
|
||||
current: 64,
|
||||
|
||||
moveNext: function()
|
||||
{
|
||||
if (this._buffer.length > 0)
|
||||
{
|
||||
this.current = this._buffer.shift();
|
||||
return true;
|
||||
}
|
||||
else if (this._index >= (this._input.length - 1))
|
||||
{
|
||||
this.current = 64;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var enc1 = Base64.codex.indexOf(this._input.charAt(++this._index));
|
||||
var enc2 = Base64.codex.indexOf(this._input.charAt(++this._index));
|
||||
var enc3 = Base64.codex.indexOf(this._input.charAt(++this._index));
|
||||
var enc4 = Base64.codex.indexOf(this._input.charAt(++this._index));
|
||||
|
||||
var chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
var chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
var chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
this.current = chr1;
|
||||
|
||||
if (enc3 != 64)
|
||||
this._buffer.push(chr2);
|
||||
|
||||
if (enc4 != 64)
|
||||
this._buffer.push(chr3);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
144
admin/custom/bootstrap-tab.js
vendored
Normal file
144
admin/custom/bootstrap-tab.js
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
/* ========================================================
|
||||
* bootstrap-tab.js v2.3.1
|
||||
* https://twitter.github.com/bootstrap/javascript.html#tabs
|
||||
* ========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ======================================================== */
|
||||
|
||||
|
||||
!function ($) {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
|
||||
/* TAB CLASS DEFINITION
|
||||
* ==================== */
|
||||
|
||||
var Tab = function (element) {
|
||||
this.element = $(element)
|
||||
}
|
||||
|
||||
Tab.prototype = {
|
||||
|
||||
constructor: Tab
|
||||
|
||||
, show: function () {
|
||||
var $this = this.element
|
||||
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
||||
, selector = $this.attr('data-target')
|
||||
, previous
|
||||
, $target
|
||||
, e
|
||||
|
||||
if (!selector) {
|
||||
selector = $this.attr('href')
|
||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||
}
|
||||
|
||||
if ( $this.parent('li').hasClass('active') ) return
|
||||
|
||||
previous = $ul.find('.active:last a')[0]
|
||||
|
||||
e = $.Event('show', {
|
||||
relatedTarget: previous
|
||||
})
|
||||
|
||||
$this.trigger(e)
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
$target = $(selector)
|
||||
|
||||
this.activate($this.parent('li'), $ul)
|
||||
this.activate($target, $target.parent(), function () {
|
||||
$this.trigger({
|
||||
type: 'shown'
|
||||
, relatedTarget: previous
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
, activate: function ( element, container, callback) {
|
||||
var $active = container.find('> .active')
|
||||
, transition = callback
|
||||
&& $.support.transition
|
||||
&& $active.hasClass('fade')
|
||||
|
||||
function next() {
|
||||
$active
|
||||
.removeClass('active')
|
||||
.find('> .dropdown-menu > .active')
|
||||
.removeClass('active')
|
||||
|
||||
element.addClass('active')
|
||||
|
||||
if (transition) {
|
||||
element[0].offsetWidth // reflow for transition
|
||||
element.addClass('in')
|
||||
} else {
|
||||
element.removeClass('fade')
|
||||
}
|
||||
|
||||
if ( element.parent('.dropdown-menu') ) {
|
||||
element.closest('li.dropdown').addClass('active')
|
||||
}
|
||||
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
transition ?
|
||||
$active.one($.support.transition.end, next) :
|
||||
next()
|
||||
|
||||
$active.removeClass('in')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* TAB PLUGIN DEFINITION
|
||||
* ===================== */
|
||||
|
||||
var old = $.fn.tab
|
||||
|
||||
$.fn.tab = function ( option ) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('tab')
|
||||
if (!data) $this.data('tab', (data = new Tab(this)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.tab.Constructor = Tab
|
||||
|
||||
|
||||
/* TAB NO CONFLICT
|
||||
* =============== */
|
||||
|
||||
$.fn.tab.noConflict = function () {
|
||||
$.fn.tab = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
/* TAB DATA-API
|
||||
* ============ */
|
||||
|
||||
$(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
7
admin/custom/bootstrap.min.js
vendored
Normal file
7
admin/custom/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
251
admin/custom/bootstrapSwitch.js
vendored
Normal file
251
admin/custom/bootstrapSwitch.js
vendored
Normal file
@ -0,0 +1,251 @@
|
||||
/* ============================================================
|
||||
* bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
|
||||
* https://www.larentis.eu/switch/
|
||||
* ============================================================
|
||||
* Licensed under the Apache License, Version 2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* ============================================================ */
|
||||
|
||||
!function ($) {
|
||||
"use strict";
|
||||
|
||||
$.fn['bootstrapSwitch'] = function (method) {
|
||||
var methods = {
|
||||
init: function () {
|
||||
return this.each(function () {
|
||||
var $element = $(this)
|
||||
, $div
|
||||
, $switchLeft
|
||||
, $switchRight
|
||||
, $label
|
||||
, myClasses = ""
|
||||
, classes = $element.attr('class')
|
||||
, color
|
||||
, moving
|
||||
, onLabel = "ON"
|
||||
, offLabel = "OFF"
|
||||
, icon = false;
|
||||
|
||||
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
|
||||
if (classes.indexOf(el) >= 0)
|
||||
myClasses = el;
|
||||
});
|
||||
|
||||
$element.addClass('has-switch');
|
||||
|
||||
if ($element.data('on') !== undefined)
|
||||
color = "switch-" + $element.data('on');
|
||||
|
||||
if ($element.data('on-label') !== undefined)
|
||||
onLabel = $element.data('on-label');
|
||||
|
||||
if ($element.data('off-label') !== undefined)
|
||||
offLabel = $element.data('off-label');
|
||||
|
||||
if ($element.data('icon') !== undefined)
|
||||
icon = $element.data('icon');
|
||||
|
||||
$switchLeft = $('<span>')
|
||||
.addClass("switch-left")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html(onLabel);
|
||||
|
||||
color = '';
|
||||
if ($element.data('off') !== undefined)
|
||||
color = "switch-" + $element.data('off');
|
||||
|
||||
$switchRight = $('<span>')
|
||||
.addClass("switch-right")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html(offLabel);
|
||||
|
||||
$label = $('<label>')
|
||||
.html(" ")
|
||||
.addClass(myClasses)
|
||||
.attr('for', $element.find('input').attr('id'));
|
||||
|
||||
if (icon) {
|
||||
$label.html('<i class="icon icon-' + icon + '"></i>');
|
||||
}
|
||||
|
||||
$div = $element.find(':checkbox').wrap($('<div>')).parent().data('animated', false);
|
||||
|
||||
if ($element.data('animated') !== false)
|
||||
$div.addClass('switch-animate').data('animated', true);
|
||||
|
||||
$div
|
||||
.append($switchLeft)
|
||||
.append($label)
|
||||
.append($switchRight);
|
||||
|
||||
$element.find('>div').addClass(
|
||||
$element.find('input').is(':checked') ? 'switch-on' : 'switch-off'
|
||||
);
|
||||
|
||||
if ($element.find('input').is(':disabled'))
|
||||
$(this).addClass('deactivate');
|
||||
|
||||
var changeStatus = function ($this) {
|
||||
$this.siblings('label').trigger('mousedown').trigger('mouseup').trigger('click');
|
||||
};
|
||||
|
||||
$element.on('keydown', function (e) {
|
||||
if (e.keyCode === 32) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
changeStatus($(e.target).find('span:first'));
|
||||
}
|
||||
});
|
||||
|
||||
$switchLeft.on('click', function (e) {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$switchRight.on('click', function (e) {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$element.find('input').on('change', function (e) {
|
||||
var $this = $(this)
|
||||
, $element = $this.parent()
|
||||
, thisState = $this.is(':checked')
|
||||
, state = $element.is('.switch-off');
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$element.css('left', '');
|
||||
|
||||
if (state === thisState) {
|
||||
|
||||
if (thisState)
|
||||
$element.removeClass('switch-off').addClass('switch-on');
|
||||
else $element.removeClass('switch-on').addClass('switch-off');
|
||||
|
||||
if ($element.data('animated') !== false)
|
||||
$element.addClass("switch-animate");
|
||||
|
||||
$element.parent().trigger('switch-change', {'el': $this, 'value': thisState})
|
||||
}
|
||||
});
|
||||
|
||||
$element.find('label').on('mousedown touchstart', function (e) {
|
||||
var $this = $(this);
|
||||
moving = false;
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.closest('div').removeClass('switch-animate');
|
||||
|
||||
if ($this.closest('.switch').is('.deactivate'))
|
||||
$this.unbind('click');
|
||||
else {
|
||||
$this.on('mousemove touchmove', function (e) {
|
||||
var $element = $(this).closest('.switch')
|
||||
, relativeX = (e.pageX || e.originalEvent.targetTouches[0].pageX) - $element.offset().left
|
||||
, percent = (relativeX / $element.width()) * 100
|
||||
, left = 25
|
||||
, right = 75;
|
||||
|
||||
moving = true;
|
||||
|
||||
if (percent < left)
|
||||
percent = left;
|
||||
else if (percent > right)
|
||||
percent = right;
|
||||
|
||||
$element.find('>div').css('left', (percent - right) + "%")
|
||||
});
|
||||
|
||||
$this.on('click touchend', function (e) {
|
||||
var $this = $(this)
|
||||
, $target = $(e.target)
|
||||
, $myCheckBox = $target.siblings('input');
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$this.unbind('mouseleave');
|
||||
|
||||
if (moving)
|
||||
$myCheckBox.prop('checked', !(parseInt($this.parent().css('left')) < -25));
|
||||
else $myCheckBox.prop("checked", !$myCheckBox.is(":checked"));
|
||||
|
||||
moving = false;
|
||||
$myCheckBox.trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseleave', function (e) {
|
||||
var $this = $(this)
|
||||
, $myCheckBox = $this.siblings('input');
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.unbind('mouseleave');
|
||||
$this.trigger('mouseup');
|
||||
|
||||
$myCheckBox.prop('checked', !(parseInt($this.parent().css('left')) < -25)).trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseup', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$(this).unbind('mousemove');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
},
|
||||
toggleActivation: function () {
|
||||
$(this).toggleClass('deactivate');
|
||||
},
|
||||
isActive: function () {
|
||||
return !$(this).hasClass('deactivate');
|
||||
},
|
||||
setActive: function (active) {
|
||||
if (active)
|
||||
$(this).removeClass('deactivate');
|
||||
else $(this).addClass('deactivate');
|
||||
},
|
||||
toggleState: function (skipOnChange) {
|
||||
var $input = $(this).find('input:checkbox');
|
||||
$input.prop('checked', !$input.is(':checked')).trigger('change', skipOnChange);
|
||||
},
|
||||
setState: function (value, skipOnChange) {
|
||||
$(this).find('input:checkbox').prop('checked', value).trigger('change', skipOnChange);
|
||||
},
|
||||
status: function () {
|
||||
return $(this).find('input:checkbox').is(':checked');
|
||||
},
|
||||
destroy: function () {
|
||||
var $div = $(this).find('div')
|
||||
, $checkbox;
|
||||
|
||||
$div.find(':not(input:checkbox)').remove();
|
||||
|
||||
$checkbox = $div.children();
|
||||
$checkbox.unwrap().unwrap();
|
||||
|
||||
$checkbox.unbind('change');
|
||||
|
||||
return $checkbox;
|
||||
}
|
||||
};
|
||||
|
||||
if (methods[method])
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
else if (typeof method === 'object' || !method)
|
||||
return methods.init.apply(this, arguments);
|
||||
else
|
||||
$.error('Method ' + method + ' does not exist!');
|
||||
};
|
||||
}(jQuery);
|
||||
|
||||
$(function () {
|
||||
$('.switch')['bootstrapSwitch']();
|
||||
});
|
1
admin/custom/custem/index.html
Normal file
1
admin/custom/custem/index.html
Normal file
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
44
admin/custom/data-generator.js
Normal file
44
admin/custom/data-generator.js
Normal file
@ -0,0 +1,44 @@
|
||||
(function(w, undefined) {
|
||||
var firstNames = ['Elodia', 'Sephnie', 'Maxine', 'Claudine', 'Londa', 'Gwyn', 'Consuelo', 'Mariko', 'Lashanda', 'Jesusa', 'Bernie', 'Annamaria', 'Muriel', 'Nikia', 'Margene', 'Lorraine', 'Annemarie', 'Rayna', 'Anonina', 'Carie', 'Gran', 'Jua', 'Jacqulyn', 'Whiney', 'Renaa', 'Usha', 'Annea', 'Jack', 'Chun', 'Eddy', 'Isidra', 'Myesha', 'Ami', 'Easer', 'Karon', 'Granville', 'Maria', 'Shenia', 'Solomon', 'Marquia', 'Charles', 'Neie', 'Beariz', 'Humbero', 'Rigobero', 'Lamon', 'Rivka', 'Phoebe', 'Renea', 'Celia', 'Shay', 'Sanford', 'Gwen', 'Lizzee', 'Lucila', 'Alice', 'Lauri', 'Desmond', 'Raeann', 'Rona', 'Jason', 'Lilian', 'Karena', 'Dennise', 'Delana', 'Rheba', 'Doy', 'Dolly', 'Venice', 'Dalene', 'Cyndy', 'Ilona', 'Lakeshia', 'Laurena', 'Lorriane', 'Kaci', 'Velve', 'Maple', 'Maire', 'Marline', 'Bar', 'Nelly', 'Shona', 'Karole', 'Judi', 'Ardelia', 'Alonzo', 'Junie', 'Alvina', 'Ilda'];
|
||||
var lastNames = ['Ortego', 'Landa', 'Piermarini', 'Valles', 'Lusher', 'Branco', 'Falls', 'Hallett', 'Nicley', 'Cambareri', 'Han', 'Edwin', 'Lan', 'Dauenhauer', 'Cerrone', 'Matsumura', 'Mosher', 'Dragoo', 'Robare', 'Judon', 'Kyger', 'Bonk', 'Mcgaughy', 'Mcfetridge', 'Maxton', 'Roling', 'Klotz', 'Boudreaux', 'Hayton', 'Leonardo', 'Schug', 'Dewitt', 'Wohlwend', 'Hoos', 'Pennock', 'Sprinkle', 'Weick', 'Gilliland', 'Resler', 'Badgett', 'Bittinger', 'Letts', 'Bottom', 'Hibler', 'Fuhrman', 'Lewis', 'Moudy', 'Goyette', 'Difranco', 'Kyles', 'Sluss', 'Bruening', 'Halladay', 'Leinen', 'Leister', 'Morgado', 'Wadkins', 'Yingst', 'Hyland', 'Carasco', 'Stever', 'Weisz', 'Woldt', 'Leak', 'Sinclair', 'Heinen', 'Furniss', 'Hosler', 'Shumpert', 'Keasler', 'Stgelais', 'Landers', 'Hogle', 'Ates', 'Vanatta', 'Goodlow', 'Haner', 'Yaple', 'Lamark', 'Cataldo', 'Smelcer', 'Marco', 'Quaranta', 'Cooke', 'Ardrey', 'Guilford', 'Polo', 'Sprouse', 'Gaffney', 'Lafromboise'];
|
||||
var jobTitles = ['Language Translator', 'Propeller-Driven Airplane Mechanic', 'Work Ticket Distributor', 'Pipe Organ Technician', 'LAN Systems Administrator', 'Employment Clerk', 'Electrical Lineworker', 'Serials Librarian', 'Technical Services Librarian', 'Blackjack Supervisor', 'Pulpwood Cutter', 'Military Science Teacher', 'Missile Pad Mechanic', 'Psychology Professor', 'Scene and Lighting Design Lecturer', 'Internet Marketing Manager', 'Business Services Sales Representative', 'Assistant Corporation Counsel', 'Photocopying Equipment Repairer', 'Post-Anesthesia Care Unit Nurse', 'Animal Husbandry Manager', 'Electrical Engineering Director', 'Drag Car Racer', 'Auto Detailer', 'Childrens Pastor', 'Strawberry Sorter', 'Geophysicist', 'Financial Accountant', 'Crown and Bridge Technician', 'Jig Bore Tool Maker', 'Union Representative', 'High School Librarian', 'High School History Teacher', 'Beveling and Edging Machine Operator', 'Roller Skater', 'Wallpaperer Helper', 'Childcare Center Administrator', 'Ordnance Engineer', 'Industrial Waste Treatment Technician', 'Airline Transport Pilot', 'Window Trimmer', 'Garment Presser', 'State Archivist', 'Die Designer', 'Ventriloquist', 'Calculus Professor', 'Technical Writer', 'Meat Packager', 'Automobile Body Painter', 'Aircraft Landing Gear Inspector', 'Fashion Designer', 'Drywall Stripper', 'Clown', 'National Association for Stock Car Auto Racing Driver', 'Staff Electronic Warfare Officer', 'Hydroelectric Machinery Mechanic', 'Clinical Services Director', 'Traffic Court Referee', 'Internal Medicine Nurse Practitioner', 'Horticulture Instructor', 'Ships Electronic Warfare Officer', 'Broadcast Maintenance Engineer', 'Weight Training Instructor', 'Potato Sorter', 'Appliance Parts Counter Clerk', 'Body Shop Supervisor', 'Accounts Collector', 'Commercial Lender', 'Scale Clerk', 'Obstetrician/Gynecologist', 'Gaming Cage Cashier', 'Fresco Artist', 'Youth Pastor', 'Parachute Officer', 'Geophysical Engineer', 'Route Sales Person', 'Master of Ceremonies', 'Cloak Room Attendant', 'Gas Main Fitter', 'Religious Activities Director', 'Hemodialysis Technician', 'Telephone Lines Repairer', 'Periodontist', 'Wood Fence Installer', 'Offbearer', 'Aviation Tactical Readiness Officer', 'Biology Laboratory Assistant', 'Emergency Room Orderly', 'Magician', 'Dog Trainer'];
|
||||
var statuses = [{ 'name': 'Active', 'value': 1 }, { 'name': 'Disabled', 'value': 2 }, { 'name': 'Suspended', 'value': 3 }];
|
||||
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
|
||||
function randomDate() {
|
||||
var start = new Date(1960, 0, 1), end = new Date(1994, 0, 1);
|
||||
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
|
||||
}
|
||||
|
||||
w.generateRows = function(rows, extraCols, return_rows) {
|
||||
rows = rows || 100;
|
||||
extraCols = extraCols || 0;
|
||||
return_rows = return_rows || false;
|
||||
var output = '';
|
||||
for (var i = 0; i < rows; i++) {
|
||||
var data = {
|
||||
firstName: firstNames[Math.floor(Math.random() * firstNames.length)],
|
||||
lastName: lastNames[Math.floor(Math.random() * lastNames.length)],
|
||||
jobTitle: jobTitles[Math.floor(Math.random() * jobTitles.length)],
|
||||
status: statuses[Math.floor(Math.random() * statuses.length)],
|
||||
dob: randomDate()
|
||||
};
|
||||
var row = '<tr>';
|
||||
//row += '<td class="expand"></td>';
|
||||
row += '<td>' + data.firstName + '</td>';
|
||||
row += '<td>' + data.lastName + '</td>';
|
||||
row += '<td>' + data.jobTitle + '</td>';
|
||||
row += '<td data-value="' + data.dob.getTime() + '">' + data.dob.getDate() + ' ' + months[data.dob.getMonth()] + ' ' + data.dob.getFullYear() +'</td>';
|
||||
row += '<td data-value="' + data.status.value + '">' + data.status.name + '</td>';
|
||||
for (var j = 0; j < extraCols; j++) {
|
||||
row += '<td>' + (i+1) + '.' + (j+1) + '</td>';
|
||||
}
|
||||
row += '</tr>';
|
||||
if (!return_rows) document.writeln(row);
|
||||
else
|
||||
output += row;
|
||||
}
|
||||
|
||||
if (return_rows) return output;
|
||||
};
|
||||
})(window);
|
153
admin/custom/downloadController.php
Normal file
153
admin/custom/downloadController.php
Normal file
@ -0,0 +1,153 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @version 2.0.0 - September 03, 2014
|
||||
* @package Component Builder
|
||||
* @author Llewellyn van de Merwe <http://www.vdm.io>
|
||||
* @copyright Copyright (C) 2014. All Rights Reserved
|
||||
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
**/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
?>
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* ###Component### Download Controller
|
||||
*/
|
||||
class ###Component###ControllerDownload extends JControllerLegacy
|
||||
{
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
// load the tasks
|
||||
$this->registerTask('file', 'download');
|
||||
}
|
||||
|
||||
public function download()
|
||||
{
|
||||
$user = JFactory::getUser();
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
$userAllowed = $jinput->get('key', NULL, 'INT');
|
||||
if($user->id != 0 && $userAllowed == $user->id && $token == $call_token)
|
||||
{
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'file':
|
||||
$enUrl = $jinput->get('link', NULL, 'BASE64');
|
||||
$filename = $jinput->get('filename', NULL, 'CMD');
|
||||
if(base64_encode(base64_decode($enUrl, true)) === $enUrl && $filename)
|
||||
{
|
||||
// Get local key
|
||||
$localkey = md5(JComponentHelper::getParams('com_###component###')->get('basic_key', 'localKey34fdWEkl'));
|
||||
$opener = new FOFEncryptAes($localkey, 256);
|
||||
$link = rtrim($opener->decryptString(base64_decode($enUrl)));
|
||||
$info = $this->getContentInfo($link);
|
||||
// set headers
|
||||
if (isset($info['type']) && $info['type'])
|
||||
{
|
||||
header('Content-Type: '.$info['type']);
|
||||
}
|
||||
elseif (strpos($filename, '.mp3') !== false)
|
||||
{
|
||||
header('Content-Type: audio/mpeg');
|
||||
}
|
||||
else
|
||||
{
|
||||
header('Content-Type: application/octet-stream');
|
||||
}
|
||||
header("Content-Transfer-Encoding: Binary");
|
||||
header("Content-disposition: attachment; filename=\"" . $filename . "\"");
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
if (isset($info['filesize']) && $info['filesize'])
|
||||
{
|
||||
header('Content-Length: ' . $info['filesize']);
|
||||
}
|
||||
ob_clean();
|
||||
flush();
|
||||
// this is faster but expose the dropbox url
|
||||
// header("Location: $link");
|
||||
// this is slower but better much more secure
|
||||
readfile($link);
|
||||
jexit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getContentInfo($url)
|
||||
{
|
||||
// we first try the curl option
|
||||
if ($this->_isCurl())
|
||||
{
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
// then we try getheaders (this is slower)
|
||||
stream_context_set_default( array('http' => array('method' => 'HEAD')));
|
||||
$headers = get_headers($url);
|
||||
if (###Component###Helper::checkArray($headers))
|
||||
{
|
||||
$data = implode("\n", $headers);
|
||||
}
|
||||
}
|
||||
// get the Content Length
|
||||
if (preg_match('/Content-Length: (\d+)/', $data, $matches))
|
||||
{
|
||||
// Contains file size in bytes
|
||||
$found['filesize'] = (int)$matches[1];
|
||||
|
||||
}
|
||||
// get the Content Type
|
||||
if (preg_match_all('/Content-Type: (.+)/', $data, $matches))
|
||||
{
|
||||
foreach ($matches[1] as $match)
|
||||
{
|
||||
// not the html
|
||||
if (strpos( $match, 'text/html') === false)
|
||||
{
|
||||
$found['type'] = $match;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// return found values
|
||||
if (isset($found) && ###Component###Helper::checkArray($found))
|
||||
{
|
||||
return $found;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function _isCurl()
|
||||
{
|
||||
return function_exists('curl_version');
|
||||
}
|
||||
}
|
171
admin/custom/downloadController_sermonDistributor.php
Normal file
171
admin/custom/downloadController_sermonDistributor.php
Normal file
@ -0,0 +1,171 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @version 2.0.0 - September 03, 2014
|
||||
* @package Component Builder
|
||||
* @author Llewellyn van de Merwe <http://www.vdm.io>
|
||||
* @copyright Copyright (C) 2014. All Rights Reserved
|
||||
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
**/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
?>
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* ###Component### Download Controller
|
||||
*/
|
||||
class ###Component###ControllerDownload extends JControllerLegacy
|
||||
{
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
parent::__construct($config);
|
||||
// load the tasks
|
||||
$this->registerTask('file', 'download');
|
||||
}
|
||||
|
||||
public function download()
|
||||
{
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
// Check Token!
|
||||
$token = JSession::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
if($token == $call_token)
|
||||
{
|
||||
$task = $this->getTask();
|
||||
switch($task)
|
||||
{
|
||||
case 'file':
|
||||
$keys = ###Component###Helper::base64_urldecode($jinput->get('key', NULL, 'STRING'));
|
||||
$enUrl = ###Component###Helper::base64_urldecode($jinput->get('link', NULL, 'STRING'));
|
||||
$filename = $jinput->get('filename', NULL, 'CMD');
|
||||
if((base64_encode(base64_decode($enUrl, true)) === $enUrl) && (base64_encode(base64_decode($keys, true)) === $keys) && $filename)
|
||||
{
|
||||
// we must first count this download
|
||||
if (###Component###Helper::countDownload($keys,$filename))
|
||||
{
|
||||
// get Site name
|
||||
$config = JFactory::getConfig();
|
||||
$vendor = $config->get('sitename');
|
||||
$name = ###Component###Helper::safeString($filename, 'Ww');
|
||||
// Get local key
|
||||
$localkey = ###Component###Helper::getLocalKey();
|
||||
$opener = new FOFEncryptAes($localkey, 128);
|
||||
$link = rtrim($opener->decryptString($enUrl), "\0");
|
||||
$info = $this->getContentInfo($link);
|
||||
// set headers
|
||||
$app = JFactory::getApplication();
|
||||
$app->setHeader('Accept-ranges', 'bytes', true);
|
||||
$app->setHeader('Connection', 'keep-alive', true);
|
||||
$app->setHeader('Content-Encoding', 'none', true);
|
||||
$app->setHeader('Content-disposition', 'attachment; filename="'.$filename.'";', true);
|
||||
if (isset($info['type']) && $info['type'])
|
||||
{
|
||||
$app->setHeader('Content-Type', $info['type'], true);
|
||||
}
|
||||
elseif (strpos($filename, '.mp3') !== false)
|
||||
{
|
||||
$app->setHeader('Content-Type', 'audio/mpeg', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$app->setHeader('Content-Type', 'application/octet-stream', true);
|
||||
}
|
||||
// important to have the file size.
|
||||
if (isset($info['filesize']) && $info['filesize'])
|
||||
{
|
||||
$app->setHeader('Content-Length', (int) $info['filesize'], true);
|
||||
$app->setHeader('Content-Size', (int) $info['filesize'], true);
|
||||
}
|
||||
$app->setHeader('Content-security-policy', 'referrer no-referrer', true);
|
||||
$app->setHeader('Content-Name', '"'.$name.'"', true);
|
||||
$app->setHeader('Content-Version', '1.0', true);
|
||||
$app->setHeader('Content-Vendor', '"'.$vendor.'"', true);
|
||||
$app->setHeader('Content-URL', '"'.JUri::getInstance().'"', true);
|
||||
$app->setHeader('etag', md5($enUrl), true);
|
||||
$app->setHeader('Pragma', 'public', true);
|
||||
$app->setHeader('cache-control', 'max-age=0', true);
|
||||
$app->setHeader('x-robots-tag', 'noindex, nofollow, noimageindex', true);
|
||||
$app->setHeader('x-content-security-policy', 'referrer no-referrer', true);
|
||||
$app->setHeader('x-webkit-csp', 'referrer no-referrer', true);
|
||||
$app->setHeader('x-content-security-policy', 'referrer no-referrer', true);
|
||||
// get the file
|
||||
readfile($link);
|
||||
$app->sendHeaders();
|
||||
$app->close();
|
||||
jexit();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
die('Restricted access');
|
||||
}
|
||||
|
||||
protected function getContentInfo($url)
|
||||
{
|
||||
// we first try the curl option
|
||||
if ($this->_isCurl())
|
||||
{
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_HEADER, true);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
// then we try getheaders (this is slower)
|
||||
stream_context_set_default( array('http' => array('method' => 'HEAD')));
|
||||
$headers = get_headers($url);
|
||||
if (###Component###Helper::checkArray($headers))
|
||||
{
|
||||
$data = implode("\n", $headers);
|
||||
}
|
||||
}
|
||||
// get the Content Length
|
||||
if (preg_match('/Content-Length: (\d+)/', $data, $matches))
|
||||
{
|
||||
// Contains file size in bytes
|
||||
$found['filesize'] = (int) $matches[1];
|
||||
|
||||
}
|
||||
// get the Content Type
|
||||
if (preg_match_all('/Content-Type: (.+)/', $data, $matches))
|
||||
{
|
||||
foreach ($matches[1] as $match)
|
||||
{
|
||||
// not the html
|
||||
if (strpos( $match, 'text/html') === false)
|
||||
{
|
||||
$found['type'] = $match;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// return found values
|
||||
if (isset($found) && ###Component###Helper::checkArray($found))
|
||||
{
|
||||
return $found;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function _isCurl()
|
||||
{
|
||||
return function_exists('curl_version');
|
||||
}
|
||||
}
|
467
admin/custom/dropbox.php
Normal file
467
admin/custom/dropbox.php
Normal file
@ -0,0 +1,467 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
Vast Development Method
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.0 - 03rd November, 2016
|
||||
@package Dropbox API 2
|
||||
@subpackage dropbox.php
|
||||
@author Llewellyn van der Merwe <http://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Dropbox class
|
||||
*/
|
||||
class Dropbox
|
||||
{
|
||||
/**
|
||||
* final url
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
/**
|
||||
* The array for the post url
|
||||
*/
|
||||
protected $postUrl = array(
|
||||
"protocol" => "https://",
|
||||
"suddomain" => "api.",
|
||||
"domain" => "dropboxapi.com",
|
||||
"path" => "/2/"
|
||||
);
|
||||
|
||||
/**
|
||||
* the verious pathes we need
|
||||
*/
|
||||
protected $domainpath = array(
|
||||
"list_folder" => "files/list_folder",
|
||||
"list_folder_continue" => "files/list_folder/continue",
|
||||
"create_shared_link" => "sharing/create_shared_link",
|
||||
"get_shared_link_metadata" => "sharing/get_shared_link_metadata",
|
||||
"revoke" => "auth/token/revoke"
|
||||
);
|
||||
|
||||
/**
|
||||
* the target pathe to get
|
||||
*/
|
||||
protected $targetPath = false;
|
||||
protected $targetPathOriginal = false;
|
||||
|
||||
/**
|
||||
* oauth token
|
||||
*/
|
||||
protected $oauthToken;
|
||||
|
||||
/**
|
||||
* the verious pathes we need
|
||||
*/
|
||||
protected $permissionType;
|
||||
|
||||
/**
|
||||
* The loop controller in calling Dropbox API
|
||||
*/
|
||||
protected $continueCalling = array();
|
||||
|
||||
/**
|
||||
* the success switch
|
||||
*/
|
||||
protected $succes;
|
||||
|
||||
/**
|
||||
* the type call
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* the query for the call
|
||||
*/
|
||||
protected $query;
|
||||
|
||||
/**
|
||||
* the query for the call
|
||||
*/
|
||||
protected $model;
|
||||
|
||||
/**
|
||||
* the mediaData bucket
|
||||
*/
|
||||
public $mediaData = array();
|
||||
|
||||
/**
|
||||
* the error messages
|
||||
*/
|
||||
public $error_summary = array();
|
||||
|
||||
/**
|
||||
* force the update to reset
|
||||
**/
|
||||
public $forceReset = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct(JModelLegacy $model, $buildType)
|
||||
{
|
||||
// set the url at this point for now
|
||||
$this->url = $this->postUrl["protocol"].$this->postUrl["suddomain"].$this->postUrl["domain"].$this->postUrl["path"];
|
||||
// set the local model
|
||||
$this->model = $model;
|
||||
// set the build type
|
||||
$this->build = (int) $buildType;
|
||||
}
|
||||
|
||||
/**
|
||||
* getFiles
|
||||
*
|
||||
* =============
|
||||
* $details
|
||||
* =============
|
||||
* sourceID
|
||||
* dropboxOption
|
||||
* dropboxTarget
|
||||
* addTypes
|
||||
*
|
||||
*/
|
||||
public function getFiles($token, $permissiontype, $details = array())
|
||||
{
|
||||
// we need more then the normal time to run this script 5 minutes at least.
|
||||
ini_set('max_execution_time', 500);
|
||||
// set the oauth toke
|
||||
$this->oauthToken = $token;
|
||||
|
||||
// set the permission type
|
||||
$this->permissionType = $permissiontype;
|
||||
|
||||
// set the details
|
||||
if ($this->checkArray($details))
|
||||
{
|
||||
foreach ($details as $detail => $value)
|
||||
{
|
||||
$this->$detail = $value;
|
||||
}
|
||||
}
|
||||
|
||||
// set the curent folder path
|
||||
if (!$this->setFolderPath())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// start the main factory that calles for the folder data
|
||||
$this->query = array("path" => $this->targetPath, "recursive" => true, "include_media_info" => true);
|
||||
$this->type = 'list_folder';
|
||||
if ($this->makeCall())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function revokeToken($token = null)
|
||||
{
|
||||
if ($token)
|
||||
{
|
||||
// set the oauth toke
|
||||
$this->oauthToken = $token;
|
||||
}
|
||||
// set the call to revoke the token
|
||||
$this->query = 'null';
|
||||
$this->type = 'revoke';
|
||||
if ($this->makeCall())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function setFolderPath()
|
||||
{
|
||||
if ('full' == $this->permissionType && isset($this->dropboxOption) && isset($this->dropboxTarget) && $this->checkString($this->dropboxTarget))
|
||||
{
|
||||
if (2 == $this->dropboxOption)
|
||||
{
|
||||
// simply set the path
|
||||
$this->targetPath = '/'.trim(strtolower($this->dropboxTarget), '/');
|
||||
|
||||
return true;
|
||||
}
|
||||
elseif (1 == $this->dropboxOption)
|
||||
{
|
||||
// make a call to get the path
|
||||
$this->query = array("url" => $this->dropboxTarget);
|
||||
$this->type = 'get_shared_link_metadata';
|
||||
if ($this->makeCall())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ('app' == $this->permissionType)
|
||||
{
|
||||
$this->targetPath = "";
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function makeCall()
|
||||
{
|
||||
if ($this->_isCurl())
|
||||
{
|
||||
return $this->makeCurlCall();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->makeGetCall();
|
||||
}
|
||||
}
|
||||
|
||||
protected function makeGetCall()
|
||||
{
|
||||
|
||||
$options = array(
|
||||
'http' => array(
|
||||
'header' => "Content-Type: application/json\r\n".
|
||||
"Authorization: Bearer ".$this->oauthToken,
|
||||
'method' => "POST"
|
||||
),
|
||||
);
|
||||
|
||||
if ($this->checkArray($this->query))
|
||||
{
|
||||
$this->query = json_encode($this->query);
|
||||
}
|
||||
$options['http']['content'] = $this->query;
|
||||
|
||||
$context = stream_context_create($options);
|
||||
$response = file_get_contents($this->url.$this->domainpath[$this->type], false, $context);
|
||||
|
||||
|
||||
if ($response === FALSE)
|
||||
{
|
||||
$this->error_summary[] = $this->type.'_error';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// store the result
|
||||
return $this->setTheResult(json_decode($response));
|
||||
}
|
||||
}
|
||||
|
||||
protected function makeCurlCall()
|
||||
{
|
||||
$headers = array('Authorization: Bearer '. $this->oauthToken,
|
||||
'Content-Type: application/json'
|
||||
);
|
||||
|
||||
$ch = curl_init($this->url.$this->domainpath[$this->type]);
|
||||
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
// check if query is set
|
||||
if ($this->checkArray($this->query))
|
||||
{
|
||||
$this->query = json_encode($this->query);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->query);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
// curl_setopt($ch, CURLOPT_VERBOSE, 1); // debug
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
if ($this->checkJson($response))
|
||||
{
|
||||
$response = json_decode($response);
|
||||
}
|
||||
// store the result
|
||||
return $this->setTheResult($response);
|
||||
}
|
||||
|
||||
protected function setTheResult($data)
|
||||
{
|
||||
// if there was an error stop!!!
|
||||
if (isset($data->error_summary))
|
||||
{
|
||||
$this->error_summary[] = $data->error_summary;
|
||||
$this->forceReset = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// deal with each type
|
||||
switch ($this->type)
|
||||
{
|
||||
case "list_folder":
|
||||
case "list_folder_continue":
|
||||
if (isset($data->entries) && $this->checkArray($data->entries))
|
||||
{
|
||||
if ($this->storeFiles($data->entries))
|
||||
{
|
||||
// run the continue if needed
|
||||
if (isset($data->has_more) && $data->has_more && isset($data->cursor))
|
||||
{
|
||||
// start the main factory that calles for the folder data
|
||||
$this->query = array("cursor" => $data->cursor);
|
||||
$this->type = 'list_folder_continue';
|
||||
if ($this->makeCall())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->error_summary[] = $this->type.'_error';
|
||||
break;
|
||||
case "create_shared_link":
|
||||
if (isset($data->url) && isset($data->path) && $this->storeSharedLink($this->fixPath($data->path), str_replace('?dl=0','?dl=1',$data->url)))
|
||||
{
|
||||
// we stored the link
|
||||
return true;
|
||||
}
|
||||
$this->error_summary[] = $this->type.'_error';
|
||||
break;
|
||||
case "get_shared_link_metadata":
|
||||
if (isset($data->path_lower))
|
||||
{
|
||||
$this->targetPath = $data->path_lower;
|
||||
return true;
|
||||
}
|
||||
$this->error_summary[] = $this->type.'_error';
|
||||
break;
|
||||
case "revoke":
|
||||
if (is_null($data))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
$this->error_summary[] = $this->type.'_error';
|
||||
break;
|
||||
}
|
||||
$this->forceReset = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function storeSharedLink($path, $url)
|
||||
{
|
||||
// we need to store the url to DB
|
||||
if (isset($this->mediaData[$path]))
|
||||
{
|
||||
$localListing = array();
|
||||
$localListing['id'] = 0;
|
||||
$localListing['name'] = $this->mediaData[$path]['name'];
|
||||
$localListing['size'] = $this->mediaData[$path]['size'];
|
||||
$localListing['key'] = $path;
|
||||
$localListing['url'] = $url;
|
||||
$localListing['build'] = $this->build;
|
||||
$localListing['external_source'] = (int) $this->sourceID;
|
||||
// free some memory
|
||||
unset($this->mediaData[$path]);
|
||||
// check if item already set
|
||||
if ($id = $this->model->searchForId($path))
|
||||
{
|
||||
// update item
|
||||
$localListing['id'] = $id;
|
||||
}
|
||||
return $this->model->save($localListing);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function storeFiles($entries)
|
||||
{
|
||||
foreach ($entries as $item)
|
||||
{
|
||||
if (isset($item->{'.tag'}) && 'file' == $item->{'.tag'} && isset($item->name))
|
||||
{
|
||||
$addLink = false;
|
||||
// remove if not related to type
|
||||
if (isset($this->addTypes) && $this->checkArray($this->addTypes))
|
||||
{
|
||||
foreach ($this->addTypes as $add)
|
||||
{
|
||||
if (strpos($item->name,$add) !== false)
|
||||
{
|
||||
$addLink = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($addLink && isset($item->path_lower))
|
||||
{
|
||||
// store media info
|
||||
$this->mediaData[$this->fixPath($item->path_lower)] = array('name' => $item->name, 'size' => $item->size);
|
||||
// get the shared link
|
||||
$this->query = array("path" => $item->path_lower);
|
||||
$this->type = 'create_shared_link';
|
||||
if (!$this->makeCall())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function fixPath($path)
|
||||
{
|
||||
if ($this->checkString($this->targetPath))
|
||||
{
|
||||
$path = str_replace($this->targetPath, 'VDM_pLeK_h0uEr', $path);
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = 'VDM_pLeK_h0uEr'.$path;
|
||||
}
|
||||
return $path;
|
||||
}
|
||||
|
||||
protected function checkObject($object)
|
||||
{
|
||||
if (isset($object) && is_object($object) && count($object) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function checkArray($array)
|
||||
{
|
||||
if (isset($array) && is_array($array) && count($array) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function checkJson($string)
|
||||
{
|
||||
if ($this->checkString($string))
|
||||
{
|
||||
json_decode($string);
|
||||
return (json_last_error() === JSON_ERROR_NONE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function checkString($string)
|
||||
{
|
||||
if (isset($string) && is_string($string) && strlen($string) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function _isCurl()
|
||||
{
|
||||
return function_exists('curl_version');
|
||||
}
|
||||
}
|
||||
|
442
admin/custom/dropboxupdater.php
Normal file
442
admin/custom/dropboxupdater.php
Normal file
@ -0,0 +1,442 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @version 2.0.0 - September 03, 2014
|
||||
* @package Component Builder
|
||||
* @author Llewellyn van de Merwe <http://www.vdm.io>
|
||||
* @copyright Copyright (C) 2014. All Rights Reserved
|
||||
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
**/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
?>
|
||||
###BOM###
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Dropbox updater component helper
|
||||
*/
|
||||
class Dropboxupdater
|
||||
{
|
||||
|
||||
/**
|
||||
* update flag (if false update will not happen)
|
||||
**/
|
||||
protected $okay = true;
|
||||
|
||||
/**
|
||||
* update flag (if false update will not happen)
|
||||
**/
|
||||
protected $data = null;
|
||||
|
||||
/**
|
||||
* the file Key
|
||||
**/
|
||||
protected $fileKey;
|
||||
|
||||
/**
|
||||
* allow a forced update
|
||||
**/
|
||||
protected $forceUpdate;
|
||||
|
||||
/**
|
||||
* Todays date-time
|
||||
**/
|
||||
protected $today;
|
||||
|
||||
/**
|
||||
* Next updat date-time
|
||||
**/
|
||||
protected $next;
|
||||
|
||||
/**
|
||||
* update method
|
||||
**/
|
||||
protected $updateMethod;
|
||||
|
||||
/**
|
||||
* update targets
|
||||
**/
|
||||
protected $updateTarget;
|
||||
|
||||
/**
|
||||
* info related to this update
|
||||
**/
|
||||
protected $updateInfo;
|
||||
protected $infoFilePath;
|
||||
|
||||
/**
|
||||
* Main dropbox class
|
||||
**/
|
||||
protected $dropbox;
|
||||
|
||||
/**
|
||||
* component parameters
|
||||
**/
|
||||
protected $app_params;
|
||||
|
||||
/**
|
||||
* the errors
|
||||
**/
|
||||
protected $errors = array();
|
||||
|
||||
/**
|
||||
* everything we want done when initialized
|
||||
**/
|
||||
public function __construct()
|
||||
{
|
||||
// get params
|
||||
$this->app_params = JComponentHelper::getParams('com_###component###');
|
||||
}
|
||||
|
||||
/**
|
||||
* get the logged errors array
|
||||
**/
|
||||
public function getErrors()
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the error to the log
|
||||
**/
|
||||
protected function setErrors($error)
|
||||
{
|
||||
if (###Component###Helper::checkString($error))
|
||||
{
|
||||
$this->errors[] = $error;
|
||||
}
|
||||
elseif (###Component###Helper::checkArray($error))
|
||||
{
|
||||
foreach($error as $log)
|
||||
{
|
||||
if (###Component###Helper::checkString($log))
|
||||
{
|
||||
$this->errors[] = $log;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* update method
|
||||
**/
|
||||
public function update($id, $target, $type = false, $forceUpdate = false, $sleutel = null)
|
||||
{
|
||||
if ($type)
|
||||
{
|
||||
// start fresh
|
||||
$this->okay = true;
|
||||
$this->data = null;
|
||||
// is this a forced run
|
||||
$this->forceUpdate = $forceUpdate;
|
||||
// the file key
|
||||
$this->fileKey = ###Component###Helper::safeString($id.$target.$type);
|
||||
// set the type of this listing
|
||||
$this->type = $type;
|
||||
|
||||
// get the external source data being updated
|
||||
$this->setExternalSourceData($id);
|
||||
|
||||
// load the token if manualy set
|
||||
if ($sleutel)
|
||||
{
|
||||
$this->setExternalSourceData($id, array('oauthtoken' => $sleutel));
|
||||
}
|
||||
|
||||
// what update method is set
|
||||
$this->setUpdateMethod();
|
||||
|
||||
// set the update links
|
||||
$this->setUpdateTarget($target);
|
||||
|
||||
// set needed dates
|
||||
if ($this->okay)
|
||||
{
|
||||
$this->setDates();
|
||||
}
|
||||
|
||||
// get info data or set if not found
|
||||
if ($this->okay)
|
||||
{
|
||||
$this->setUpdateInfoData();
|
||||
}
|
||||
|
||||
// check if update should run now
|
||||
if ($this->okay)
|
||||
{
|
||||
$this->checkUpdateStatus();
|
||||
}
|
||||
|
||||
// before update save update info incase class is called again
|
||||
if($this->okay)
|
||||
{
|
||||
if ($this->updateInfo->updatenow)
|
||||
{
|
||||
// turn update to active
|
||||
$this->updateInfo->updatenow = false;
|
||||
$this->updateInfo->updateactive = true;
|
||||
// now save the date
|
||||
$this->okay = $this->saveUpdateInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->okay = false;
|
||||
}
|
||||
}
|
||||
|
||||
// run the update if all is okay
|
||||
if ($this->okay)
|
||||
{
|
||||
// set the config
|
||||
$this->setDetailsConfig();
|
||||
// load the file
|
||||
JLoader::import('dropbox', JPATH_COMPONENT_SITE.'/helpers');
|
||||
$build = 1;
|
||||
if ('auto' == $this->type)
|
||||
{
|
||||
$build = 2;
|
||||
}
|
||||
// load the dropbox class
|
||||
$this->dropbox = new Dropbox(###Component###Helper::getModel('local_listing', JPATH_COMPONENT_ADMINISTRATOR), $build);
|
||||
// okay now update
|
||||
$this->okay = $this->doUpdate();
|
||||
}
|
||||
// always reset if all okay
|
||||
return $this->resetUpdate();
|
||||
}
|
||||
$this->setErrors('The update type is unknown.');
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the exsternal source data
|
||||
*/
|
||||
protected function setExternalSourceData($id, $data = array())
|
||||
{
|
||||
// get the data if not set
|
||||
if (!$this->data || !###Component###Helper::checkObject($this->data))
|
||||
{
|
||||
// load model to get the data
|
||||
$model = ###Component###Helper::getModel('external_source', JPATH_COMPONENT_ADMINISTRATOR);
|
||||
$this->data = $model->getItem($id);
|
||||
}
|
||||
// if new data is set load it
|
||||
if (###Component###Helper::checkArray($data))
|
||||
{
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
$this->data->$key = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set update mehtod
|
||||
**/
|
||||
protected function setUpdateMethod()
|
||||
{
|
||||
if ($this->forceUpdate)
|
||||
{
|
||||
// this is a manual method
|
||||
$this->updateMethod = 'manual';
|
||||
}
|
||||
elseif (2 == $this->data->update_method)
|
||||
{
|
||||
// this it an auto mehtod
|
||||
$this->updateMethod = 'auto';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->okay = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set update target
|
||||
**/
|
||||
protected function setUpdateTarget($nr)
|
||||
{
|
||||
// get target based on type and position
|
||||
if ('full' == $this->data->permissiontype && $nr > 0)
|
||||
{
|
||||
$position = $nr - 1;
|
||||
if (1 == $this->data->dropboxoptions && ###Component###Helper::checkJson($this->data->sharedurl))
|
||||
{
|
||||
$targets = json_decode($this->data->sharedurl)->tsharedurl;
|
||||
}
|
||||
elseif (2 == $this->data->dropboxoptions && ###Component###Helper::checkJson($this->data->folder))
|
||||
{
|
||||
$targets = json_decode($this->data->folder)->tfolder;
|
||||
}
|
||||
// check if we found any
|
||||
if (!isset($targets[$position]) || !###Component###Helper::checkString($targets[$position]))
|
||||
{
|
||||
$this->setErrors('The target Shared-url or Folder is not set.');
|
||||
$this->okay = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->updateTarget = $targets[$position];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->updateTarget = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set the configeration for exsternal source class
|
||||
**/
|
||||
protected function setDetailsConfig()
|
||||
{
|
||||
// reset config
|
||||
$this->detailsConfig = array();
|
||||
// the source ID
|
||||
$this->detailsConfig['sourceID'] = $this->data->id;
|
||||
// get the legal files set
|
||||
$this->detailsConfig['addTypes'] = $this->data->filetypes;
|
||||
// set other config settings
|
||||
$this->detailsConfig['dropboxOption'] = $this->data->dropboxoptions;
|
||||
// set dropbox target
|
||||
$this->detailsConfig['dropboxTarget'] = $this->updateTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* set next update time
|
||||
**/
|
||||
protected function setDates()
|
||||
{
|
||||
// set todays date/time
|
||||
$this->today = time();
|
||||
|
||||
// set the next update date/time
|
||||
if ('manual' == $this->updateMethod)
|
||||
{
|
||||
// set the date to two days ago to ensure the update runs now
|
||||
$this->next = strtotime("-2 days");
|
||||
}
|
||||
else
|
||||
{
|
||||
// based on the auto time we will set the next update date/time
|
||||
$timer = $this->data->update_timer;
|
||||
if ($timer != 0)
|
||||
{
|
||||
// Get Next Update Time
|
||||
$this->next = strtotime('+'.$timer.' minutes', $this->today);
|
||||
}
|
||||
// if timer is 0 we should not update
|
||||
else
|
||||
{
|
||||
$this->setErrors('The timer is not setup correctly.');
|
||||
$this->okay = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set update info data
|
||||
**/
|
||||
protected function setUpdateInfoData()
|
||||
{
|
||||
// set the info file name
|
||||
$fileName = md5($this->fileKey.'info');
|
||||
// set file path
|
||||
$this->infoFilePath = JPATH_COMPONENT_SITE.'/helpers/'.$fileName.'.json';
|
||||
|
||||
if (($json = @file_get_contents($this->infoFilePath)) !== FALSE)
|
||||
{
|
||||
$this->updateInfo = json_decode($json);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->updateInfo = new stdClass;
|
||||
$this->updateInfo->nextupdate = 0;
|
||||
$this->updateInfo->updateactive = false;
|
||||
$this->updateInfo->updatenow = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check update status
|
||||
**/
|
||||
protected function checkUpdateStatus()
|
||||
{
|
||||
// check if there is already an update running
|
||||
if ($this->updateInfo->updateactive)
|
||||
{
|
||||
$this->okay = false;
|
||||
$this->setErrors('There is an update already running.');
|
||||
}
|
||||
// check if the time has come to do the next update
|
||||
elseif (('auto' == $this->updateMethod) && ($this->updateInfo->nextupdate > $this->today))
|
||||
{
|
||||
$this->okay = false;
|
||||
$this->setErrors('It is not yet time to run this update.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->updateInfo->updatenow = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* save the update info
|
||||
**/
|
||||
protected function saveUpdateInfo()
|
||||
{
|
||||
return $this->saveJson(json_encode($this->updateInfo),$this->infoFilePath);
|
||||
}
|
||||
|
||||
/**
|
||||
* update the local listing
|
||||
**/
|
||||
protected function doUpdate()
|
||||
{
|
||||
// we need more then the normal time to run this script 5 minutes at least.
|
||||
ini_set('max_execution_time', $this->app_params->get('max_execution_time', 500));
|
||||
// get data of all the shared links of all target items
|
||||
if (!$this->dropbox->getFiles($this->data->oauthtoken, $this->data->permissiontype, $this->detailsConfig))
|
||||
{
|
||||
$this->setErrors($this->dropbox->error_summary);
|
||||
return false;
|
||||
}
|
||||
// if this is a manual update, then revoke the token
|
||||
if ($this->forceUpdate)
|
||||
{
|
||||
$this->dropbox->revokeToken();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function resetUpdate()
|
||||
{
|
||||
if ($this->okay || (isset($this->dropbox->forceReset) && $this->dropbox->forceReset))
|
||||
{
|
||||
// make sure the update reset
|
||||
$this->updateInfo->nextupdate = $this->next;
|
||||
$this->updateInfo->updateactive = false;
|
||||
$this->updateInfo->updatenow = false;
|
||||
// store final update
|
||||
$this->saveUpdateInfo();
|
||||
}
|
||||
return $this->okay;
|
||||
}
|
||||
|
||||
protected function saveJson($data,$filename)
|
||||
{
|
||||
if (###Component###Helper::checkString($data))
|
||||
{
|
||||
$fp = fopen($filename, 'w');
|
||||
fwrite($fp, $data);
|
||||
fclose($fp);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
50
admin/custom/form-password.js
Normal file
50
admin/custom/form-password.js
Normal file
@ -0,0 +1,50 @@
|
||||
/*! UIkit 2.0.0 | https://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
||||
|
||||
(function($, UI){
|
||||
|
||||
var FormPassword = function(element, options) {
|
||||
|
||||
var $this = this, $element = $(element);
|
||||
|
||||
if($element.data("formPassword")) return;
|
||||
|
||||
this.options = $.extend({}, FormPassword.defaults, options);
|
||||
|
||||
this.element = $element.on("click", function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
if($this.input.length) {
|
||||
var type = $this.input.attr("type");
|
||||
$this.input.attr("type", type=="text" ? "password":"text");
|
||||
$this.element.text($this.options[type=="text" ? "lblShow":"lblHide"]);
|
||||
}
|
||||
});
|
||||
|
||||
$this.input = this.element.next("input").length ? this.element.next("input") : this.element.prev("input");
|
||||
$this.element.text(this.options[$this.input.is("[type='password']") ? "lblShow":"lblHide"]);
|
||||
|
||||
this.element.data("formPassword", this);
|
||||
};
|
||||
|
||||
FormPassword.defaults = {
|
||||
"lblShow": "Show",
|
||||
"lblHide": "Hide"
|
||||
};
|
||||
|
||||
UI["formPassword"] = FormPassword;
|
||||
|
||||
// init code
|
||||
$(document).on("click.formpassword.uikit", "[data-uk-form-password]", function(e) {
|
||||
|
||||
var ele = $(this);
|
||||
if (!ele.data("formPassword")) {
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var obj = new FormPassword(ele, UI.Utils.options(ele.attr("data-uk-form-password")));
|
||||
ele.trigger("click");
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery, jQuery.UIkit);
|
3
admin/custom/form-password.min.js
vendored
Normal file
3
admin/custom/form-password.min.js
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/*! UIkit 2.0.0 | https://www.getuikit.com | (c) 2013 YOOtheme | MIT License */
|
||||
|
||||
(function(t,e){var n=function(e,i){var s=this,o=t(e);o.data("formPassword")||(this.options=t.extend({},n.defaults,i),this.element=o.on("click",function(t){if(t.preventDefault(),s.input.length){var e=s.input.attr("type");s.input.attr("type","text"==e?"password":"text"),s.element.text(s.options["text"==e?"lblShow":"lblHide"])}}),s.input=this.element.next("input").length?this.element.next("input"):this.element.prev("input"),s.element.text(this.options[s.input.is("[type='password']")?"lblShow":"lblHide"]),this.element.data("formPassword",this))};n.defaults={lblShow:"Show",lblHide:"Hide"},e.formPassword=n,t(document).on("click.formpassword.uikit","[data-uk-form-password]",function(i){var s=t(this);s.data("formPassword")||(i.preventDefault(),new n(s,e.Utils.options(s.attr("data-uk-form-password"))),s.trigger("click"))})})(jQuery,jQuery.UIkit);
|
11
admin/custom/form.js
Normal file
11
admin/custom/form.js
Normal file
@ -0,0 +1,11 @@
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('#tour_favorite').click(function() {
|
||||
if (jQuery(this).attr('rel') == 'no') {
|
||||
jQuery('#tour_favorite').removeClass('favorite_inactive')
|
||||
.addClass('favorite_active').attr('rel', 'yes');
|
||||
} else {
|
||||
jQuery('#tour_favorite').removeClass('favorite_active')
|
||||
.addClass('favorite_inactive').attr('rel', 'no');
|
||||
};
|
||||
});
|
||||
});
|
BIN
admin/custom/grid.png
Normal file
BIN
admin/custom/grid.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
11
admin/custom/iframeheight.min.js
vendored
Normal file
11
admin/custom/iframeheight.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user