discuz! Global variable $_g

Source: Internet
Author: User
Tags border color image processing library

Ext.: http://blog.sina.com.cn/s/blog_4bfd07180101fxcy.html

$_g saved the discuz!. All preprocessing data in the

Caching can improve the performance of the program, some configuration data is not necessary to query the database every time, as long as the changes in the time to update the cache.

discuz! All of the caches are saved in $_g[cache]

$_g[member] Member Information data
$_G[UID] User UID
$_g[username] User name
$_g[adminid] User Management Group ID
$_g[groupid] User User Group ID
$_g[settting] Setting up data
$_g[cache] System cache
$_g[cache][plugin] Plugin Cache

Load cache can use the Loadcache () function to load the cache into the $_g[cache] array

(1) global variable system Chapter

$_g[' uid '] + = Current Login uid

$_g[' username ' + = Current Login user name

$_g[' adminid ' + = Current login ID Management Group ID

$_g[' groupid ' + = Current login ID user group ID

$_g[' Cookie '] + client cookie

$_g[' formhash ' + = "Formhash" of the current login ID is mainly used for form submission

$_g[' timestamp '] = current active time

$_g[' starttime '] = 1317042440.3242

$_g[' clientip ' + = Current Visitor IP Address

$_g[' referer ' + = Current requested address, primary user form submission

$_g[' charset '] = = program code

$_g[' php_self '] = relative address of the current access page

$_g[' siteurl '] = = Program Access address

$_g[' siteroot ' = The relative directory of the domain name where the program is located

$_g[' FID '] + current section ID "topic list page, Post page" appears

$_g[' tid '] = current post id "Post page" appears

$_g[' basescript ' + = Channel on current page

$_g[' basefilename ' = + Current page PHP file name

$_g[' staticurl '] = = Program Accessories Directory

$_g[' mod ' + + mod value on current page "Example: Forum.php?mod=xxx"

$_g[' inajax ' + = The value of the current AJAX request "None-0 has-1"

$_g[' page '] + current page ID

$_g[' TPP '] + current pagination per page display quantity

$_g[' seokeywords '] = current page SEO keywords

$_g[' seodescription '] = Current Page SEO Introduction

$_g[' timenow '] = = Array

(

[Time] = 2011-9-26 21:07 current server times

[offset] = +8 Current server time zone

)

$_g[' config '] = = Array (

$_g[' config '][db] = = Array (

$_g[' config '][db][1] = = Array (

$_g[' config '][db][1][dbhost] = localhost database connection address

$_g[' config '][db][1][dbuser] = root database user name

$_g[' config '][db][1][dbpw] = 123456 Database Password

$_g[' config '][db][1][dbcharset] = UTF8 database encoding

$_g[' config '][db][1][pconnect] = 0

$_g[' config '][db][1][dbname] = Dxutf database name

$_g[' config '][db][1][tablepre] = pre_ data table prefix

)

)

)

(2) Global background Settings Chapter

$_g[' setting '][sitename] = global-site information-site name

$_g[' setting '][siteurl] = global-site information-site URL

$_g[' setting '][regname] = global-Registration Access-registration-registered address

$_g[' setting '][reglinkname] = global-Registration Access-Registration-Register link text

$_g[' setting '][regverify] = global-Registration Access-registration-New user registration verification

$_g[' setting '][ICP] = global-site Information-Website filing Information code

$_g[' setting '][imagelib] = global-Upload settings-basic settings-image processing library type

$_g[' setting '][extcredits] + points status printing on your own

$_g[' setting '][creditsformula] = global-Integral setting-basic settings-Total integral calculation formula

$_g[' setting '][cacheindexlife] = global-Performance Optimization-Forum page cache Settings-Cache Forum Home validity

$_g[' setting '][cachethreaddir] = global-Performance Optimization-Forum page cache settings-cache directory

$_g[' setting '][cachethreadlife] = global-Performance Optimization-Forum page cache Settings-Cache post validity

$_g[' setting '][bbrulestxt] = global-Registration Access-registration-website Terms of service

$_g[' setting '][bbname] = global-site information-site name

$_g[' setting '][attachurl] = global-Upload settings-Basic settings-local Attachment URL address

$_g[' setting '][attachdir] = global-Upload settings-Basic settings-Local attachment save location

$_g[' setting '][anonymoustext] = interface-Interface Settings-Global-anonymous user nickname

$_g[' setting '][threadsticky] + interface-Interface settings-topic List-identification of the pinned theme

$_g[' setting '][defaultindex] + = default Home file name forum.php

$_g[' setting '][verify] + user-authentication settings

$_g[' setting '][rewriterule] + background pseudo static rule case

$_g[' setting '][ucenterurl] = Ucenter Address

$_g[' setting '][plugins] + background plugin settings and enabled conditions

$_g[' setting '][navlogos] + background interface settings-navigation settings-built-in navigation logo group

$_g[' setting '][navmn] = background settings navigation, mainly used for navigation and judgment

$_g[' setting '][navs] = header navigation Array, can refer to this array for page header navigation overrides

$_g[' setting '][footernavs] + footer Navigation

$_g[' setting '][spacenavs] = home module left navigation

$_g[' setting '][mynavs] + page Header navigation right shortcut navigation button contents

$_g[' setting '][topnavs] = page Top navigation content

$_g[' setting '][forumpicstyle] = Array section theme cover

(

$_g[' setting '][forumpicstyle][thumbwidth] = Theme Cover width

$_g[' setting '][forumpicstyle][thumbheight] = Theme Cover Height

)

$_g[' setting '][activityfield] = global-site features-event theme-Required information for initiator

$_g[' setting '][activityextnum] = global-Site Features-activity topics-expand the number of data items

$_g[' setting '][activitypp] = global-Site Features-Activity topics-user list each page shows the number of people who participated in the activity

$_g[' setting '][activitycredit] = global-site features-activity theme-use points

$_g[' setting '][activitytype] = global-site features-active theme-built-in type

$_g[' setting '][adminemail] = global-Site information-Admin mailbox

(3) Global Current login Information Chapter

$_g[' member '] = = Array Current login user personal information

(

$_g[' member '][uid] = UID

$_g[' member '][email] + e-mail address

$_g[' member '][username] = user name

$_g[' member '][password] = after the MD5 password (do not mess output!!!) Remember) $_g[' member '][status] and whether the user has deleted

$_g[' member '][emailstatus] + email verification Status 0 Not verified 1 verified by

$_g[' member '][avatarstatus] = Avatar upload status 0 not uploaded 1 uploaded

$_g[' member '][videophotostatus] + video certification 0 uncertified 1 Certified

$_g[' member '][adminid] + where management Group ID

$_g[' member '][groupid] + = user Group ID

$_g[' member '][groupexpiry] + = user Group validity period

$_g[' member '][extgroupids] + expand User Groups

$_g[' member '][regdate] = registration time

$_g[' member '][credits] = 214 existing total points

$_g[' member '][notifysound] = Short message sound

$_g[' member '][timeoffset] + in your time zone

$_g[' member '][newpm] = number of new short messages

$_g[' member '][newprompt] = number of new reminders

$_g[' member '][accessmasks] and this seemingly access permission, not sure

$_g[' member '][ALLOWADMINCP] = Whether you have admin panel permissions 0 No 1 Yes

$_g[' member '][ONLYACCEPTFRIENDPM] = whether only to accept friends Short message 0 No 1 yes

$_g[' member '][conisbind] = whether to bind QQ 0 No 1 Yes

$_g[' member '][lastvisit] + last access time

);

(4) Style variable Chapter

$_g[' style '] = = Array (

$_g[' style '][styleid] = current Style ID

$_g[' style '][name] = current style name

$_g[' style '][templateid] + current template system

$_g[' style '][tpldir] + = Current template directory

$_g[' style '][menuhoverbgcolor] + navigation menu Highlight background color

$_g[' style '][lightlink] = light link color

$_g[' style '][floatbgcolor] = pop-up window background properties

$_g[' style '][dropmenubgcolor] + drop-down menu background Properties $_g[' style '][floatmaskbgcolor] + popup window border Color properties

$_g[' style '][dropmenuborder] = drop-down menu border color

$_g[' style '][specialbg] = color area background color (post user Information Bar, table top to emphasize)

$_g[' style '][specialborder] = Color area border

$_g[' style '][COMMONBG] + Universal display Area background color

$_g[' style '][commonborder] = universal Border color

$_g[' style '][inputbg] = input Box background color

$_g[' style '][inputborderdarkcolor] = input box Border Dark

$_g[' style '][headerbgcolor] = Page Header background

$_g[' style '][headerborder] = header Split Line height

$_g[' style '][sidebgcolor] = home side background

$_g[' style '][msgfontsize] + = post Content font size

$_g[' style '][bgcolor] = page background

$_g[' style '][noticetext] + + hint info color

$_g[' style '][highlightlink] = Highlight link color

$_g[' style '][link] = link text color

$_g[' style '][lighttext] = Light text

$_g[' style '][midtext] = Medium text color

$_g[' style '][tabletext] + plain text color

$_g[' style '][smfontsize] = small font size

$_g[' style '][threadtitlefont] + Theme list font

$_g[' style '][threadtitlefontsize] + Theme List font size

$_g[' style '][smfont] = s font

$_g[' style '][titlebgcolor] = section list title font Color $_g[' style '][fontsize] = normal font size

$_g[' style '][font] = normal font

$_g[' style '][styleimgdir] + expand Image Catalog

$_g[' style '][imgdir] +-Interface base image Catalog

$_g[' style '][boardimg] = The path of the logo

$_g[' style '][headertext] = Page Header text color

$_g[' style '][footertext] = footer text color

$_g[' style '][menubgcolor] = navigation menu background color

$_g[' style '][menutext] = navigation Menu text color

$_g[' style '][menuhovertext] + navigation menu Highlight text color

$_g[' style '][wrapbg] = Main Table background color

$_g[' style '][wrapbordercolor] = Body table border color

$_g[' style '][contentwidth] = reading area width

$_g[' style '][contentseparate] + posts interval color

$_g[' style '][inputborder] = input box Border light

$_g[' style '][menuhoverbgcode] + navigation menu Highlight background

$_g[' style '][floatbgcode] = pop-up window background color

$_g[' style '][dropmenubgcode] = drop-down menu background color

$_g[' style '][floatmaskbgcode] = pop-up window border color

$_g[' style '][headerbgcode] = Page Header background

$_g[' style '][sidebgcode] = home Sidebar Background properties

$_g[' style '][bgcode] and global Background property properties

$_g[' style '][titlebgcode] = section list title background $_g[' style '][menubgcode] + navigation menu Background Properties

$_g[' style '][boardlogo] = LOGO img Code

)

discuz! Global variable $_g

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.