Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

How To Apply Template to JomSocial Registration Forms

How To Apply Template to JomSocial Registration Forms

When you click the registration in Jomsocial, the first form is from Joomla Default Registration Form

(index.php?option=com_community&view=register&Itemid=2)

and when you click Next, the Jomsocial Registration form appear

(index.php?option=com_community&view=register&task=registerProfile&profileType=0&Itemid=2)

where you can find your Custom Profile input, please help me how to use metaTemplate for me to apply my 2nd Joomla tempalte in this second registration form.

jelven
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: How To Apply Template to JomSocial Registration Forms

Hi jelvin,

Try this in the PHP box, to identify the 2nd URL. If it finds it, the rule will SUCCEED, so then select the template to be used in the SUCCEED action dropdown.


if ( $option == "com_community"
  and $view == "register"
  and JRequest::getVar("task") == "registerProfile"
  and JRequest::getVar("profileType") == "0"
  ) return true;


The Itemid probably doesn't matter in this case.

Hope that helps,
Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Re: How To Apply Template to JomSocial Registration Forms

Thank you for the reply, but I'm just new in this MetaTemplate, actually I don't know where to start, I wanna purchased this item if it works as what I wanted, I want first to see if it gives my expectation before buying, I'm sorry for the trouble because as of now I'm not yet well knowledgeable in PHP, I'm just using Modules and components in Joomla that's easy to configure like in Breezing Forms, once I'm inside the component environment I can work easily.
Please bear with me, I have not yet read all the documentation of MetaTemplate but I already installed the metatemplate-1-12.zip and when I open it, I don't know where to start, I really appreciate if I can receive some steps to follow;), if this stuff works my expectation, I will gladly post it in JED review and purchased the pro version. Thank you very much.

jelven
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: How To Apply Template to JomSocial Registration Forms

metaTemplate will work exactly as you need with your setup without fail. This more specifically what the system was originally designed to do (handle Joomla template changes based on given variables).

As Stephen pointed out, you can use the parameters in the URL to decipher when to change th template.
1. Install the metaTemplate in your Joomla installer
2. Go to components, and create a new rule.
3. In the new rule, under 'Advanced', the 'PHP' field, enter the code that Stephen provided you above.
4. On the right side of rule page, under the 'Succeed Action' section, set the 'Set Template' option to the template you want to show on the Jomsocial Registration page.
5. Make sure the rule is published.
6. Test

Just take a good 15-20 min to really understand the component and read the documentation. If you really understand the power, you can start using metaTempalte to capture the form fields from the J! registration page and propagate that data into the Jomsocial Registration form, should you have any data that is repeating and not pre-filled. Just one example of how this powerful (yet very small server load) component can be used.

techgump
Local SEO Guru
Beginner Modder
ranks
useravatar
Offline
16 Posts
Administrator has disabled public posting

Re: How To Apply Template to JomSocial Registration Forms

Thanks a lot techgump!

I tried your instruction in local server and works perfect. I appreciate your detailed instruction and this module really work great, only in my side will have a slight issue because I'm currently PHP Challenge.. even basic php as of now, I don't have yet enough skills for that.
What about next time I have a Kunena component and want to apply also specific joomla template in that area, It means I need to have some php code syntax same with what metamodguy had provided.,it means this component really require at least php knowledge..interesting I think it really deserves time to study more due to very good functions.

jelven
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: How To Apply Template to JomSocial Registration Forms

Hi Jelven,

The Pro version gives a form-based interface to many of the more common scenarios - menu items, page types, users and user groups, articles, VirtueMart, cookies, urls, etc etc. The only 3rd-party component that currently has a user interface like this is VirtueMart, so any other components like Kunena and JomSocial still require PHP to be written. Generally this is reasonably simple, such as in the code I gave you above.

The good news is.... it means that pretty much anything is possible, whereas if there was no PHP coding option then you would have to either hunt for an extension that deals with exactly your situation (hint: this probably does not exist!), or pay someone to code it for you.

There's a lot of help available on these forums, which I provide for free (within reason).

I would say however that it's worth learning a bit of PHP. Just as I would advise anyone who is dealing with web sites at a content level to learn the basics of HTML, I would advise anyone dealing with Joomla administration to become familiar with PHP. There are many times in setting up a Joomla site where you might come across a little PHP, for example in working with the template. PHP is a very expressive language, and comparatively easy to learn. I believe it's a good match for coding additional rules in MetaMod and MetaTemplate as it makes it very easy to code structures like:

if ( some condition here ) then do this...
else if ( some condition or some other condition) then do something else...
else do something else.

(that's not real php by the way)
It's difficult to design a user interface to encapsulate this sort of logic with forms and ajax. So if you can just learn a little PHP then you get incredible flexibility to form these sorts of complex logical rules, and this gives MetaTemplate and MetaMod much of their power.

Hope that helps to explain the ethos,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1674
Total Polls:
6
Total Posts:
5917
Total Posts Today:
5
User Info:
 
Total Users:
11538
Newest User:
michael2155
Members Online:
5
Guests Online:
220


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked