Perseus 117 Report post Posted November 7, 2016 Hello I've been working on a small project to create a better version of our beloved pkoSite. It's still a work in progress but just in case anyone wants to use it and help around with testing or whatever, I'm releasing a minimal version to the public. This version includes Register Login Downloads News Admin panel for both downloads and news I'll update it to include more things such as: Ranking Item Mall Credit Mall IMP Auction Credit Auction Wheel of Fortune Admin panel Logging system ( log all actions performed by admins ) If you have any feature you want , you can let me know in the comments, I'll be happy to add that! I've used the latest database libraries ( SQLSRV ) and laravel as the framework. You'll be able to run this in the latest version of any webserver you want. You can obtain the site from here. Installation guide: First off, you need SQLSRV drivers. Find out what version of PHP you're running and then download those drivers from here. Most of your webservers have thread safety enabled so you're going to want to use the _ts dll files. Take the sqlsrv pdo DLL and the normal sqlsrv dll and put them into your php( this folder will be in your webserver folder. For xampp users -> xampp/php.) -> ext folder. Now, open your php.ini which you'll find in your php folder. Search for "extension=php_" and you should come across something like this. as you can see at the end, I have the sqlsrv dlls added. Do the same for your php.ini file. Now, go here and scroll down till you see this : download the ODBC driver that corresponds to the sqlsrv driver versions you download and install them. That's all for the SQLSRV part. Now, depending on whether you just want to mess around with the website or you want to put it up for production, you have two options. You start a temporary server using artisan (it'll work on the port 8080 and won't interfere with your website) You can edit your HTTPD.CONF file to direct it to the website's public folder and the website will run directly from your browser by going to localhost or your website name. ( WARNING : No other folders on your webserver will be accessible to you if you use this method, i.e, you won't be able to use another site like http://localhost/site2. It won't work.). If you want to go the first route, open your command prompt. Direct yourself to the webserver directory and type in php artisan serve This'll start a server on the 8080 port and you can use the website as you wish. If you want to go the second route, go to your apache folder, and open the httpd.conf file. It should be in the conf folder. Search for the DocumentRoot. It'll be something like this : As you can see I've already changed my document root to the directory that my website is in. Do the same. That does it for the webserver/sqlsrv configuration. Now, adding your database configurations to the website. In the root of the website, there's a file called .env.example. Open the file. Most of the configs are self-explanatory. Change the SITE_INFO_DB_FILE to wherever you've stored your website. Go to google and check their RECAPTCHA page to obtain your RECAPTCHA PUBLIC and PRIVATE keys and just stuff those in the respective fields. IMPORTANT STEP HERE You have to remove the .example part from the .env file, i.e open your word editor and click "save as", choose the "all files" option and remove the .example from the end of the name, so the file is just called .env Open your command prompt, direct yourself to the website directory and type in php artisan key:generate This'll generate a key specific to your website. Go to the database folder(topSite/database/) and just create an empty "SiteInfo.sqlite" file. Run php artisan migrate --database=SiteInfo --path=database/migrations/SiteInfo php artisan migrate --database=GameDB --path=database/migrations/GameDB And you're done! If you want to change the title of the site or whatever, you can find the website's name in the config->app.php file. Let me know if there are any issues, I'll fix them as soon as I can. Some screenshots from the website 25 Quote Share this post Link to post Share on other sites
Totoka 152 Report post Posted November 7, 2016 Hello @Perseus, https://github.com/Microsoft/msphpsql/releases ^ here linux sqlsrv drivers btw, laravel, good choice Quote Discord: andresc Share this post Link to post Share on other sites
Shako 97 Report post Posted November 7, 2016 (edited) @Perseus it looks great! Edited November 7, 2016 by Shako Quote Sunny Go! Online pko.host Share this post Link to post Share on other sites
V3ct0r 2,152 Report post Posted November 7, 2016 Great work, @Perseus! Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
TheLegend 13 Report post Posted November 7, 2016 (edited) Woop At last @Perseus looks very neat with a lot of comments thanks a lot @Totoka which one is better to learn first for a beginner (Larval of codeigniter) looking at the popularity of the framework for the next few years Edited November 7, 2016 by TheLegend Quote Share this post Link to post Share on other sites
Totoka 152 Report post Posted November 7, 2016 48 minutes ago, TheLegend said: @Totoka which one is better to learn first for a beginner (Larval of codeigniter) looking at the popularity of the framework for the next few years Isn't about which one is better, is about what you want to do with it, and what you expect from. I would suggest you to read carefully both documents. For example, using a whole framework on small projects, could be bad, time/progress by structuring, but if your are pointing to do something great (due scalability, maintenance and balh) it is very nice. Note: Laravel for small project can be abstracted, by using just a few modules instead, like Eloquent(Capsule) it is a very nice one, + some other stuff like Twig which is very powerful. 1 Quote Discord: andresc Share this post Link to post Share on other sites
TheLegend 13 Report post Posted November 7, 2016 15 minutes ago, Totoka said: Isn't about which one is better, is about what you want to do with it, and what you expect from. I would suggest you to read carefully both documents. For example, using a whole framework on small projects, could be bad, time/progress by structuring, but if your are pointing to do something great (due scalability, maintenance and balh) it is very nice. Note: Laravel for small project can be abstracted, by using just a few modules instead, like Eloquent(Capsule) it is a very nice one, + some other stuff like Twig which is very powerful. thanks for the info, will probably be using Larval with Twig or Smarty Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 If you want to create a small project using laravel they have a smaller version of their framework called Lumen. You could use that. 1 Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 I'm completely clueless when it comes down to all this website stuff, but can I just download the latest XAMPP, install, make the necessary edits you said and add your website? I really liked the simple and good looking design! Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 (edited) 1 hour ago, Angelix said: I'm completely clueless when it comes down to all this website stuff, but can I just download the latest XAMPP, install, make the necessary edits you said and add your website? I really liked the simple and good looking design! Yeah! If you run into issues, you can let me know. I'm happy to help! Edit: I've updated the topic with some features that I'll be adding as time goes by. I intend to make this website the source for all website related needs that the community has. If you've got any feature you'd like me to add, you can put a request up on github or you can post here. Edited November 8, 2016 by Perseus Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 11 hours ago, Perseus said: I'll update it to include more things such as: Ranking Item Mall Credit Mall IMP Auction Credit Auction Wheel of Fortune Admin panel Logging system ( log all actions performed by admins ) The ranking thing is already applied? Can you also include these: View member count of guild. Change/Reset guild password. Change/Reset security code. I'm barely going to install the latest xampp (7.0.9 / PHP 7.0.9), then go looking for the rest of the instructions. Had a hard time installing and apache not running because of UAC, had to carefully rad not to install on program files folder, haha. Really awesome work and design once again. Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 12 hours ago, Perseus said: Open your command prompt, direct yourself to the website directory and type in php artisan key:generate This'll generate a key specific to your website. I'm having a bit of trouble with this, I just changed the folder "topsite" to "Website", went there by command and it says "php" is not a valid command. Quote Share this post Link to post Share on other sites
Totoka 152 Report post Posted November 8, 2016 38 minutes ago, Angelix said: I'm having a bit of trouble with this, I just changed the folder "topsite" to "Website", went there by command and it says "php" is not a valid command. try to add the php.exe into your %PATH%, or execute it directly like: C:\path\to\php.exe [args ...] Quote Discord: andresc Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 (edited) 42 minutes ago, Totoka said: try to add the php.exe into your %PATH%, or execute it directly like: C:\path\to\php.exe [args ...] I already got it to generate a key, but it shows errors. And I did defined them correctly (I think), and when trying to see the home page or login, I get an error pages with many things. EDIT: Ok, I was using the x64 DLL (went by my computer, duh), but it seems PHP is x32 (went surfing on Google for this error) and I had to use the ones from x86 instead of the x64. That fixed the issue on screenshot above, now I'm running into this: Edited November 8, 2016 by Angelix Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 (edited) 1 hour ago, Angelix said: I already got it to generate a key, but it shows errors. And I did defined them correctly (I think), and when trying to see the home page or login, I get an error pages with many things. EDIT: Ok, I was using the x64 DLL (went by my computer, duh), but it seems PHP is x32 (went surfing on Google for this error) and I had to use the ones from x86 instead of the x64. That fixed the issue on screenshot above, now I'm running into this: Ah crap I forgot to include one of the commands. Go to the database folder and just create an empty "SiteInfo.sqlite" file. Run php artisan migrate --database=SiteInfo and see if that fixes it. Edited November 8, 2016 by Perseus Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 6 minutes ago, Perseus said: Ah crap I forgot to include one of the commands. Run php artisan migrate and see if that fixes it. Tried running that, error result. Sorry for many errors hahah, I'm completely clueless to this. Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 Just now, Angelix said: Tried running that, error result. Sorry for many errors hahah, I'm completely clueless to this. Hey! No prob. My bad, run php artisan migrate --database=SiteInfo Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 1 minute ago, Perseus said: Hey! No prob. My bad, run php artisan migrate --database=SiteInfo Now I get somewhat the same error text from site. Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 Did you create a SiteInfo.sqlite file in the database folder? Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 4 minutes ago, Perseus said: Did you create a SiteInfo.sqlite file in the database folder? I think I missed that on the guide, did it and got it to show the home page, now something went wrong with the ranking page, login user and registering user pages. And: Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 The first error, can you tell me which page you're on? What's the URL? I'll push an update to github to fix the second one, give me 2 minutes. Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 1 minute ago, Perseus said: The first error, can you tell me which page you're on? What's the URL? I'll push an update to github to fix the second one, give me 2 minutes. On 127.0.0.1/ranking Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 (edited) 1 minute ago, Angelix said: On 127.0.0.1/ranking I haven't pushed ranking to the site yet! It's not functional as of now. I've listed the functions that do work. Edited November 8, 2016 by Perseus Quote Share this post Link to post Share on other sites
Perseus 117 Report post Posted November 8, 2016 Pushed an update to the repo, the issue should be fixed now. If you're not using git, just download the config/database.php file and replace it in your folder. Quote Share this post Link to post Share on other sites
Angelix 385 Report post Posted November 8, 2016 2 minutes ago, Perseus said: I haven't pushed ranking to the site yet! It's not functional as of now. I've listed the functions that do work. Hahah, sorry about that, I asked though. Will add the update, inform on the result then go to sleep since it's 3AM here. Maybe try adding a "home" button in the initial page where it shows "Tales of Pirates" next to the login/register buttons, could be nice. Quote Share this post Link to post Share on other sites