All questions about EDocman extension

Adding multiple categories - uploading (frontend)

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89576 by Greg Dollin
About 3 years ago a forum entry was posted regarding adding a document to multiple categories when uploading from the front end - the same as you can do in the back end. Indicators were that this functionality would be included in a future release Has this been implemented and if so, can someone advise on how this can be done. My Upload form does not appear to give this option.

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

More
8 years 5 months ago #89634 by Mr. Dam
Hi,
To add dropdown Other Category in "Document upload form" at front-end, please follow these steps
1. Open file:
root > components > com_edocman > view > document > tmpl > edit.php
2. Find:
Code:
<?php if ($this->catId) { ?> <tr> <td class="edocman_title_col"> <?php echo $this->form->getLabel('category_id'); ?> </td> <td class="edocman_field_cell"> <input type="hidden" name="jform[category_id]" value="<?php echo $this->catId; ?>" /> <?php echo $this->categoryTitle; ?> </td> </tr> <?php } else { ?> <tr> <td class="edocman_title_col"> <?php echo $this->form->getLabel('category_id'); ?> </td> <td class="edocman_field_cell"> <?php echo $this->form->getInput('category_id'); ?> </td> </tr> <?php } ?>

and add this code below:
Code:
<tr> <td class="key"> <?php echo $this->form->getLabel('extra_category_ids'); ?> </td> <td style="padding-bottom: 5px;"> <?php echo $this->form->getInput('extra_category_ids'); ?> </td> </tr>

Good luck
Dam

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

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89729 by Greg Dollin
Replied by Greg Dollin on topic Adding multiple categories - uploading (frontend)
I have added the code as follows (before the else statement) but this doesn't seem to have had any effect on the upload form. I have attached a screenshot of the form.

if ($this->catId)
{
?>
<tr>
<td class="edocman_title_col">
<?php echo $this->form->getLabel('category_id'); ?>
</td>
<td class="edocman_field_cell">
<input type="hidden" name="jform[category_id]" value="<?php echo $this->catId; ?>" />
<?php echo $this->categoryTitle; ?>
</td>
</tr>
<?php
}
<tr>
<td class="key">
<?php echo $this->form->getLabel('extra_category_ids'); ?>
</td>
<td style="padding-bottom: 5px;">
<?php echo $this->form->getInput('extra_category_ids'); ?>
</td>
</tr>
else
{
?>
<tr>
<td class="edocman_title_col">
<?php echo $this->form->getLabel('category_id'); ?>
</td>
<td class="edocman_field_cell">
<?php echo $this->form->getInput('category_id'); ?>
</td>
</tr>
Attachments:

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

More
8 years 5 months ago #89730 by Mr. Dam
Hi,
Please submit ticket and send your site url with super admin account. I will check the issue and solve it for you.
Thanks
Dam

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

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89732 by Greg Dollin
Replied by Greg Dollin on topic Adding multiple categories - uploading (frontend)
Unfortunately we are an intranet site and it cannot be accessed externally.

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

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89733 by Greg Dollin
Replied by Greg Dollin on topic Adding multiple categories - uploading (frontend)
I found part of my editing issue - I had inserted additional lines in wrong place. Rectified this but still missing additional field in upload form. Code now looks like this:
if ($this->catId)
{
?>
<tr>
<td class="edocman_title_col">
<?php echo $this->form->getLabel('category_id'); ?>
</td>
<td class="edocman_field_cell">
<input type="hidden" name="jform[category_id]" value="<?php echo $this->catId; ?>" />
<?php echo $this->categoryTitle; ?>
</td>
</tr>
<?php
}
else
{
?>
<tr>
<td class="edocman_title_col">
<?php echo $this->form->getLabel('category_id'); ?>
</td>
<td class="edocman_field_cell">
<?php echo $this->form->getInput('category_id'); ?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="key">
<?php echo $this->form->getLabel('extra_category_ids'); ?>
</td>
<td style="padding-bottom: 5px;">
<?php echo $this->form->getInput('extra_category_ids'); ?>
</td>
</tr>

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

More
8 years 5 months ago #89736 by Mr. Dam
Hi,
You need to upload your site into live server or else we won't able to help you anything. Hope you understand.
Dam

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

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89765 by Greg Dollin
Replied by Greg Dollin on topic Adding multiple categories - uploading (frontend)
Thanks Dam. Unfortunately I cannot put a copy of our corporate intranet out in a public place so that you can investigate the reasons as to why the code does not work.

To all other eDocman users - if anyone else elects to install the additional code as provided by Dam, it would be beneficial to know if it implements correctly. This would at least let us know if it is a local issue on our server or some issue with the provided code.

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

  • Greg Dollin
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 5 months ago #89776 by Greg Dollin
Replied by Greg Dollin on topic Adding multiple categories - uploading (frontend)
Further update - Dam's code kind of works if in the Configuration area, you set 'Use simple front-end upload form' to No (see Attachment 1). Our issue is that we have categorised our documents by Departmental View, Table View and File type View. In the backend I have the ability to add a new document to all three categories (see Attachment2 and Attachment3). Unfortunately, as you can see from Attachment 4 I can only add the document into either the same category or a sub category WITHIN the existing category (Attachment5)
Attachments:

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

More
6 years 7 months ago #117385 by Mike Waxman
Replied by Mike Waxman on topic Adding multiple categories - uploading (frontend)
If you want to continue to use the simple form upload you can do an override for simple.php rather than edit.php

i.e. copy the file from the component directory into
/templates/your_template/html/com_edocman/document/simple.php

Haven't got around trying to get the same multiple categories selector on the front end as the back end though.

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

Moderators: Mr. Dam