- Posts: 5
COMMUNITY FORUM
Re: customize my front-end editor
- Alberto Misrachi
-
Topic Author
- Offline
- New Member
Can I disable featuring but keep publishing enable?
Thanks
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Edit itemform.php
comment out or remove "<?php echo $this->lists; ?> " around line 152 in 2.5.4
you can do more formatting work in this file, but this will get rid of the featured buttones in the front end
Please Log in or Create an account to join the conversation.
- Falko
-
- Offline
- New Member
- Posts: 11
I want to remove the TABS in the frontend, while adding a item. I want only K2 to show title content, extrafields and image in one page, with scrolling and no tabs.
thanks
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Falko
-
- Offline
- New Member
- Posts: 11
I looked up the parameters for frontend editing but there is no way to customize the things I described earlier, only show or hide tabs. I think I have to change the itemform.php by hand.
second question: is there an opcion to leave a default category choose when opening the frontend editor? I want to have a certain category pre-selected.
here a part of the itemform.php:
Log in or Create an account to join the conversation.
- Falko
-
- Offline
- New Member
- Posts: 11
Please Log in or Create an account to join the conversation.
- Alberto Misrachi
-
Topic Author
- Offline
- New Member
- Posts: 5
I did try this with no luck
from line 146 to 166 which is below
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('publish'))): ?>
<tr>
<td class="adminK2LeftCol">
<label for="featured"><?php echo JText::_('K2_IS_IT_FEATURED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_PUBLISHED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
</table>
<!-- Tabs start here -->
And did replace with...
<?php if(isset($user->groups) || isset($user->groups)): ?>
<tr>
<td class="adminK2LeftCol">
<label for="featured"><?php echo JText::_('K2_IS_IT_FEATURED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('publish'))): ?>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_PUBLISHED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists; ?>
</td>
</tr>
<?php endif; ?>
</table>
<!-- Tabs start here -->
But it is not working any idea??
Please Log in or Create an account to join the conversation.
- HSMDK
-
- Offline
- New Member
- Posts: 5
I had the same issues regaring fronted editing.
Found the solution in the JE K2 Story
Look here - joomlaextensions.co.in/product/JE-K2-Story
Please Log in or Create an account to join the conversation.
- Pashted
-
- Offline
- New Member
- Posts: 3
Falko wrote: Hello,
I looked up the parameters for frontend editing but there is no way to customize the things I described earlier, only show or hide tabs. I think I have to change the itemform.php by hand.
second question: is there an opcion to leave a default category choose when opening the frontend editor? I want to have a certain category pre-selected.
here a part of the itemform.php:
<?php if(is_object($user->profile) && isset($user->profile->addLink)): ?> <li> <a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink; ?>"><?php echo JText::_('K2_ADD_ITEM'); ?></a> </li> <?php endif; ?>
3. add some words to this code
it predetermines the choice of the category in which you are<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink.'&catid='.$this->category->id; ?>">
...or...
where "3" is the ID of your category<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink.'&catid=3'; ?>">
it determines the category with selected ID
now im trying to edit default category list... ...
Please Log in or Create an account to join the conversation.
- Alex C.
-
- Offline
- New Member
- Posts: 7
I would like to to set a default category for my users to only have to select the child categories.
Please help!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You need to set the correct category permission to the K2 User group your authors belong to.
From that point it is very easy with a simple JS script to remove or hide the disabled options from the select box.
Please Log in or Create an account to join the conversation.
- Alex C.
-
- Offline
- New Member
- Posts: 7
I am setting up a website where the registered users can submit articles.
I have 16 main Categories and 10 sub-categories for each.
I would like to make it easier for the user to click on a link for a Category and then they would select from the drop down list only the sub-category where they want to add an article.
I know of templates overrides and all I need is a way to get itemform.php to display a specif Category with its respective children categories.
Can you help with this? or anyone out there?
Another issue I have is that I want to disable access to the server in the front end in the attachments tab, any ideas on how to do this, in the image tab I commented out the 'browser button' but I'm not able to in attachments?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
As for the attachments the safest method is to use an .htaccess file it's the safest method.
Please Log in or Create an account to join the conversation.
- webloesung
-
- Offline
- Junior Member
- Posts: 23
the adjustment for the listing only allowed categories (as stated Alex C.) is quite needed. We have same situation and would prefer to provide the user with better usability (especially in cases if user will choose the category he or she doesn't allow to add the article to -> error producing is guarranted :( ).
In case this requires some coding:
- could you please support us with giving a hint towards it
- or is it possible to have this in the upcoming K2 upgrade(s)?
Thank you!
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
I can give you a push towards the right direction.
Provided you have already overriden itemform.php you need to add a small jQuery script which removed the disabled options from the select box.
A sample script can be found here: forum.jquery.com/topic/removing-disabled-options-from-a-select-box
Please Log in or Create an account to join the conversation.