Keyword

Re: customize my front-end editor

  • Alberto Misrachi
  • Alberto Misrachi's Avatar Topic Author
  • Offline
  • New Member
More
13 years 5 months ago #61344 by Alberto Misrachi
Re: customize my front-end editor was created by Alberto Misrachi
Yes, but I would like to have users publish, but not feature.
Can I disable featuring but keep publishing enable?

Thanks

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

More
13 years 5 months ago #61345 by william white
Replied by william white on topic Re: customize my front-end editor
Create and override or K2 template
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.

More
13 years 5 months ago #61346 by Falko
Replied by Falko on topic Re: customize my front-end editor
Hi I have a similar problem:

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.

More
13 years 5 months ago #61347 by william white
Replied by william white on topic Re: customize my front-end editor
Check the paramaters in the k2 dashboard for Front End Editing

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

More
13 years 5 months ago #61348 by Falko
Replied by Falko on topic Re: customize my front-end editor
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:
Log in  or Create an account to join the conversation.

More
13 years 5 months ago #61349 by Falko
Replied by Falko on topic Re: customize my front-end editor
does no one has an idea?

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

  • Alberto Misrachi
  • Alberto Misrachi's Avatar Topic Author
  • Offline
  • New Member
More
13 years 4 months ago #61350 by Alberto Misrachi
Replied by Alberto Misrachi on topic Re: customize my front-end editor
I am trying to add some users "only" to this featuring privilage, so in \components\com_k2\templates\default\itemform.php

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.

More
13 years 4 months ago #61351 by HSMDK
Replied by HSMDK on topic Re: customize my front-end editor
Hi

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.

More
11 years 11 months ago - 11 years 11 months ago #61352 by Pashted
Replied by Pashted on topic Re: customize my front-end editor

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
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink.'&catid='.$this->category->id; ?>">
it predetermines the choice of the category in which you are

...or...
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $user->profile->addLink.'&catid=3'; ?>">
where "3" is the ID of your category
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.

More
11 years 8 months ago #61353 by Alex C.
Replied by Alex C. on topic Re: customize my front-end editor
Any luck setting the default category in 'Add Item' form (itemform.php)?

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 8 months ago - 11 years 8 months ago #61354 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: customize my front-end editor
Hello Alex,

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.

More
11 years 8 months ago #61355 by Alex C.
Replied by Alex C. on topic Re: customize my front-end editor
Thank you Krikor for your reply, however, I'm very new to this.

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 8 months ago #61356 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: customize my front-end editor
This requires some coding, If you don't have enough PHP experience I would'nt recommend editing extensively that form. Why don't instead use JS to alter the value of the select box?

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.

More
11 years 7 months ago #61357 by webloesung
Replied by webloesung on topic Re: customize my front-end editor
Hello,
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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 7 months ago #61358 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: customize my front-end editor
Thank you for feedback.

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.