Keyword

k2 user extended fields

More
9 years 2 months ago #136535 by alona
k2 user extended fields was created by alona
Hi!

I installed the k2 user extended fields on my joomla but I cant find a way to wrap every label+div with a <fieldset>, I just can't find where to overwrite the inputs?? on the user profile page I only have the <?php echo $K2Plugin->fields; ?> that brings all the inputs and labels one after another, I tried to var_dump and all I get is a string number, I tried to wrap the fields in the xml file , nothing works for me....

please help!

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136541 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2 user extended fields
The output is generated in the files located in the /tmpl folder. You can override it like every other plugin and change the markup.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • David Raza
  • David Raza's Avatar
  • Offline
  • New Member
  • Welcome to my presence!
More
9 years 2 months ago #136543 by David Raza
Replied by David Raza on topic k2 user extended fields
Hi

As you can see by my similar post I am having the same problem.

So far I have tried a couple of options...

1. Use css - You use Firebug etc. and style accordingly in a custom css file or add your own class(s) in the .xml file (although this only does the input element not the label).

2. I have currently hacked the core K2plugin file (administrator/components/con_K2/lib/k2plugin.php) to wrap the fields in table rows/cells but this is not ideal when updating K2.

Hope that helps...

DR

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136545 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2 user extended fields
You will lose these edits when you update K2. It is best to override the users plugin instead of hacking K2's core.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #136568 by alona
Replied by alona on topic k2 user extended fields
hi again! thanks for the reply!

I can see that there is a default.php file in the tmpl folder but the output there is <ul><li> and not <label><input>, I'm lost here..... if I write something in that file it doesn't appear on the website.

I just can't understand how it works, I have already changed the labels in the XML file and I can see change in the front and the back but I can't find the place where I can wrap them all with <fieldset>......

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136577 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2 user extended fields
Are you referring to the front end or the backend?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #136617 by alona
Replied by alona on topic k2 user extended fields
both. but the fron end is more important ....

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136629 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2 user extended fields
For the backend you can find a patch here in this post: www.joomlaworks.net/forum/k2-en/39249-user-extended-fields-plugin

Now as for the front-end the profile view can be completely overridden.
The registration fields can also be overriden in the register.php file (check your K2 template/overrides).

In this view you can try <?php var_dump($K2Plugin->fields); ?> to see the plugin's content and manipulate the markup.
Personally I do not think this is necessary and it is kind of an overkill since you can achieve the exact same result with CSS (just add a class on the parent element and control the inputs and the labels).

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum