QBcore FoxDev-Magazine [QBCore/QBOX]

SaifNeon

Administrators
Joined
Apr 25, 2022
Messages
875
Credits
46,352

FoxDev-Magazine​

An interactive magazine system for FiveM servers using the QB-Core/Qbox framework. Create, edit, and read digital magazines in-game with a modern and intuitive interface. Support for multiple editions and player-specific magazine ownership.

License

Version

QB-Core

QBox

1744955043758.png1744955064494.png
1744955088525.png1744955124510.png
1744955196133.png

:star2:
Features​

  • Interactive Reading Experience
    • Smooth page-turning animations
    • Zoom functionality for detailed viewing
    • Keyboard and mouse navigation
    • Fade-in animations
  • Magazine Editor
    • Multiple edition support
    • Add/remove pages per edition
    • Reorder pages via drag-and-drop
    • Image URL support
    • Real-time preview
    • Edition publishing system
  • Player Magazine System
    • Player-specific magazine ownership
    • Edition tracking
    • Purchase history
    • OX Inventory integration
  • Database Integration
    • Multiple edition support
    • Automatic page ordering
    • Player ownership tracking
    • Edition status management

:clipboard:
Requirements​

  • QB-Core Framework
  • ox_inventory
  • qb_inventory
  • QBox

:gear:
Installation​

  1. Download & Place Files

    cd resources
    git clone
    Please, Log in or Register to view URLs content!


  2. Database Setup
    The resource uses three main tables:
    • magazine_editions: Stores different magazine editions
    • magazine_pages: Stores pages for each edition
    • Import the SQL file from sql/magazine.sql which will create all necessary tables and indexes.
  3. Add to Server.cfg

    ensure FoxDev-magazine

  4. OX Inventory Setup
    Add to your ox_inventory/data/items.lua:

    ['magazine'] = {
    label = 'Magazine',
    weight = 500,
    stack = false,
    close = false,
    description = 'A readable magazine',
    consume = 0,
    client = {
    export = 'fd-magazine.useMagazine'
    }
    }

:wrench:
Configuration​

Edit config.lua to customize:


Config = {}

-- Jobs that can access the editor
Config.AuthorizedJobs = {
['news'] = true,
['admin'] = true
}

-- Item name in QB-Core shared items
Config.MagazineItem = 'magazine'


-- Image Settings
Config.MaxImageSize = 5 * 1024 * 1024 -- 5MB
Config.AllowedImageTypes = {
'jpg',
'jpeg',
'png',
'gif'
}

:iphone:
Commands​

  • /magazine - Open owned magazine editions
  • /magazineeditor - Open editor (authorized jobs only)
  • /createedition [title] - Create new edition
  • /publishedition [number] - Publish an edition

:video_game:
Usage​

Reading a Magazine​

  1. Purchase or receive a magazine edition
  2. Use the magazine item from inventory
  3. Navigate using:
    • Arrow keys (← →)
    • Mouse clicks on page corners
    • Navigation buttons
  4. Press ESC to close

Editing a Magazine​

  1. Select or create an edition
  2. Add pages via URL input
  3. Drag & drop to reorder
  4. Save changes
  5. Publish when ready

:framed_picture:
Image Guidelines​

  • Recommended Format: JPG/PNG
  • Optimal Resolution: 1920x1080
  • Maximum File Size: 5MB
  • Aspect Ratio: 16:9 (recommended)

:mag:
Troubleshooting​

  1. Images Not Loading
    • Verify URL is accessible
    • Check image format
    • Ensure URL is HTTPS
  2. Editor Not Opening
    • Verify job permissions
    • Check server console for errors
  3. Database Issues
    • Verify oxmysql is running
    • Check table relationships
    • Verify edition exists before adding pages
  4. Edition Access Issues
    • Check if edition is published
    • Verify player ownership
    • Check edition status (active/inactive)

:hammer_and_wrench:
Development​

Database Structure​


magazine_editions
- id (AUTO_INCREMENT)
- edition_number (UNIQUE)
- title
- is_active
- is_published
- created_at

magazine_pages
- id (AUTO_INCREMENT)
- page_number
- image_url
- edition_number (FK)
- created_at


File Structure​


qb-magazine/
├── client/
│ └── main.lua
├── server/
│ └── main.lua
├── html/
│ ├── index.html
│ ├── style.css
│ └── script.js
├── sql/
│ └── magazine.sql
├── config.lua
└── fxmanifest.lua

:memo:
License​

This project is licensed under the MIT License - see the LICENSE file for details.

:handshake:
Support​


Download
Please, Log in or Register to view URLs content!
 
Back
Top Bottom