OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



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
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.

URL interpetation\explanation?

Postby Jim » Wed Sep 04, 2013 9:26 am

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
Jim
 
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

Re: URL interpetation\explanation?

Postby asmecher » Wed Sep 04, 2013 10:03 am

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
asmecher
 
Posts: 8597
Joined: Wed Aug 10, 2005 12:56 pm

Re: URL interpetation\explanation?

Postby Jim » Wed Sep 04, 2013 11:05 am

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
Jim
 
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

Re: URL interpetation\explanation?

Postby asmecher » Wed Sep 04, 2013 1:09 pm

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
asmecher
 
Posts: 8597
Joined: Wed Aug 10, 2005 12:56 pm

Re: URL interpetation\explanation?

Postby Jim » Thu Sep 05, 2013 8:57 am

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?
Jim
 
Posts: 22
Joined: Wed May 02, 2012 1:16 pm

Re: URL interpetation\explanation?

Postby asmecher » Thu Sep 05, 2013 9:17 am

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
asmecher
 
Posts: 8597
Joined: Wed Aug 10, 2005 12:56 pm

Re: URL interpetation\explanation?

Postby Jim » Tue Sep 10, 2013 2:13 pm

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>
Jim
 
Posts: 22
Joined: Wed May 02, 2012 1:16 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests