OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



automatically assigning Author role to new registrants

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

automatically assigning Author role to new registrants

Postby shimrah » Mon Nov 05, 2007 2:19 pm

Hi there,

I would like to automatically assign all new registrants as Authors, so that they will be able to submit abstracts without confusion.

Currently, if the user clicks on "Register" to create a new account, this option seems to be already checked and listed (Author: Able to submit items to the conference), but if the user clicks on "Registration" (i.e., register for a conference), s/he can create an account on that page but is not assigned an Author role; nor is there an option to check a box on that page to make it so.

So my plea is as follows:

1. What code should I add (and to what file) to the Registration form to create that "Create account as Author" box?
2. Is there a way (on both pages) to add this role without the need for a box?

or, better than 1 and 2,

3. Is there a way to automatically assign the role of "Author" to a user if s/he tries to submit an abstract?

Thanks,
Shimrah
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Re: automatically assigning Author role to new registrants

Postby asmecher » Tue Nov 06, 2007 12:52 pm

Hi Shimrah,

If a user is following the manuscript submission link and ends up on the account creation page, there will be a parameter in the URL called "requiresPresenter"; if this is present, the "register as author" checkbox will be checked by default. The code responsible for this is in classes/user/form/CreateAccountForm.inc.php near line 126:
Code: Select all
if (Request::getUserVar('requiresPresenter')) $this->setData('createAsPresenter', 1);
If you want that role to be checked for every registration, I'd suggest changing the checkbox called "createAsPresenter" into a hidden form element in templates/user/createAccount.tpl. (Keep in mind that it'll be difficult to tell who the actual authors are, as all accounts will now have that role.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
Joined: Wed Aug 10, 2005 12:56 pm

Re: automatically assigning Author role to new registrants

Postby shimrah » Tue Nov 06, 2007 2:47 pm

Thanks, Alec. I'll try this out.

The ideal option would be to have it so that if someone were to register for the conference through the "Registration" link, thus not flagged as an author, then later attempt to submit an abstract, they would have the role "Author" added to their profile. Is there a way to do this?
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Re: automatically assigning Author role to new registrants

Postby asmecher » Tue Nov 06, 2007 3:05 pm

Hi Shimrah,

Agreed, that's the best approach. I've implemented it against the current CVS version, but the patch should apply against version 2.0; just in case, try applying it --dry-run first to be sure. See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3131 for a link to the patch.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8905
Joined: Wed Aug 10, 2005 12:56 pm

Re: automatically assigning Author role to new registrants

Postby shimrah » Thu Nov 08, 2007 10:49 am

Ah. Perfect. This is why I frequent the forums, Alec. You're so helpful!

Thanks! :D
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Re: automatically assigning Author role to new registrants

Postby m.giordano » Wed Jan 09, 2008 11:15 am

Hi all,

just two questions about this useful thread:
- I have 2.0.0-1 installed: is the above patch already included?
- if I understand well, with the patch applied, when a user completes registration, he's registered as a reader by default. But how could he submit a paper, in order to become an Author, given that he doesn't see the Author link when he logs in as reader?

Thanks all.

Marco
m.giordano
 
Posts: 29
Joined: Wed Jan 09, 2008 4:02 am

Re: automatically assigning Author role to new registrants

Postby jmacgreg » Wed Jan 09, 2008 1:01 pm

Hi Marco,

No, the above patch is not included.

When this patch is installed, a registered user is automatically enrolled as an author when he clicks the "Proposal Submission" link from the Conference Information page.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: automatically assigning Author role to new registrants

Postby m.giordano » Wed Jan 16, 2008 3:00 am

Thank you, James.

Given that we decided not to use 'Account' page, but only 'Registration' page (we don't need a Reader role), we prefer to assign Author role since the registration submission. To this aim we modified the line

Code: Select all
$role->setRoleId(ROLE_ID_READER);

in the UserRegistrationForm.inc.php file, changing ROLE_ID_READER to ROLE_ID_PRESENTER, and it works.

Marco
m.giordano
 
Posts: 29
Joined: Wed Jan 09, 2008 4:02 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest