Don't want to see articles from a certain category? When logged in, go to your User Settings and adjust your feed in the Content Preferences section where you can block tags!
We do often include affiliate links to earn us some pennies. See more here.

The GOL website source is now open to everyone

By -
I've seen a few requests for this to happen and it was always planned, so from today the gitlab repository for GOL is officially public.

I already opened up GOL once, but I screwed up the github for it and nuked it until I could learn git a little better. I'm a bit more confident in my git abilities now to manage it in public.

Find it here: https://gitlab.com/liamdawe/gamingonlinux

It's probably not even remotely interesting to the majority, but I'm more than happy for it to be open, because there's no real reason to have it closed.

Feel free to submit issues, patches for security and so on. I appreciate any helpful comments, but any spiteful/idiotic comments about the code aren't appreciated or needed. It is still very much a learning project for me (and hey it works!).

The main thing I would like right now for people interested, is for people to check for security issue and other glaring bugs. The main bulk of the features are likely still to be done by me, since it's still for me to continue learning.

To stop the inevitable "why not github!!!111one", well gitlab originally allowed us to host a private project whereas github at the time did not. Gitlab has literally everything we need and it's easy to use, so there's no sense in wasting time moving. It allowed me to properly work on it for ~10 months in private as I cleaned up a bunch of it and learnt to use git more. Article taken from GamingOnLinux.com.
24 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
The comments on this article are closed.
14 comments
Page: 1/2»
  Go to:

ripper Jan 23, 2017
Awesome!
MayeulC Jan 23, 2017
Yippeeee !
Though the site really seems to work well now, there's not a lot of missing features... @Mentions, maybe?
Anyway, it's great to have a way of fixing issues as they arise; though you were already quite reactive :)
Corben Jan 23, 2017
If you want to host your own github-like service, have a look at GoGS on https://github.com/gogits/gogs/ or its fork GiTea on https://github.com/go-gitea/gitea

It's pretty cool, and has already a lot of features github offers. Some are still missing, but it's under development and you can kindly request features. E.g. if you want to have snippets like gists etc.
And it's pretty easy to setup.


Last edited by Corben on 23 January 2017 at 1:10 pm UTC
Levi Jan 23, 2017
I've been helping Liam with code off and on. You'll maybe notice a few issues are mine.
Past few weeks I haven't been as involved as I'd like but still know enough to answer most questions should Liam not get around to it ^_^

Quoting: M@yeulCYippeeee !
Though the site really seems to work well now, there's not a lot of missing features... @Mentions, maybe?
Anyway, it's great to have a way of fixing issues as they arise; though you were already quite reactive :)

That has been on my wishlist for a long time too. I haven't been able to come up with a good method of detecting when the "@name" is actually a username or something else. Preferable now and in past comments. All methods I've come up with would require many DB calls.
It would be a prime candidate for integration with the new notification menu.
minidou Jan 23, 2017
great, what can we help with?
minkiu Jan 23, 2017
View PC info
  • Supporter
Quoting: LeviI've been helping Liam with code off and on. You'll maybe notice a few issues are mine.
Past few weeks I haven't been as involved as I'd like but still know enough to answer most questions should Liam not get around to it ^_^

Quoting: M@yeulCYippeeee !
Though the site really seems to work well now, there's not a lot of missing features... @Mentions, maybe?
Anyway, it's great to have a way of fixing issues as they arise; though you were already quite reactive :)

That has been on my wishlist for a long time too. I haven't been able to come up with a good method of detecting when the "@name" is actually a username or something else. Preferable now and in past comments. All methods I've come up with would require many DB calls.
It would be a prime candidate for integration with the new notification menu.

On th ementions thing, maybe you could do a JSOn export of the usernames/urls to those, and do the matching on PHP if true, repormat the @username to a href?
Liam Dawe Jan 23, 2017
Quoting: minidougreat, what can we help with?
Pointing out glaring errors and flaws would be a big help right now.
tmtvl Jan 23, 2017
Quoting: CorbenIf you want to host your own github-like service, have a look at GoGS on https://github.com/gogits/gogs/ or its fork GiTea on https://github.com/go-gitea/gitea

Or Kallithea or Gitprep or Apache Allura or... IDK, GitLab CE?

But seriously, good on you, Liam. Always nice to have people open source their stuff so it can both be scrutinized by the community and used as example for learners.
Gobo Jan 23, 2017
Thumbs up for GitLab! I might still have my own instance running on a hidden server at work, never checked after my co-workers never understood the benefits of running a version control system...

Small bug report here as I didn't want to sign up at GitLab after having a quick peek at your code: when you set $year in calendar_ical.php you seem to have borked the google bot path with the empty content. As of right now calling calendar_ical.php without setting the year parameter will most likely invalidate your SQL later on. I guess in case of an empty $_GET['year'] you might want to set $year = date( "Y" ) just like the first branch.

Additionally, it seems you copied code from calendar_ical.php to livestreams_ical.php, as it has the same issue in setting $year. But this time, $year is not even used anywhere afterwards, so it would be best to just strip lines 16 to 27 in that file.


Last edited by Gobo on 23 January 2017 at 4:15 pm UTC
wojtek88 Jan 23, 2017
First of all, great that you went open-source. Congrats!

But, with great power comes great responsibility...

So I will leave my notes here. You can do with them whatever you want :).

Let me start with this sentence - I'm not a PHP developer. I just wanted to see the overall quality of the code.

I have to say that I see very huge difference between code in gamingonlinux/includes/hashids directory while comparing with other code of the system. Object-oriented approach looks much better from my perspective, and I would follow it in the rest of the code.

What's more - I just took a look on one random file and I found commented code (gamingonlinux/includes/crons/itch_games_import.php). I would strongly recommend that you avoid leaving such a stuff in the code - it makes the code very hard to read and it gives no value. If you want to see old portion of business logic, you should find it in the VCS. Leaving it in code is pointless.

And the general note - I see that you tend to use magic numbers and values that have some meaning for you, but it's very hard to find out from the code their meaning while looking at one file. I come from Object-oriented world, so I have Object-oriented manners, but for me it's hard to read file like:
gamingonlinux/blocks/block_comments_latest.php
Where you can find many numbers with some meaning, but without a constant that would suggest the meaning with it's name. And what's more I guess there is a bug:

if ($title_length >= 55)
{
$title = substr($comments['title'], 0, 65);
//...

You test against 55 and assume that string has 65 characters. This is a great sample where constant like "MAX_COMMENT_TITLE_NAME" would help to avoid such an error. There are more places to improve in this file, like having pagination config and reading pagination information from it, etc.

Don't get me wrong Liam, I'm very pleased you've opened the code of the site. I just wanted to share with you my comments, You can do with them whatever you want, I just want to share with you my remarks. Maybe you have your reasons to have different opinion, so we can argue for a moment ;)
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.