All questions about EDocman extension

How to change the default access level

  • Kent Chadwick
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 4 months ago #55904 by Kent Chadwick
How to change the default access level was created by Kent Chadwick
Tuan,

We would like to customize the Add new document form to change the default access level from "Public" to another one of our configured access levels. Which Edocman php file has that default so that we can customize it?

Thank you,

Kent

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

More
9 years 4 months ago #55915 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to change the default access level
Hi Kent

From front-end or backend ?

Tuan

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

  • Kent Chadwick
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 4 months ago #55929 by Kent Chadwick
Replied by Kent Chadwick on topic How to change the default access level
Tuan,

We want to customize the backend new document form.

Thank you,

Kent

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

  • Kent Chadwick
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #56547 by Kent Chadwick
Replied by Kent Chadwick on topic How to change the default access level
Tuan,

Which Edocman php file has the default access level for the Add new document form?

Thank you,

Kent

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

More
9 years 3 months ago #56573 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to change the default access level
Sorry Kent. I forgot to answer your support question. Please follow the instruction below:

1. Open the file administrator/components/com_edocman/model/document.php

2. Add this function to the class (you know code, so I think you understand what I meant)
Code:
public function initData() { $this->data = $this->getTable(); $this->data->access = 3; }

Replace 3 in the code above with ID of the access level you want. For example:

1 => Public

2=> Registered

3=> Special

After that, it will work as expected. Attached is the modified file in case someone doesn't know code and want to make this change

Regards,

Tuan
Attachments:
The following user(s) said Thank You: Kent Chadwick

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

  • Kent Chadwick
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 years 3 months ago #56597 by Kent Chadwick
Replied by Kent Chadwick on topic How to change the default access level
Tuan,

Thank you very much. I greatly appreciate your help!

Kent

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

More
9 years 3 months ago #56609 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to change the default access level
No problem Kent. Really sorry for missed your question (you have to wait for more than one week for the answer :( )

Tuan

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

Moderators: Mr. Dam