Documentation

GoStock – Free and Premium Stock Photos Script

Created: 02, February 2017 by Miguel Vasquez

GoStock - Free Stock Photos Script It is a platform to share stock photos free and premium of high quality, users will be able to upload their photos to share with the whole community and visitors, and may receive donations through PayPal. In addition users will be able to give you like, comment, share and add to collections your favorite photos.

Features:

  • Built with Laravel 8
  • Subscription System
  • Stripe Connect
  • PWA
  • Referrals
  • Storage (Local, Amazon, DigitalOcean, Wasabi, Vultr)
  • 2FA authentication
  • Taxes
  • Invoices for payments made
  • Bootstrap
  • Font Awesome
  • Facebook, Twitter and Google Login
  • Follow / Unfollow system
  • Like in Photos
  • Collections of Photos
  • Categories
  • Notifications Real-time
  • Latest, Featured, Popular, Most Commented, Most Viewed, Most Downloads sections
  • Photo search
  • Download photos in different size
  • Search for photos by colors and cameras
  • Members can upload unlimited photos
  • Updates photos
  • Option Delete Account
  • Members can change their name, email and password
  • Upload Avatar
  • Upload Cover
  • Change password
  • Donations through PayPal for members
  • XSS: Protection from cross site scripting
  • Secure Bcrypt password hashing
  • SMTP Support
  • Share social
  • Easy translation
  • Ajax pagination in Photos and Comments
  • Comment system
  • Like in comments
  • Feed section (Posts by users you follow)
  • Admin Features:
  • Create/Edit Plans
  • Manage Subscriptions
  • Create taxes
  • Maintenance mode
  • Manage roles and permissions
  • Change the site name
  • Change the site title welcome
  • Manage General Settings and Limits
  • Statistics
  • Set keywords for the site. (SEO)
  • Add a description (SEO)
  • Create/Edit pages e.g.: Help, Privacy, etc.
  • Manage Categories
  • Manage Photos
  • Manage Members.
  • Manage Members, Photos Reported
  • Set up social accounts
  • Manage Google Adsense, Google Analytics
  • Among other functions...

Requirements:

  • PHP 7.4.0 or Greater
  • MySQL 5.6
  • Fileinfo PHP Extension
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
  • Ctype PHP Extension
  • JSON PHP Extension
  • BCMath PHP Extension
  • cURL
  • GD Library or ImageMagick or Imagick.
  • allow_url_fopen (PHP.INI) is ON

Setting MySQL

  • 1.) Create a database
  • 2.) Create a user for database
  • 3.) Import the Database
  • Log into your phpMyAdmin and import the gostock.sql file located in the folder Mysql

Uploading Files

  • Upload all files inside the folder "Script" to the "public_html" or "www" folder on your server. You can compress the files or use FTP.

Installation

  • After you have uploaded all files, go to https://yousite.com/installer/script
  • This screen will appear, all the boxes must be green to proceed with the installation.
  • Next, you can put the credentials of your database, your App name, URL and an email.
  • If all goes well, a success notice will appear with the Admin credentials, remember to change immediately, click Go to Panel Admin.
  • Credentials Admin Panel
  • Just enter from https://yousite.com/login and enter the following credentials.
  • User: Admin
    Pass: 123456
  • Create Cron Job
  • Click on Cron Jobs
  • Click on Common Settings and select Once Per Minute
  • /usr/local/bin/ea-php74 /home/username/public_html/artisan schedule:run >> /dev/null 2>&1
  • In the image above change ea-php74 for your PHP version, username for yours, and put the path where your project is located, in my case it is in public_html, but if it is in another directory you should put public_html/yoursite/ like this
  • Click on Add New Cron Job and you're done!
  • reCAPTCHA
  • Go to https://yousite.com/panel/admin/google
  • Get your API keys here https://www.google.com/recaptcha/admin/create
  • Stripe Webhook
  • Go to the Developers section of the Stripe dashboard and click on Webhooks. Click on Add a new endpoint
  • 1) Your webhook url must end in stripe/webhook
  • 2) Click on Signing secret to reveal the Stripe Webhook Secret that you must place in Dashboard > Payment Settings > Stripe
  • 3) The events you should add to your webhook
  • API Version 2020-08-27
  • Stripe Connect
  • Set the countries or the country you want to send direct payments to your members at https://dashboard.stripe.com/settings/connect/express

Storage

  • Go to https://yousite.com/panel/admin/storage
    • avatar
    • cover
    • uploads
    • avatar
    • cover

Customize

  • Homepage title
  • File: resources/lang/en/seo.php
  • Language files
  • To change the script language go to: resources / lang / en / Edit the text strings of all the files in are in that folder.
  • /*
    |--------------------------------------------------------------------------
    | Admin Language Lines
    |--------------------------------------------------------------------------
    |
    */
    
    'admin'      => 'Panel Admin',
    'role_admin' => 'Admin',
    'dashboard'  => 'Dashboard',

How to add a new language

  • Duplicate the folder resources / lang / en
  • Rename to your language for example es
  • Translate the strings
  • Duplicate the file public/ js / jqueryTimeago_en.js and rename ie: public/ js / jqueryTimeago_es.js
  • Translate the strings the new file
  • Go panel admin https://yourwebsite.com/panel/admin/languages/create and add you new lenguage
  • Translate Categories

  • Create a file called categories.php in the folder of the language to be translated, for example resources / lang / es
  • <?php
    
    return array(
    
    	/*
    	|--------------------------------------------------------------------------
    	| Categories Language Lines
    	|--------------------------------------------------------------------------
    	|
    	*/
    	"animals" => "Animales",
    	"architecture" => "Arquitectura",
    	"backgrounds" => "Fondos / Texturas",
    );
  • The key identifier will be the Slug / URL of the category
  • Translate Pages

  • Just create a page by selecting the new language, remember that you must put the same Slug / URL

  • Sitemap

  • https://yoursite.com/sitemaps.xml
  • Troubleshooting

  • I can't turn off maintenance mode
  • Go to storage / framework and delete the file named down go back to Dashboard > Maintenance mode put "off" and then "on" again, whenever you want to have your site in mode maintenance.
  • Error creating an account
  • Make sure you have correctly configured the email in the admin panel (Dashboard > Email settings)
  • Error 404 in the installer
  • Check that your .htaccess file has not been corrupted when uploading to your server.
  • Error 500 in the installer or on the home page
  • Check that your .env file has not been corrupted when uploading to your server. It must have a dot before the name, and you must have at least PHP 7.4

  • Make sure these folders have 0755 permissions

    Files
  • .env
  • Folders
  • public / avatar
  • public / temp
  • public / uploads
  • public / uploads / files
  • public / uploads / large
  • public / uploads / medium
  • public / uploads / small
  • public / uploads / thumbnail
  • public / avatar
  • public / cover
  • public / img-category

  • Basic PHP configuration

  • max_execution_time minimum 6000
  • memory_limit set to 512M
  • post_max_size set the maximum upload value you want
  • upload_max_filesize must be the same maximum value of post_max_size

  • Sources and Credits

    • Laravel - http://laravel.com/
    • jQuery - http://jquery.com/
    • Bootstrap - http://getbootstrap.com/
    • Font Awesome - http://fortawesome.github.io/Font-Awesome/
    • jquery Form // malsup.com/jquery/form/‎
    • jqueryTimeago.js // http://timeago.yarp.com/
    • Readmore - http://jedfoster.com/Readmore.js/
    • Images - unsplash - http://unsplash.com/ -- splitshire http://www.splitshire.com/
    • Fonts - https://www.google.com/fonts
    • http://www.tinymce.com/
    • https://ckeditor.com/
    • https://www.chartjs.org

    Any problem or doubt send me an email to support@miguelvasquez.net
    Do not forget to visit miguelvasquez.net


    Thank you for purchasing my script 😉