Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2001
Posts: 27
User
User
Offline
Joined: Mar 2001
Posts: 27
Gentlemen,

I always have used this hack for a simple total of all topics / posts. With updates I have modified it slightly and it has always worked. But now with 6.3 it does not display or do anything.

Everything matches.

Any idea's?

Here is the mod..

##############################################################################
# Name: Total Posts and Topics Hack 1.1 #
# Description: Adds total posts and topics to forum home #
# By: Tovok7 #
# Date: 03-27-2001 #
# Link: http://UBB.Tovok7.de #
# Changed files: ubb_forum_summary.cgi #
# Works with: Version 6.2.0.1 #
# Copyright 2001 Tovok7 #
##############################################################################
# #
# DISCLAIMER: By using this hack, the user implicitly agrees that they #
# are willingly modifying any and all files at their own #
# risk. Should any errors occur either as a direct or #
# indirect result of said modifications the user agrees not #
# to hold Infopop Corporation or any of the individuals #
# listed above accountable. #
# #
# IN OTHER WORDS: PLEASE MAKE BACKUP COPIES OF EVERY FILE YOU PLAN TO #
# MODIFY PRIOR TO MODIFICATION!! #
# #
# You can see this hack in action at www.UnitedBoards.de #
# Please visit my homepage at www.Tovok7.de #
# #
##############################################################################

########################################
# open ubb_forum_summary.cgi and find: #
########################################

# get HTML bits for this page
&LoadTemplate("public_forum_summary");

##############
# below add: #
##############

local ($each, @thisforuminfo, $x, @data, $TotalTopics, $TotalPosts, $AllTopics, $AllPosts,
$exact_path);

for $each(@sortedforums) {

@thisforuminfo = split(/|^|/, $each);
chomp($thisforuminfo[8]);
$x = "$thisforuminfo[8]";

$exact_path = "Forum$x";
if ($thisforuminfo[6] eq 'private') { $exact_path .= "/private-$thisforuminfo[7]"; }

# Get Forum Data from lastnumber.file(s)
if (-e "$vars_config{NonCGIPath}/$exact_path/lastnumber.file") {
@data = &OpenFileAsArray("$vars_config{NonCGIPath}/$exact_path/lastnumber.file");
$TotalTopics = $data[1]; chomp($TotalTopics);
$TotalPosts = $data[2]; chomp($TotalPosts);
} else {
$TotalTopics = 0;
$TotalPosts = 0;
}

# sum number of posts and topics
$AllTopics += $TotalTopics;
$AllPosts += $TotalPosts;

}
$RegisteredMemberLine .= qq!
Total $vars_wordlets{topic_column}: $AllTopics / Total $vars_wordlets{post_column}: $AllPosts
!;

###########################################################
# Save the file and clear your cache! #
# END #
# If want to place the Total Posts and Topics manually in #
# public_forum_summary.pl use the following instruction: #
###########################################################

#########
# find: #
#########

$RegisteredMemberLine .= qq!
$vars_wordlets{post_column}: $AllPosts
$vars_wordlets{topic_column}: $AllTopics
!;

############################################################
# replace with: #
# and insert $AllPosts and $AllTopics in the template file #
############################################################

# vars manually placed
# $RegisteredMemberLine .= qq!
$vars_wordlets{post_column}: $AllPosts
$vars_wordlets{topic_column}: $AllTopics
# !;


Webmaster
AUS-CITY Space and General Interest Forums
http://www.aus-city.com/ubbthreads/ubbthreads.php
Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)