Keyword

K2 - how to hide categories and other stuff

More
12 years 3 months ago #67161 by Angie
Hello everyone,
I need help, I want to change form that appears when registered user wants to add sam items.First i want to hide disabled categories, and I want to add some text fields and to hide some.I think I know how to do it, but I don't know in witch file.
I am using K2 2.5.7v

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

More
12 years 3 months ago #67162 by william white
Replied by william white on topic Re: K2 - how to hide categories and other stuff
Try editing form.php in your override. Information here
williamwhitejr.com/index.php/k2-tips/item/92-how-to-disable-unused-categories-in-front-end-editing
worked with earlier versions, have not tried it with 2.5.x

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

More
12 years 3 months ago #67163 by robm

William White wrote: Try editing form.php in your override. Information here
williamwhitejr.com/index.php/k2-tips/item/92-how-to-disable-unused-categories-in-front-end-editing
worked with earlier versions, have not tried it with 2.5.x


That doesn't work anymore. Please help!

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

More
12 years 3 months ago #67164 by Daniele
I have the solution.
It works in k2 2.5.3

Open file
/media/k2/assets/js/k2.js

Search the row (it should be line 226)
$K2('#catid option[disabled]').css('color', '#808080');

Just after that row, add this row
$K2('#catid option[disabled]').css('display', 'none');

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

More
12 years 3 months ago #67165 by robm
Thanks for your help.
I've seen this solution also but it's only working on Firefox.
With IE9 and Chrome it's not working.

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

More
12 years 3 months ago #67166 by Angie
$K2('#catid').change(function(){
if($K2(this).find('option:selected').attr('disabled')){
alert(K2Language[4]);
$K2(this).val('0');
return;
}

Can we do something here,to hide it?

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

More
12 years 3 months ago #67167 by robm
Please have a look to my solution here >

getk2.org/community/New-to-K2-Ask-here-first%21/8616-Frontend-Editing---Hide-Disabled-Categories#13573

and give a reply if it works (or not)

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

More
12 years 3 months ago #67168 by Angie
I don't know why,but it doesn't work :blink:

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

More
12 years 3 months ago #67169 by robm
Please put your k2.js file as an attachment so I can have a look if it's ok

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

More
12 years 3 months ago - 12 years 3 months ago #67170 by Angie
Attachments:

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


Powered by Kunena Forum