Keyword

K2 - how to hide categories and other stuff

More
12 years 11 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 11 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 11 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 11 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 11 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 11 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 11 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 11 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 11 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 11 months ago - 12 years 11 months ago #67170 by Angie
Attachments:

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

More
12 years 11 months ago #67171 by robm
Please put it in a .zip file

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

More
12 years 11 months ago - 12 years 11 months ago #67172 by robm
File is OK
What browser are you using?
Are you sure you are logged in as a user with no access to ALL categories?

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

More
12 years 11 months ago #67173 by Angie
I am using chrome,firefox and ie.Yes I am sure,because I can see category but I can't select it :(
And the thing with css works only on firefox

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

More
12 years 11 months ago #67174 by robm
How can you pm or send e-mail on this forum??

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

More
12 years 11 months ago #67175 by Angie
Obviously there isn't option for that

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

More
12 years 11 months ago #67176 by robm
Please send me an e-mail so we can have a look further into your problem.
getk2.org/component/k2/itemlist/user/1967-bor

click e-mail to send me an e-mail or msn contact.

I only want to check some things and see what is different.

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

More
12 years 11 months ago #67177 by Angie
I added you on msn

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

More
12 years 11 months ago #67178 by Angie
I just want to say that this function works on joomla 1.5 but doesn't work on other versions.
Than you Bor!


I have another question, is it posible to hide option Featured ?

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


Powered by Kunena Forum