Software Hosting and Development Services available at PKP Publishing Services
As the developers of Open Journal Systems, Open Conference Systems, Open Harvester Systems, and Open Monograph Press, the PKP team are experts in helping journal managers and conference organizers make the most of their online publishing projects. PKP Publishing Services offers support for:
As a customer of PKP Publishing Services, you will not only receive direct, personalized support from the PKP Development Team, but will be contributing to the ongoing development of the PKP applications. All funds raised by PKP Publishing Services go directly toward enhancing our free, open source software. For more information, please contact us.
OJS development discussion, enhancement requests, third-party patches and plug-ins.
Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
Forum rules
Developer Resources:Documentation: The
OJS Technical Reference and the OJS
API Reference are both available from the
OJS Documentation page.
Git: You can access our public Git Repository
here. Comprehensive Git usage instructions are available on the
wiki.
Bugzilla: You can access our Bugzilla report tracker
here.
Search: You can use our
Google Custom Search to search across our main website, the support forum, and Bugzilla.
Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the
OJS Editorial Support and Discussion subforum; if you have a technical support question, try the
OJS Technical Support subforum.
by rameshnispaara » Fri Apr 23, 2010 3:25 am
Hi,
After login, I want ti display the like this 'You are logged in as sanjana: author'.
but I tried this code which in index.tpl of user in user block.tpl. The code is below
{assign var="journalId" value=$journal->getJournalId()}
{section name=role loop=$userRoles[$journalId]}
{if $userRoles[$journalId][role]->getRolePath() != 'reader'}
<li>» <a href="{url journal=$journal->getPath() page=$userRoles[$journalId][role]->getRolePath()}">{translate key=$userRoles[$journalId][role]->getRoleName()}</a></li>
{/if}
{/section}
But I git below Error.
Fatal error: Call to a member function getJournalId() on a non-object.
Any one would help me.
Thanks in advance.
-
rameshnispaara
-
- Posts: 1
- Joined: Fri Apr 23, 2010 3:14 am
by mcrider » Fri Apr 30, 2010 10:45 am
Hi rameshnispaara,
It looks like journal object is not available to the template you are using--you'll have to assign it by putting something like
- Code: Select all
$journal =& Request::getJournal();
$templateMgr->assign_by_ref('journal', $journal);
In the getContents() function of the UserBlockPlugin.inc.php file.
Cheers,
Matt
Matthew Crider
Public Knowledge Project Team
-
mcrider
-
- Posts: 952
- Joined: Mon May 05, 2008 10:29 am
- Location: Vancouver, BC
Return to OJS Development
Who is online
Users browsing this forum: No registered users and 2 guests