How to load my plugin file on joomla's back-end? - php

I have developed a joomla extension and want to load a php file within my extension directory onto joomla's back-end (Admin page).
For developing the extension, I have followed the developer document of joomla and install it on an instance of joomla. It located at administrator\components\com_myextension as the picture below:
Note: The root folder of joomla is jStore
For my intention, to achieve the result I have to define the behavior in xml file so that myextension.php file can be included whenever admin page viewed or to write a function to include myextension.php file when my extension installed. Neither way I don't know how to do that yet!
In conclusion, what I want to achieve is to load the file myextension.php whenever joomla's admin page loaded. And this must be automatically.
Regards,
Dung Tri

I have figured out a new way to run a php script after my plugin activated.
The way is to develop a system plugin for Joomla. The system plugin support some functions that can automatically run when admin page is viewed like: onAfterInitialise, onAfterRoute, onAfterDispatch, onBeforeRender.
You can see a tutorial at docs.joomla.org/J3.x:Creating_a ... for_Joomla and download sample project at github.com/joomla/joomla-cms-examples

Related

How to add custom PHP files in Typo3 9 LTS

I want to show advanced search page which includes PHP, HTML and CSS code. Its work is to get User inputs and process/execute a query to get results from Oracle DB. There are multiple PHP files which are linked to each other and index.php is root point. All custom files are in a folder named "prod". So the problem is I want to redirect to index.php after User login in Typo3 9 LTS CMS. But do not know how to achieve this. Please help me what is the best and easy way to do this in Typo3 9 LTS version. Is there any extension which can help me. And which files I have to configure to achieve this. I am using Fluid template extension.
As this are individual PHP scripts unrelated to TYPO3 you can consider them external pages to TYPO3. if you want to have a link inside of your installation to that pages use a page with type Link to External URL. After FE-login you can forward to this TYPO3 page, which redirects to the external URL.
Be aware that the external script (your script) has no login validation from TYPO3 and that the URL, once known, can be called without a login.

How can I find the file some element is loaded from?

I manage a website which is based on Drupal CMS. I have FTP access and I want to modify the structure of the header.
I know that the header is loaded from separated php file but I don't know what is the path to the file and how to find it in FTP.
Is there any way in Chrome dev tools to find the path to the file and is there a general way to find the files from which some part is loaded?
Check under "Appearance" from admin menu what theme is used and download whole theme over FTP. Themes should be in sites/all/themes dir. Then search the theme files and change what you need.
I don't think that browser can be aware of theme structure since it receives the whole pages and it can not know how page html is built on server side. There is an drupal module called Theme developer which can help you with that:
https://www.drupal.org/project/devel_themer
Unfortunately it exists only for Drupal 6 & Drupal 7 - not sure what version of drupal uses your site.

Modifying Joomla html5 module chrome

I want to modify the module chrome for the Joomla custom html module. I understand that I can simply overwrite it or create an alternative chrome by creating a modules.php file in my template html folder. However, I have no idea where I can find the code for the existing, standard Joomla chromes so that I can modify them - does anybody know where the standard chrome php/html markup files are located or generated in the file system? Of course I could write it all from scratch in theory but I just want a slight variation to the existing html5 module and I would like to see how it is constructed to learn from it. Anybody got any clues where t can be found in Joomla 3.1? The documentation is sparse on the matter.
You can use the system modules.php file that comes with joomla as a starting point for your own module chrome. It is located under the templates/system/html/modules.php
For the custom html module overrides:
Copy the default.php file located under the /modules/mod_custom/tmpl/ directory over to /templates/yourtemplatename/html/mod_custom/ directory.

how to add joomla site header in my custom php file without using ready made plugin or module?

I have been develope one site in joomla framework. Now my trouble is that client want one custom page in this site. so, please guide me how to i setup theme interface in this custom page?
Although this is not my favorite solution, instead of including Joomla in your script, you can put your script inside an article with an extension that can read your code, like DirectPHP and others.
You can make something like error.php which is really a mini application that renders a single page. You can see in the core how elements of the emplae are used and you can evn pull in modules and so on.

Joomla PHP file

I have a PHP file, which uses jquery and other, It uploads the image to upload folder , I want to use the same structure to my joomla 1.5 site. I am not sure how can I get this working in side a module . I tried taking all the file with default joomla module structure but I could not see more than the title of my joomla module . Not sure If I am missing something . Please guide me how I can take this to my site ?
img : http://i.stack.imgur.com/3yk0h.png
We firstly you will need to create a basic Joomla module structure as you will see in the default Joomla module such as "Login". Seeing as you have only provided a screenshot of the files and folders you're using, I am limited to what I can provide you.
So the first link is this:
http://docs.joomla.org/Creating_a_simple_module
It shows you how to create a simple module and after that, have a search on Google for other tutorials.
Also, if you don't want to create you own module, you could always use a pre made one from the Joomla Extensions Directory.

Categories