PeterX {l Wrote}:FGD.net has (afaik) not the wish to take-over all communication related to libre games on the internet. Bundling communication a bit would be cool, not bad, but it is not about a totalitarian approach if I understand it correctly.
It does not work at all for me. Some js is blocked due to cross-site scripting and then the whole site collapses. I can see nothing essentially.Julius {l Wrote}:I got fed up and made a Flarum again, find it on https://freegamedev.net
Seems to work nicely
Julius {l Wrote}:I got fed up and made a Flarum again, find it on https://freegamedev.net
trevor {l Wrote}:Julius {l Wrote}:I got fed up and made a Flarum again, find it on https://freegamedev.net
OH MY GOD!!! Julius, You killing forum. Please don't do it. I really love this place, where people talking about FOSS games. This phpbb forum is good. New forum is f**ing hipster-looking shit.
trevor {l Wrote}:Julius {l Wrote}:I got fed up and made a Flarum again, find it on https://freegamedev.net
OH MY GOD!!! Julius, You killing forum. Please don't do it. I really love this place, where people talking about FOSS games. This phpbb forum is good. New forum is f**ing hipster-looking shit.
Nope. I have a very secure configuration, that's why I catch these.Julius {l Wrote}:That must be partially an issue on your side
Well, there's still a lot to do, it is full of jsdeliver.net urls.Julius {l Wrote}:I spend a lot of time yesterday trying to eliminate exactly that, some CDN loaded emojis
I would say then this is a shortcoming of Flarum. There's absolutely nothing on a forum that would require js, as phpBB demonstrates.Julius {l Wrote}:Totally without JS is not possible with Flarum though, and I have given up trying to find an option that can satisfy this requirement without reasonable trade-offs in other areas.
You're welcome, and thanks for checking it out! Yes, there's css too.Julius {l Wrote}:However I now noticed that I missed one "flatpickr.min.css" that is still loaded from a CDN. As that is just a CSS file it should not cause your issues, but I will try to eliminate it never the less. Thanks for the feedback.
I can confirm that all cdn urls have been removed. Still don't like it though, I have to enable js which always make me nervous.Julius {l Wrote}:Edit: the last external resource mentioned above seems to have been part of the "polls" plugin. I disabled it and filed a bug report. AFAIK it now should not load any resources from outside freegamedev.net and all javascript (and everything else) is fully FOSS.
You have contradicted yourself here. You have said yourself why Flarum is actually a worse option.Julius {l Wrote}:A more modern phpBB might be alright, but when starting completely new (for legal reasons we can't just transfer the personal data without user-consent, but IANAL), there are better options like Flarum in my personal opinion.
Yeah, you can say "it looks bad" without js, but I personally think it is a lot worse than that. You can only see the tags, that's all.Julius {l Wrote}:No you misunderstood
I like libre Javascript or rather see nothing wrong with it, but we had this discussion in depth before so no need to start it here again please.
But despite this, I think a forum should have a functional non-javascript fallback, which Flarum sadly hasn't (AFAIK you can only read and it looks bad).
It does work. There's absolutely no technical issues, I've done it many many times, I could do it for you without a transfer. Even if the new database contains only the topics (with their ids and therefore keeping the links) is a much better solution that starting anew with Flarum. You don't know me so it is totally understandable that you won't trust the admin access to me, otherwise I could do this easily. In lack of admin access, here's how this could work:Julius {l Wrote}:As for the other points, again discussed a lot before, but even a new phpBB would require a complete restart as for both technical and legal reasons we can't just plumb the old database into a new system and upgrading the existing one simply doesn't work (it just breaks horribly). It's not about "help" that is required, it simply doesn't work technically (& in regards to administrative rights to the server) and we can't get user consent for transferring all the personal data either.
You create a script (could be bash, python or php) that downloads each page with a webcrawler (wget or curl can do this) with a generated name (say 000001.html, you could match the extension but not required) and at the same time saves a rewriterule to a file with the url used and the assigned local filename. When you've finished, you upload the static files and the rewriterule list to an Apache.Julius {l Wrote}:And last but not least, we do not plan to remove this forum here, so links will stay intact (as least if technically possible). The idea is simple to retire it and use as an read-only archive. However given the sorry state this forum/database is in, even after turning it read only it might break again, so I am thinking about turning it into a set of static pages. However I am not quite sure how that can be done best and if that doesn't change the link structure to be incompatible with external links.
wget -B https://forum.freegamedev.net -r https://forum.freegamedev.net
You're welcome! Let me know if you want to give it a try.Julius {l Wrote}:Thanks, the offer for help is appreciated.
I don't know the state of this community (I'm quite new here), but I know old technology isn't necessarily the cause. I mean, take a look at IRC, it's even older than phpBB, yet it supports huge communities.Julius {l Wrote}:This community is very much dying, and to a large part because the technical foundation is stuck in the early 2000, just as phpBB in general.
Oh, that's a pity. As promised, here's my suckless rss generator that doesn't care about the overcomplicated, way-to-many OOP abstraction forced Flarum source at all. (I understand that it is written by amateurs for free, but calling it "delightfully simple" made my day :-) Just ROTFL :-D ) Digging into the code made me remember why I have left webdevelopment altogether years ago... Oh, and by the way, taking a look at the sql schema revealed that Flarum is storing the user's IP address with every post without the user's consent which is in a direct violation of GDPR. You should do something about it, turn this feature off if possible.Julius {l Wrote}:Yes, I hope to add RSS feeds to it ASAP, but the problem is that (contrary to what I thought because I previously used the plugin you linked) there is currently no good RSS feed addon that is compatible with the latest version of Flarum
Holy ****, you're right, it's downloading the page and parsing the html then downloads each and every discussion page as well...Julius {l Wrote}:Someone on the official Flarum forum just posted a new one, but it seems to use a not very good way of generating the feeds so I am not sure if that would be a good way to implement it. See: https://discuss.flarum.org/d/27569-rss-feed
<?php
/* ------------------ set this to the Flarum config file -------------------- */
$config = @include("path/to/flarum/config.php");
$limit = 100; /* return that many records at most */
/* -------------------------- configuration ends ---------------------------- */
if(!is_array($config) || !is_array($config['database']))
die("Configuration not found.\n");
/***** connect to the database using the configuration in Flarum's config *****/
try {
$pdo = new \PDO(
$config['database']['driver'].":host=".$config['database']['host'].
";dbname=".$config['database']['database'].
(!empty($config['database']['charset']) ?
";charset=".$config['database']['charset'] : ""),
$config['database']['username'],
@$config['database']['password'],
[
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_EMULATE_PREPARES => 0
]);
} catch(\PDOException $e) {
die("Unable to connect to database: ".$e->getMessage()."\n");
}
if(!empty($config['database']['charset']))
$pdo->exec("set names ".escapeQueryChars($config['database']['charset']).";");
/********************** get some data from the database ***********************/
try {
$sql = "SELECT a.id, a.title, a.slug, a.last_posted_at, b.username, ".
" TIMESTAMPDIFF(SECOND, a.last_posted_at, NOW()) as t, ".
" DATE_FORMAT(a.last_posted_at, '%a, %d %b %Y %T') as d FROM ".
$config["database"]["prefix"]."discussions as a LEFT JOIN ".
$config["database"]["prefix"]."users as b ON a.last_posted_user_id = b.id ".
"WHERE b.id IS NOT NULL AND a.is_private != 1 ".
"ORDER BY a.last_posted_at DESC LIMIT ".$limit.";";
$res = $pdo->query($sql);
$rows = $res->fetchAll(\PDO::FETCH_ASSOC);
$pdo->close();
} catch(\PDOException $e) {
die("Unable to query the database: ".$e->getMessage()."\n");
}
/*************************** output what we've got ****************************/
echo("<"."?xml version=\"1.0\" encoding=\"utf-8\"?".">\r\n");
?>
<rss version="2.0">
<channel>
<title>FreeGameDev</title>
<link><![CDATA[<?php echo($config["url"]); ?>]]</link>
<description>Free Game Development</description>
<?php foreach($rows as $row) { ?>
<item>
<title><![CDATA[<?php echo(htmlspecialchars($row["title"])); ?>]]></title>
<description><![CDATA[<?php
echo("by ".htmlspecialchars($row["username"])." ");
$t = $row["t"] + 0;
if($t < 60)
echo("just now");
else if($t < 60*60)
echo(($t/60)." minute".($t/60 > 1 ? "s" : "")." ago");
else if($t < 60*60*24)
echo(($t/60/60)." hour".($t/60/60 > 1 ? "s" : "")." ago");
else
echo(($t/60/60/24)." day".($t/60/60/24 > 1 ? "s" : "")." ago");
?>]]></description>
<guid><![CDATA[<?php echo(
/* create a link to the discussion. Slug might contain the id already */
$config["url"]."/d/".$row["id"]."-".$row["id"]."-".
htmlspecialchars($row["slug"]));
?>]]</guid>
<pubDate><![CDATA[<?php
echo(htmlspecialchars($row["d"]." ".date("T"))); ?>]]></pubDate>
</item>
<?php } ?>
</channel>
</rss>
bzt {l Wrote}:Oh, and by the way, taking a look at the sql schema revealed that Flarum is storing the user's IP address with every post without the user's consent which is in a direct violation of GDPR. You should do something about it, turn this feature off if possible.
bzt {l Wrote}:Okay, here's my ca. 50 SLoC version...
bzt {l Wrote}:One thing I couldn't figure out, is if the discussions table's slug field contains the sluggified title only, or the entire url part with the discussion id as well
Ok, I see you're aware. What violates GDPR is that it is storing without user's consent or knowing. Letting them know isn't a good a solution, just a step in the right direction, but makes it GDPR-compatible.Julius {l Wrote}:Yes I am aware of this and also not sure why this is hard-coded in Flarum. I asked one of their developers and their suggestion was to periodically overwrite it with a script or so I'll probably file a bug report and see where this goes. However, it is not in direct violation of the GDPR, but indeed I need to include this in the privacy policy that users have to consent to (which I haven't got around adding to the forum yet).
- $ipAddress = Arr::get($request->getServerParams(), 'REMOTE_ADDR', '127.0.0.1');
+ $ipAddress = '127.0.0.1';
No, this is supposed to be called as a cgi by the webserver.Julius {l Wrote}:Thanks a lot! This looks like a simple initial solution indeed, but I need to study the code a bit closer. Two quick questions though:
1. I assume you intend to just run this periodically with a cron?
The xml is outputted to the stream sent to the client, no local files created. This is a read-only code, it does not modify the database neither any server files (it just reads the config, that's all, it does not touch anything else).Julius {l Wrote}:2. How can I best change the output location of the resulting .xml?
Using "public" is quite common, and you definitely want this inside, because that's how it supposed to work (it's minimal, has no url routing, so it must be the webserver that serves it when "rss.php" url is called). Storing the xml in a file won't work as it has to serve up-to-date data and it contains time specifications like "just now" or "2 minutes ago" relative to the time of the http query, which would be impossible with a cached file.Julius {l Wrote}:Because in Flarum only the "public" sub-directory is accessible via the webserver and this script looks like something that I would prefer to have outside of that directory.
Then printing the id is necessary. Thanks! Oh, and I've use htmlspecialchars there too, my mistake, please replace it with urlencode($row["slug"]) as the guid field contains an url not html tags.Julius {l Wrote}:bzt {l Wrote}:One thing I couldn't figure out, is if the discussions table's slug field contains the sluggified title only, or the entire url part with the discussion id as well
It contains the sluggified title only.
Users browsing this forum: No registered users and 1 guest