Home Backend Development PHP Tutorial vBulletin HACK----Display topic size and open new window on forum index page_PHP tutorial

vBulletin HACK----Display topic size and open new window on forum index page_PHP tutorial

Jul 21, 2016 pm 04:01 PM
vbulletin big Open new window show window index forum

vBulletin HACK
----Display topic size and open a new window on the forum index page
Author: gogosoft

"Display topic size"
Reason: This function is not available in version 1.1.4 , and some users will use this as a reference factor for whether to view the topic.
Advantages: Just add a few lines of code.
Disadvantages: Because every time the forum index page is displayed, all topics on the page need to be calculated, so it may have some impact on the server.
Self-evaluation: This is a small function, dispensable, and whether it is practical or not is a matter of opinion.

Steps:
⒈Open forumdisplay.php and search for "
if ($announcement=$DB_site->query_first("SELECT announcementid,userid,startdate,title FROM announcement WHERE startdate<=$ datenow AND enddate>=$datenow AND (forumid=$forumid OR forumid=-1) ORDER BY startdate DESC LIMIT 1")) {
", add "
" // Hack thread size
$ size=0;
$announcements=$DB_site->query("SELECT pagetext FROM announcement WHERE startdate<=$datenow AND enddate>=$datenow AND (forumid=$forumid OR forumid=-1)");
while ($announce=$DB_site->fetch_array($announcements)) $size+=strlen($announce[pagetext]);
$size=iif($size>1024,number_format($size/1024, 1)."K",$size);
// End Hack thread size
", search for "
while ($thread=$DB_site->fetch_array($threads)) {
", add "
// Hack thread size
$size=0;
$posts=$DB_site->query("SELECT pagetext FROM post WHERE threadid=".$thread[threadid] );
while ($post=$DB_site->fetch_array($posts)) $size+=strlen($post[pagetext]);
$size=iif($size>1024,number_format($size /1024,1)."K",$size);
// End Hack thread size
", save and exit;

⒉Open the forumdisplay template in the "Control Panel" and search for "
Reply

Popularity

", add "size

", find

", replace with "

" Save. Open the forumdisplaybit template and look for "

$replies >
$views

", add "
< ;td align=center bgcolor="{secondaltcolor}">
$size

", open forumdisplay_announcement template, search for "
< ;td align=center bgcolor="{firstaltcolor}">
-



-

", add "

$size

", save. Finish!


"Open new window"
Reason: This is very useful for browsing a frequently updated forum. Users can easily open windows on many different topics.
Advantages: Very simple, just need to change the template to achieve it - it doesn't seem to be too HACK. :)
Disadvantage: You can only open a new window for the first page of the topic, but for other pages, you still need to hold down Shift.

Steps: Control Panel->Template->Edit, open forumdisplaybit, search for "

$gotonew $threadtitle
", after or in front of $gotonew ($gotonew is the "new post" icon ) Join "

", of course, you have to prepare a small icon for this link to open a new window and upload it to the images directory. Finish!

Example: http://gogosoft.oso.com.cn/forum/forumdisplay.php?forumid=4


[The copyright of this article is jointly owned by the author and Oso.com, If you need to reprint, please indicate the author and source]


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316896.htmlTechArticlevBulletin HACK ----Show topic size and open a new window on the forum index page Author: gogosoft "Show topic size 》Reason: This function is not available in version 1.1.4, and some users will use it as a...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to open iso file on mobile phone How to open iso file on mobile phone Feb 24, 2024 pm 05:33 PM

With the development of technology, more and more people are now starting to use ISO files. An ISO file is a format of a disc file that usually contains all the contents of the disc, including operating system, software, games, etc. Opening an ISO file on your computer is relatively simple, just use virtual optical drive software. However, when we want to open ISO files on our mobile phones, it may be more troublesome. Well, this article will introduce some methods for you to easily open ISO files on your phone. 1. Using the virtual optical drive application First, we can install

How to set Google Chrome to open a new window every time How to set Google Chrome to open a new window every time Mar 06, 2024 pm 06:19 PM

How to set Google Chrome to open a new window every time? Vicious users like to use Google Chrome for work or study. This browser is safe, fast, and convenient. Different users have different preferences for using browsers. Some users like to open Google Chrome as a new window to facilitate quick searches. , so how to set it up. Next, the editor will bring you a tutorial on setting up a new window every time you open Google Chrome. Friends who are interested can come and learn it. Tutorial on setting up a new window every time Google Chrome opens 1. Double-click Google Chrome on your computer desktop to open it, then click on the [three dots] icon in the upper right corner. 2. Find the [Settings] option and enter the page (as shown in the picture). 3. Go to Google Chrome

How to open torrent files How to open torrent files Feb 24, 2024 pm 05:20 PM

Torrent seed files can be opened with software, so what software can be used to open them? Users need to open it with download tools such as Thunder, BitComet, qBittorrent, etc., and then download. This introduction to how to open torrent files can tell you the specific content. The following is a detailed introduction, take a look! How to open a torrent seed file? Answer: Use Thunder, BitComet, qBittorrent and other download tools to open it. Detailed introduction: 1. Torrent is a BT seed file that can be opened with various download software. 2. The more people download this software, the faster the download speed will be. 3. In order to ensure accuracy, the software will calculate Ha every time it downloads a block.

Where can I open the Douyin mini game? Two ways to open Douyin mini games Where can I open the Douyin mini game? Two ways to open Douyin mini games Mar 15, 2024 am 09:30 AM

Douyin is a popular short video social application. Users can not only watch and share various types of short video content, but also provide a series of mini games for you to play. So where can I get into Douyin mini-games? Where is the entrance to Douyin mini game? Let’s take a look at the detailed tutorial below. Method 1: Open the mini program 1. Click the My option. After entering the homepage of Douyin, click the My option to enter. 2. Click the three horizontal lines. After entering the My interface, click the three horizontal lines button above. 3. Click on the mini program. After opening the three horizontal lines option, click on the mini program inside. 4. Click on the Douyin Mini Game. After entering the mini program interface, click on the Douyin Mini Game option to open it. Method 2: Search and open 1. Click the magnifying glass to enter

How to open caj file How to open caj file on computer How to open caj file How to open caj file on computer Feb 22, 2024 pm 04:37 PM

Select the file in the word converter and click Start Conversion to open it. Analysis 1. Open the CAJ to Word converter and select CAJ to Word on the left side of the software. 2Then select the file you want to convert and click Open. 3Finally, click Start Conversion and you can open the caj file in Word. Supplement: What is the format of caj? 1CAJ is a format of electronic journals. You can use the CAJ full-text browser to read. Supports CAJ, NH, KDH and PDF format files of China Journal Network. You can read the original text of China Journal Network online, or you can read the full text of China Journal Network downloaded to your local hard drive. Its printing effect can be consistent with the original display. Summary/Notes CAJ is a Chinese academic journal

Discuz Forum Permission Management: Read Permission Setting Guide Discuz Forum Permission Management: Read Permission Setting Guide Mar 10, 2024 pm 05:33 PM

Discuz forum permission management: Read the permission setting guide In Discuz forum management, permission setting is a crucial part. Among them, the setting of reading permissions is particularly important, as it determines the scope of content that different users can see in the forum. This article will introduce in detail the reading permission settings of the Discuz forum and how to flexibly configure it for different needs. 1. Basic concepts of reading permissions In the Discuz forum, reading permissions mainly include the following concepts that need to be understood: Default reading permissions: Default after new user registration

How to open WeChat while writing and translating How to open WeChat while writing and translating Feb 24, 2024 pm 02:55 PM

There is a function in WeChat that allows you to translate while writing, so how do you enable the function of translating while writing? Users need to press and hold the input method, click to translate while writing, and then enter other languages ​​to translate. This article is written and translated at the same time. The opening method introduction can tell you the specific operation method. The following is a detailed introduction, hurry up and take a look! WeChat usage tutorial How to open WeChat Translate while writing? Answer: Long press the chat box, click Translate while writing to open this function. Specific methods: 1. Click on a chat interface, long press in the input box, click Write while translating Translated. 2. Then enter Chinese and it will be automatically translated into English. 3. Click the a icon on the left to switch to other languages.

How to open Minesweeper? -How to mark small flags in Minesweeper? How to open Minesweeper? -How to mark small flags in Minesweeper? Mar 18, 2024 pm 10:46 PM

How to open Minesweeper? Minesweeper is a classic single-player game in which the player's goal is to uncover numbers within squares in order to determine which squares contain mines. If the revealed square contains no mines, the game will continue; if the revealed square contains mines, the game will end immediately. Next, we will introduce in detail how to enter the Minesweeper game. Step 1: Turn on the computer First, you need to turn on the computer. Minesweeper is a computer game that can only be played on a computer. If you haven't turned on the computer yet, press and hold the power button until the computer turns on and displays the desktop. Step 2: Find the Minesweeper game. Look for the Minesweeper game icon on the desktop. If Minesweeper is already installed, it should appear on the desktop. If not, search for Minesweeper game in your computer's start menu

See all articles