- Introduction
-
Getting Started
- How to Enable or Disable Users Registration
- How to Enable or Disable User Account Activation
- How to Add Auto Follow Accounts
- How to Enable/Disable Debug
- How to Create A Language Pack
- How to Import A Language Pack
- How to Manage Language Packs
- How to Manage Phrase
- How to Verify, Activate, Ban, and Set Members Role
- How to Update System
- How to Manage Plugins
- How to Manage Core Plugins
- How To Setup Bing Translator
- How to install crea8social script
- Quick Links
- How To Detect And Face Tag
- How to extract the zipped crea8social android application
-
Android App and Messenger Setup
- Google settings Instruction
- Twitter Login Setup Instruction
- Facebook Login Setup Instruction
- Creating Admob Unit Instrution
- How to compile Crea8social Messenger App
- How to extract and import the messenger folder to android studio
- Changing the logo and icon launcher of Crea8social Messenger App
- How to add different languages to the Messenger code
- How to generate google Service JSON file for Messenger
- Inserting google service JSON file to code
- Package name in crea8social Messenger
- Linking messenger to app and website and including twitter key and secret
- How to Setup LiveStreaming Server
- Installing Android Studio
- How to extract zipped messenger folder
- How to change the logo and icon launcher of Crea8social Messenger App
-
Setup
- How to Setup Social Integration Plugin for Facebook
- How to Setup Social Integration Plugins for Twitter
- How to Setup social integration plugins for VK
- How to Set Up Your Social Integration Plugins for G+
- How To Setup Amazon S3 As Your CDN Servers
- How To Setup CDN Storage
- How To Setup Email
- How to setup Video / Audio Call
-
Website Management
- How to Change or Edit Site Title
- How to send mail to members in the mailing list
- How to set site logo and favicon
- How to add emoticon
- How to send push notification
- How to manage emoticon
- How to manage posts
- How to Activate a Theme
- How to add custom fields
- How to create/edit Announcement
- How to Edit Country
- How To Change Your Password
- How to edit your profile
- How To Delete Announcement
- How to Add Custom Fields to the Page Creation Form
- How to add music
- How to Edit/Delete Event Category
- How to add music category
- How to Add Event Category
- How to Edit / Delete Blog Categories
- How to Add Blogs Category
- How to change music category, title, artist, album, and cover art
- How to change music privacy
- How to edit music info
- How to add video category
- How to Edit Blogs
- How to Add New Blog
- How to create ads
- How to add ads plans
- How to edit ads plans
- How to do Ads Settings
- How to Edit / Delete Game Category
- How to Add Game Category
- How to Add Game
- How to create new forum topic
- How to add forum category
- How to add forum tag
- How to edit, delete forum tag
- How to edit, delete forum thread
- How to edit, delete group in admin panel
- How to add help
- How to Add Feedback Severity
- How to add help category
- How to add marketplace category
- How to delete, edit marketplace category
- How to manage marketplace listing
- How to add new marketplace listing
- How to Add feedback Category
- How to manage feedback
- How to Create New feedback
- How to Backup & Restore Files
- Automatic system upgrade settings
- How to move Lite Version Database to Pro Version Database
- How to edit a static page
- How to create a static page
- How to Enable or Disable HTTPS
- How to Add Verification Question
- How to Setup Memory
- How Activate Modal Editor for Feed
- Background Features for Feed Post
- How to activate video pop up
- How to Clear Temporary Data from Admincp Menu
- How to Set Live Streaming Server
- How to make LiveStreaming Video
- How to Activate Plugins
- How to Set Currency Conveter
- How to Add Category on Auction plugin And Adding of Auction
- How to Add Categories and Business Plan
- How to Activate Note Plugin and How it Works
- How to Add Confession
- How to Add Contact
- How to Purchase Credit, Add and Send Credit
- How To Add Relationship
- How To Add Slide Show
- How To Detect And Face Tag
- How to Setup and Add Testimonial
- How To Create Category, Plan and Add Survey
- Hacked
- User Management
- Installation
- Support Policy
- Customization
- Plugins Developer Documentation
- Theme Developer Documentation
- How To Upgrade
- General FAQ
- Policy FAQ
- Refund Policy
Using Database
This section will explain how to interact with database and you can create tables or upgrade plugin database e.t.c
# db()
The db() return you the mysqli resource that you can use to make query to the database . For example
With that you can INSERT , UPDATE or DELETE from database
How to create tables
Actually you can create a table right from your PHPmyadmin but there will be a next question how will you distribute the plugin with the tables, here come the solution
1. Create a folder call database/ in your plugin
2. create two files install.php and upgrade.php this two file will be called during installation of the plugin and updaing of the plugin respectively.
Install.php
Inside the install.php file create a function like the one below
Note the test in bold , it is your plugin name and this function will be call when user install your plugin and you can use it to create tables , dump data into your tables e.t.c
For exmple
`id` varchar(255) NOT NULL,
`active` int(11) NOT NULL DEFAULT '1',
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
Upgrade.php
This is called when user click on the update plugin in the plugin manager section and the function is simlar to install.php as you see below
And your query code will be inside as described in the install.php, you can actually use this to add columns or remove columns e.t.c
Thanks for reading