I'm trying to change the source of a table in a Joomla 1.5.9 page from hardcoded html in the page to getting the information from a SQL database. What is the proper way to do this? Create a new model or component and somehow use that in the page?
I found these:
http://docs.joomla.org/Tutorial:How_to_use_the_database_classes_in_your_script
http://docs.joomla.org/How_to_use_the_database_classes_in_your_script
But I'm not sure where to write the php code and how to access it in the page. If somebody could point me to a basic tutorial for custom php or whatever it's called, I'm new to webb development, I'd be happy.
You can use the Jumi extension to add custom PHP code to a Joomla page or module.
You Can install The Php Pages Component in joomla 1.5 .Where you can write your custom php code in joomla .
Also using this Php Pages Component you can Also write the query in the Php Code Itself.
So That you can extract the data from the database.
Related
I'm new to joomla! extension development, and I'm developing a simple component,the idea of my component is to insert a couple of data into database. In the admin when people click on the new button it should enable them to insert values according to the form I created. Here is my problem when I click on the new button it show's me this error:
JForm::getInstance could not load file
So far i have created all the basic MVC model that the joomla! interface needs. Need help.
Thank you.(I'm using Joomla! version 3.0)
That error is because joomla is not loading your form correctly. Can't say anything else without looking at the code, sorry.
If you want to see how a component works with a clean, functional written code, check http://component-creator.com. It creates a complete component with CRUD functions in 5-10 mins.
Regards,
Andrés
I have 2 php pages, form.php and results.php. The form accepts user data and send to the database with mysql query, the results page retrieves the data for display.
I have installed Joomla as my CMS and it is connected with the database in which the form data is also stored.
How can i use these two pages in joomla?
You are better off developing a component for Joomla as that is the correct way to extend the functionality. Take a look at http://www.component-creator.com it can write all the code for you.
You can place these two pages into your web root directory & those will work.
If you want to use configurations defined for Joomla, just include those files into your PHP files.
If you want to place your form within a Joomla article, I would suggest using a form builder extension - there are quite a few in the Joomla extensions directory: http://extensions.joomla.org/extensions/contacts-and-feedback/forms
Using an extension like this will allow you to create your form in the Joomla admin area, publish it to your site, and then accept submissions which could then be emailed to you or viewed in the admin area.
So I am trying to convert a certain type of page view into PDF (and also CSV's but thats another hurdle). The tricky part is that I am using Joomla 3.0 so the ever popular PhocaPDF extension will not work.
So far I have tried using http://docs.joomla.org/Creating_PDF_views, but it ends up throwing errors when referring to JRENDER().
Also I have tried using this extension
http://rootprogress.com/index.php/downloads/root-pdf-content
Which I can get to work but only for the article view. I can tell that this plug-in gets its code using DOMPDF and also grabs the $article from JOOMLA! so I have no idea where it is grabbing the $article variable from (so I can reassign it to my new view).
Has anyone had any success with implementing a PDF generator in Joomla 3.0?
The PDF functionality that used to be there in V1.5 was removed in V1.6, see Changes from 1.5 to 1.6. I don't think anybody put it back in for later versions. You can use a third party component if you really need it.
Joomla 3.3 has the option to print articles, you have just to enable it.
Then if you're browsing with Google Chrome you can easily print the page as PDF.
We have Joomla all setup and running, however the login module is not where we want it. The theme we are using had a built in "style panel", something that slides in and out on the right hand side of the page. We used this to display some user data, however it is not actually a defined position in the gantry framework.
Therefore, we are unable to assign the login module to this area... Does anyone know how to maybe call the elements from the module so they will display where we want it too and have the same functionality?
EDIT: http://demo.rockettheme.com/?template=voxel
The panel on the left side. We have editied that (php file) to display some info we want, however we'd also like the login box there.
You will need to iclude the files from the login module folder, therefore the following:
include (JURI::root() . "modules/mod_login/mod_login.php");
include (JURI::root() . "modules/mod_login/helper.php");
include (JURI::root() . "modules/mod_login/tmpl/default.php");
Once you have done this, let me know if it works and if not, I will update my answer accordingly.
My codeigniter app is multilingual and I want to redirect users to their pages, by checking IP address.
I should check it at the top of all pages (i know i can set a session or cookie, but i want to check it on all pages); before any views or other.
Where should i put my code (function)? on Startup file or Loader? or create an extension or plugin and load it on Startup? if it can be done by an extension or plugin, how can I create it? (i've searched, but didn't find a useful tutorial)
Thanks.
If you're using a main front controller you can put your code in there. But a better way to do it would be to use CodeIgniters built in functionality to extend the core - hooks!
http://codeigniter.com/user_guide/general/hooks.html
Just select the point you want your script to be activated and take it from there.