## URL interpetation\explanation?

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Jim
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

### URL interpetation\explanation?

I have a url like this -
servername/ocs/index.php/symposium/60/schedConf/register
Is everything after index.php generated dynamically?

I'm trying to walk the path to the register file.

Thanks

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

### Re: URL interpetation\explanation?

Hi Jim,

Have a look at the OJS quick reference, particularly http://pkp.sfu.ca/ojs/docs/technicalreference/2.1/designOverviewRequestHandling.html. OCS is the same, but with two parts of the URL to identify the specific conference rather than the one that OJS uses.

Regards,
Alec Smecher
Public Knowledge Project Team

Jim
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

### Re: URL interpetation\explanation?

Alec hi,

What I'm being asked to do is to change the label on the button that reads Register to Start Registration. I'm guessing this is on one of the templates. And I'm searching for the template.

Thanks Jim

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

### Re: URL interpetation\explanation?

Hi Jim,

All text appears in the locale files, generally locale/en_US/* and lib/pkp/locale/en_US/* for English -- but I don't see any text reading "Register to Start Registration" built into the system. Are you sure that's correct?

In any case, inspect the URL where you see the text you want to change. Follow the instructions on the link above to find out what PHP class and function handles that request; then you can generally find the template file within that code.

Regards,
Alec Smecher
Public Knowledge Project Team

Jim
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

### Re: URL interpetation\explanation?

asmecher wrote:Hi Jim,

All text appears in the locale files, generally locale/en_US/* and lib/pkp/locale/en_US/* for English -- but I don't see any text reading "Register to Start Registration" built into the system. Are you sure that's correct?

In any case, inspect the URL where you see the text you want to change. Follow the instructions on the link above to find out what PHP class and function handles that request; then you can generally find the template file within that code.

Regards,
Alec Smecher
Public Knowledge Project Team

It's the text\label on a button on a form they're asking me to change. The button's current text\label reads as "Register" they're asking me to change it to "Start Registration". Would the text\label for that button be in /locale/en_US file?

On another note: Thanks for the link to the documentation.
I've printed out the documentation from the link you sent me earlier. In the example /myjournal/user/profile, "user" is the Page class, and "profile" is the function. My url is servername/ocs/index.php/symposium/60/schedConf/registration.

So "/symposium/60/" id's the particular journal, "schedConf" is the Page class, and "registration" is the function. This is how I'm interpreting the url. I navigated to /pages/schedConf/SchedConfHandler.inc.php. Looked for the "registration" function in SchedConfHandler.inc.php but didn't find it. Am I misinterpreting the url?

asmecher
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm
Contact:

### Re: URL interpetation\explanation?

Hi Jim,

Your interpretation is correct -- and the "registration" function does exist in pages/schedConf/SchedConfHandler.inc.php:

Code: Select all

        /**         * Display conference registration page         */        function registration() {            ...        }
It generates markup from several different places, depending on the situation. If the user is already registrered:

Code: Select all

return $templateMgr->display('common/message.tpl'); If the registration type hasn't yet been chosen: Code: Select all return$templateMgr->display('registration/selectRegistrationType.tpl');
Otherwise, it uses the UserRegistrationForm class:

Code: Select all

import('registration.form.UserRegistrationForm');...$form = new UserRegistrationForm($typeId);...$form->display(); The UserRegistrationForm class is implemented in classes/registration/form/UserRegistrationForm.inc.php and you can find its template file in the constructor: Code: Select all function UserRegistrationForm($typeId) {    ...    parent::Form('registration/userRegistrationForm.tpl');    ...}
All template file paths start off in the template/ subdirectory.

Regards,
Alec Smecher
Public Knowledge Project Team

Jim
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

### Re: URL interpetation\explanation?

Alec, thanks for helping us. Finally got it sorted out. I needed to edit this file. /var/www/ocs/locale/en_US/locale.xml

<!-- Button rename from Register to Start Registering..." -->
<!-- <message key="schedConf.registration.register">Register</message> -->
<message key="schedConf.registration.register">Start Registering...</message>