Code Monkey home page Code Monkey logo

links's Introduction

Links by FriendsOfFlarum

License Latest Stable Version

A Flarum extension. Manage Flarum primary navigation links. Original by @sijad.

links_front

Installation

Use Bazaar or install manually with composer:

composer require fof/links

Updating

composer update fof/links

TODO List by Sijad

  • Add sub items
  • Add permission

Links

An extension by FriendsOfFlarum.

links's People

Contributors

askvortsov1 avatar clarkwinkelmann avatar davwheat avatar dependabot[bot] avatar dsevillamartin avatar flarum-bot avatar imorland avatar ipurpl3x avatar jaggy avatar karaok491 avatar luceos avatar rob006 avatar stylecibot avatar sycho9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

links's Issues

DOMException when clicking a link

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:

  • Manually tested the link in the browser
  • Added the link to a page from fof/pages and clicked on that

Update: 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?

Allow blank links for drop downs

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 :-(

Hover effect?

Is it possible to add an hover effect to the Links?
Also font (Bold) etc?

Identity verification feature: Add the option to add "rel=me" to links

Feature Request

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:

image

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:

rel-me

Support for relative links

Feature Request

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.

Active links feature doesn't work on subfolder

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.

Unable to update to version 0.2.0

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.

Not all Free Font Awesome icons show up in the link bar

Bug Report

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

  1. Go to 'FoF Links' extension config page
  2. Click on 'create link'
  3. Add title 'YouTube' and icon 'fas fa-youtube' and add a random link.
  4. Save and visit your website

Expected Behavior
I expected to see the icons, which are on the Font Awesome website.

Screenshots
image

Environment
Fresh installation of Flarum

  • Flarum version: 1.8.1
  • Extension version: 1.2.0
  • Website URL: https://forum.utopify.org
  • Webserver: nginx
  • Hosting environment: vserver
  • PHP version: 8.2.7
  • Browser: Firefox 115.0.1 (64-bit) & Android preinstalled browser
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

Latest version broke Flarum Beta 15

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

Beta 14 support?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.