monperrus / bibtexbrowser

Beautiful publication lists with bibtex and PHP (standalone or in Wordpress)
http://www.monperrus.net/martin/bibtexbrowser/
87 stars 54 forks source link

Allow different localization styles to use the same bibtex database on different pages #89

Open i2000s opened 6 years ago

i2000s commented 6 years ago

Hi Martin,

It's me again! I haven't made any improvements to the package for a while, but I received a request from my people recently. They want to show some attractive images for publication entries on one page but no associated images on another page with the same bibtex file. I am thinking it might be necessary to call the localization files defined in two different files, say, bibtexbrowser.local.php and bibtexbrowser.local2.php for the two pages, respectively. Then within these two localization files, I can call different CSS files to display or not to display a new bibentry_image field, which includes an html code block to display images.

When I looked into the bibtexbrowser.php code, on lines 49 and 50, the bibtexbrowser.local.php file is hard-coded into the function. Since I am not sure how to make it flexible to accept customized *.local.php files and don't know if there is an easier way to implement the requested feature, I am resorting to you to give some pointers. I guess it's trivial to you to redefine the localization file calls in a couple of lines.

Let me know if you have time to implement this feature or just give me some guidelines.

Thanks!

Qi

monperrus commented 6 years ago

Hi Qi, I don't have time now, so a pull request would be much welcome :-) --Martin

i2000s commented 6 years ago

Could you give me some pointer? How would you like to solve it? I can give a try, but I haven't PHP code for a while.

monperrus commented 6 years ago

On the top of my head ... I don't know :-)