PHPackages                             shebaoting/flarum-repost - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shebaoting/flarum-repost

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

shebaoting/flarum-repost
========================

A Flarum extension that redirects to the original URL if specified when posting.

2.0.2(yesterday)01↑2900%MITPHPPHP ^8.3CI failing

Since Aug 30Pushed yesterday1 watchersCompare

[ Source](https://github.com/shebaoting/flarum-repost)[ Packagist](https://packagist.org/packages/shebaoting/flarum-repost)[ RSS](/packages/shebaoting-flarum-repost/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (5)Used By (0)

Repost
======

[](#repost)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/ee40dcd2d86abfb7ca225f6698c071634c9f0395a88ea61dec3a76e0235d28c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686562616f74696e672f666c6172756d2d7265706f73742e737667)](https://packagist.org/packages/shebaoting/flarum-repost) [![Total Downloads](https://camo.githubusercontent.com/8af075f07fffd0ec2bc0dbc71530fe1ef3cd02bf660aa9b46d7b22e3a5ffe205/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686562616f74696e672f666c6172756d2d7265706f73742e737667)](https://packagist.org/packages/shebaoting/flarum-repost)

**Repost** is a Flarum 2.x extension for publishing link-based discussions. If a new discussion starts with an HTTP or HTTPS URL, the extension stores that URL as the discussion's original source and turns the discussion list title into an external link. The local discussion page remains available, so community members can still reply, moderate, and discuss the linked content inside Flarum.

[中文介绍](README.zh-CN.md)

Features
--------

[](#features)

- Detects URLs at the beginning of new discussion content.
- Stores the detected URL on the discussion as `originalUrl`.
- Shows the source domain in the discussion list metadata.
- Opens the original source URL when users click the discussion title/list main area.
- Keeps the reply/comment count linked to the local Flarum discussion page.
- Displays a notice on the discussion page to show that the topic is a reposted source.
- Adds an admin permission for controlling who can extract and save original URLs.
- Supports existing 1.x data stored in the `discussions.original_url` column.
- Ships English and Chinese translation files.

Requirements
------------

[](#requirements)

- Flarum `^2.0.0-beta`
- PHP `^8.3`

This extension is intended for Flarum 2.x. Use the `v0.x` series for old Flarum 1.x installations.

Installation
------------

[](#installation)

Install the extension with Composer:

```
composer require shebaoting/flarum-repost:"^2.0"
php flarum migrate
php flarum cache:clear
```

If you are using a local path repository during development, require the same 2.x constraint from your Flarum app:

```
composer require shebaoting/flarum-repost:"^2.0" -W
php flarum migrate
php flarum cache:clear
```

Updating
--------

[](#updating)

```
composer update shebaoting/flarum-repost -W
php flarum migrate
php flarum cache:clear
```

If your forum still requires the old package name, switch the Composer requirement first:

```
composer remove shebaoting/repost --no-update
composer require shebaoting/flarum-repost:"^2.0" -W
```

After clearing the cache, refresh the forum page in the browser so Flarum regenerates the combined frontend assets.

Configuration
-------------

[](#configuration)

Go to **Admin &gt; Permissions** and configure the Repost permission:

- **Extract original URL**: users with this permission can create discussions whose first line starts with a URL and have that URL saved as the discussion's original source.

Users without this permission can still create normal discussions, but the extension will not save an `originalUrl` value for them.

Usage
-----

[](#usage)

Create a discussion whose content starts with a full URL:

```
https://example.com/article

This is a short note about why this article is worth discussing.

```

When the discussion is published:

1. The URL is stored as the discussion's original source.
2. The discussion list shows the source domain, for example `example.com`.
3. Clicking the discussion title opens the original source in a new tab.
4. Clicking the reply/comment icon or number opens the local Flarum discussion page.
5. Replies, moderation actions, tags, subscriptions, and other Flarum discussion features continue to work on the local page.

Behavior Details
----------------

[](#behavior-details)

Only URLs that appear at the very beginning of the discussion content are extracted. The URL must start with `http://` or `https://`.

The extension does not fetch, scrape, or copy the remote page. It only stores the source URL and adjusts the discussion list link behavior.

The local discussion URL remains the canonical place for comments. This is useful for RSS imports, news sharing, bookmarks, link roundups, and communities where users want to discuss external content without duplicating the full article.

Data And Migration Notes
------------------------

[](#data-and-migration-notes)

Repost stores the original source URL in the `discussions.original_url` column.

For Flarum 1.x upgrades, existing values in this column are preserved. The migration is idempotent and will not recreate the column if it already exists.

Development
-----------

[](#development)

Install JavaScript dependencies and build the frontend assets:

```
cd js
corepack yarn install
corepack yarn build
```

Useful checks:

```
composer validate --no-check-publish
find . -path './vendor' -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l
```

Troubleshooting
---------------

[](#troubleshooting)

If the discussion list still links every part of a reposted discussion to the external source, clear Flarum's cache and refresh the forum:

```
php flarum cache:clear
```

If the original URL is not saved, check that the actor has the **Extract original URL** permission and that the discussion content begins directly with an `http://` or `https://` URL.

Links
-----

[](#links)

- [My Community](https://wyz.xyz)
- [Packagist](https://packagist.org/packages/shebaoting/flarum-repost)
- [GitHub](https://github.com/shebaoting/flarum-repost)

License
-------

[](#license)

This extension is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~221 days

Total

4

Last Release

1d ago

Major Versions

0.4.0 → 2.0.02026-06-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29738814?v=4)[牛铁柱](/maintainers/shebaoting)[@shebaoting](https://github.com/shebaoting)

---

Top Contributors

[![shebaoting](https://avatars.githubusercontent.com/u/29738814?v=4)](https://github.com/shebaoting "shebaoting (14 commits)")

---

Tags

flarum

### Embed Badge

![Health badge](/badges/shebaoting-flarum-repost/health.svg)

```
[![Health](https://phpackages.com/badges/shebaoting-flarum-repost/health.svg)](https://phpackages.com/packages/shebaoting-flarum-repost)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59112.4k11](/packages/fof-byobu)[fof/gamification

Upvotes and downvotes for your Flarum community

4062.0k7](/packages/fof-gamification)[fof/polls

 A Flarum extension that adds polls to your discussions

25130.2k9](/packages/fof-polls)[fof/user-bio

Add a user bio to user profiles

20102.0k9](/packages/fof-user-bio)[fof/sitemap

Generate a sitemap

1796.4k2](/packages/fof-sitemap)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
