JOOMLA : template overrides for plugin - php

i'm doing a gallery plugin for joomla, someone told me to use template overrides, i really don't know what the hell is this, and why i need to use it for my gallery plugin? i did googling and found this article useful Joomla template override , but still i am not able understand why i need this, and how to do this for my gallery plugin 'cause the example i found is for modules, your help will be much appreciated.

If you are simply trying to insert some content (a gallery) into the output via a plugin, template overrides are not what you need. Template overrides would allow you to modify the output of a component or a module, but not to insert a functionality like a gallery. You simply want to create a plugin that acts on onContentPrepare.

Related

is there a way to make HTML, CSS , JS static page a wordpress dashboard so that the user can change the content images

I am working on a landing page using HTML, CSS , and JavaScript which are the tolls I am familiar with, but the client informed me that he want a dashboard to update the contents , images ...etc . I am not familiar with WordPress and have not done any project before. So is there any way to create the website then convert it into WP or any other way to solve the issue I am facing ?
hope I found a solution here
Yes you can create the HTML first. Then you can convert it to a WordPress Theme. But would require some PHP coding and knowledge in WordPress template structure, functions, etc.
Or else, you can hire a developer for this purpose.
Or the more easier way for you would be to use a drag and drop content creation plugin like Elementor (personally, I like it more) or WPBakery or something else.
EDIT:
To answer your question in comment, there's a starter theme called Hello. You can use it as your canvas and start adding your components and layouts in it. There are many third party Elementor addons available for use (some are premium). I mean certain elements for your layout would already be there as an addon widget created by someone else or it might be already shipped with the Elementor plugin!
If you have some time to spare (I mean it's not an urgent project), I would suggest some time playing with it.

Customising a plugin for Genesis/Studiopress Wordpress

I have created a carousel (not perfect yet - images are not showing but it could work) with custom control icons ("next" "back") with Boostrap:http://homepage160630-v3.bitballoon.com/travel
Being not familiar with PHP, I found it difficult to integrate a CMS like Wordpress into my code, so I am trying to re-create the same site as a Genesis/Studiopress Wordpress site based on the Genesis Sample theme:
http://paulheartfieldphotography.com/home/portraits/
My biggest problem is to create the carousel. I have looked at "Easing Slider" plugin: of course it does not allow to position the control icons or even to create my own.
I wonder what shall I do? try to create the custom carousel by transforming my Bootstrap code into PHP or try to edit the plugin? or something else?
https://en-gb.wordpress.org/plugins/easing-slider/
I think your best option is to get bootstrap shortcode plugin like this one https://wordpress.org/plugins/bootstrap-3-shortcodes/
However there are a bunch of them and you should check what works best for you. The link above is just to visualize.

include wp custom post templates in plugin

I trying to include two theme template files into a wp plugin that deals with custom post types and for the life of me cant figure out a way to do it, I have searched extensively and believe posting here is the best option if I am to find an answer.
The custom post type is videos which is using single-video.php as the single template and category-253.php for the category and am wanting to move them from the child theme into the plugin/includes/templates directory so the plugin is independent.
Anyone have any ideas ?
this should cover what you are looking for
http://tommcfarlin.com/page-template-in-plugin/
but as far as plugin integration, you can try the shortcode method to display template codes from plugins
[myshortcode parm=1 parm=2 parm=3]
to do something in a plugin like for example list your custom post with different options

Wordpress plugin using existing theme

I am building a plugin for the first time and I have setup my rewrite rules to call a PHP file I have located in my plugin folder and this is working but all I have it output just now is "test"
I wanted to ask, is there is a way of pulling in the existing theme and using this as the basis for the page, then I can have my plugin just output the page content area so to speak.
My plugin is quite big in terms of the amount of data it handles so I would like to be able to use a menu link to the aforementioned file and this file can then output all the sub pages of content but still using the default theme (theme I have made) and fill the content area only is this possible and if so is there anything to explain this already available because I couldn't see it.
Any help with this would be much appreciated.
Edit: I have tried including a file from my current theme but this will give me a 500 error so I assume its not as simple as this.
Have you thought about using custom post types for your plugin content rather than relying on custom tables and separate code?
Other than that, you could use a shortcode (just one) and have users insert that into a regular WP page, the shortcode then displays all of your various plugin stuff.
It's hard to be more specific without understanding why you've done it this way.

Create a custom wordpress plugin than can be called directly like mydomain.com/mytemplate.php?id=xx

I need to create a template, which is done by now, but i want to call it directly without have to create any page that use my file as the template.
The idea was having a specific template to show some custom information and call it like: http://mydomain.com/mycustomtemplate.php?id=7777
I try to call it like it is and doesn't work... says file or directoy not found
Anyone has a sugestion or been through this?
Thanks i advance!
I think you need to elaborate a little more on this. Is the idea to have a custom template for only certain pages?
Wordpress themes (or templates as you are reffing to them as) don't work in the manner that you are referring to:
http://mydomain.com/mycustomtemplate.php?id=7777
The link above refers to a file outside of the whole Wordpress Theme hierarchy.
Please be more clear on what you are trying to accomplish.
You want to have a template, but no file that actually uses it? You'd need some hack up Wordpress's standard RewriteRules to detect a URL that should use your template and redirect the request somewhere that is aware of the template.
You're basically saying "I want to have a car, but I don't want to actually HAVE a car, how can I have a car?"

Categories