|
|
Joined: Mar 2001
Posts: 28
User
|
User
Joined: Mar 2001
Posts: 28 |
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 # !;
|
|
|
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.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|