Joomla: Is there a querystring parameter that can remove a pages theme? - joomla

We've got a joomla website and are now in the process of developing a sencha-touch application to complement it.
Since our website is in joomla, I don't want to have to write any PHP to extract page data separate from the main site.
Is there any type of querystring parameter that can disable the theme?
IE:
http://example.com/about-us?show-theme=false
If this is not possible, is there any other option to achieve similar results?

index2.php is depreciated and is no longer supported in new versions of Joomla. What you are looking for is ?tmpl=component. You can add that to any Joomla URL and it will only display what you have coded in the /templates/YOUR TEMPLATE/component.php file. The default loads just the component output, but you can customize it to do what ever you want.

Do I get your question right: you want to extract the content from the page, without menu and so on? 2 possibilities, then:
Extract it from the concerning RSS feed (of the front page, of a category ... if you need more options you can install an component such as Total RSS
Use index2.php: example site (This doesn't seem to work if you use URL Rewriting as in your example URL.)

you can add format=raw in the URL. This will only output the content of the component and not the template.
This is used to show printable pages.
You may have to create a view.raw.php file along with the view.html.php

Related

Moving captcha between a user registration and a user profile in joomla

I almost have finished setting up a website based on joomla 3.x but I'm not a programmer and I'm stuck on one point and don't know what to do.
I use a registration form in which I use a user registration and a user profile forms. I also have a captcha on but it's not at the very bottom of the page but between the forms.
Could anyone one of help me with it and tell how to change it?
I'm sure there's more than one way to do this, here's one option.
What you are wanting to do is create an override and customise the Joomla core output.
(1) Use the template manager to copy components > com_users > registration files from your base Joomla components directory to /templates/YOUR-TEMPLATE/html/com_users/registration
See https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager for detailed instructions on this
(2) You'll be editing /templates/YOUR-TEMPLATE/html/com_users/registration/default.php, so maybe make a backup because you'll be doing well if you get this first time ;)
(3) Open default.php with your favourite text editor. It looks to me like the output you want to customise is all happening between lines 39-49
How you attack it from here is up to you. You can use web inspector to examine details about all the fields, their IDs and classes.
Instead of the built in loop in default.php you could manually rebuild the form, or you could keep the loop but add some logic to add the captcha control group where you want it.
Good luck!

How to create a custom component for Joomla 3.3?

I'm new to Joomla and I'm confused, so I need your advice on this. I have to create a plugin which connects to an API and shows base64 PDF on a page. So, I created my PDF viewer, but I don't know how to pack it up in Joomla. It's not just "custom HTML", it has to be a separate package so it can be installed on other Joomla sites. I guess it also has to have a database to store some settings (e.g. API URL). I want users who install this extension to be able to go to Modules > New Module > PDF Viewer, and from there they can set up API URL for that module. Users will be able to create modules of this type on multiple pages and to be able to set different API URL for every page. So, what do I need? An extension, component, module...? I searched for tutorials and read Joomla docs but I'm still confused. Please help me, what to do, some guide, where to put files, where to upload them etc. Thanks
You could actually go about this with a component, plugin or module:
I think a component would be the most complex in this situation. As you are probably already aware, a component is like an application which renders itself in the main click of the website.
If you were to create a plugin, you could generate a short code snippet based on the name of the plugin which could then be added to an article, which would then display the PDF within the article. For example:
{PDFgen=NAME_OF_PDF}
or
{PDF}name_of_file.pdf{/PDF}
Creating a module in my opinion would be the easiest. As once you've added the functionality to render the PDF, the user can either display it as a module (like a sidebar widget), or they can also import it in their article using a built in Joomla feature. Assign a custom position to the module, then add the following anywhere within an article: {loadposition XXX}, where XXX is the name of the custom position you assigned to the module.
Out of all honest, you should develop it in a way you feel most comfortable with. Just make sure when you do it, that you stick to Joomla coding standards.
Hope this helps

How to avoid custom url generation from joomla SH404SEF component?

I have been using joomla Sh404sef component in my site,what is my problem is its generating two url for the same content so it produces the problem with google search engine as both url pointing to the same content.
Here is the examples of url generated from the component
URL:
http://www.mysite.com/page.html - Automatic URLS
http://www.mysite.com/page/ - Custom URLS
When I go and do the purge url from the component option it eliminated the non html (.html) urls from the db but it creates the url again when we post new page etc.
any body come across this issue and could give a suggestion on it?
thanks in advance
I think you'll find this is Joomla generating the url not SH404SEF. It has a habit of generating extras especially where you have blog style views etc. The way I get around this problem is 3 fold.
Create a solid menu structure (Now harder on Joomla2.5 where aliases are created with date/time). This should take care of most issues. Make sure you make unnecessary levels as noindex-nofollow
Use a 3rd party tool to mark secondary urls with a canonical tag. Look at ITPMetaPro but many others are available.
Work in Webmaster Tools to remove urls from index after following step 1 & 2.

custom joomla site, layout of a page

I have a quick question about the layout of the page on a custom joomla site. been googling to no avail. On the home page of a site im working on, i have a flash(or soon to be jquery ) banner with some of the products sold from my clients store hard coded onto the page.
looks good and all but, it appears in every page. now i know that modules can be appended to individual pages but, how can i make.....well for example, WordPress has a feature where you can make a template of a page and give that template to a new page.
is there something similar in joomla? my overall goal is to have this banner only appear on the homepage. the rest of the pages will only get the header,menu, middle content, footer etc.
im trying to find a workaround and so i was thinking of maybe creating a "custom html" module, and i guess copy/pasting the content there and praying that it works...i suppose if it did, then id be able to dictate what page that banner comes in at but this method seems too messy.
any ides on how to better achive this? im a noob to joomla so sorry if i seem a bit turned around.
Thanks in advanced.
Here is a good explanation about assigning modules:
http://docs.joomla.org/How_do_you_assign_a_module_to_specific_pages%3F
If your scenario gets too complicated you can use an extension like this one to manage where (even when) your modules will be displayed:
http://extensions.joomla.org/extensions/style-a-design/modules-management/10307
If you want banner on home page only but not on other pages then just set the Banner module to show on home page only. You will get Menu option under Module configuration page.
For banner you can either use any third party Joomla modules or you can write your code inside custom HTML. I hope this will help :)

How to create my own form in joomla

I want to create my own form that are submitted and values of that form will be stored in joomla database. How can i used the Joomla connection code to interacte with the joomla database.
If you just want to get your work done, there are some components already avaiable in Joomla Extension's website to your form's needs. CkForms is a good one, you can create simple forms with it that are automatically saved in the database (supports upload of files too).
If you want to learn how to write extensions in Joomla, you should read Joomla Official Documentation website.
Extensions in Joomla are divided in "Components", "Modules" and "Plugins". More informations about these differences can be found here and here.
What you're trying to achieve sounds a "component" to me. Downloading the CkForms and reading it's source code should get you started to Joomla's way of writing components.
EDIT: Joomla has a huge API with a lot of features. It has a database module of it's own, with insert methods and such. Reading Joomla's API website before implementing your component it's a good idea to avoid "reinventing the wheel" and it's a good practice since those methods are extensively tested by all Joomla users.
The JForm class helps you build forms.
Documentation can be found here:
joomla CMS: http://docs.joomla.org/API16:JForm
joomla API: http://api.joomla.org/11.4/Joomla-Platform/Form/JForm.html
This class provides you with ready to use form elements and form loading and/or processing methods
This class includes validation methods, date picker control, color picker, etc.
Of course, as another mentioned above, if you are building a module, component, or application, you will need to learn how to to develop a module, component or application. Of these three, the module is the easiest to implement.
The application gives you much freedom b/c you are not constrained to the CMS paradigm, front and back end complexities. However, there is little documentation about how to develop applications with Joomla framework b/c joomla as a framework is relatively new
This tutorial gets you started understanding how to use JForm to create a form in Joomla: http://www.ostraining.com/blog/how-tos/development/getting-started-with-jform/
Or you could just create add a html module to any position and then write the form in html i.e.
<form method="post" action="mycreatedpage.php"> <input type="text"/> <input type="submit">
Now just create a page that handles the code by emailing or inserting into db. I havent tried it but i think it should work.
Looks like everyone already told you almost everything I know except for the component creator. Very easy to use, and it follows Joomla standards. Will get you up and running within minutes.
I have got good working experience with Joomla RSForm Pro. It has got options for
validation
user email/admin emails on submit
file uploads
and many more
Good tutorials too. Get started with http://www.rsjoomla.com/support/documentation/view-knowledgebase/21-rsform-pro.html
Good luck!
Create View.
Create Model.
Create Table.
Create Controller ( if Needed ).
Create Form xml file.
Go here for more information:
http://docs.joomla.org/Standard_form_field_types
Take a look at the Chronoforms extension - does more than you want.
You have two options:
Use an already built custom form extension
Create your own custom form extension (or outsource it)
Now if you only want to modify the user registration form, then you can do some PHP customization to accomplish your goal.
Making forms in Joomla can be done in a couple of ways.
If you just wanted a contact us, you can just create a page with a menu item for the User contact form. This gives you a page with a Members address and contact form. So all you would need to do was add the user as the company of the websites home address and email. But the form is very basic, name, title, textarea for message.
Next up from that you could just make a Custom HTML module add add a form to it in plain HTML like +Sean said above this, you would need to code in PHP your own form process script. You would not get error in form data checking unless you also wrote it.
Next you might rather look on the Joomla Extension Directory JED for one of the good extensions for 3 and 2.5 Joomla RSForms!Pro is good, and can do all we have needed. This lets you add fields one by one and move your form around. Then can auto generate or custom the html of the form.
You can easily create your own forms with Fabrik
Chronoforms are now a days a very popular solution for custom forms in joomla. Chornoforms support twitter bootstrap also. In simple 5 steps you can create a contact form with unlimited fields and also embed various function like DB save, Email, Thanks Message, Redirection on any page. There is events and events will have particular events.
Also possibility of extension of Normal joomla registeration. It will not extend the core registration but at the time of registration you can take various information from users.
I would use Chrono Forms, they work really well and are easy to use.
Download here
Here is a full tutorial on the new Chronoforms 5 to help you get started quickly and understand most of the features available.
CLICK HERE
You can use plugin to insert external php form in content. It is easy and you don't need to make plugin etc. Please use this.
I suggest you to use breezingforms: http://crosstec.de/en/extensions/joomla-forms-download.html
It's one of the best solutions for custom form creation in joomla.

Resources