VBulletin
VBulletin HACK
----Show topic size and open new Window on Forum index page
Author: gogosoft
"Show topic Size"
Reason: 1.1. This feature is not available in version 4, and some users use it as a reference for viewing the topic.
Pros: Just add a few lines of code to it.
Cons: Because each time a forum index page is displayed, all of the topics on the page need to be sized, which can have a number of effects on the server.
Self-Assessment: This is a small function, dispensable, practical or not a matter of opinion.
Steps:
⒈ Open forumdisplay.php, find "
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 in later"
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
", find"
while ($thread = $DB _site->fetch_array ($threads)) {
", add in later"
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 the exit;
⒉ Open the Forumdisplay template in Control Panel and look for "
reply
popularity
", add in later"
size
", find"
", replace with"
Save Open the Forumdisplaybit template and look for "
$replies
$views
", add in later"
$size
", open the forumdisplay_announcement template, look for"
-
-
", add in later"
$size
", save. Complete!
"Open new Window"
Why: This is useful for browsing a frequently updated forum where users can easily open up a lot of different topics.
Pros: Very simple, just need to change the template to achieve-it seems to be not too hack. :)
Cons: You can only open a new window on the first page of the topic, and the other pages, or hold down shift.
Step: Edit the template, Control Panel, open Forumdisplaybit, find "
$gotonew $threadtitle
", in the back or in front of the $gotonew ($gotonew is the" new post "icon), add"
"And, of course, you have to prepare a small icon for this connection to open a new window and upload it to the images directory. Complete!
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.