A Flarum extension. Manage Flarum primary navigation links. Original by @sijad.
Use Bazaar or install manually with composer:
composer require fof/links
composer update fof/links
- Add sub items
- Add permission
An extension by FriendsOfFlarum.
Manage Flarum primary navigation links
License: MIT License
A Flarum extension. Manage Flarum primary navigation links. Original by @sijad.
Use Bazaar or install manually with composer:
composer require fof/links
composer update fof/links
An extension by FriendsOfFlarum.
Is it possible to make links visible to logged in users only?
I would also appreciate hints for a possible implementation, so maybe I can submit a pull request.
how can I slide links to the right?
Hey don't forget the futher future like sub items!
Please specify in docs or somewhere how we can use translation strings instead of hardcoding the link title, thank you.
Some links will likely be cross-domain, and adding rel="noopener noreferrer"
is considered best practice.
More info: https://web.dev/external-anchors-use-rel-noopener
(I'll happily PR this, but if I haven't by Sunday, just ping me a reminder below.)
So, I have a custom Flarum home page (using fof/pages
), so the forums aren't seen when you first get to the site. I have a "Forums" link in the navbar (created with fof/links
, of course!), which simply sends the user to the http://site.com/all
route.
When I click on it from the navbar, it fails to load, and I get this in the console:
router.js:24 Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'http://site.com/all' cannot be created in a document with origin 'http://site' and URL 'http://site.com/all'.
at p (http://site.com/assets/forum-f5cae522.js:25:106516)
at Function.y.set (http://site.com/assets/forum-f5cae522.js:25:108543)
at HTMLAnchorElement.s.attrs.onclick (http://site.com/assets/forum-f5cae522.js:25:109364)
at _.handleEvent (http://site.com/assets/forum-f5cae522.js:25:102087)
Note in the above, the issue is that the origin is http://site
and the URL is http://site.com/all
. I'm thinking http://site
should actually be http://site.com
.
I cleared the cache, et al as well.
To try and determine if this is actually an issue with fof/links
, flarum/core
, or some other extension, I did the following, both of which worked:
fof/pages
and clicked on thatUpdate: I should have added that this was working fine earlier today, prior to upgrading Flarum from beta 13 to beta 15.
Here is some other info, if this helps:
Flarum core 0.1.0-beta.15
PHP version: 7.2.34
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, readline, Reflection, SPL, session, standard, libsodium, apcu, bcmath, bz2, calendar, ctype, curl, dba, dom, enchant, mbstring, fileinfo, ftp, gd, geoip, gettext, gmp, iconv, igbinary, imagick, json, exif, mysqlnd, mysqli, odbc, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_sqlite, Phar, posix, pspell, recode, redis, shmop, SimpleXML, snmp, soap, sockets, sodium, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xdiff, xml, wddx, xmlreader, xmlwriter, xsl, memcached, zip, Zend OPcache, xdebug
+------------------------------+----------------+--------+
| Flarum Extensions | | |
+------------------------------+----------------+--------+
| ID | Version | Commit |
+------------------------------+----------------+--------+
| flarum-lang-english | v0.1.0-beta.15 | |
| flarum-sticky | v0.1.0-beta.15 | |
| flarum-tags | v0.1.0-beta.15 | |
| fof-byobu | 0.6.0 | |
| fof-drafts | 0.3.1 | |
| fof-polls | 0.3.2 | |
| fof-reactions | 0.5.0 | |
| flarum-likes | v0.1.0-beta.15 | |
| flarum-mentions | v0.1.0-beta.15 | |
| flarum-subscriptions | v0.1.0-beta.15 | |
| flarum-emoji | v0.1.0-beta.15 | |
| flarum-flags | v0.1.0-beta.15 | |
| flarum-approval | v0.1.0-beta.15 | |
| fof-merge-discussions | 0.5.1 | |
| fof-pages | 0.6.0 | |
| fof-masquerade | 0.3.6 | |
| flarum-suspend | v0.1.0-beta.15 | |
| flarum-lock | v0.1.0-beta.15 | |
| fof-split | 0.6.0 | |
| fof-forum-statistics-widget | 0.4.0 | |
| fof-profile-image-crop | 0.2.1 | |
| fof-user-bio | 0.4.1 | |
| fof-user-directory | 0.5.0 | |
| flarum-statistics | v0.1.0-beta.15 | |
| fof-formatting | 0.3.1 | |
| flarum-markdown | v0.1.0-beta.15 | |
| nearata-tags-color-generator | v1.2.0 | |
| fof-links | 0.5.0 | |
| fof-doorman | 0.3.0 | |
| fof-terms | 0.6.1 | |
| flarum-bbcode | v0.1.0-beta.15 | |
+------------------------------+----------------+--------+
Base URL: http://site.com
Installation path: /var/www/tmv
Debug mode: off
Any thoughts?
(Sorry figured it out it was my mistake, please delete.)
Right now you can have sub links, but you have to put a link in the drop down label. I would like this to be not a link so they can click the label and then see the drop down menu to choose a link.
Use Case Example
I want to have a social Drop Down. When a user clicks social, I want to have links to my Facebook page, Twitter and instagram page.
Right now I can't do that and I have no more room on my bar for links :-(
A Flarum link should hide, if the user doesn't have permission to the tag the discussion belongs to.
Is it possible to add an hover effect to the Links?
Also font (Bold) etc?
On some platforms, like Mastodon the rel="me"
attribute to links is a way to verify someones identity. On Mastodon verified links get highlighted and get a green check mark on your profile page:
It would be very good to identify my own forum, because it gives some trust to people.
A link with the rel attribute looks like this:
<a href="https://veganism.social/@utopify_org" rel="me" target="_blank">Mastodon</a>
It would be very useful if there would be an option for every link to activate this attribute like this:
Hi, please see: https://discuss.flarum.org/d/24178-top-bar-issue-on-some-windows-size
Seems this extension is causing that issue.
Actually miss compatibility with Beta 14
https://discuss.flarum.org/d/25184-issues-on-upgrading/2
https://github.com/PeopleInside/Flarum_Beta14_Upgrade/issues/1
Is your feature request related to a problem? Please describe.
Allow inserting only the relative path to an url, without having to specify the full url:
Instead of https://example.com/p/2-mypage
, allow also to input only /p/2-mypage
for internal links.
In case of domain/base url changes, all the internal links will just work, right now, you need to update all the links by hand.
When Flarum is installed in a subfolder, the active links feature doesn't work.
Sorry about this, I didn't actually try my code on a subfolder before opening #5
The problem is that m.route()
returns the full path instead of just the path relative to flarum base url as I expected.
I thought I had found a solution that completely removed the need for the URL
object, but I guess I will have to use it to extract the path of the link after all. I can submit the PR to fix this later this week.
Hi, when i run composer update fof/links
for update the plugin I see system stay frozen on:
Loading composer repositories with package information
Updating dependencies (including require-dev)
the cursor continue to intermitting without complete the update.
Current Behavior
After installing the fof links extension, I wanted to add some links with icons from font awesome. On the config page it shows a link to Font Awesome and I've chosen free icons. Some of them don't show up:
Steps to Reproduce
Expected Behavior
I expected to see the icons, which are on the Font Awesome website.
Environment
Fresh installation of Flarum
Flarum core: 1.8.1
PHP version: 8.2.7
MySQL version: 10.11.3-MariaDB-1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+----------------------------+---------+--------+
| Flarum Extensions | | |
+----------------------------+---------+--------+
| ID | Version | Commit |
+----------------------------+---------+--------+
| flarum-flags | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-lock | v1.8.0 | |
| flarum-approval | v1.8.0 | |
| v17development-blog | v0.7.2 | |
| fof-links | 1.2.0 | |
| flarum-suspend | v1.8.0 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-mentions | v1.8.2 | |
| flarum-markdown | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-lang-english | v1.8.0 | |
| flarum-emoji | v1.8.0 | |
| askvortsov-markdown-tables | v1.2.1 | |
+----------------------------+---------+--------+
Base URL: https://forum.utopify.org
Installation path: /var/www/flarum
Queue driver: sync
Session driver: file
Mail driver: mail
Debug mode: off
Hi, today I run the following command:
composer outdated --direct
the partial result was:
fof/links 0.5.0 0.5.3 Manage Flarum primary navbar menu links
so I run composer update fof/links
than cleared cache and the forum never load anymore.
0.1.0-beta.15
PHP
7.4.xx
MySQL
5.7.xx
Flarum beta 14 has been out for about a week, any hope for an update to support this version?
Is this pull request all that's needed? #24
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.