OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS Plugin: Galley Icons

The Plugin Gallery is a venue for users of PKP software to share their plugins.

Moderators: jmacgreg, michael, John

Forum rules
If you post a plugin here, please include information on which versions of which applications it is compatible with. Attach a tarball of the plugin (e.g. tar cvzf myPlugin-0.1.tar.gz plugins/generic/myPlugin). Thanks for contributing!

OJS Plugin: Galley Icons

Postby msaghaei » Thu Oct 09, 2008 12:57 pm

This plugin is used to replace the text label associated with each galley type in the issue table of content, with a favorite icon.
The settings page of this plugin allow adding, deleting and changing the galley icon associated with each galley type (label). You may also specify an icon for abstract (or no-abstract when details is displayed). For the later use enter a localized string (e.g. article.abstract) as the galley type (label). For each entered icon a link to Google image for some favorite icons is provided.
The search pattern in preg_replace function in this plugin may require some optimization to make it more specific and robust. Any feedback will be appreciated.

See as an example this journal which uses it:
http://journals.mui.ac.ir/jrms/issue/current

Author: Mahmoud Saghaei
Software: OJS
Versions: 2.1+
Multilingual: yes
Attachments
fileIcons.tar.gz
(6.19 KiB) Downloaded 870 times
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby ramon » Thu Dec 04, 2008 11:40 am

Hello Mahmoud et al,

I like this plugin. Only issue is that I can't replace the Abstract link, since it's not a galley file.
Any suggestions on how to replace that to match the layout?

Doing something just with css might be quite tricky...
ramon
 
Posts: 929
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: OJS Plugin: Galley Icons

Postby msaghaei » Sat Dec 06, 2008 5:02 am

Hi ramon

For abstract and other non-galley links (e.g. details when no abstract), please enter the corresponding localization message key in the Galley Type text box. For example in the case of abstract just enter {article.abstract} (without braces of course) in the Galley Type. This way the icon will be displayed for any page language you are using.

Regards,
Saghaei
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby kekropas » Tue Jul 14, 2009 1:42 pm

I have created an icon for my pdf galley but when I change locale to Greek for example, the same articles have galley type PDF(English) and the icon is not applied. I add the same icon for galley type PDF(English) but nothing happens. What is the galley's name? Is it possible to find the types of galleys?

Nice work by the way!!!
kekropas
 
Posts: 38
Joined: Sat Dec 20, 2008 5:56 am

Re: OJS Plugin: Galley Icons

Postby msaghaei » Wed Jul 15, 2009 1:57 am

Hi kekropas

This occurs with ojs 2.2.3

in the file plugins/generic/fileIcons/FileIconsPlugin.inc.php please change the line:

Code: Select all
$pattern = "|(<a href=\"{$url}[^>]+>)$key<\/a>|Ui";


to

Code: Select all
$pattern = "|(<a href=\"{$url}[^>]+>){$key}[^<]*<\/a>|Ui";


This should be around line 92 in the file
also the revised package is attached
Please set the label for your galley icon the same as the one that ojs assign when uploading galley (e.g. pdf)

Thank you
Mahmoud
Attachments
fileIcons.tar.gz
search pattern revised to make it compatible with 2.2.3
(6.19 KiB) Downloaded 397 times
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby kekropas » Wed Jul 15, 2009 2:23 am

Problem fixed, thank you very much msaghaei
kekropas
 
Posts: 38
Joined: Sat Dec 20, 2008 5:56 am

Re: OJS Plugin: Galley Icons

Postby kol_jaf » Wed Nov 17, 2010 11:20 am

Prof. Saghaei,

I have experienced a same problem with OJS 2.3. Would you please advise me?

Jafar
kol_jaf
 
Posts: 7
Joined: Sun Mar 21, 2010 9:41 am

Re: OJS Plugin: Galley Icons

Postby msaghaei » Wed Nov 17, 2010 11:56 am

Dear Jafar

OK, if you have the same problem, please consider the posts above to solve your problem, If it does not work this mean that you have not the same problem. In that case you have to describe the exact problem.

Thank you
Saghaei
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby kol_jaf » Sat Nov 20, 2010 5:20 am

The plugin installed successfully and appeared in generic plugin section. The icon was uploaded successfully but it is not appear in Table of Contents section. I have tried the solution for OJS 2.3 but it does not work for OJS 3.2.
Thank you for your recommendation.
kol_jaf
 
Posts: 7
Joined: Sun Mar 21, 2010 9:41 am

Re: OJS Plugin: Galley Icons

Postby msaghaei » Sat Nov 20, 2010 11:35 am

Hi kol_jaf

It's indeed 2.3.3

This is due to lack of version information in the database. New ojs needs version information present in the table versions. You can insert the following record into the versions table by executing the following SQL.
Code: Select all
INSERT INTO `versions` (`major`, `minor`, `revision`, `build`, `date_installed`, `current`, `product_type`, `product`, `product_class_name`, `lazy_load`, `sitewide`) VALUES (1, 0, 0, 0, now(), 1, 'plugins.generic', 'fileIcons', 'FileIconsPlugin', 1, 0);

Please let me know if this fixed your problem

Regards,
Saghaei
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby kol_jaf » Mon Nov 22, 2010 11:09 am

Problem was solved, thank you very much Prof. Saghaei.

Jafar
kol_jaf
 
Posts: 7
Joined: Sun Mar 21, 2010 9:41 am

Re: OJS Plugin: Galley Icons

Postby kol_jaf » Wed Jan 12, 2011 1:35 pm

Prof. Saghaei,

I am trying to change Galley Icon. I have deleted previously uploaded image and when trying to upload new image I have received the following error:

Errors occurred processing this form:

Selected galley type (PDF) already exists!


Would you please advise me?
kol_jaf
 
Posts: 7
Joined: Sun Mar 21, 2010 9:41 am

Re: OJS Plugin: Galley Icons

Postby theodore » Wed Jun 06, 2012 7:55 am

msaghaei wrote:Hi ramon

For abstract and other non-galley links (e.g. details when no abstract), please enter the corresponding localization message key in the Galley Type text box. For example in the case of abstract just enter {article.abstract} (without braces of course) in the Galley Type. This way the icon will be displayed for any page language you are using.

Regards,
Saghaei


i also want to change the "pdf" from the abstract page, but i do not get this... can you plz explain it again?? i write "article.abstract" in the type textbox but nth happens...
theodore
 
Posts: 37
Joined: Wed May 16, 2012 8:52 am

Re: OJS Plugin: Galley Icons

Postby msaghaei » Wed Jun 06, 2012 11:30 am

theodore

Please explain in more detail what do you want to do.

Mahmoud
msaghaei
 
Posts: 119
Joined: Sun Jan 08, 2006 1:01 pm

Re: OJS Plugin: Galley Icons

Postby theodore » Wed Jun 06, 2012 3:07 pm

of course.
the plugin changes the file form in the table of contents with icon. (changes the "pdf" word with the icon i will choose)
bt only in the table of contents. if i want to do the same in the abstract form, how is it??
theodore
 
Posts: 37
Joined: Wed May 16, 2012 8:52 am

Next

Return to Plugin Gallery

Who is online

Users browsing this forum: No registered users and 4 guests