Jump to content

[WIP]The kOS Repository: Now with 100% more registrations!


SolarLiner

Recommended Posts

[Moved updates on second post]

Hi,

I'm presenting to you: the kOS Repository !

This site is being made to share kOS scripts, classed by types and categories.

Currently the site is not yet functional (for example you cannot submit scripts), but I would like your feedback on how it looks for now.

index.jpgscript.jpg

The site is heavily using backend methods (using PHP for all operations on download/upload, Markdown conversion, etc.), since frontend cannot connect to databases. I use Bootstrap for the CSS, two versions of it actually (one for the index, the other for the scripts)

GitHub: https://github.com/SolarLiner/kOS-Repo

Avaliable script types:

- One-time run

- Function

- Other

Avaliable categories (will change the image on the script page) :

- Launch

- Orbital Maneuvers

- Landing

- Atmospheric Autopilot

- I/O Operations

- Utility

- Other

Happy autopiloting ! :)

Edited by SolarLiner
Link to comment
Share on other sites

UPDATE 06/19: Now you can log in and out, if you have created an account previously, it's now time for you to help me test it! And if you haven't already, create one, it's open ! :)

UPDATE 06/17 #2: If you thought you were crazy and already registered, I have to say that you were not. Boolean logic in PHP is so different than in every other language that it drives me crazy. If this doesn't work now, Imma yell or something ^^

Also, Search bar is implemented. At last, you can find something useful to you in no time.

UPDATE 06/17: OK, now registration works fine now it seems.

UPDATE 06/12: Be prepared and register yourself ! http://kosrepo.uphero.com/register.php <- BTW, if guys with SQL knowledge can test some SQL injections (please not deadly ones) it would be great. :)

UPDATE 06/10:

- Author page has been added

- Working descriptions with markdown for scripts and users

- Working download scripts and download counter

- Avatars

- GitHub Repo: https://github.com/SolarLiner/kOS-Repo

Edited by SolarLiner
Link to comment
Share on other sites

I think the basic idea is good, but there are two things to look out for:

- Making sure things are neatly ordered and do not become a huge mess. For instance, things fitting into two categories being spread across the site makes things messy and hard to find.

- Being able to distinguish easily between comparable or near identical scripts. It is very confusing to have 14 scripts that do exactly or roughly the same with no discernible differences

Link to comment
Share on other sites

I think the basic idea is good, but there are two things to look out for:

- Making sure things are neatly ordered and do not become a huge mess. For instance, things fitting into two categories being spread across the site makes things messy and hard to find.

- Being able to distinguish easily between comparable or near identical scripts. It is very confusing to have 14 scripts that do exactly or roughly the same with no discernible differences

I agree that now the front page looks messy, but it will just show the most recent/top rated/most downloaded scripts. You'll have the scripts classified by types and categories, you will even be able to search through in the titles and descriptions.

2 suggestions:

One, have a field for the kOS version scripts are written for.

Second, Code text aligned to center... really? :P

Good catch! I didn't even think about the kOS version.

And yeah, for now, text is centered because I didn't mess with the CSS too much for now.

Link to comment
Share on other sites

I agree that now the front page looks messy, but it will just show the most recent/top rated/most downloaded scripts. You'll have the scripts classified by types and categories, you will even be able to search through in the titles and descriptions.

That is what I am saying: you will need very stringent guidelines for placement and description and/or good moderation, or it will end in chaos.

Link to comment
Share on other sites

That is what I am saying: you will need very stringent guidelines for placement and description and/or good moderation, or it will end in chaos.

Moderation will be assured by people (not only just me), once I get the moderation tools done (as soon as people are able to post scripts and comments).

Oh, and news! This site has now 100% more registration pages! Go create your account (and help me test my site) [you're not yet able to connect and post].

Link to comment
Share on other sites

Moderation will be assured by people (not only just me), once I get the moderation tools done (as soon as people are able to post scripts and comments).

And description templates? I just point to the Spaceport to show you how much of a mess things can become.

Link to comment
Share on other sites

This is a great idea!

Might there also be a place for helper tools external to the actual kOS script? I have a Perl script I use to strip down indentation and comments to try to get things under the 10,000 byte limit without having to "pay" the penalty of having proper commenting and indentation.

Link to comment
Share on other sites

This is a great idea!

Might there also be a place for helper tools external to the actual kOS script? I have a Perl script I use to strip down indentation and comments to try to get things under the 10,000 byte limit without having to "pay" the penalty of having proper commenting and indentation.

That can be done quickly with some JavaScript: paste your code, and get a "min" version of it, without any line returns, unneeded white spaces, comments, etc.

EDIT: Look at the script page (on the photo) ! I finally got syntax coloring working!

Link to comment
Share on other sites

That can be done quickly with some JavaScript: paste your code, and get a "min" version of it, without any line returns, unneeded white spaces, comments, etc.

EDIT: Look at the script page (on the photo) ! I finally got syntax coloring working!

No, what I meant was "Can I share the Perl script on your site?", not "Can your site do the same thing as my Perl script?".

You have a site for hosting of kOS scripts for sharing. I was trying to ask if it also supports sharing utilities that aren't kOS scripts but are directly related to them (like my Perl script).

Link to comment
Share on other sites

You say you got the author page working now, but when I click on an author name link to see the author's page, I get this:

Warning: mysqli_stmt::bind_result() [mysqli-stmt.bind-result]: Number of bind variables doesn't match number of fields in prepared statement in /home/a4228718/public_html/author.php on line 18

Link to comment
Share on other sites

You say you got the author page working now, but when I click on an author name link to see the author's page, I get this:

Warning: mysqli_stmt::bind_result() [mysqli-stmt.bind-result]: Number of bind variables doesn't match number of fields in prepared statement in /home/a4228718/public_html/author.php on line 18

Oh.

I got the same database locally and on the server, and it works perfectly locally. What is wrong?

And the same error happens on the registration confirmation page too. Curious ...

Link to comment
Share on other sites

No, what I meant was "Can I share the Perl script on your site?", not "Can your site do the same thing as my Perl script?".

You have a site for hosting of kOS scripts for sharing. I was trying to ask if it also supports sharing utilities that aren't kOS scripts but are directly related to them (like my Perl script).

Technically you can share everything that is text, but I'd prefer the repo to stay only kOS scripts. How cool would that be if you could strip down the scripts using kOS code? ^^

That brings a problem: how to actually limit content being submitted to only be kOS scripts?

Oh, and that brings me a good idea actually: a third button on the script page that allows you to download a stripped version !

Link to comment
Share on other sites

Technically you can share everything that is text, but I'd prefer the repo to stay only kOS scripts. How cool would that be if you could strip down the scripts using kOS code? ^^

kOS doesn't have the ability to read file input, making this sort of impossible right now.

The reason I care about the stripping program is that I have examples I won't post without users being able to get them stripped, as they literally can't run without it (and if you do strip then trying to read it is messy).

Link to comment
Share on other sites

kOS doesn't have the ability to read file input, making this sort of impossible right now.

The reason I care about the stripping program is that I have examples I won't post without users being able to get them stripped, as they literally can't run without it (and if you do strip then trying to read it is messy).

My kOS IDE ill soon have something like that: when you open the file, it shows you the clean version, but when you save, it gets minified. I'm not fully sure how to handle this yet, but this would make a real difference.

But I may have put the IDE dev a bit aside with this project. I kinda want to link those two projects (be able to download/upload scripts directly from the IDE would allow for easier and faster sharing, and make use of the external kOS tools I might put on the server too).

EDIT:

Oh.

I got the same database locally and on the server, and it works perfectly locally. What is wrong?

And the same error happens on the registration confirmation page too. Curious ...

Hum hum ... In fact the database on the server was one revision behind. So it missed two columns ...

EDIT2: OK, now that I've put a bunch of verification conditions, it now works just fine. I just can't even on that one.

Edited by SolarLiner
Link to comment
Share on other sites

But I may have put the IDE dev a bit aside with this project. I kinda want to link those two projects (be able to download/upload scripts directly from the IDE would allow for easier and faster sharing, and make use of the external kOS tools I might put on the server too).

Please don't link them so strongly that the IDE is necessary to use the repository (like would happen if you make the IDE's stripper the universal way stripping is done). I don't use the IDE because I can edit about twice as fast in VI than in an editor that makes you take your fingers off the home row keys.

Link to comment
Share on other sites

Please don't link them so strongly that the IDE is necessary to use the repository (like would happen if you make the IDE's stripper the universal way stripping is done). I don't use the IDE because I can edit about twice as fast in VI than in an editor that makes you take your fingers off the home row keys.

NEVER I'll make one needing the other. One is better with the other, but these are still two independant projects, just sharing a common subject.

And ... VI is in Linux, right? So you cannot (yet) use my IDE because of the platform. That's yet another reason not to bind those too close.

Link to comment
Share on other sites

NEVER I'll make one needing the other. One is better with the other, but these are still two independant projects, just sharing a common subject.

And ... VI is in Linux, right? So you cannot (yet) use my IDE because of the platform. That's yet another reason not to bind those too close.

VI began its life in the Unix world. But there's been ports to every other platform. I'm using it on Windows because doing csharp development for kOS requires Windows, unfortunately. (Csharp itself can in principle be done in Linux, but the peeking inside of KSP's DLL to see the class definitions is messy when you're on a system for which DLL's aren't native libraries. But the bigger problem is that it depends on a Windows parser generator tool called tinyPG.)

Link to comment
Share on other sites

Loging in and out now works! kOS Repo might now use cookies if you choose to allow the site to remember you. But it only stores a Unique ID which is linked to your account, so the site knows who you are when you get back. Also, the said cookie expires 30 days after its creation, so every month or so, you'll have to connect back.

Unfortunately you still cannot do lots of things on the website yet.

Link to comment
Share on other sites

  • 4 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...