Compare commits
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
0cd5660141 | |||
082196378b | |||
319944db68 | |||
52f7737f5c | |||
05160b499f | |||
07f9344265 | |||
e63441531b | |||
33f3bb5652 | |||
ecb3ab5af9 | |||
8fbd4f8701 | |||
b8311078ac | |||
f8d5145af9 | |||
a7e641b499 | |||
675ecece84 | |||
f76587361b | |||
2f9e54e371 | |||
53cf534664 | |||
5567ca6856 | |||
7546e9aceb | |||
f09fd06ddc | |||
2004b8d91c | |||
d82d4aeb22 | |||
5cd07f3b88 | |||
5d19f46070 | |||
02f9523e1b | |||
7f52decf16 | |||
d2aa1fce0b | |||
3b774a8385 | |||
ee2fea1db8 | |||
c9150e930d | |||
e21980bbea | |||
32e3f6b86e | |||
0fd9d9d169 | |||
e7572e0557 | |||
6b70aa45e6 | |||
951e0c1f5d | |||
57bf464111 | |||
6871bfd9a2 | |||
3bc71a935c | |||
1cad434a39 | |||
a2224e3ad9 | |||
4bdb503973 | |||
4424179425 | |||
306b6b9787 | |||
0c30fa7f68 | |||
86624770b1 | |||
21756c3e55 | |||
ef8578104c | |||
80670beada | |||
3efbb7b4af | |||
36d45f2ff6 | |||
5a541340c8 | |||
15e3c82dd2 | |||
2ecf186846 | |||
fa199947d2 | |||
dea8ca3cae | |||
36d3a10ef8 | |||
4e65696d40 | |||
737785ea33 |
147
README.md
147
README.md
@ -1,75 +1,122 @@
|
||||
# Component Builder (2.0.9)
|
||||
# Component Builder (2.2.4)
|
||||
|
||||
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 Component Builder with the following components as demo setup 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!
|
||||
|
||||
+ **Basic 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.4) 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.
|
||||
|
||||
+ **Medium Version** ([get this demo set](https://www.vdm.io/joomla-component-builder))
|
||||
# Some of the Features
|
||||
|
||||
*Demo Component* see the build on [github] (https://github.com/namibia/demo-joomla-3-component)
|
||||
+ 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!
|
||||
|
||||
*Sermon Distributor* see the build on [github] (https://github.com/SermonDistributor/Joomla-3-Component)
|
||||
# Just Imagine
|
||||
|
||||
+ **Advanced Version** ([get this demo set](https://www.vdm.io/joomla-component-builder))
|
||||
+ 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!
|
||||
|
||||
*All the above*
|
||||
# You are in Control
|
||||
|
||||
*Component Builder* see the build on [github] (https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ 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!
|
||||
|
||||
## Training & Help Videos
|
||||
# Get Access to Video Tutorials
|
||||
|
||||
The Medium and Advanced Versions come with video tutorials in the component included.
|
||||
> **You can purchase more demo content for Component Builder including access to training & help video tutorials:**
|
||||
|
||||
# Extra Support
|
||||
+ 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.
|
||||
|
||||
Would you require more help VDM.io has a number of support plans available [visit us today!](https://www.vdm.io/joomla-component-builder).
|
||||
[**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](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)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 31st January, 2016
|
||||
+ *Version*: 2.0.9
|
||||
+ *Last Build*: 25th November, 2016
|
||||
+ *Version*: 2.2.4
|
||||
+ *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*: **86638**
|
||||
+ *File count*: **541**
|
||||
+ *Folder count*: **99**
|
||||
|
||||
## Build Time
|
||||
> 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)
|
||||
|
||||
**221 Hours** or **28 Eight Hour Days** (actual time the author saved -
|
||||
due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builder))
|
||||
## Donations
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> never making one mistake or taking any coffee break.)
|
||||
|
||||
+ *Line count*: **79357**
|
||||
+ *File count*: **490**
|
||||
+ *Folder count*: **96**
|
||||
|
||||
**146 Hours** or **18 Eight Hour Days** (the actual time the author spent)
|
||||
|
||||
> (with the following break down:
|
||||
> **debugging @55hours** = codingtime / 4;
|
||||
> **planning @32hours** = codingtime / 7;
|
||||
> **mapping @22hours** = codingtime / 10;
|
||||
> **office @37hours** = codingtime / 6;)
|
||||
|
||||
**367 Hours** or **46 Eight Hour Days**
|
||||
(a total of the realistic time frame for this project)
|
||||
|
||||
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
|
||||
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
|
||||
|
||||
Project duration: **9.2 weeks** or **1.9 months**
|
||||
|
||||
> 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)
|
||||
If you want to support this project, please consider donating:
|
||||
* 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.4)
|
||||
|
||||
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.4) 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](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)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 25th November, 2016
|
||||
+ *Version*: 2.2.4
|
||||
+ *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*: **86638**
|
||||
+ *File count*: **541**
|
||||
+ *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)
|
||||
|
||||
## Donations
|
||||
|
||||
If you want to support this project, please consider donating:
|
||||
* PayPal: pay@vdm.io
|
||||
* Bitcoin: 3H35PYwikEosvcjxHXGPLS1GufZ4b4iFu3
|
@ -9,13 +9,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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 |
@ -1,17 +0,0 @@
|
||||
/*----------------------------------------------------------------------------------| www.giz.de |----/
|
||||
###COMPANYNAME###
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version ###VERSION###
|
||||
@build ###BUILDDATE###
|
||||
@created ###CREATIONDATE###
|
||||
@package ###Component_name###
|
||||
@subpackage ###FILENAME###
|
||||
@author ###AUTHOR### <###AUTHORWEBSITE###>
|
||||
@owner ###COMPANYNAME###
|
||||
@copyright ###COPYRIGHT###
|
||||
@license ###LICENSE###
|
||||
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
###SHORT_DESCRIPTION###
|
||||
/------------------------------------------------------------------------------------------------------*/
|
@ -206,5 +206,5 @@ class ###Component###Model###Component### extends JModelList
|
||||
}
|
||||
}
|
||||
return $icons;
|
||||
}
|
||||
}###DASH_MODEL_METHODS###
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class ###Component###View###Component### extends JViewLegacy
|
||||
};
|
||||
// Assign data to the view
|
||||
$this->icons = $this->get('Icons');
|
||||
$this->contributors = ###Component###Helper::getContributors();
|
||||
$this->contributors = ###Component###Helper::getContributors();###DASH_GET_CUSTOM_DATA###
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolBar();
|
||||
|
@ -29,22 +29,6 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<div id="j-main-container" class="span9">
|
||||
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_left', array('active' => 'main')); ?>
|
||||
JHtml::_('behavior.tooltip');
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_left', 'cPanel', 'main'); ?>
|
||||
<?php echo $this->loadTemplate('main');?>
|
||||
<?php echo JHtml::_('bootstrap.endSlide'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
|
||||
</div>
|
||||
<div id="j-main-container" class="span3">
|
||||
<?php echo JHtml::_('bootstrap.startAccordion', 'dashboard_right', array('active' => 'vdm')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addSlide', 'dashboard_right', '###COMPANYNAME###', 'vdm'); ?>
|
||||
<?php echo $this->loadTemplate('vdm');?>
|
||||
<?php echo JHtml::_('bootstrap.endSlide'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endAccordion'); ?>
|
||||
</div>
|
||||
?>###DASH_DISPLAY_DATA###
|
@ -7,7 +7,7 @@
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@package Component Builder
|
||||
@ -16,9 +16,9 @@
|
||||
@my wife Roline 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
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
@ -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);
|
||||
@ -162,31 +168,33 @@ abstract class ###Component###Helper
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ")
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
// is JSON
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
{
|
||||
$value = '';
|
||||
$counter = 0;
|
||||
foreach ($result as $string)
|
||||
if (self::checkString($table))
|
||||
{
|
||||
if ($counter)
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
$value .= $sperator.$string;
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
{
|
||||
$names[] = $name;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (self::checkArray($names))
|
||||
{
|
||||
$value .= $string;
|
||||
}
|
||||
$counter++;
|
||||
return (string) implode($sperator,$names);
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
return (string) implode($sperator,$result);
|
||||
}
|
||||
return json_decode($value);
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
@ -201,7 +209,7 @@ abstract class ###Component###Helper
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('a.published'));
|
||||
$query->from('#__###component###_'.$type.' AS a');
|
||||
$query->where('a.id = '.$id);
|
||||
$query->where('a.id = '. (int) $id);
|
||||
$query->where('a.published = 1');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
@ -219,7 +227,7 @@ abstract class ###Component###Helper
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('a.title'));
|
||||
$query->from('#__usergroups AS a');
|
||||
$query->where('a.id = '.$id);
|
||||
$query->where('a.id = '. (int) $id);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
@ -252,7 +260,7 @@ abstract class ###Component###Helper
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// set to use component default
|
||||
$allow = true;
|
||||
$fallback= true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
@ -268,13 +276,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###.'.$view.'.' . (int) $record->id))
|
||||
@ -284,13 +292,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise('core.edit.own', 'com_###component###'))
|
||||
@ -300,13 +308,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###'))
|
||||
@ -316,13 +324,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -352,13 +360,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###.'.$views.'.category.' . (int) $record->catid))
|
||||
@ -368,13 +376,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise('core.edit.own', 'com_###component###'))
|
||||
@ -384,13 +392,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###'))
|
||||
@ -400,21 +408,21 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback= false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if allowed then fall back on component global settings
|
||||
if ($allow)
|
||||
// if allowed then fallback on component global settings
|
||||
if ($fallback)
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_###component###'));
|
||||
}
|
||||
@ -478,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
|
||||
@ -572,6 +580,16 @@ abstract class ###Component###Helper
|
||||
return $button->input;
|
||||
|
||||
}
|
||||
|
||||
public static function checkJson($string)
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
json_decode($string);
|
||||
return (json_last_error() === JSON_ERROR_NONE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function checkObject($object)
|
||||
{
|
||||
@ -831,7 +849,7 @@ abstract class ###Component###Helper
|
||||
$w .= ' ';
|
||||
if($r < 100)
|
||||
{
|
||||
$word .= 'and ';
|
||||
$w .= 'and ';
|
||||
}
|
||||
$w .= self::numberToString($r);
|
||||
}
|
||||
|
279
admin/compiler/joomla_3/Helper_email.php
Normal file
279
admin/compiler/joomla_3/Helper_email.php
Normal file
@ -0,0 +1,279 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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/>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
?>
|
||||
###BOM###
|
||||
|
||||
/**
|
||||
* ###Component### component email helper
|
||||
*/
|
||||
abstract class ###Component###Email
|
||||
{
|
||||
/**
|
||||
* Configuraiton object
|
||||
*
|
||||
* @var JConfig
|
||||
*/
|
||||
public static $config = null;
|
||||
|
||||
/**
|
||||
* Mailer object
|
||||
*
|
||||
* @var JMail
|
||||
*/
|
||||
public static $mailer = null;
|
||||
|
||||
/**
|
||||
* Get a configuration object
|
||||
*
|
||||
*/
|
||||
public static function getConfig()
|
||||
{
|
||||
if (!self::$config)
|
||||
{
|
||||
self::$config = JComponentHelper::getParams('com_###component###');
|
||||
}
|
||||
|
||||
return self::$config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a mailer object.
|
||||
*
|
||||
* Returns the global {@link JMail} object, only creating it if it doesn't already exist.
|
||||
*
|
||||
* @return JMail object
|
||||
*
|
||||
* @see JMail
|
||||
*/
|
||||
public static function getMailer()
|
||||
{
|
||||
if (!self::$mailer)
|
||||
{
|
||||
self::$mailer = self::createMailer();
|
||||
}
|
||||
|
||||
$copy = clone self::$mailer;
|
||||
|
||||
return $copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a mailer object
|
||||
*
|
||||
* @return JMail object
|
||||
*
|
||||
* @see JMail
|
||||
*/
|
||||
protected static function createMailer()
|
||||
{
|
||||
// set component params
|
||||
$conf = self::getConfig();
|
||||
|
||||
// now load the mailer
|
||||
$mailer = $conf->get('mailer', 'global');
|
||||
|
||||
// Create a JMail object
|
||||
$mail = JMail::getInstance();
|
||||
|
||||
// check if set to global
|
||||
if ('global' == $mailer)
|
||||
{
|
||||
// get the global details
|
||||
$globalConf = JFactory::getConfig();
|
||||
|
||||
$mailer = $globalConf->get('mailer');
|
||||
$smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1;
|
||||
$smtpuser = $globalConf->get('smtpuser');
|
||||
$smtppass = $globalConf->get('smtppass');
|
||||
$smtphost = $globalConf->get('smtphost');
|
||||
$smtpsecure = $globalConf->get('smtpsecure');
|
||||
$smtpport = $globalConf->get('smtpport');
|
||||
$sendmail = $globalConf->get('sendmail');
|
||||
$mailfrom = $globalConf->get('mailfrom');
|
||||
$fromname = $globalConf->get('fromname');
|
||||
}
|
||||
else
|
||||
{
|
||||
$smtpauth = ($conf->get('smtpauth') == 0) ? null : 1;
|
||||
$smtpuser = $conf->get('smtpuser');
|
||||
$smtppass = $conf->get('smtppass');
|
||||
$smtphost = $conf->get('smtphost');
|
||||
$smtpsecure = $conf->get('smtpsecure');
|
||||
$smtpport = $conf->get('smtpport');
|
||||
$sendmail = $conf->get('sendmail');
|
||||
$mailfrom = $conf->get('mailfrom');
|
||||
$fromname = $conf->get('fromname');
|
||||
$mailreply = $conf->get('mailreply');
|
||||
$replyname = $conf->get('replyname');
|
||||
|
||||
// set the global reply-to
|
||||
if ($mailreply && $fromname)
|
||||
{
|
||||
$mail->ClearReplyTos();
|
||||
$mail->addReplyTo( array( $mailreply, $replyname ) );
|
||||
}
|
||||
}
|
||||
|
||||
// Set global sender
|
||||
$mail->setSender(array($mailfrom, $fromname));
|
||||
|
||||
// Default mailer is to use PHP's mail function
|
||||
switch ($mailer)
|
||||
{
|
||||
case 'smtp':
|
||||
// set the SMTP option
|
||||
$mail->useSMTP($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport);
|
||||
break;
|
||||
|
||||
case 'sendmail':
|
||||
// set the sendmail option
|
||||
$mail->useSendmail($sendmail);
|
||||
$mail->IsSendmail();
|
||||
break;
|
||||
|
||||
default:
|
||||
$mail->IsMail();
|
||||
break;
|
||||
}
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an email
|
||||
*
|
||||
* @return bool on success
|
||||
*
|
||||
*/
|
||||
public static function send($recipient, $subject, $body, $textonly, $mode = 0, $bounce_email = null, $idsession = null, $mailreply = null, $replyname = null , $mailfrom = null, $fromname = null, $cc = null, $bcc = null, $attachment = null, $embeded = null , $embeds = null)
|
||||
{
|
||||
|
||||
// Get a JMail instance
|
||||
$mail = self::getMailer();
|
||||
|
||||
// set component params
|
||||
$conf = self::getConfig();
|
||||
|
||||
// do some house cleaning
|
||||
$mail->ClearReplyTos();
|
||||
|
||||
// set if we have override
|
||||
if ($mailfrom && $fromname)
|
||||
{
|
||||
$mail->setSender(array($mailfrom, $fromname));
|
||||
}
|
||||
|
||||
// load the bounce email as sender if set
|
||||
if (!is_null($bounce_email))
|
||||
{
|
||||
|
||||
$mail->Sender = $bounce_email;
|
||||
}
|
||||
|
||||
// Add tag to email to identify it
|
||||
if (!is_null($idsession))
|
||||
{
|
||||
$mail->addCustomHeader('X-VDMmethodID:'.$idsession);
|
||||
}
|
||||
|
||||
// set the subject & Body
|
||||
$mail->setSubject($subject);
|
||||
$mail->setBody($body);
|
||||
|
||||
// Are we sending the email as HTML?
|
||||
if ($mode)
|
||||
{
|
||||
$mail->IsHTML(true);
|
||||
$mail->AltBody = $textonly;
|
||||
}
|
||||
|
||||
//embed images
|
||||
if ($embeded)
|
||||
{
|
||||
if(###Component###Helper::checkArray($embeds))
|
||||
{
|
||||
foreach($embeds as $embed)
|
||||
{
|
||||
$mail->AddEmbeddedImage($embed->Path,$embed->FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$mail->addRecipient($recipient);
|
||||
$mail->addCC($cc);
|
||||
$mail->addBCC($bcc);
|
||||
$mail->addAttachment($attachment);
|
||||
|
||||
// Take care of reply email addresses
|
||||
if (is_array($mailreply))
|
||||
{
|
||||
$mail->ClearReplyTos();
|
||||
$numReplyTo = count($mailreply);
|
||||
for ($i=0; $i < $numReplyTo; $i++)
|
||||
{
|
||||
$mail->addReplyTo($mailreply[$i], $replyname[$i]);
|
||||
}
|
||||
}
|
||||
elseif (!empty($mailreply))
|
||||
{
|
||||
$mail->ClearReplyTos();
|
||||
$mail->addReplyTo($mailreply, $replyname);
|
||||
}
|
||||
|
||||
// check if we can add the DKIM to email
|
||||
if ($conf->get('enable_dkim'))
|
||||
{
|
||||
if (!empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public')))
|
||||
{
|
||||
$mail->DKIM_domain = $conf->get('dkim_domain');
|
||||
$mail->DKIM_selector = $conf->get('dkim_selector');
|
||||
$mail->DKIM_identity = $conf->get('dkim_identity');
|
||||
$mail->DKIM_passphrase = $conf->get('dkim_passphrase');
|
||||
|
||||
$tmp = tempnam(sys_get_temp_dir(), 'VDM');
|
||||
$h = fopen($tmp, 'w');
|
||||
fwrite($h, $conf->get('dkim_private'));
|
||||
fclose($h);
|
||||
$mail->DKIM_private = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
$sendmail = $mail->Send();
|
||||
|
||||
if ($conf->get('enable_dkim') && !empty($conf->get('dkim_domain')) && !empty($conf->get('dkim_selector')) && !empty($conf->get('dkim_private')) && !empty($conf->get('dkim_public')))
|
||||
{
|
||||
@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;
|
||||
}
|
||||
}
|
@ -17,7 +17,7 @@
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@ -33,35 +33,38 @@ defined('_JEXEC') or die('Restricted access');
|
||||
* ###Component### component helper
|
||||
*/
|
||||
abstract class ###Component###Helper
|
||||
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT###
|
||||
|
||||
public static function jsonToString($value)
|
||||
{###SITE_GLOBAL_EVENT_HELPER### ###SITE_CUSTOM_HELPER_SCRIPT### ###BOTH_CUSTOM_HELPER_SCRIPT###
|
||||
|
||||
public static function jsonToString($value, $sperator = ", ", $table = null)
|
||||
{
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE) {
|
||||
// check if string is JSON
|
||||
$result = json_decode($value, true);
|
||||
if (json_last_error() === JSON_ERROR_NONE)
|
||||
{
|
||||
// is JSON
|
||||
if (self::checkArray($result))
|
||||
if (self::checkArray($result))
|
||||
{
|
||||
if (self::checkString($table))
|
||||
{
|
||||
$value = '';
|
||||
$counter = 0;
|
||||
foreach ($result as $string)
|
||||
$names = array();
|
||||
foreach ($result as $val)
|
||||
{
|
||||
if ($counter)
|
||||
if ($name = self::getVar($table, $val, 'id', 'name'))
|
||||
{
|
||||
$value .= ", ".$string;
|
||||
$names[] = $name;
|
||||
}
|
||||
else
|
||||
{
|
||||
$value .= $string;
|
||||
}
|
||||
$counter++;
|
||||
}
|
||||
if (self::checkArray($names))
|
||||
{
|
||||
return (string) implode($sperator,$names);
|
||||
}
|
||||
}
|
||||
return json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
return (string) implode($sperator,$result);
|
||||
}
|
||||
return (string) json_decode($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the Component xml manifest.
|
||||
@ -168,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
|
||||
@ -273,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);
|
||||
@ -332,6 +341,45 @@ abstract class ###Component###Helper
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function isPublished($id,$type)
|
||||
{
|
||||
if ($type == 'raw')
|
||||
{
|
||||
$type = 'item';
|
||||
}
|
||||
$db = JFactory::getDbo();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('a.published'));
|
||||
$query->from('#__###component###_'.$type.' AS a');
|
||||
$query->where('a.id = '. (int) $id);
|
||||
$query->where('a.published = 1');
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getGroupName($id)
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select(array('a.title'));
|
||||
$query->from('#__usergroups AS a');
|
||||
$query->where('a.id = '. (int) $id);
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
$found = $db->getNumRows();
|
||||
if($found)
|
||||
{
|
||||
return $db->loadResult();
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actions permissions
|
||||
@ -355,7 +403,7 @@ abstract class ###Component###Helper
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
// set to use component default
|
||||
$allow = true;
|
||||
$fallback = true;
|
||||
if (self::checkObject($record) && isset($record->id) && $record->id > 0 && !in_array($action->name,$componentActions))
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
@ -371,13 +419,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###.'.$view.'.' . (int) $record->id))
|
||||
@ -387,13 +435,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise('core.edit.own', 'com_###component###'))
|
||||
@ -403,13 +451,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###'))
|
||||
@ -419,13 +467,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -455,13 +503,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###.'.$views.'.category.' . (int) $record->catid))
|
||||
@ -471,13 +519,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise('core.edit.own', 'com_###component###'))
|
||||
@ -487,13 +535,13 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
elseif ($user->authorise($view.'edit.own', 'com_###component###'))
|
||||
@ -503,27 +551,37 @@ abstract class ###Component###Helper
|
||||
{
|
||||
$result->set($action->name, true);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result->set($action->name, false);
|
||||
// set not to use component default
|
||||
$allow = false;
|
||||
$fallback = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if allowed then fall back on component global settings
|
||||
if ($allow)
|
||||
// if allowed then fallback on component global settings
|
||||
if ($fallback)
|
||||
{
|
||||
$result->set($action->name, $user->authorise($action->name, 'com_###component###'));
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function checkJson($string)
|
||||
{
|
||||
if (self::checkString($string))
|
||||
{
|
||||
json_decode($string);
|
||||
return (json_last_error() === JSON_ERROR_NONE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function checkObject($object)
|
||||
{
|
||||
@ -783,7 +841,7 @@ abstract class ###Component###Helper
|
||||
$w .= ' ';
|
||||
if($r < 100)
|
||||
{
|
||||
$word .= 'and ';
|
||||
$w .= 'and ';
|
||||
}
|
||||
$w .= self::numberToString($r);
|
||||
}
|
||||
|
@ -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.
|
||||
@ -264,7 +264,7 @@ class ###Component###Controller###View### extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{###POSTSAVEHOOK###
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ class ###Component###Controller###View### extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{###POSTSAVEHOOK###
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -117,10 +117,10 @@ class ###Component###ControllerHelp extends JControllerLegacy
|
||||
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
|
||||
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
|
||||
// build the help text
|
||||
$text[] = '<h3 class="uk-panel-title">'.$document->title."</h3>";
|
||||
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
|
||||
$text[] = str_replace(array_keys($images),array_values($images),$document->content);
|
||||
// end template
|
||||
$text[] = '</div>';
|
||||
$text[] = '</div><br /><br />';
|
||||
$text[] = '</div>';
|
||||
$text[] = "</body>";
|
||||
$text[] = "</html>";
|
||||
|
@ -118,10 +118,10 @@ class ###Component###ControllerHelp extends JControllerLegacy
|
||||
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
|
||||
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
|
||||
// build the help text
|
||||
$text[] = '<h3 class="uk-panel-title">'.$document->title."</h3>";
|
||||
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
|
||||
$text[] = str_replace(array_keys($images),array_values($images),$document->content);
|
||||
// end template
|
||||
$text[] = '</div>';
|
||||
$text[] = '</div><br /><br />';
|
||||
$text[] = '</div>';
|
||||
$text[] = "</body>";
|
||||
$text[] = "</html>";
|
||||
|
70
admin/compiler/joomla_3/JControllerLegacy_import_custom.php
Normal file
70
admin/compiler/joomla_3/JControllerLegacy_import_custom.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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/>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// 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');
|
||||
|
||||
/**
|
||||
* ###Component### ###View### Controller
|
||||
*/
|
||||
class ###Component###Controller###View### extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Import an spreadsheet.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function import()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
$model = $this->getModel('###View###');
|
||||
if ($model->import())
|
||||
{
|
||||
$cache = JFactory::getCache('mod_menu');
|
||||
$cache->clean();
|
||||
// TODO: Reset the users acl here as well to kill off any missing bits
|
||||
}
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$redirect_url = $app->getUserState('com_###component###.redirect_url');
|
||||
if (empty($redirect_url))
|
||||
{
|
||||
$redirect_url = JRoute::_('index.php?option=com_###component###&view=###view###', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// wipe out the user state when we're going to redirect
|
||||
$app->setUserState('com_###component###.redirect_url', '');
|
||||
$app->setUserState('com_###component###.message', '');
|
||||
$app->setUserState('com_###component###.extension_message', '');
|
||||
}
|
||||
$this->setRedirect($redirect_url);
|
||||
}
|
||||
}
|
@ -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();
|
||||
|
||||
@ -199,7 +199,7 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
@ -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();
|
||||
|
||||
@ -199,7 +199,7 @@ class ###Component###Model###View### extends JModelAdmin
|
||||
{
|
||||
$table->created = $date->toSql();
|
||||
// set the user
|
||||
if ($table->created_by == 0)
|
||||
if ($table->created_by == 0 || empty($table->created_by))
|
||||
{
|
||||
$table->created_by = $user->id;
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
* Import Settings
|
||||
*/
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
protected $dataType = NULL;
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
@ -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;
|
||||
}
|
||||
@ -511,7 +515,6 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// reset all buckets
|
||||
$query = $db->getQuery(true);
|
||||
$fields = array();
|
||||
$version = false;
|
||||
// Fields to update.
|
||||
foreach($row as $key => $cell)
|
||||
{
|
||||
@ -534,7 +537,6 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
if ('version' == $target[$key])
|
||||
{
|
||||
$cell = (int) $version + 1;
|
||||
$version = true;
|
||||
}
|
||||
// verify publish authority
|
||||
if ('published' == $target[$key] && !$canState)
|
||||
@ -559,10 +561,6 @@ class ###Component###ModelImport extends JModelLegacy
|
||||
// load the defaults
|
||||
$fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id);
|
||||
$fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate);
|
||||
if (!$version)
|
||||
{
|
||||
$fields[] = $db->quoteName('version') . " = " . (int) $version + 1;
|
||||
}
|
||||
// Conditions for which records should be updated.
|
||||
$conditions = array(
|
||||
$db->quoteName('id') . ' = ' . $id
|
||||
|
370
admin/compiler/joomla_3/JModelLegacy_import_custom.php
Normal file
370
admin/compiler/joomla_3/JModelLegacy_import_custom.php
Normal file
@ -0,0 +1,370 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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/>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// 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');
|
||||
|
||||
/**
|
||||
* ###Component### ###View### Model
|
||||
*/
|
||||
class ###Component###Model###View### extends JModelLegacy
|
||||
{
|
||||
/**
|
||||
* @var object JTable object
|
||||
*/
|
||||
protected $_table = null;
|
||||
|
||||
/**
|
||||
* @var object JTable object
|
||||
*/
|
||||
protected $_url = null;
|
||||
|
||||
/**
|
||||
* Model context string.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_context = 'com_###component###.###view###';
|
||||
|
||||
/**
|
||||
* Import Settings
|
||||
*/
|
||||
protected $getType = NULL;
|
||||
protected $dataType = NULL;
|
||||
|
||||
/**
|
||||
* Method to auto-populate the model state.
|
||||
*
|
||||
* Note. Calling getState in this method will result in recursion.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
protected function populateState()
|
||||
{
|
||||
$app = JFactory::getApplication('administrator');
|
||||
|
||||
$this->setState('message', $app->getUserState('com_###component###.message'));
|
||||
$app->setUserState('com_###component###.message', '');
|
||||
|
||||
// Recall the 'Import from Directory' path.
|
||||
$path = $app->getUserStateFromRequest($this->_context . '.import_directory', 'import_directory', $app->get('tmp_path'));
|
||||
$this->setState('import.directory', $path);
|
||||
// set uploading values
|
||||
$this->use_streams = false;
|
||||
$this->allow_unsafe = false;
|
||||
$this->safeFileOptions = array();
|
||||
parent::populateState();
|
||||
}
|
||||
###IMPORT_METHOD_CUSTOM###
|
||||
|
||||
/**
|
||||
* Works out an importation spreadsheet from a HTTP upload
|
||||
*
|
||||
* @return spreadsheet definition or false on failure
|
||||
*/
|
||||
protected function _getPackageFromUpload()
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$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');
|
||||
|
||||
// Make sure that file uploads are enabled in php
|
||||
if (!(bool) ini_get('file_uploads'))
|
||||
{
|
||||
$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))
|
||||
{
|
||||
$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)
|
||||
{
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Build the appropriate paths
|
||||
$config = JFactory::getConfig();
|
||||
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
|
||||
$tmp_src = $userfile['tmp_name'];
|
||||
|
||||
// Move uploaded file
|
||||
jimport('joomla.filesystem.file');
|
||||
$p_file = JFile::upload($tmp_src, $tmp_dest, $this->use_streams, $this->allow_unsafe, $this->safeFileOptions);
|
||||
|
||||
// Was the package downloaded?
|
||||
if (!$p_file)
|
||||
{
|
||||
$session = JFactory::getSession();
|
||||
$session->clear('package');
|
||||
$session->clear('dataType');
|
||||
$session->clear('hasPackage');
|
||||
// was not uploaded
|
||||
return false;
|
||||
}
|
||||
|
||||
// check that this is a valid spreadsheet
|
||||
$package = $this->check($userfile['name']);
|
||||
|
||||
return $package;
|
||||
}
|
||||
|
||||
/**
|
||||
* Import an spreadsheet from a directory
|
||||
*
|
||||
* @return array Spreadsheet details or false on failure
|
||||
*
|
||||
*/
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$input = $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
$p_dir = JPath::clean($p_dir);
|
||||
// Did you give us a valid path?
|
||||
if (!file_exists($p_dir))
|
||||
{
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Detect the package type
|
||||
$type = $this->getType;
|
||||
|
||||
// Did you give us a valid package?
|
||||
if (!$type)
|
||||
{
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
|
||||
}
|
||||
|
||||
// check the extention
|
||||
switch(strtolower(pathinfo($p_dir, PATHINFO_EXTENSION))){
|
||||
case 'xls':
|
||||
case 'ods':
|
||||
case 'csv':
|
||||
break;
|
||||
|
||||
default:
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
$package['packagename'] = null;
|
||||
$package['dir'] = $p_dir;
|
||||
$package['type'] = $type;
|
||||
|
||||
return $package;
|
||||
}
|
||||
|
||||
/**
|
||||
* Import an spreadsheet from a URL
|
||||
*
|
||||
* @return Package details or false on failure
|
||||
*
|
||||
*/
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$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)
|
||||
{
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// Download the package at the URL given
|
||||
$p_file = JInstallerHelper::downloadPackage($url);
|
||||
|
||||
// Was the package downloaded?
|
||||
if (!$p_file)
|
||||
{
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
|
||||
return false;
|
||||
}
|
||||
|
||||
// check that this is a valid spreadsheet
|
||||
$package = $this->check($p_file);
|
||||
|
||||
return $package;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a file and verifies it as a spreadsheet file
|
||||
* Supports .csv .xlsx .xls and .ods
|
||||
*
|
||||
* @param string $p_filename The uploaded package filename or import directory
|
||||
*
|
||||
* @return array of elements
|
||||
*
|
||||
*/
|
||||
protected function check($archivename)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
// Clean the name
|
||||
$archivename = JPath::clean($archivename);
|
||||
|
||||
// check the extention
|
||||
switch(strtolower(pathinfo($archivename, PATHINFO_EXTENSION))){
|
||||
case 'xls':
|
||||
case 'ods':
|
||||
case 'csv':
|
||||
break;
|
||||
|
||||
default:
|
||||
// Cleanup the import files
|
||||
$this->remove($archivename);
|
||||
$app->enqueueMessage(JText::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
// set Package Name
|
||||
$check['packagename'] = $archivename;
|
||||
|
||||
// set directory
|
||||
$check['dir'] = $config->get('tmp_path'). '/' .$archivename;
|
||||
|
||||
// set type
|
||||
$check['type'] = $this->getType;
|
||||
|
||||
return $check;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up temporary uploaded spreadsheet
|
||||
*
|
||||
* @param string $package Name of the uploaded spreadsheet file
|
||||
*
|
||||
* @return boolean True on success
|
||||
*
|
||||
*/
|
||||
protected function remove($package)
|
||||
{
|
||||
jimport('joomla.filesystem.file');
|
||||
|
||||
$config = JFactory::getConfig();
|
||||
$package = $config->get('tmp_path'). '/' .$package;
|
||||
|
||||
// Is the package file a valid file?
|
||||
if (is_file($package))
|
||||
{
|
||||
JFile::delete($package);
|
||||
}
|
||||
elseif (is_file(JPath::clean($package)))
|
||||
{
|
||||
// It might also be just a base filename
|
||||
JFile::delete(JPath::clean($package));
|
||||
}
|
||||
}
|
||||
###IMPORT_SETDATE_METHOD_CUSTOM###
|
||||
###IMPORT_SAVE_METHOD_CUSTOM###
|
||||
|
||||
protected function getAlias($name,$type = false)
|
||||
{
|
||||
// sanitize the name to an alias
|
||||
if (JFactory::getConfig()->get('unicodeslugs') == 1)
|
||||
{
|
||||
$alias = JFilterOutput::stringURLUnicodeSlug($name);
|
||||
}
|
||||
else
|
||||
{
|
||||
$alias = JFilterOutput::stringURLSafe($name);
|
||||
}
|
||||
// must be a uniqe alias
|
||||
if ($type)
|
||||
{
|
||||
return $this->getUniqe($alias,'alias',$type);
|
||||
}
|
||||
return $alias;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to generate a uniqe value.
|
||||
*
|
||||
* @param string $field name.
|
||||
* @param string $value data.
|
||||
* @param string $type table.
|
||||
*
|
||||
* @return string New value.
|
||||
*/
|
||||
protected function getUniqe($value,$field,$type)
|
||||
{
|
||||
// insure the filed is always uniqe
|
||||
while (isset($this->uniqeValueArray[$type][$field][$value]))
|
||||
{
|
||||
$value = JString::increment($value, 'dash');
|
||||
}
|
||||
$this->uniqeValueArray[$type][$field][$value] = $value;
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function getAliasesUsed($table)
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = JFactory::getDbo();
|
||||
// first we check if there is a alias column
|
||||
$columns = $db->getTableColumns('#__###component###_'.$table);
|
||||
if(isset($columns['alias'])){
|
||||
// Create a new query object.
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('alias')));
|
||||
$query->from($db->quoteName('#__###component###_'.$table));
|
||||
$db->setQuery($query);
|
||||
$db->execute();
|
||||
if ($db->getNumRows())
|
||||
{
|
||||
$aliases = $db->loadColumn();
|
||||
foreach($aliases as $alias)
|
||||
{
|
||||
$this->uniqeValueArray[$table]['alias'][$alias] = $alias;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -67,7 +67,7 @@ class ###Component###Model###SViews### extends JModelList
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;###CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY### ###CUSTOM_ADMIN_GET_LIST_QUERY###
|
||||
$this->initSet = true; ###CUSTOM_ADMIN_GET_LIST_QUERY###
|
||||
}
|
||||
|
||||
/**
|
||||
@ -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
|
||||
|
@ -67,7 +67,7 @@ class ###Component###Model###SViews### extends JModelList
|
||||
$this->levels = $this->user->getAuthorisedViewLevels();
|
||||
$this->app = JFactory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->initSet = true;###SITE_CUSTOM_BEFORE_LIST_QUERY### ###SITE_GET_LIST_QUERY###
|
||||
$this->initSet = true; ###SITE_GET_LIST_QUERY###
|
||||
}
|
||||
|
||||
/**
|
||||
@ -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
|
||||
|
@ -67,7 +67,7 @@ class ###Component###View###SView### extends JViewLegacy
|
||||
// hide the main menu
|
||||
$this->app->input->set('hidemainmenu', true);
|
||||
// set the title
|
||||
if ($this->item->name)
|
||||
if (isset($this->item->name) && $this->item->name)
|
||||
{
|
||||
$title = $this->item->name;
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ class ###Component###View###View### extends JViewLegacy
|
||||
$document->setTitle(JText::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
$document->addStyleSheet(JURI::root() . "administrator/components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
$document->addScript(JURI::root() . $this->script);
|
||||
$document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js");
|
||||
$document->addScript(JURI::root() . "administrator/components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP###
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ class ###Component###View###View### extends JViewLegacy
|
||||
$document->addStyleSheet(JURI::root()."components/com_###component###/assets/css/###view###.css");###AJAXTOKE### ###LINKEDVIEWTABLESCRIPTS###
|
||||
// default javascript of this view
|
||||
$document->addScript(JURI::root().$this->script);
|
||||
$document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js");
|
||||
$document->addScript(JURI::root(). "components/com_###component###/views/###view###/submitbutton.js"); ###DOCUMENT_CUSTOM_PHP###
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
61
admin/compiler/joomla_3/JViewLegacy_import_custom.php
Normal file
61
admin/compiler/joomla_3/JViewLegacy_import_custom.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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/>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// 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');###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
// import Joomla view library
|
||||
jimport('joomla.application.component.view');
|
||||
|
||||
/**
|
||||
* ###Component### ###View### View
|
||||
*/
|
||||
class ###Component###View###View### extends JViewLegacy
|
||||
{###IMPORT_DISPLAY_METHOD_CUSTOM###
|
||||
|
||||
/**
|
||||
* Setting the toolbar
|
||||
*/
|
||||
protected function addToolBar()
|
||||
{
|
||||
JToolBarHelper::title(JText::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
|
||||
JHtmlSidebar::setAction('index.php?option=com_###component###&view=###view###');
|
||||
|
||||
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
|
||||
{
|
||||
JToolBarHelper::preferences('com_###component###');
|
||||
}
|
||||
|
||||
// set help url for this view if found
|
||||
$help_url = ###Component###Helper::getHelpUrl('###view###');
|
||||
if (###Component###Helper::checkString($help_url))
|
||||
{
|
||||
JToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $help_url);
|
||||
}
|
||||
}
|
||||
}
|
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
|
||||
@ -46,7 +46,7 @@ $document->addStyleSheet('components/com_###component###/assets/css/admin.css');
|
||||
$document->addScript('components/com_###component###/assets/js/admin.js');
|
||||
|
||||
// require helper files
|
||||
JLoader::register('###Component###Helper', dirname(__FILE__) . '/helpers/###component###.php');
|
||||
JLoader::register('###Component###Helper', dirname(__FILE__) . '/helpers/###component###.php'); ###HELPER_EMAIL###
|
||||
JLoader::register('JHtmlBatch_', dirname(__FILE__) . '/helpers/html/batch_.php');###LICENSE_LOCKED_INT### ###ADMIN_GLOBAL_EVENT###
|
||||
|
||||
// import joomla controller library
|
||||
|
@ -35,7 +35,7 @@ $document->addStyleSheet('components/com_###component###/assets/css/site.css');
|
||||
$document->addScript('components/com_###component###/assets/js/site.js');
|
||||
|
||||
// Require helper files
|
||||
JLoader::register('###Component###Helper', dirname(__FILE__) . '/helpers/###component###.php');
|
||||
JLoader::register('###Component###Helper', dirname(__FILE__) . '/helpers/###component###.php'); ###HELPER_EMAIL###
|
||||
JLoader::register('###Component###HelperRoute', dirname(__FILE__) . '/helpers/route.php');###LICENSE_LOCKED_INT### ###SITE_GLOBAL_EVENT###
|
||||
|
||||
// import joomla controller library
|
||||
|
@ -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,10 +32,10 @@ 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)) : ?>
|
||||
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList)) : ?>
|
||||
Joomla.continueImport = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
@ -62,7 +62,7 @@ JHtml::_('script', 'system/core.js', false, true);
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
Joomla.submitbutton = function()
|
||||
{
|
||||
var form = document.getElementById('adminForm');
|
||||
@ -115,25 +115,25 @@ JHtml::_('script', 'system/core.js', false, true);
|
||||
form.submit();
|
||||
}
|
||||
};
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
// Add spindle-wheel for importations:
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $('body');
|
||||
// Add spindle-wheel for importations:
|
||||
jQuery(document).ready(function($) {
|
||||
var outerDiv = $('body');
|
||||
|
||||
$('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_###component###/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - $(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - $(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
});
|
||||
$('<div id="loading"></div>')
|
||||
.css("background", "rgba(255, 255, 255, .8) url('components/com_###component###/assets/images/import.gif') 50% 15% no-repeat")
|
||||
.css("top", outerDiv.position().top - $(window).scrollTop())
|
||||
.css("left", outerDiv.position().left - $(window).scrollLeft())
|
||||
.css("width", outerDiv.width())
|
||||
.css("height", outerDiv.height())
|
||||
.css("position", "fixed")
|
||||
.css("opacity", "0.80")
|
||||
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
|
||||
.css("filter", "alpha(opacity = 80)")
|
||||
.css("display", "none")
|
||||
.appendTo(outerDiv);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -148,89 +148,87 @@ JHtml::_('script', 'system/core.js', false, true);
|
||||
<?php else : ?>
|
||||
<div id="j-main-container">
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList) && ###Component###Helper::checkArray($this->headers)) : ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
|
||||
<div class="controls">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach($this->headerList as $name => $title): ?>
|
||||
<div class="control-group">
|
||||
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
|
||||
<div class="controls">
|
||||
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
|
||||
<option value=""><?php echo JText::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
|
||||
<option value="IGNORE"><?php echo JText::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
|
||||
<?php foreach($this->headers as $value => $option): ?>
|
||||
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
|
||||
<option value="<?php echo ###Component###Helper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ###Component###Helper::htmlEscape($option); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="gettype" value="continue" />
|
||||
<?php else: ?>
|
||||
|
||||
<?php if ($this->hasPackage && ###Component###Helper::checkArray($this->headerList) && ###Component###Helper::checkArray($this->headers)) : ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
|
||||
<div class="controls">
|
||||
<label class="control-label" ><h4><?php echo JText::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
|
||||
</div>
|
||||
</div>
|
||||
<?php foreach($this->headerList as $name => $title): ?>
|
||||
<div class="control-group">
|
||||
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
|
||||
<div class="controls">
|
||||
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
|
||||
<option value=""><?php echo JText::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
|
||||
<option value="IGNORE"><?php echo JText::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
|
||||
<?php foreach($this->headers as $value => $option): ?>
|
||||
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
|
||||
<option value="<?php echo ###Component###Helper::htmlEscape($value); ?>" class="required" <?php echo $selected ?>><?php echo ###Component###Helper::htmlEscape($option); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="gettype" value="continue" />
|
||||
<?php else: ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'upload')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_package" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
|
||||
<div class="controls">
|
||||
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_directory" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_url" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'upload', JText::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_package" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
|
||||
<div class="controls">
|
||||
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="button" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'directory', JText::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_directory" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'url', JText::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
|
||||
<fieldset class="uploadform">
|
||||
<legend><?php echo JText::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
|
||||
<div class="control-group">
|
||||
<label for="import_url" class="control-label"><?php echo JText::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
|
||||
<div class="controls">
|
||||
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="button" class="btn btn-primary" value="<?php echo JText::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" /> <small><?php echo JText::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
|
||||
<input type="hidden" name="gettype" value="upload" />
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="import.import" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="task" value="import.import" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
36
admin/compiler/joomla_3/default_import_custom.php
Normal file
36
admin/compiler/joomla_3/default_import_custom.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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/>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Builds Complex Joomla Components
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// 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');###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'); ?>
|
||||
|
@ -30,16 +30,18 @@ defined('_JEXEC') or die('Restricted access');
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
?>
|
||||
<?php if(is_array($this->icons['main'])) :?>
|
||||
<?php if(isset($this->icons['main']) && is_array($this->icons['main'])) :?>
|
||||
<?php foreach($this->icons['main'] as $icon): ?>
|
||||
<div class="dashboard-wraper">
|
||||
<div class="dashboard-content">
|
||||
<a class="icon hasTip" href="<?php echo $icon->url; ?>">
|
||||
<img alt="<?php echo $icon->alt; ?>" src="components/com_###component###/assets/images/icons/<?php echo $icon->image; ?>">
|
||||
<span class="dashboard-title"><?php echo JText::_($icon->name); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="clearfix"></div>
|
||||
<div class="dashboard-wraper">
|
||||
<div class="dashboard-content">
|
||||
<a class="icon" href="<?php echo $icon->url; ?>">
|
||||
<img alt="<?php echo $icon->alt; ?>" src="components/com_###component###/assets/images/icons/<?php echo $icon->image; ?>">
|
||||
<span class="dashboard-title"><?php echo JText::_($icon->name); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="clearfix"></div>
|
||||
<?php else: ?>
|
||||
<div class="alert alert-error"><h4 class="alert-heading"><?php echo JText::_("Permission denied, or not correctly set"); ?></h4><div class="alert-message"><?php echo JText::_("Please notify your System Administrator if result is unexpected."); ?></div></div>
|
||||
<?php endif; ?>
|
@ -36,7 +36,8 @@ JHtml::_('formbehavior.chosen', 'select');
|
||||
JHtml::_('behavior.keepalive');
|
||||
$componentParams = JComponentHelper::getParams('com_###component###');
|
||||
?>
|
||||
|
||||
###EDITBODYFADEIN###
|
||||
<form action="<?php echo JRoute::_('index.php?option=com_###component###&layout=edit&id='.(int) $this->item->id.$this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
|
||||
###EDITBODY###
|
||||
</form>###EDITBODYSCRIPT###
|
||||
</form>
|
||||
</div>###EDITBODYSCRIPT###
|
||||
|
@ -1 +1,6 @@
|
||||
###INSTALL###
|
||||
###INSTALL###
|
||||
|
||||
--
|
||||
-- Always insure this column is large enough for all the access control values.
|
||||
--
|
||||
ALTER TABLE `#__assets` CHANGE `rules` `rules` MEDIUMTEXT NOT NULL COMMENT 'JSON encoded access control.';
|
||||
|
@ -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/",
|
||||
@ -225,6 +231,11 @@
|
||||
"rename": false,
|
||||
"type": "encrypt"
|
||||
},
|
||||
"Helper_email.php": {
|
||||
"path": "c0mp0n3nt/admin/helpers",
|
||||
"rename": "Helper_",
|
||||
"type": "emailer"
|
||||
},
|
||||
"DASHJControllerAdmin.php": {
|
||||
"path": "c0mp0n3nt/admin/controllers",
|
||||
"rename": "DASHJControllerAdmin",
|
||||
@ -460,6 +471,28 @@
|
||||
"rename": false,
|
||||
"type": "import"
|
||||
},
|
||||
"JControllerLegacy_import_custom.php": {
|
||||
"path": "c0mp0n3nt/admin/controllers",
|
||||
"rename": "JControllerLegacy_import_custom",
|
||||
"type": "customimport"
|
||||
},
|
||||
"JModelLegacy_import_custom.php": {
|
||||
"path": "c0mp0n3nt/admin/models",
|
||||
"rename": "JModelLegacy_import_custom",
|
||||
"type": "customimport"
|
||||
},
|
||||
"JViewLegacy_import_custom.php": {
|
||||
"path": "c0mp0n3nt/admin/views/VIEW",
|
||||
"rename": "new",
|
||||
"newName": "view.html.php",
|
||||
"type": "customimport"
|
||||
},
|
||||
"default_import_custom.php": {
|
||||
"path": "c0mp0n3nt/admin/views/VIEW/tmpl",
|
||||
"rename": "new",
|
||||
"newName": "default.php",
|
||||
"type": "customimport"
|
||||
},
|
||||
"JControllerLegacyHelp.php": {
|
||||
"path": "c0mp0n3nt/admin/controllers",
|
||||
"rename": "new",
|
||||
@ -700,7 +733,7 @@
|
||||
"type": "template"
|
||||
},
|
||||
"layout_custom_admin.php": {
|
||||
"path": "c0mp0n3nt/admin/layouts/VIEW",
|
||||
"path": "c0mp0n3nt/admin/layouts",
|
||||
"rename": "layout_custom_admin",
|
||||
"type": "layout"
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
@ -44,7 +43,7 @@ $document->addStyleSheet('components/com_componentbuilder/assets/css/admin.css')
|
||||
$document->addScript('components/com_componentbuilder/assets/js/admin.js');
|
||||
|
||||
// require helper files
|
||||
JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/componentbuilder.php');
|
||||
JLoader::register('ComponentbuilderHelper', dirname(__FILE__) . '/helpers/componentbuilder.php');
|
||||
JLoader::register('JHtmlBatch_', dirname(__FILE__) . '/helpers/html/batch_.php');
|
||||
|
||||
// import joomla controller library
|
||||
|
287
admin/config.xml
287
admin/config.xml
@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<fieldset
|
||||
addrulepath="/administrator/components/com_componentbuilder/models/rules"
|
||||
addfieldpath="/administrator/components/com_componentbuilder/models/fields"
|
||||
name="global_config"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC">
|
||||
@ -28,7 +30,7 @@
|
||||
name="save_history"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="0"
|
||||
default="1"
|
||||
label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"
|
||||
description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"
|
||||
>
|
||||
@ -83,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"
|
||||
@ -466,6 +203,24 @@
|
||||
filter="PATH"
|
||||
message="Error! Please add folder path here."
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_BACKUP_FOLDER_PATH_HINT"
|
||||
/>
|
||||
<!-- Note_git_folder_path Field. Type: Note. A None Database Field. (joomla) -->
|
||||
<field type="note" name="note_git_folder_path" label="COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_GIT_FOLDER_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_git_folder_path" />
|
||||
<!-- Git_folder_path Field. Type: Text. (joomla) -->
|
||||
<field
|
||||
type="text"
|
||||
name="git_folder_path"
|
||||
label="COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_LABEL"
|
||||
size="70"
|
||||
maxlength="150"
|
||||
description="COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_DESCRIPTION"
|
||||
class="text_area"
|
||||
readonly="false"
|
||||
disabled="false"
|
||||
required="false"
|
||||
filter="PATH"
|
||||
message="Error! Please add folder path here."
|
||||
hint="COM_COMPONENTBUILDER_CONFIG_GIT_FOLDER_PATH_HINT"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerAdmin_view extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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,8 +42,11 @@ 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');
|
||||
$this->registerTask('layoutDetails', 'ajax');
|
||||
$this->registerTask('templateDetails', 'ajax');
|
||||
$this->registerTask('snippetDetails', 'ajax');
|
||||
@ -67,9 +69,86 @@ 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
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$tableValue = $jinput->get('table', NULL, 'WORD');
|
||||
if($tableValue && $user->id != 0)
|
||||
{
|
||||
@ -79,9 +158,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -90,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
|
||||
{
|
||||
@ -103,6 +186,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'fieldSelectOptions':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -112,9 +196,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -123,9 +211,47 @@ 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
|
||||
{
|
||||
echo "(".json_encode($e).");";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'getImportScripts':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$typeValue = $jinput->get('type', NULL, 'WORD');
|
||||
if($typeValue && $user->id != 0)
|
||||
{
|
||||
$result = $this->getModel('ajax')->getImportScripts($typeValue);
|
||||
}
|
||||
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
|
||||
{
|
||||
@ -136,6 +262,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'layoutDetails':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', null, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -145,9 +272,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -156,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
|
||||
{
|
||||
@ -169,6 +300,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'templateDetails':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', null, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -178,9 +310,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,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
|
||||
{
|
||||
@ -202,6 +338,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'snippetDetails':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -211,9 +348,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -222,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
|
||||
{
|
||||
@ -235,6 +376,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'dynamicValues':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$viewValue = $jinput->get('view', NULL, 'WORD');
|
||||
if($idValue && $viewValue && $user->id != 0)
|
||||
@ -245,9 +387,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -256,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
|
||||
{
|
||||
@ -269,6 +415,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'dynamicFormDetails':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -278,9 +425,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -289,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
|
||||
{
|
||||
@ -302,6 +453,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'dbTableColumns':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$nameValue = $jinput->get('name', NULL, 'WORD');
|
||||
$asValue = $jinput->get('as', NULL, 'WORD');
|
||||
$typeValue = $jinput->get('type', NULL, 'INT');
|
||||
@ -313,9 +465,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -324,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
|
||||
{
|
||||
@ -337,6 +493,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'viewTableColumns':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
$asValue = $jinput->get('as', NULL, 'WORD');
|
||||
$typeValue = $jinput->get('type', NULL, 'INT');
|
||||
@ -348,9 +505,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -359,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
|
||||
{
|
||||
@ -372,6 +533,7 @@ class ComponentbuilderControllerAjax extends JControllerLegacy
|
||||
case 'fieldOptions':
|
||||
try
|
||||
{
|
||||
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
|
||||
$idValue = $jinput->get('id', NULL, 'INT');
|
||||
if($idValue && $user->id != 0)
|
||||
{
|
||||
@ -381,9 +543,13 @@ 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)
|
||||
{
|
||||
echo json_encode($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -392,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
|
||||
{
|
||||
@ -406,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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -305,7 +304,7 @@ class ComponentbuilderControllerComponent extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerCustom_admin_view extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerDynamic_get extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -349,7 +348,7 @@ class ComponentbuilderControllerField extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -349,7 +348,7 @@ class ComponentbuilderControllerFieldtype extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -115,10 +114,10 @@ class ComponentbuilderControllerHelp extends JControllerLegacy
|
||||
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';
|
||||
$text[] = '<div class="uk-panel uk-width-1-1 uk-panel-box uk-panel-box-primary">';
|
||||
// build the help text
|
||||
$text[] = '<h3 class="uk-panel-title">'.$document->title."</h3>";
|
||||
$text[] = '<h1 class="uk-panel-title">'.$document->title."</h1>";
|
||||
$text[] = str_replace(array_keys($images),array_values($images),$document->content);
|
||||
// end template
|
||||
$text[] = '</div>';
|
||||
$text[] = '</div><br /><br />';
|
||||
$text[] = '</div>';
|
||||
$text[] = "</body>";
|
||||
$text[] = "</html>";
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerHelp_document extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerLayout extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerSite_view extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerSnippet extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
@ -319,7 +318,7 @@ class ComponentbuilderControllerTemplate extends JControllerForm
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy &$model, $validData = array())
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -10,13 +10,12 @@
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 2.0.9
|
||||
@build 31st January, 2016
|
||||
@version 2.2.4
|
||||
@build 25th November, 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 <https://www.vdm.io/joomla-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
|
||||
|
||||
|
49
admin/custom/PHPExcel/Reader/ChunkReadFilter.php
Normal file
49
admin/custom/PHPExcel/Reader/ChunkReadFilter.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
|
||||
__ __ _ _____ _ _ __ __ _ _ _
|
||||
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
|
||||
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
|
||||
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
|
||||
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
|
||||
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
|
||||
| |
|
||||
|_|
|
||||
/-------------------------------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@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
|
||||
|
||||
/-----------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/** PHPExcel root directory */
|
||||
if (!defined('PHPEXCEL_ROOT')) {
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
|
||||
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
|
||||
}
|
||||
|
||||
class PHPExcel_Reader_chunkReadFilter implements PHPExcel_Reader_IReadFilter
|
||||
{
|
||||
private $_startRow = 0;
|
||||
private $_endRow = 0;
|
||||
|
||||
/** Set the list of rows that we want to read */
|
||||
public function setRows($startRow, $chunkSize)
|
||||
{
|
||||
$this->_startRow = $startRow;
|
||||
$this->_endRow = $startRow + $chunkSize;
|
||||
}
|
||||
|
||||
public function readCell($column, $row, $worksheetName = '')
|
||||
{
|
||||
// Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow
|
||||
if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user