OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Contact Pages and Editorial Page

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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

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.

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 OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Contact Pages and Editorial Page

Postby neophyte13 » Thu Feb 14, 2008 9:04 pm

I am wondering if anyone has any suggestions for the following two issues. To begin, I should state that I did make both pages static as a means of addressing the problem, but that made it such that the top menu bar etc., was also static. Hence, it failed to reflect whether on not the user had logged in prior to visiting either the contact or editorial (redirected) pages.

Here is a brief description of what I am attempting to do.
1. On the Contact page, I am looking to add another name under the Principal Contact - which I will have to change to Contacts.

2. For the Editorial Page it has been decided that only the Editors and myself will have our e-mail addresses linked to our names. All of the other board members, though listed on the page, will not have their names linked in this manner. (How the standard page has been developed makes it such that everyone has their name linked to their e-mail address.)

I would appreciate any insight anyone may have concerning these issues.

Thanks in advance and Happy Valentine's Day.

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Contact Pages and Editorial Page

Postby jmacgreg » Thu Feb 14, 2008 10:25 pm

Hi neophyte13,

And a happy Valentines day to you as well -- what a great time to be posting to the forums! :D

How did you go about making the pages static? I'm not sure I entirely follow what you mean in that first paragraph -- did you change the header template to point to static pages for those pages?

Since OJS doesn't directly support the functionality you're looking for, the easiest thing for you to do would be to edit the specific template pages to reflect what you want. Please note that you'll have to keep track of these changes, and handle them properly when you next upgrade.

In the first instance, you'll want to edit the file templates/about/contact.tpl. Firstly, to change "Principal Contact" to "Contacts": this line is called from the en_US locale file by the following piece of smarty code on line 22:

Code: Select all
<h3>{translate key="about.contact.principalContact"}</h3>


If you look for that translate key in the en_US locale file (locale/en_US/locale.xml) you'll find it on line 2248. Change it to whatever you want it to say.

OK, back to the contact template file. You can add HTML/text on line 47, between the two if statements, to for your second contact. Something like

Code: Select all
<p><strong>James MacGregor</strong><br />
Email: <a href="mail@mail.com">mail@mail.com</a></p>


Keep in mind that when OJS displays email addresses it does so with an obfuscation algorithm; you might want to look into doing the same if you hard-code any email addresses into the system.

Your second question is a little difficult to implement. The template file to edit is templates/about/editorialTeamBio.tpl. If you take a look on line 68 you'll see smarty code that throws up the email icon:

Code: Select all
{icon name="mail" url=$address}


If you remove that, the icon won't display; problematically, however, it won't display all across the board, and that goes for the folks you want to have addresses listed beside. This is also where my knowledge of smarty runs a bit thin, but I assume if you did some extra legwork you might be able to throw those email addresses up conditionally.

Poke around and give this a shot at first; if you have any further questions, let me know.

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

Re: Contact Pages and Editorial Page

Postby neophyte13 » Thu Feb 14, 2008 11:33 pm

Hi James-

Thanks for the suggestions you provided concerning my two seemingly simple problems. :) You got to love how some people just think it takes a mere flip of a switch to make things happen. At any rate, what I meant by making the two "problematic" pages static was I simply created the pages in HTML and then had the respective handler go to the location where the pages are found. The suggestion was made to another person on this site and overall it is a nice work around, but as I say, the navigational menus at the top and on the side are also static.

I have not had time to implement your suggestions but will try it out tomorrow. James, what would happen if I used your suggestion of putting some HTML right in the contact template as well as in the Editoral template? Just a thought. James, would it be the editorialTeamBio.tpl that needs changing or the editorialTeam.tpl? The actual page I am trying to work with is the one developed through the "Masthead" step. I should point out that I am using the option "The Journal Manager creates titles and adds people under each title." In addition, it may be useful to note that many of the people who we want to appear on the Editorial Team page are advisors and as such will not have an official role, as identified by OJS.

All for now. Thanks again James for your help.

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Contact Pages and Editorial Page

Postby jmacgreg » Thu Feb 14, 2008 11:53 pm

Hi neophyte13,

No worries about the help -- as a matter of fact, one of my very first forays into the inner workings of OJS (this was before I worked for the PKP directly) was actually to figure out how to remove email icons from the masthead, so this question has brought me back a bit.

At any rate, what I meant by making the two "problematic" pages static was I simply created the pages in HTML and then had the respective handler go to the location where the pages are found. The suggestion was made to another person on this site and overall it is a nice work around, but as I say, the navigational menus at the top and on the side are also static.


Since you most definitely want to keep the nav/sidebar content dynamic, I would recommend against this solution. Actually, would you be able to point me to the thread where you got the suggestion from? I wouldn't mind taking a look and possibly adding a correction.

The First page you come to when you click About --> Editorial Team would be dictated by editorialTeam.tpl. If you click on a team member's name, the resulting pop-up window (listing name, email icon, and other information as added by the user) is dictated by editorialTeamBio.tpl.

Since your Editorial Board will *not* be entered into the system in any meaningful way, I would recommend this as a course of action: don't worry about editing editorialTeamBio.tpl as I had instructed in my previous post. Before editing any template file, consider whether you can add a list of board members anywhere else in the journal and have it suffice -- remember, you'll have to keep track of that template file change, update it periodically, etc., and if you can add the board somewhere else so that it can be editing through the system, you may want to do that. Some ideas include:

  • adding the list to the main page by filling in either Journal Description or Additional Content in Step 5 of the setup process;
  • adding the list as another item to appear in "About the Journal" in step 2.5 of the setup process (be warned that this item will fall under the Policies subsection);
  • creating your own custom page that can be linked to from either a new item on the navigation bar (again can be done from step 5) or from a link on the main page (see first point above for where to put it)
If none of these suffice, and you prefer to have the board members added in the masthead, I would go ahead and add them to the appropriate place in editorialTeam.tpl. Take a look, and if you need help finding the appropriate place, please let me know.

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

Re: Contact Pages and Editorial Page

Postby neophyte13 » Fri Feb 15, 2008 6:27 pm

Hi James-

Prior to initiating this bulletin board subject, I had already done what you had suggested. Namely, I had included the Editorial Board on the main page of the journal. Unfortunately, the request is that it appear in both places. Hence, the initiation of my search for an answer. I am not sure why it is critical that the list of names appear twice, but for whatever reason it appears to be of importance. What can I say? HA.

Here is where I found the information about redirecting to my static pages. The topic title is: How to add static "About the Journal: Contact | Editorial te
Hi istoyanov,

The easiest way to do this is probably to add redirects to those two pages. In the "contact" and "editorialTeam" functions in pages/about/AboutHandler.inc.php, add something like the following line to the beginning of the function:
Code: Select all
Request::redirectUrl('http://url/to/static/page');
Regards,
Alec Smecher
Public Knowledge Project Team


I have not yet taken a look at the editorialTeam.tpl but after I do, would it be okay if I post my possible solution for your review? As my username suggests, I have only been part of the php world for a short time - how does the last four days sound - so any insight would be appreciated.

Take care and thanks again.

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm

Re: Contact Pages and Editorial Page

Postby jmacgreg » Mon Feb 18, 2008 12:29 pm

Hi neophyte13,

No worries -- feel free to share what you come up with. I'll let you know in advance though, that our ability to comment on optional changes like this is relative to the time we're spending with other support requests; but I certainly don't mind taking a look with what you're doing.

As noted in Alec's thread that you referenced, you may want to take a look at the smarty website:

http://smarty.php.net

When you're editing .tpl files, you're actually modifying smarty template code, rather than php itself.

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

Re: Contact Pages and Editorial Page

Postby neophyte13 » Tue Feb 19, 2008 8:41 pm

Hi James-

I am happy to report that with your insight, the contact page is now operational. Thanks.

As for the other issue....The Editorial Team Page, I have looked at the editorialTeam.tpl and, if I am interpreting things correctly, as it stands, the information to be found on the "final page" comes from a database. Being as I chose the option, in the Masthead step, to assign titles etc. and I am not selecting anyone from the database for membership in a particular role, the page is truly static except for the sidebar, top menu bar etc. In other words, the content of the Editorial board is not coming from any database at all. Therefore, what would happen if I used the following as the editorialTeam.tpl?
______________________________________________


{**
* editorialTeam.tpl
*
* Copyright (c) 2003-2007 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* About the Journal index.
*
* $Id: editorialTeam.tpl,v 1.18 2007/09/04 16:31:43 asmecher Exp $
*}
{assign var="pageTitle" value="about.editorialTeam"}
{include file="common/header.tpl"}

<p>
<h4>Founding Editors</h4>

<a href="mailto:xxx@email">AA. Aaaa</a>, University of Alison <br />
<a href="mailto:dddd@email">CM. Ddddd</a>, University of Caribou <br />
<br />
<h4>Book Review Editor</h4>
TBA <br />
<br />
<h4>Production Manager</h4>
<a href="mailto:www@email">TT.Wwww</a>, University of Christmas <br />
<br /><h4>Editorial Advisory Board</h4>
MM Bbbb, University of Sunrise <br />
YV Bbbb, University of Bulldog <br />

</p>



{include file="common/footer.tpl"}

_________________________________________________________
Would that work?

Thanks again, James, for any help you may be able to provide.

Have a good evening,

neophyte13
neophyte13
 
Posts: 7
Joined: Mon Feb 11, 2008 1:55 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 4 guests