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.

Table of Contents

Features:

  • Built with Laravel 5.8
  • Bootstrap
  • Font Awesome
  • IcoMoon
  • Facebook 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:
  • 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

Requirements:

  • PHP 7.1.3 or Greater
  • MySQL 5.6
  • 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 the folder "Script" to the "public_html" or "www" folder on your server.

Installation

  • After you have uploaded all files can start to setup the files.
  • Database Connection
  • Open the file .env located in your root folder, with any text editor, e.g: NOTEPAD (IMPORTANT: You can not find the file and you are using cPanel click show hidden files)
  • change the following parameters, for theirs:
  • DB_DATABASE=YOU_DATABASE
    DB_USERNAME=YOU_USERNAME
    DB_PASSWORD="YOU_PASSWORD"
  • Mail Set Up
  • Open the file mail.php located in the folder config, with any text editor, e.g: NOTEPAD
  • 'from' => [
      'address' => env('MAIL_FROM_ADDRESS', '[email protected]'),
      'name' => env('MAIL_FROM_NAME', 'Gostock'),
        ],
  • Only change 'Gostock' and '[email protected]'
  • Mail Driver
  • Open the file .env located in the root folder, with any text editor, e.g: NOTEPAD
  • MAIL_DRIVER=mail
    MAIL_HOST=smtp.mailtrap.io
    MAIL_PORT=2525
    MAIL_USERNAME=null
    MAIL_PASSWORD=null
    MAIL_ENCRYPTION=null
  • You can choose between mail and smtp
  • Access to Admin Panel
  • Just enter from http://yousite.com/login and enter the following credentials.
  • User: Admin
    Pass: 123456
  • Set Timezone
  • Open the file app.php located in the folder config, with any text editor, e.g: NOTEPAD
  • 'timezone' => 'America/Caracas',
  • List of Supported Timezones http://php.net/manual/en/timezones.php
  • reCAPTCHA
  • Open the file .env located in the root folder, with any text editor, e.g: NOTEPAD
  • INVISIBLE_RECAPTCHA_SITEKEY=YOU_KEY
    INVISIBLE_RECAPTCHA_SECRETKEY=YOU_SCRETKEY
  • Get your API keys here https://www.google.com/recaptcha/admin/create

Social Login

  • Open the file services.php located in the folder config, with any text editor, e.g: NOTEPAD
  • 'facebook' => [
    'client_id' => "APP_ID", // configure with your app id
    'client_secret' => 'APP_SECRET', // your app secret
    'redirect' => 'http://YOURSITE.COM/oauth/facebook/callback', // IMPORTANT NOT REMOVE /oauth/facebook/callback
    ],
    
    'twitter' => [
     'client_id' => "APP_ID", // configure with your app id
     'client_secret' => 'APP_SECRET', // your app secret
     'redirect' => 'http://YOURSITE.COM/oauth/twitter/callback', // IMPORTANT NOT REMOVE /oauth/twitter/callback
     ],

Customize

  • Changing the logo, Favicon, Image Header, and Image Bottom
  • Go to https://yousite.com/panel/admin/theme
  • Changing watermark in photos
  • Path: public / img / watermark.png
  • Change the background header color page
  • Path: public / img / header_colors.jpg
  • Change the background header cameras page
  • Path: public / img / header_cameras.jpg
  • Changing the avatar default
  • Path: public / avatar / default.png
  • Changing the user cover default
  • Path: public / cover / cover.jpg
  • Change image default in categories
  • Path: public / img-category / default.jpg
  • Change image default in collections
  • Path: public / uploads / thumbnail / img-collection.jpg
  • Change the default link color
  • Find this #F00 in public / css / main.css and you replace it with the one you want

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 / timeago / jqueryTimeago_en.js and rename ie: public/ js / timeago / jqueryTimeago_es.js
  • Translate the strings the new file
  • Go panel admin https://yousite.com/panel/admin/languages and add you new lenguage

  • Make sure these folders have 755 or 777 permissions

  • public / avatar
  • public / temp
  • public / uploads
  • public / uploads / large
  • public / uploads / medium
  • public / uploads / small
  • public / uploads / thumbnail
  • public / avatar
  • public / cover
  • public / img-category

  • Sources and Credits

    • Laravel - http://laravel.com/
    • jQuery - http://jquery.com/
    • Bootstrap - http://getbootstrap.com/
    • Font Awesome - http://fortawesome.github.io/Font-Awesome/
    • IcoMoon - http://icomoon.io
    • Flat UI - http://designmodo.github.io/Flat-UI/
    • Placeholder Plugin jquery.placeholder.1.1.1.min.js // Mike Taylor, http://miketaylr.com
    • Char Count count.js // Alen Grakalic
    • jquery Form // malsup.com/jquery/form/‎
    • jqueryTimeago.js // http://timeago.yarp.com/
    • jquery.colorbox.js // Jack Moore - http://www.jacklmoore.com/colorbox
    • Readmore - http://jedfoster.com/Readmore.js/
    • Bootboxjs - http://bootboxjs.com/
    • Images - unsplash - http://unsplash.com/ -- splitshire http://www.splitshire.com/
    • Avatars - http://uifaces.com/
    • Fonts - https://www.google.com/fonts
    • http://www.tinymce.com/
    • https://github.com/sliptree/bootstrap-tokenfield
    • http://morrisjs.github.io/morris.js/

    SITEMAPS: http://YOURSITE.COM/sitemaps.xml

    Any problem or doubt send me an email to [email protected]
    Do not forget to visit miguelvasquez.net


    Thank you for purchasing my script 😉