[deleted]
010101 Thanks a lot!
010101 Thanks a lot!
composer update zerosonesfun/link-decisions
See original post for instructions on how to customize (which includes using another language).
Hope you can add translation keys.
Littlegolden I'll be very honest. It's not likely that will happen any time soon.
Short story: See this post.
Long story: I don't have a proper developer environment at this time. So, I can only code online via a basic text editor (very old-school). I was able to do this latest update because of the fact that all I needed to do was add some extra JavaScript; which can be done online right in GitHub. But, anything more complex (such as the transpilation required to make extensions more Flarumized) requires a better set up than what I've got. Although, I did it once using tools in the cloud provided by Google - still it wasn't the best set up.
Would be cool if you made a feature that allowed admins or users to chose whether the want the link to be opened in a new page by default or ask every time.
010101 here's the fixed extension with locale support so maybe someone else could give it a try? :
https://github.com/the-turk/link-decisions/tree/locale
@jordanjay29 this discussion should be tagged with Dev
for now
Kylo Oh, if you’ve completely redone the extension then I definitely can’t help. It could be the way the JavaScript is being loaded in your version of the extension.
Unless you’re saying that your version does work. Then that’s cool. If it works and folks would rather use your version then yes, this thread can be marked as dev. Then you may start a new thread tagged extension; that’s cool with me. I’m happy to turn the keys over to you so to speak.
However, my version isn’t broken and works. Folks may see it working here:
https://www.sitbreathe.be/d/15-audio-heart-lotus-by-shindhu
Kylo You should probably release your fork as separate extension, since it fixes some fundamental issues with upstream version. This is also the way how open source works.
010101 However, my version isn’t broken and works. Folks may see it working here:
https://www.sitbreathe.be/d/15-audio-heart-lotus-by-shindhu
Well, it does no work for me on Firefox - it always opens links in current tab.
Kylo I know how open source works. But, I wouldn’t be able to maintain your version. So if it’s better, your version should become “the” version. I was being sincere. You should take over if that version works better. But, if you don’t want to, that’s cool too. I’ll test your version later and make it the “official” version if it works ok. But again, I won’t be able to update or do much with it.
rob006 Well, it does no work for me on Firefox - it always opens links in current tab.
Are you sure? I don’t have a PC so I can’t test a windows version of Firefox, but I just tested with Firefox for iPhone and it works great. Green button opens site in a new tab/window.
Also, I don’t think the new version Kylo made would fix that unless the JavaScript was completely rewritten? I could be wrong though.
Kylo Thanks! So if anyone wants to confirm if it works in Firefox or not let me know. That part is pretty basic. The green button adds target _blank to the link, the small text above the buttons uses _self as the target. In Chrome, Safari, and Firefox iOS it is working. That would be a real head scratcher if it didn’t work in some other recent version of Firefox. But, I know it’s possible. There could be even just one version of Firefox that doesn’t like it.
LOL - weird. Version 2.0 worked when I first tested, now it's not working for me. JavaScript probably isn't being loaded in a way Sweet Alerts likes or something. Hmm.
Troubleshooting done so far:
It may be some kind of race condition. Now it is working for me on Firefox, but not on Chrome.
Tested on most recent versions of Firefox & Chrome with success.
I reverted back to the previous version. Instantly it works at my forum. I'm going to stick with that version since my forum seems to like it better for some reason.
@jordanjay29 I think this can stay marked as an "extension." In the end, it shouldn't matter how an extension is done, as long as it works for many people, and doesn't have a huge security issue. In the replies above there was talk about maybe marking this as "dev" instead of as an "extension," because the current version wasn't done in the "Flarum way." And so there aren't things like translation support. But, with other CMS extensions/plugins, not all have translation support (thinking about WordPress as one example).
I've tested this on a laptop and on my iPhone in three different browsers and it works. Will it not work in some browsers? Maybe. Will it work for every single Flarum installation scenario? Maybe not, I'm actually not sure. But, so far, with a standard installation, it works for me.