Comments (8)
Hi @karamqubsi,
Thanks for your pr at #52. OJS3 actually has a config option for whether or not to enable the use of a CDN. This is important for some countries that have strict privacy laws, where people don't want the request to an external server.
Instead of modifying the template file, can you instead load it in via the addStyle
theme method? To do this, add a copy of the .css file to to the styles
directory, so it's at /plugins/themes/bootstrap3/styles/bootstrap-rtl.min.css
. Then, in the BootstrapThreeThemePlugin.inc.php
file, you'll see how styles and scripts are loaded here:
https://github.com/NateWr/bootstrap3/blob/master/BootstrapThreeThemePlugin.inc.php#L58
If you add the following code, this should load the RTL stylesheet if the locale is RTL, and it will load from the CDN if the enable_cdn
config option is set:
$locale = AppLocale::getLocale();
if (AppLocale::getLocaleDirection($locale) === 'rtl') {
if (Config::getVar('general', 'enable_cdn')) {
$this->addStyle('bootstrap-rtl', '//cdn.rawgit.com/morteza/bootstrap-rtl/v3.3.4/dist/css/bootstrap-rtl.min.css');
} else {
$this->addStyle('bootstrap-rtl', 'styles/bootstrap-rtl.min.css');
}
}
from bootstrap3.
Hi @karamqubsi, RTL support would be great. Are you able to issue a PR with support for this?
from bootstrap3.
Hi @NateWr , I will try to do that , thank you :) .
from bootstrap3.
Hi @NateWr I did a small change that worked for me you might test it here (not sure if it can be suitable for a pull request ) :
https://github.com/karamqubsi/bootstrap3
I'm not familiar with the ojs code base so maybe there is a better way to do that and of course it might be better for some users not to use cdn library ...
anyway that fixed the problem for us , now we are using ojs3 bootstrap with rtl support ,
Thanks a lot for your efforts in these projects .
from bootstrap3.
Hi , thanks for the help , I added a new commit to my branch please have a look , I added the code you've mentioned and I added the bootstrap-rtl.min.css to its place in the styles folder .
Thanks .
from bootstrap3.
This is looking great @karamqubsi, thanks!
Can you just tweak the whitespace in your latest commit? The main block in BootstrapThreeThemePlugin.inc.php
needs to be properly indentend, this commented line can be removed, and this line should be indented with tabs rather than spaces.
Then I think we'll be ready to go! 👍
from bootstrap3.
Thanks @NateWr , I did the indentations and I removed the comment :) .
from bootstrap3.
I've merged that PR now. Thanks for contributing!
from bootstrap3.
Related Issues (20)
- Problem with the display of author's information HOT 2
- User can not provide review interests during registration HOT 4
- keywords: no separator displayed HOT 5
- Problems installing the latest version (3.2.0.3) through the Plugin Gallery in Open Journal Systems (3.3.0-8) HOT 6
- Versioned galley redirects to most recent HOT 3
- catalog category page generates error in 3.3.0.8 HOT 4
- Fatal error on first page using template on system front page HOT 7
- sidebar width too small at medium/tablet sizes HOT 2
- Author affiliation class on details page has a typo HOT 1
- Darkly theme issues on search page HOT 1
- Search throws error when searching HOT 3
- Issue description non showing in issues archive view HOT 1
- Readable theme contains not readable color selection HOT 5
- Bootstrap3 Theme PHP Fatal Error on indexSite.tpl HOT 3
- doi not show in bootstap3 and ojs 3.4 HOT 1
- ReCAPTCHA missing from templates
- Curl issue HOT 1
- The latest release has an invalid version HOT 1
- Missing `Templates::Search::SearchResults::` hooks on search.tpl HOT 3
- Bootstrap 3 EOL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap3.