Discuz Secondary Development Notes (1) ------ $ _ G full parsing, discuz_g

Source: Internet
Author: User
Tags image processing library

Discuz Secondary Development Notes (1) ------ $ _ G full parsing, discuz_g

$ _ G saves Discuz! All pre-processed data
The cache can improve the program performance. Some configuration data does not need to query the database every time. You only need to update the cache when the modification is made.
Discuz! All 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 group id
$ _ G [setparts] sets data
$ _ G [cache] system cache
$ _ G [cache] [plugin] plug-in cache
You can use the loadcache () function to load the cache to the $ _ G [cache] array.

(1) Global Variable System
$ _ G ['uid'] => current logon uid
$ _ G ['username'] => current logon username
$ _ G ['adminid'] => current logon ID management group ID
$ _ G ['groupid'] => current logon ID user group ID

$ _ G ['cookies'] => client cookie
$ _ G ['formhash'] => the current logon ID's [formhash] is mainly used for form submission.
$ _ G ['timestamp'] => current activity time
$ _ G ['starttime'] = & gt; 1317042440.3242
$ _ G ['clientip'] => Current Visitor IP Address
$ _ G ['Referer'] => address of the current request. The primary user forms are submitted.
$ _ G ['charset'] => program code
$ _ G ['php _ SELF '] => current address of the accessed page
$ _ G ['siteurl'] => program access address
$ _ G ['siteroot'] => relative directory of the domain name of the program
$ _ G ['fid'] => the current forum id [topic list page, post page] appears
$ _ G ['tid'] => current post ID [Post page] appears
$ _ G ['basescript'] => channel of the current page
$ _ G ['basefilename'] => php file name on the current page
$ _ G ['staticurl'] => program attachment directory
$ _ G ['mod'] => mod value of the current page [for example: forum. php? Mod = xxx]
$ _ G ['ajax '] => value of the current ajax request [no-0 has-1]
$ _ G ['page'] => current page ID
$ _ G ['tpp '] => current number displayed per page
$ _ G ['seokeyword'] => seo keywords on the current page
$ _ G ['secret'] => seo overview on the current page
$ _ G ['timenow'] => Array
(
[Time] => current server time
[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 username
$ _ 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

$ _ G ['setting'] [sitename] => global-site information-website name

$ _ G ['setting'] [siteurl] => global-site information-website URL

$ _ G ['setting'] [regname] => global-registration access-registration address

$ _ G ['setting'] [reglinkname] => global-registration access-registration link text

$ _ G ['setting'] [regverify] => global-registration access-registration-new user registration verification

$ _ G ['setting'] [icp] => global-site information-website icp filing information code

$ _ G ['setting'] [imagelib] => global-upload settings-Basic settings-image processing library type

$ _ G ['setting'] [extcredits] => automatically print points

$ _ G ['setting'] [creditsformula] => global-points settings-Basic settings-total points calculation formula

$ _ G ['setting'] [cacheindexlife] => global-Performance Optimization-Forum Page cache settings-Cache Forum homepage Validity Period
$ _ 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 Period

$ _ G ['setting'] [bbrulestxt] => global-registration access-registration-Website Terms of Service

$ _ G ['setting'] [bbname] => global-site Info-site name

$ _ G ['setting'] [attachurl] => global-upload settings-Basic settings-local attachment URL

$ _ G ['setting'] [attachdir] => global-upload settings-Basic settings-local attachment storage location

$ _ G ['setting'] [anonymoustext] => interface-interface settings-global-nickname of Anonymous Users

$ _ G ['setting'] [threadsticky] => interface-interface settings-topic list-pin the topic ID

$ _ G ['setting'] [defaultindex] => default homepage file name forum. php

$ _ G ['setting'] [verify] => User-Authentication Settings

$ _ G ['setting'] [rewriterule] => background pseudo-static rules

$ _ G ['setting'] [ucenterurl] => UCenter address

$ _ G ['setting'] [plugins] => background plug-in setting and enabling

$ _ G ['setting'] [navlogos] => background interface settings-Navigation settings-built-in navigation logo Group

$ _ G ['setting'] [navmn] => background navigation information, mainly used for navigation judgment
$ _ G ['setting'] [navs] => page header navigation array. You can refer to this array for page header navigation rewriting.

$ _ G ['setting'] [footernavs] => navigation at the end of a page

$ _ G ['setting'] [spacenavs] => left-side navigation of the home Module

$ _ G ['setting'] [mynavs] => content of the shortcut navigation button on the right of the browser navigation

$ _ G ['setting'] [topnavs] => navigation content on the top of the page

$ _ G ['setting'] [forumpicstyle] => Array section topic cover
(
$ _ G ['setting'] [forumpicstyle] [thumbwidth] => topic cover width
$ _ G ['setting'] [forumpicstyle] [thumbheight] => topic cover height
)

$ _ G ['setting'] [activityfield] => global-site function-activity topic-required information for initiators

$ _ G ['setting'] [activityextnum] => global-site function-activity topic-extended item count

$ _ G ['setting'] [activitypp] => global-site function-activity topic-user list show participants on each page

$ _ G ['setting'] [activitycredit] => global-site function-activity topic-use points

$ _ G ['setting'] [activitytype] => global-site function-activity topic-built-in type

$ _ G ['setting'] [adminemail] => global-site information-Administrator email


(3) Information about the current global publisher
$ _ G ['member'] => Array current logon user personal information
(
$ _ G ['member'] [uid] => UID
$ _ G ['member'] [email] => email address
$ _ G ['member'] [username] => User Name
$ _ G ['member'] [password] => password after MD5 (do not output it in disorder !!! Remember) $ _ G ['member'] [status] => whether the user has been deleted
$ _ G ['member'] [emailstatus] => email verification status 0 unverified 1 verified
$ _ G ['member'] [avatarstatus] => Avatar upload status 0 not uploaded 1 uploaded
$ _ G ['member'] [videophotostatus] => Video Authentication 0 unauthenticated 1 authenticated
$ _ G ['member'] [adminid] => ID of the Management Group
$ _ G ['member'] [groupid] => ID of the user group
$ _ G ['member'] [groupexpiry] => validity period of the user group
$ _ G ['member'] [extgroupids] => Extended user group
$ _ G ['member'] [regdate] => Registration Time
$ _ G ['member'] [credits] => 214 existing total points
$ _ G ['member'] [policysound] => short message sound
$ _ G ['member'] [timeoffset] => Time Zone
$ _ G ['member'] [newpm] => Number of New Short Messages
$ _ G ['member'] [newprompt] => Number of new reminders
$ _ G ['member'] [accessmasks] => the access permission seems to be unknown.
$ _ G ['member'] [allowadmincp] => whether to have panel management permission 0 No 1 Yes
$ _ G ['member'] [onlyacceptfriendpm] => whether to accept only friend Short Messages 0 No 1 Yes
$ _ G ['member'] [conisbind] => whether to bind QQ 0 No 1 Yes
$ _ G ['member'] [lastvisit] => last access time
);

(4) style Variables
$ _ 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] => highlight background color in the navigation menu
$ _ G ['style'] [lightlink] => light link color
$ _ G ['style'] [floatbgcolor] => context attribute in the pop-up window
$ _ G ['style'] [dropmenubgcolor] => drop-down menu background attribute $ _ G ['style'] [floatmaskbgcolor] => pop-up window border color attribute
$ _ G ['style'] [dropmenuborder] => border color of the drop-down menu
$ _ G ['style'] [specialbg] => color area background color (post User Information bar, header to be emphasized, etc)
$ _ G ['style'] [specialborder] => colored area border
$ _ G ['style'] [commonbg] => General display area background color
$ _ G ['style'] [commonborder] => general border color
$ _ G ['style'] [inputbg] => background color of the input box
$ _ G ['style'] [inputborderdarkcolor] => the border of the input box is dark.
$ _ G ['style'] [headerbgcolor] => page header background
$ _ G ['style'] [headerborder] => height of the split line at the page header
$ _ G ['style'] [sidebgcolor] => home side background
$ _ G ['style'] [msgfontsize] => post content font size
$ _ G ['style'] [bgcolor] => page background
$ _ G ['style'] [noticetext] => message color
$ _ G ['style'] [highlightlink] => highlight link color
$ _ G ['style'] [link] => link text color
$ _ G ['style'] [lighttext] => light-colored text
$ _ G ['style'] [midtext] => moderate text color
$ _ G ['style'] [tabletext] => plain text color
$ _ G ['style'] [smfontsize] => small font size
$ _ G ['style'] [threadtitlefont] => topic list font
$ _ G ['style'] [threadtitlefontsize] => font size of the topic list
$ _ G ['style'] [smfont] => small font
$ _ G ['style'] [titlebgcolor] => section list title Font color $ _ G ['style'] [fontsize] => normal font size
$ _ G ['style'] [font] => normal font
$ _ G ['style'] [styleimgdir] => extended image directory
$ _ G ['style'] [imgdir] => basic image directory on the Interface
$ _ G ['style'] [boardimg] => 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] => highlight text color in the navigation menu
$ _ G ['style'] [wrapbg] => background color of the subject table
$ _ G ['style'] [wrapbordercolor] => subject table border color
$ _ G ['style'] [contentwidth] => Read area width
$ _ G ['style'] [contentseparate] => post interval color
$ _ G ['style'] [inputborder] => the border of the input box is light-colored.
$ _ G ['style'] [menuhoverbgcode] => highlight the background in the navigation menu
$ _ G ['style'] [floatbgcode] => pop-up window background color
$ _ G ['style'] [dropmenubgcode] => background color of the drop-down menu
$ _ G ['style'] [floatmaskbgcode] => the border color in the pop-up window
$ _ G ['style'] [headerbgcode] => page header background
$ _ G ['style'] [sidebgcode] => Home sidebar background attribute
$ _ G ['style'] [bgcode] => global background attributes
$ _ G ['style'] [titlebgcode] => Forum list title background $ _ G ['style'] [menubgcode] => navigation menu background attribute
$ _ G ['style'] [boardlogo] => LOGO img code
)

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.