Skip to content

Commit

Permalink
FIX: the "author" option now shows English papers only
Browse files Browse the repository at this point in the history
  • Loading branch information
masuhar committed Dec 14, 2024
1 parent e8333aa commit 05b482e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions prg-bib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: PRG Bibliography Shortcode
* Plugin URI: https://github.com/prg-titech/bib-shortcode/
* Description: Shortcode to embed publication lists.
* Version: 0.1.7-alpha
* Version: 0.1.8-alpha
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Hidehiko Masuhara
Expand Down Expand Up @@ -71,13 +71,14 @@ function prg_bib_shortcode( $atts ) {
} else if ($atts['author']!='') {
$bib_url = 'https://prg.is.titech.ac.jp/papers/bibtexbrowser.php';
$author_param = 'author=' . str_replace(' ','+',$atts['author']);
$bib_param = 'bib=prg-e.bib;prg-j.bib;thesis-b.bib;thesis-m.bib;thesis-d.bib';
$bib_param_e = 'bib=prg-e.bib;thesis-b.bib;thesis-m.bib;thesis-d.bib';
$bib_param_ej = $bib_param_e . 'prg-j.bib';
$code .= <<<HTML
<div>
<div class='linksblock'>
<a title='publications of the group' href='https://prg.is.titech.ac.jp/papers/'>👥</a>
<a title='publications both in English and Japanese'
href='$bib_url?frameset&amp;$bib_param'>
href='$bib_url?frameset&amp;$bib_param_ej'>
<div style='position: absolute; padding-left: 8px; padding-top: 2px;'>
<img src='https://prg.is.titech.ac.jp/wp-content/plugins/qtranslate/flags/jp.png' />
</div>
Expand All @@ -87,12 +88,12 @@ function prg_bib_shortcode( $atts ) {
<span class='transparent'>👥</span>
</a>
<a title='full page view'
href='$bib_url?$author_param&amp;$bib_param'>
href='$bib_url?$author_param&amp;$bib_param_e'>
</a>
</div>
<iframe class='bibtexbrowser'
src='$bib_url?$author_param&amp;$bib_param&amp;notitle=true'>
src='$bib_url?$author_param&amp;$bib_param_e&amp;notitle=true'>
</iframe>
</div>
HTML;
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: masuhara
Tags: bibtex, bibliography, citation
Requires at least: 5.2
Tested up to: 6.6.1
Stable tag: v0.1.7-alpha
Stable tag: v0.1.8-alpha
Requires PHP: 7.2
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -43,6 +43,9 @@ Parameters:

== Changelog ==

- v0.1.8-alpha
FIX: the "author" option now shows English papers only

- v0.1.7-alpha
IMPROVEMENT: add the "author" option

Expand Down

0 comments on commit 05b482e

Please sign in to comment.