OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Customize the OJS website (3 questions)

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.

Customize the OJS website (3 questions)

Postby bimota » Tue Feb 24, 2009 1:20 am

Hi, I am new to OJS but I am in charge of the technical support for a website, which use cPanel (Linux) and PHP basically and is presented as OJS. I have a couple of questions that daunted me for the previous weeks.

1. I want to delete two tags in the navigation bar, "CURRENT" and "ARCHIVE", how can I do that by changing specific documents?

2. I don't know why our website can't show iamge?

3. The homepage of the website is http://....../ojs, but I want to change it to http://...... instead (get rid of "ojs"), how can I do that?

Honestly, i am not familiar with PHP, so I will very appriciate if you could have detailed instruction. Thank you very much.
bimota
 
Posts: 14
Joined: Tue Feb 24, 2009 1:11 am

Re: Customize the OJS website (3 questions)

Postby jmacgreg » Tue Feb 24, 2009 1:16 pm

Hi Bimota,

See below. Please note, however, that solutions to these questions do require a certain amount of technical knowhow, or at least an ability to learn and investigate. We'll help you where we can, but while OJS is in many ways a simple system to administer, any server administration requires diligence.

1. I want to delete two tags in the navigation bar, "CURRENT" and "ARCHIVE", how can I do that by changing specific documents?


You will have to edit your header template files. OJS uses the Smarty template engine to create all HTML pages (http://smarty.net). The files you will need to edit are in your server's OJS folder: templates/common/header.tpl (that's the main header file for the entire site) and templates/article/article.tpl. In each case, you are looking for code that looks something like the following:

Code: Select all
                {if $currentJournal}
                        <li><a href="{url page="issue" op="current"}" target="_parent">{translate key="navigation.current"}</a></li>
                        <li><a href="{url page="issue" op="archive"}" target="_parent">{translate key="navigation.archives"}</a></li>
                {/if}{* $currentJournal *}


2. I don't know why our website can't show iamge?


I'm not sure what you mean here. Are you having trouble uploading images? Do they not display once you upload them? Please give more information.

3. The homepage of the website is http//....../ojs, but I want to change it to http//...... instead (get rid of "ojs"), how can I do that?


You can move the OJS files directly into your public HTML folder if you want: that is, if all the files are on your server in a folder like /var/www/html/ojs/, you can move them all to /var/www/html. It would be easier for me to explain this if you can tell me how you log in to your server/web space, and what kind of path you see when you do. Please note that if you *do* move your OJS files around, you will likely need to correct a few configuration and website settings: see viewtopic.php?f=8&t=1135 and viewtopic.php?f=8&t=2174#p7340.

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

Re: Customize the OJS website (3 questions)

Postby jmacgreg » Tue Feb 24, 2009 1:21 pm

Hi Bimota,

I just noticed too that you posted this to OCS Development (wrong forum entirely) and again to OCS Technical Support (wrong forum, and a double-post). Please post to the correct forum, and don't double-post as it wastes our time.

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

Re: Customize the OJS website (3 questions)

Postby bimota » Tue Feb 24, 2009 5:31 pm

Thank James and sorry about the duplicate content, cuz I was not sure which would be the right category. I am gonna check your suggesting solutions out :) Thanks again.

Cheers,
Bimota
bimota
 
Posts: 14
Joined: Tue Feb 24, 2009 1:11 am

Re: Customize the OJS website (3 questions)

Postby bimota » Tue Feb 24, 2009 7:14 pm

Hi James,

After following your suggestions, I made some progress and still leave some issues, which I am gonna tell you one by one.

jmacgreg wrote:
1. I want to delete two tags in the navigation bar, "CURRENT" and "ARCHIVE", how can I do that by changing specific documents?


You will have to edit your header template files. OJS uses the Smarty template engine to create all HTML pages (http://smarty.net). The files you will need to edit are in your server's OJS folder: templates/common/header.tpl (that's the main header file for the entire site) and templates/article/article.tpl. In each case, you are looking for code that looks something like the following:

Code: Select all
                {if $currentJournal}
                        <li><a href="{url page="issue" op="current"}" target="_parent">{translate key="navigation.current"}</a></li>
                        <li><a href="{url page="issue" op="archive"}" target="_parent">{translate key="navigation.archives"}</a></li>
                {/if}{* $currentJournal *}


------- I do exactly what you are presenting here, but anything doesn't change, the "Search", "Current" and "Archieve" tags are still there, and the their links still work as before.

I have question here, why should we change both "templates/common/header.tpl" and "templates/article/article.tpl" rather than just "templates/common/header.tpl", based on the fact that it, as you said, is the main header file for the entired site?




2. I don't know why our website can't show iamge?


I'm not sure what you mean here. Are you having trouble uploading images? Do they not display once you upload them? Please give more information.

----- The problem is that all the pictures/images do show or work, no matter the images I upload (site logo or homepage image) or the Captcha image. Any cues for it?


3. The homepage of the website is http//....../ojs, but I want to change it to http//...... instead (get rid of "ojs"), how can I do that?


You can move the OJS files directly into your public HTML folder if you want: that is, if all the files are on your server in a folder like /var/www/html/ojs/, you can move them all to /var/www/html. It would be easier for me to explain this if you can tell me how you log in to your server/web space, and what kind of path you see when you do. Please note that if you *do* move your OJS files around, you will likely need to correct a few configuration and website settings: see viewtopic.php?f=8&t=1135 and viewtopic.php?f=8&t=2174#p7340.

----------- It is amazing that I can get ride of "ojs". Actually prior to the change, it redirected to "http://.../ojs/index.php?journal=arit" everything a user typed "http://.../ojs". Accordingly, it redirects to "http://.../index.php?journal=arit" after a user types "http://....". Is there a way to trim off the "index.php?journal=arit" and make the homepage exactly "http://..."? I log into the server and ojs using the administrator account.



THANKS YOU VERY MUCH

sincerely,
bimota
bimota
 
Posts: 14
Joined: Tue Feb 24, 2009 1:11 am

Re: Customize the OJS website (3 questions)

Postby bimota » Wed Feb 25, 2009 11:57 am

The first one has been solved. Is there any cue for the other two, please? :)
bimota
 
Posts: 14
Joined: Tue Feb 24, 2009 1:11 am

Re: Customize the OJS website (3 questions)

Postby jmacgreg » Wed Feb 25, 2009 12:05 pm

Hi Bimota,

See below:
bimota wrote:
jmacgreg wrote:
1. I want to delete two tags in the navigation bar, "CURRENT" and "ARCHIVE", how can I do that by changing specific documents?


You will have to edit your header template files. OJS uses the Smarty template engine to create all HTML pages (http://smarty.net). The files you will need to edit are in your server's OJS folder: templates/common/header.tpl (that's the main header file for the entire site) and templates/article/article.tpl. In each case, you are looking for code that looks something like the following:

Code: Select all
                {if $currentJournal}
                        <li><a href="{url page="issue" op="current"}" target="_parent">{translate key="navigation.current"}</a></li>
                        <li><a href="{url page="issue" op="archive"}" target="_parent">{translate key="navigation.archives"}</a></li>
                {/if}{* $currentJournal *}



------- I do exactly what you are presenting here, but anything doesn't change, the "Search", "Current" and "Archieve" tags are still there, and the their links still work as before.

I have question here, why should we change both "templates/common/header.tpl" and "templates/article/article.tpl" rather than just "templates/common/header.tpl", based on the fact that it, as you said, is the main header file for the entired site?


Apologies -- templates/common/header.tpl is the header file for *almost* every page on the site. You also have to account for article-level pages -- HTML galley pages, for example -- which use templates/article/article.tpl. Are you deleting or commenting out the above code in your header file? If you aren't seeing changes right away, you might have to clear your site's template cache (that option is in the Site Administration User Home page) or clear your browser cache.

bimota wrote:
2. I don't know why our website can't show iamge?


I'm not sure what you mean here. Are you having trouble uploading images? Do they not display once you upload them? Please give more information.

----- The problem is that all the pictures/images do show or work, no matter the images I upload (site logo or homepage image) or the Captcha image. Any cues for it?
[/quote]

I would suggest taking a look at the FAQ first to try and narrow the problem down: viewtopic.php?f=8&t=2481. Suggestions: try turning on error reporting as per the FAQ instructions and subqequently uploading an image; check your permissions; check whether an image uploaded (FTP'd) straight to the server is viewable.

bimota wrote:
3. The homepage of the website is http//....../ojs, but I want to change it to http//...... instead (get rid of "ojs"), how can I do that?


You can move the OJS files directly into your public HTML folder if you want: that is, if all the files are on your server in a folder like /var/www/html/ojs/, you can move them all to /var/www/html. It would be easier for me to explain this if you can tell me how you log in to your server/web space, and what kind of path you see when you do. Please note that if you *do* move your OJS files around, you will likely need to correct a few configuration and website settings: see viewtopic.php?f=8&t=1135 and viewtopic.php?f=8&t=2174#p7340.

----------- It is amazing that I can get ride of "ojs". Actually prior to the change, it redirected to "http://.../ojs/index.php?journal=arit" everything a user typed "http://.../ojs". Accordingly, it redirects to "http://.../index.php?journal=arit" after a user types "http://....". Is there a way to trim off the "index.php?journal=arit" and make the homepage exactly "http://..."? I log into the server and ojs using the administrator account.

[/quote]

You can try turning disable_path_info to OFF in your config.inc.php, if it's on; you can also experiment with Apache's mod_rewrite -- there's an entry in the FAQ about how OJS handles URLs that points to a good thread.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 5 guests