


discuz secondary development notes (1) ------$_G full analysis, discuz_g_PHP tutorial
discuz secondary development notes (1) ------$_G full analysis, discuz_g
$_G saves all preprocessed data in Discuz!
Caching can greatly improve the performance of the program. There is no need to query the database every time for some configuration data. You only need to update the cache when it is modified.
All caches in Discuz! are stored 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[setting] Setting data
$_G[cache] System cache
$_G[cache] [plugin] Plug-in cache
To load the cache, you can use the loadcache() function to load the cache into the $_G[cache] array
(1) Global Variable System
$_G['uid'] => Current login UID
$_G['username'] => Current login username
$_G[' adminid'] => Current login ID Management group ID
$_G['groupid'] => Current login ID User group ID
$_G['cookie'] => Client cookie
$_G['formhash'] => The [FORMHASH] of the current login ID is mainly used for form submission
$_G['timestamp' ] => Current activity time
$_G['starttime'] => 1317042440.3242
$_G['clientip'] => Current visitor IP address
$_G['referer'] = > Current requested address, main user form submission
$_G['charset'] => Program encoding
$_G['PHP_SELF'] => Relative address of the currently visited page
$_G ['siteurl'] => Program access address
$_G['siteroot'] => 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'] => The channel where the current page is located
$_G[' basefilename'] => Current page php file name
$_G['staticurl'] => Program attachment directory
$_G['mod'] => The MOD value of the current page [for example: forum. php?mod=xxx】
$_G['inajax'] => The value of the current ajax request [None -0 Yes -1]
$_G['page'] => The current paging ID
$_G['tpp'] => The number displayed on each page of the current page
$_G['seokeywords'] => The current page's seo keywords
$_G['seodescription'] => The current page seo introduction
$_G['timenow'] => Array
(
[time] => 2011-9-26 21:07 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-Site Name
$_G[' setting'][siteurl] => Global-Site Information-Website URL
$_G['setting'][regname] => Global-Registration Access-Registration-Registration Address
$_G['setting'][reglinkname] => Global-Register Access-Register-Register Link Text
$_G['setting'][regverify] => Global-Register Access-Register-New User registration verification
$_G['setting'][icp] => Global-Site Information-Website Registration Information Code
$_G['setting'][imagelib] => Global-Upload Settings-Basic Settings-Image Processing Library Type
$_G['setting'][extcredits] => Print the points by yourself
$_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 - Register for 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's nickname
$_G['setting'][threadsticky] => Interface - Interface settings - Topic list - Identity of the sticky topic
$_G['setting'] [defaultindex] => Default homepage file name forum.php
$_G['setting'][verify] => User-Authentication Settings
$_G['setting'][ rewriterule] => Background pseudo-static rule situation
$_G['setting'][ucenterurl] => UCenter address
$_G['setting'][plugins] => Background plug-in settings and activation
$_G['setting'][navlogos] => Backend interface settings - navigation settings - built-in navigation logo group
$_G['setting'] [navmn] => Navigation status set in the background, mainly used for navigation judgment
$_G['setting'][navs] => Page header navigation array, you can refer to this array to rewrite the page header navigation
$_G['setting'][footernavs] => Footer navigation
$_G['setting'][spacenavs] => Home module left navigation
$_G['setting'][mynavs] => Content of the shortcut navigation button on the right side of the page header
$_G['setting'][topnavs] => >$_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 function - activity theme - initiator required information
$_G['setting'][activityextnum] => Global - site function -Activity theme-Number of expanded data items
$_G['setting'][activitypp] => Global-Site function-Activity theme-User list shows the number of people participating in the activity on each page
$_G['setting'][activitycredit] => Global-Site Function-Activity Theme-Use Points
$_G['setting'][activitytype] => Global-Site Function-Activity Theme- Built-in type
$_G['setting'][adminemail] => Global-Site Information-Administrator Email
(3) Global Current Login User Information
$_G['member'] => Array Personal information of the currently logged in user
(
$_G['member'][uid] => UID
$_G['member'][email] => Email address
$_G['member'][username] => Username
$_G['member'][password] => Password after MD5 (don't input it randomly!! ! 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 not authenticated 1 authenticated
$_G[ 'member'][adminid] => Management group ID
$_G['member'][groupid] => User group ID
$_G['member'][groupexpiry] => Validity period of the user group
$_G['member'][extgroupids] => Extended user group
$_G['member'][regdate] => Registration time
$_G['member' ][credits] => 214 Total existing points
$_G['member'][notifysound] => SMS sound
$_G['member'][timeoffset] => Time zone
$_G['member'][newpm] => Number of new short messages
$_G['member'][newprompt] => Number of new reminders
$_G['member'][accessmasks ] => This looks like access permissions, not sure
$_G['member'][allowadmincp] => Do you have management panel permissions 0 No 1 Yes
$_G['member'][onlyacceptfriendpm] = > Whether to only accept short messages from friends 0 No 1 Yes
$_G['member'][conisbind] => Whether to bind QQ 0 No 1 Yes
$_G['member'][lastvisit] = > Last visit 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] => Navigation menu highlight background color
$_G['style'][lightlink] => Light link color
$_G['style '][floatbgcolor] => Pop-up window background attribute
$_G['style'][dropmenubgcolor] => Drop-down menu background attribute $_G['style'][floatmaskbgcolor] => Pop-up window border color attribute
$_G['style'][dropmenuborder] => Drop-down menu border color
$_G['style'][specialbg] => Colored area background color (post user information bar, tables that need to be emphasized First class)
$_G['style'][specialborder] => Colored area border
$_G['style'][commonbg] => Common display area background color
$_G['style '][commonborder] => Common border color
$_G['style'][inputbg] => Input box background color
$_G['style'][inputborderdarkcolor] => Input box border Dark
$_G['style'][headerbgcolor] => Header background
$_G['style'][headerborder] => Header dividing line height
$_G['style '][sidebgcolor] => Home side background
$_G['style'][msgfontsize] => Post content font size
$_G['style'][bgcolor] => Page background
$_G['style'][noticetext] => Prompt message 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] => Normal text color
$_G['style'][smfontsize] => Small font size
$_G['style'][threadtitlefont] => Topic list font
$_G['style'][threadtitlefontsize] => Topic list font size
$_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 picture directory
$_G['style'][imgdir] => Interface basic picture directory
$_G['style'][boardimg] = > The path where the logo is located
$_G['style'][headertext] => 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 highlighted text color
$_G['style'][wrapbg] => Main table background color
$_G['style'][wrapbordercolor] => Main table border color
$_G['style'][contentwidth] => Reading area width
$_G['style'][contentseparate] => Post separation color
$_G['style'][inputborder] => ; Input box border light color
$_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] => Header background
$_G['style'][sidebgcode] => Home sidebar background attribute
$_G['style'][bgcode] => Global background attribute
$_G['style'][titlebgcode] => Section list title background$_G['style'][menubgcode] => Navigation menu background attribute
$_G['style'][boardlogo] => ; LOGO img code
)

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How to delete Xiaohongshu notes? Notes can be edited in the Xiaohongshu APP. Most users don’t know how to delete Xiaohongshu notes. Next, the editor brings users pictures and texts on how to delete Xiaohongshu notes. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to delete Xiaohongshu notes 1. First open the Xiaohongshu APP and enter the main page, select [Me] in the lower right corner to enter the special area; 2. Then in the My area, click on the note page shown in the picture below , select the note you want to delete; 3. Enter the note page, click [three dots] in the upper right corner; 4. Finally, the function bar will expand at the bottom, click [Delete] to complete.

Xiaohongshu has rich content that everyone can view freely here, so that you can use this software to relieve boredom every day and help yourself. In the process of using this software, you will sometimes see various beautiful things. Many people want to save pictures, but the saved pictures have watermarks, which is very influential. Everyone wants to know how to save pictures without watermarks here. The editor provides you with a method for those in need. Everyone can understand and use it immediately! 1. Click the "..." in the upper right corner of the picture to copy the link 2. Open the WeChat applet 3. Search the sweet potato library in the WeChat applet 4. Enter the sweet potato library and confirm to get the link 5. Get the picture and save it to the mobile phone album

As a Xiaohongshu user, we have all encountered the situation where published notes suddenly disappeared, which is undoubtedly confusing and worrying. In this case, what should we do? This article will focus on the topic of "What to do if the notes published by Xiaohongshu are missing" and give you a detailed answer. 1. What should I do if the notes published by Xiaohongshu are missing? First, don't panic. If you find that your notes are missing, staying calm is key and don't panic. This may be caused by platform system failure or operational errors. Checking release records is easy. Just open the Xiaohongshu App and click "Me" → "Publish" → "All Publications" to view your own publishing records. Here you can easily find previously published notes. 3.Repost. If found

"Detailed Explanation of Discuz Registration Process: Allowing you to easily modify personal information, specific code examples are required" Discuz is a powerful community forum program that is widely used in various websites. It provides a wealth of user registration and personal information modification. functions and interfaces. This article will introduce you to Discuz's registration process in detail and provide specific code examples to help you easily customize and modify your personal information. 1. User registration process In Discuz, user registration is one of the important functions of the site. The smoothness of the registration process and

How to add product links in notes in Xiaohongshu? In the Xiaohongshu app, users can not only browse various contents but also shop, so there is a lot of content about shopping recommendations and good product sharing in this app. If If you are an expert on this app, you can also share some shopping experiences, find merchants for cooperation, add links in notes, etc. Many people are willing to use this app for shopping, because it is not only convenient, but also has many Experts will make some recommendations. You can browse interesting content and see if there are any clothing products that suit you. Let’s take a look at how to add product links to notes! How to add product links to Xiaohongshu Notes Open the app on the desktop of your mobile phone. Click on the app homepage

1. Open the Douyin app, find the video you want to download and save, and click the [Share] button in the lower right corner. 2. In the pop-up window that appears, slide the function buttons in the second row to the right, find and click [Save Local]. 3. A new pop-up window will appear at this time, and the user can see the download progress of the video and wait for the download to complete. 4. After the download is completed, there will be a prompt of [Saved, please go to the album to view], so that the video just downloaded will be successfully saved to the user's mobile phone album.

Serving 80,000 enterprise users, it has helped users fine-tune 13,000 large models and helped users develop 160,000 large model applications. Since December 2023, the daily API calls of Baidu Smart Cloud Qianfan Large Model Platform have increased by 97% month-on-month. ..From the "pioneer" of the domestic large model platform a year ago to today's large model "super factory", Baidu Intelligent Cloud Qianfan large model platform firmly occupies a leading position in the domestic large model market, but its pace is slow. Didn't stop. On March 21, Baidu Intelligent Cloud held a Qianfan product launch conference in Beijing Shougang Park. Baidu Intelligent Cloud announced during the conference: 1. Joining hands with Beijing Shijingshan District to build the country's first Baidu Intelligent Cloud Qianfan large-scale model industrial innovation base to help Promote the take-off of regional industries; 2. Satisfy the “valency” of enterprises

Video account is a popular short video application that allows users to shoot, edit and share their own videos. However, sometimes we may want to save these amazing videos to our photo album so that we can always look back at them when needed. So, next I will share some methods to teach you how to save the video of the video account to the album. Videos can be saved through the built-in function of the Video Number application. Open the app and find the video you want to save. Click the options icon in the lower right corner of the video, a menu will pop up, select "Save to Album". This will save the video to your phone's photo album. Method two is to save the video by taking a screenshot. This method is relatively straightforward, but the saved image will contain elements such as video control bars, which is not pure enough. you
