- Posts: 26
COMMUNITY FORUM
[Hack] hide options for front-enduser article form
- spock
- Topic Author
- Offline
- Junior Member
Less
More
13 years 8 months ago #93110
by spock
[Hack] hide options for front-enduser article form was created by spock
this hack(K2 v2.4.1)provide options for hiden into and from items on users
based in Joomla default user groups
Ideas for integrate on K2 user GRoups?
comment please, this is my 1º participattion in this community
sorry for my english
download from
www.ruizmasa.com/centro-de-ayuda.html
based in Joomla default user groups
Ideas for integrate on K2 user GRoups?
comment please, this is my 1º participattion in this community
sorry for my english
download from
www.ruizmasa.com/centro-de-ayuda.html
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
13 years 8 months ago #93111
by FeSys
Replied by FeSys on topic [Hack] hide options for front-enduser article form
Hi SPOCK
I love you.... Superior work, been asking for it in the community long time.
May I Ask you how to hide Tabs too according to users level or Category selection?
Thank you for sharing...Keep cool ideas please.
BTW: you have clean nice beautiful website.
I love you.... Superior work, been asking for it in the community long time.
May I Ask you how to hide Tabs too according to users level or Category selection?
Thank you for sharing...Keep cool ideas please.
BTW: you have clean nice beautiful website.
Please Log in or Create an account to join the conversation.
- spock
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 8 months ago #93112
by spock
Replied by spock on topic [Hack] hide options for front-enduser article form
I have some problems to limit sections, specific users and user groups k2
hidden apps tabs is identical process
change in config.xml
<param menu="hide" name="showImageTab" .....<param menu="hide" name="showImageGalleryTab" ....<param menu="hide" name="showVideoTab" .... <param menu="hide" name="showExtraFieldsTab" ..... <param menu="hide" name="showAttachmentsTab" .....
can follow this little tutorial in Spanish remember to hide for joomla user level need to include this syntax in xml (in sample is yes/no)
<param menu="hide" name="showXXXXXXXX" type="list" default="18" label="showXXXXX" description=""> <option value="26">none</option> <option value="25">Super Administrator</option> <option value="24">Administrator</option> <option value="23">Manager</option> <option value="21">Publisher</option> <option value="20">Editor</option> <option value="19">Author</option> <option value="18">Registered</option> <option value="1">all</option> </param>
sorry 4 my english
hidden apps tabs is identical process
change in config.xml
<param menu="hide" name="showImageTab" .....<param menu="hide" name="showImageGalleryTab" ....<param menu="hide" name="showVideoTab" .... <param menu="hide" name="showExtraFieldsTab" ..... <param menu="hide" name="showAttachmentsTab" .....
can follow this little tutorial in Spanish remember to hide for joomla user level need to include this syntax in xml (in sample is yes/no)
<param menu="hide" name="showXXXXXXXX" type="list" default="18" label="showXXXXX" description=""> <option value="26">none</option> <option value="25">Super Administrator</option> <option value="24">Administrator</option> <option value="23">Manager</option> <option value="21">Publisher</option> <option value="20">Editor</option> <option value="19">Author</option> <option value="18">Registered</option> <option value="1">all</option> </param>
sorry 4 my english
Please Log in or Create an account to join the conversation.
- spock
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 8 months ago #93113
by spock
Replied by spock on topic [Hack] hide options for front-enduser article form
continue... NOTE: the additional plugins tabs is not posible only default tabs
Complete sample for image tab
in config.xml change
<param menu="hide" name="showImageTab" type="radio" default="1" label="Image tab on edit form" description=""> <option value="0">Hide</option> <option value="1">Show</option> </param>
for
<param menu="hide" name="showImageTab" type="list" default="18" label="Image tab on edit form" description=""> <option value="26">none</option> <option value="25">Super Administrator</option> <option value="24">Administrator</option> <option value="23">Manager</option> <option value="21">Publisher</option> <option value="20">Editor</option> <option value="19">Author</option> <option value="18">Registered</option> <option value="1">all</option> </param>
in from.php change (example for image tab)
<?php if ($this->params->get('showImageTab')): ?><li id="tabImage"><a href="#"><?php echo JText::_('Image'); ?></a></li><?php endif; ?>
for
<?php if ($access > ($this->params->get('showImageTab')-1)){ ?>
<li id="tabImage"><a href="#"><?php echo JText::_('Image'); ?></a></li>
<?php } ?>
and other tabs identical process
remenber maintain the same form field names in this sample showImageTab
Complete sample for image tab
in config.xml change
<param menu="hide" name="showImageTab" type="radio" default="1" label="Image tab on edit form" description=""> <option value="0">Hide</option> <option value="1">Show</option> </param>
for
<param menu="hide" name="showImageTab" type="list" default="18" label="Image tab on edit form" description=""> <option value="26">none</option> <option value="25">Super Administrator</option> <option value="24">Administrator</option> <option value="23">Manager</option> <option value="21">Publisher</option> <option value="20">Editor</option> <option value="19">Author</option> <option value="18">Registered</option> <option value="1">all</option> </param>
in from.php change (example for image tab)
<?php if ($this->params->get('showImageTab')): ?><li id="tabImage"><a href="#"><?php echo JText::_('Image'); ?></a></li><?php endif; ?>
for
<?php if ($access > ($this->params->get('showImageTab')-1)){ ?>
<li id="tabImage"><a href="#"><?php echo JText::_('Image'); ?></a></li>
<?php } ?>
and other tabs identical process
remenber maintain the same form field names in this sample showImageTab
Please Log in or Create an account to join the conversation.
- FeSys
- Offline
- Elite Member
Less
More
- Posts: 262
13 years 7 months ago #93114
by FeSys
Replied by FeSys on topic [Hack] hide options for front-enduser article form
Thank you so much SPOCK, for details and help..
That's sound good for me.. I appreciate your replay.
Keep good and flexible idea please
That's sound good for me.. I appreciate your replay.
Keep good and flexible idea please
Please Log in or Create an account to join the conversation.
- juju
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 6 months ago #93115
by juju
Replied by juju on topic [Hack] hide options for front-enduser article form
great work ! Thanks a lot ;)
Please Log in or Create an account to join the conversation.
- juju
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 5 months ago #93116
by juju
Replied by juju on topic [Hack] hide options for front-enduser article form
I take your file form.php, and I have this error when I click on add link :
Parse error: syntax error, unexpected $end in C:\Users\Administrateur - TIC\xampp\htdocs\site_temp\components\com_k2\views\item\tmpl\form.php on line 882
I don't find the problem, could you help me ?
Parse error: syntax error, unexpected $end in C:\Users\Administrateur - TIC\xampp\htdocs\site_temp\components\com_k2\views\item\tmpl\form.php on line 882
I don't find the problem, could you help me ?
Please Log in or Create an account to join the conversation.
- spock
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 5 months ago #93117
by spock
Replied by spock on topic [Hack] hide options for front-enduser article form
it is advisable that you take as a reference file and modify your own form.php Based on the steps that suggestK2 what version you use?
Please Log in or Create an account to join the conversation.
- juju
- Offline
- Premium Member
Less
More
- Posts: 119
13 years 5 months ago #93118
by juju
Replied by juju on topic [Hack] hide options for front-enduser article form
I use K2 2.4.1, I just take your file form.php and replace my file with it. It don't work at all :/ The error said me that missing a closing brace or a comma but if it's work for you...
Please Log in or Create an account to join the conversation.
- spock
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 26
13 years 5 months ago #93119
by spock
Replied by spock on topic [Hack] hide options for front-enduser article form
Time is money means that it is only an example of how to do I have reviewed the file, changing the one I have, something more complex and did not produce any error if you have a test site can tell me the url for testing. What is the error message? give me an email by MP to give you the files that I use otherwise, do not know how to solve your problem
Please Log in or Create an account to join the conversation.