The Arcive of vBulletin Modifications Site. |
|
Details »»
|
|||||||||||||||||||||||||
JonnyQuest hacked the Active Threads hack (thank you to those fine contributors to our community) to make this one. He also made a Most Popular Threads ever ... pretty basic mod.
See it included here: http://www.bigsoccer.com/forum/boards.shtml Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
dns-error right now ... where could i find this to download?
|
|
#3
|
|||
|
|||
|
Likewise, I'm not able to load your page, but this is an AWESOME hack! I've been working on something similar, but I haven't had the time to iron it out recently.
|
|
#4
|
|||
|
|||
|
we're back up.
|
|
#5
|
|||
|
|||
|
huss, congrats that you're online again - but where's this fine hack to download ?
|
|
#6
|
|||
|
|||
|
Hi Huss,
i'm just looking over your site and saw the small message "PM users click here to check messages." Is this a hack for vB? |
|
#7
|
|||
|
|||
|
Just curious, how do you folks time stamp the most popular posts? I need this feature to highlight the most popular posts of the week.
With UBB i had the server parsing html files for SSI and then executing a custom counter. Can we take a look at the code please?
|
|
#8
|
|||
|
|||
|
WHoops my bad, forgot I never put it up!!
Most read Today: Code:
<script language="php">
/*
##############################################################################
# vBulletin Active Topics Version 0.25 #
##############################################################################
*/
/*
##############################################################################
# Load Required Variables #
##############################################################################
*/
include("admin/config.php");
include("class.FastTemplate.php3");
/*
##############################################################################
# Set initial directory to load templates from. #
##############################################################################
*/
$Template_Dir = ".";
/*
##############################################################################
# Set file to output to if post_to_file is equal to 1. #
##############################################################################
*/
$Post_File_Name = "mostread.txt";
/*
##############################################################################
# Initiate FastTemplate #
##############################################################################
*/
$displaytemplate = new FastTemplate("$Template_Dir");
$displaytemplate->strict();
/*
##############################################################################
# Setup initial settings if not specified on command line. #
##############################################################################
*/
if (isset($posts)) {
$num_active = intval($posts);
}
else {
$num_active = 10;
}
if (isset($length)) {
$num_chars = intval($length);
}
else {
$num_chars = 150;
}
if (isset($file)) {
$post_to_file = 1;
$displaytemplate->define(array(
"ActivePage" => "Most-Read-Page.tpl",
"ActiveMessage" => "Most-Read-Message.tpl"
));
}
else {
$post_to_file = 1;
$displaytemplate->define(array(
"ActivePage" => "Most-Read-Page.tpl",
"ActiveMessage" => "Most-Read-Message.tpl"
));
}
if (isset($forum)) {
$selected_forum = intval($forum);
$querylatest = "select * from thread where forumid='$selected_forum' and (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastpost))<35000 order by views desc limit $num_active";
}
else {
$querylatest = "select * from thread where (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastpost))<35000 order by views desc limit $num_active";
}
/*
##############################################################################
# Lets Setup and Connect to the Database #
##############################################################################
*/
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
/*
##############################################################################
# Generate SQL and Query Database #
##############################################################################
*/
$resultlatest = mysql_query($querylatest,$db);
/*
##############################################################################
# Lets Find the Latest Topics #
##############################################################################
*/
while ($latest_array = mysql_fetch_array($resultlatest)) {
/*
##############################################################################
# Go one-by-one through the result query. #
##############################################################################
*/
$query_forum = "select * from forum where forumid='$latest_array[forumid]'";
$result_forum = mysql_query($query_forum,$db);
$forum_info_array = mysql_fetch_array($result_forum);
/*
##############################################################################
# Split the Date to make it nicer. #
##############################################################################
*/
$datestr1 = substr($latest_array["dateline"],0,10);
$datetime = substr($latest_array["dateline"],11,8);
/*
##############################################################################
# Assign result info to template #
##############################################################################
*/
$displaytemplate->assign ("FORUMTITLE" , $forum_info_array["title"]);
$displaytemplate->assign ("POSTTITLE" , $latest_array["title"]);
$displaytemplate->assign ("POSTUSERNAME" , $latest_array["postusername"]);
$displaytemplate->assign ("POSTDATETIME" , $datetime);
$displaytemplate->assign ("POSTREPLYCOUNT" , $latest_array["replycount"]);
$querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1";
$result_thread_text= mysql_query($querythread,$db);
$result_thread_array = mysql_fetch_array($result_thread_text);
$displaytemplate->assign ("POSTICON" , $latest_array["iconid"]);
$displaytemplate->assign ("LASTPOSTER" , $latest_array["lastposter"]);
$displaytemplate->assign ("VIEWS" , $latest_array["views"]);
$Msg = substr(strip_tags($result_thread_array["pagetext"]),0,$num_chars);
$displaytemplate->assign ("POSTMESSAGE" , $Msg);
$displaytemplate->assign ("THREADID" , $latest_array["threadid"]);
$displaytemplate->parse ("FORUMINFO" , ".ActiveMessage");
}
/*
##############################################################################
# Parse the Data and Output the whole Page #
##############################################################################
*/
if ($post_to_file == 1) {
$displaytemplate->parse ("GLOBAL" , "ActivePage");
$displaybody = $displaytemplate->fetch("GLOBAL");
$fp = fopen("$Post_File_Name", "w");
fwrite($fp, $displaybody);
fclose($fp);
exit();
}
$displaytemplate->parse ("GLOBAL" , "ActivePage");
$displaytemplate->FastPrint();
exit();
</script>
Code:
<script language="php">
/*
##############################################################################
# vBulletin Active Topics Version 0.25 #
##############################################################################
*/
/*
##############################################################################
# Load Required Variables #
##############################################################################
*/
include("admin/config.php");
include("class.FastTemplate.php3");
/*
##############################################################################
# Set initial directory to load templates from. #
##############################################################################
*/
$Template_Dir = ".";
/*
##############################################################################
# Set file to output to if post_to_file is equal to 1. #
##############################################################################
*/
$Post_File_Name = "mostreadever.txt";
/*
##############################################################################
# Initiate FastTemplate #
##############################################################################
*/
$displaytemplate = new FastTemplate("$Template_Dir");
$displaytemplate->strict();
/*
##############################################################################
# Setup initial settings if not specified on command line. #
##############################################################################
*/
if (isset($posts)) {
$num_active = intval($posts);
}
else {
$num_active = 5;
}
if (isset($length)) {
$num_chars = intval($length);
}
else {
$num_chars = 150;
}
if (isset($file)) {
$post_to_file = 1;
$displaytemplate->define(array(
"ActivePage" => "Most-Read-Page.tpl",
"ActiveMessage" => "Most-Read-Message.tpl"
));
}
else {
$post_to_file = 1;
$displaytemplate->define(array(
"ActivePage" => "Most-Read-Page.tpl",
"ActiveMessage" => "Most-Read-Message.tpl"
));
}
if (isset($forum)) {
$selected_forum = intval($forum);
$querylatest = "select * from thread where forumid='$selected_forum' order by views desc limit $num_active";
}
else {
$querylatest = "select * from thread order by views desc limit $num_active";
}
/*
##############################################################################
# Lets Setup and Connect to the Database #
##############################################################################
*/
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
/*
##############################################################################
# Generate SQL and Query Database #
##############################################################################
*/
$resultlatest = mysql_query($querylatest,$db);
/*
##############################################################################
# Lets Find the Latest Topics #
##############################################################################
*/
while ($latest_array = mysql_fetch_array($resultlatest)) {
/*
##############################################################################
# Go one-by-one through the result query. #
##############################################################################
*/
$query_forum = "select * from forum where forumid='$latest_array[forumid]'";
$result_forum = mysql_query($query_forum,$db);
$forum_info_array = mysql_fetch_array($result_forum);
/*
##############################################################################
# Split the Date to make it nicer. #
##############################################################################
*/
$datestr1 = substr($latest_array["dateline"],0,10);
$datetime = substr($latest_array["dateline"],11,8);
/*
##############################################################################
# Assign result info to template #
##############################################################################
*/
$displaytemplate->assign ("FORUMTITLE" , $forum_info_array["title"]);
$displaytemplate->assign ("POSTTITLE" , $latest_array["title"]);
$displaytemplate->assign ("POSTUSERNAME" , $latest_array["postusername"]);
$displaytemplate->assign ("POSTDATETIME" , $datetime);
$displaytemplate->assign ("POSTREPLYCOUNT" , $latest_array["replycount"]);
$querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1";
$result_thread_text= mysql_query($querythread,$db);
$result_thread_array = mysql_fetch_array($result_thread_text);
$displaytemplate->assign ("POSTICON" , $latest_array["iconid"]);
$displaytemplate->assign ("LASTPOSTER" , $latest_array["lastposter"]);
$displaytemplate->assign ("VIEWS" , $latest_array["views"]);
$Msg = substr(strip_tags($result_thread_array["pagetext"]),0,$num_chars);
$displaytemplate->assign ("POSTMESSAGE" , $Msg);
$displaytemplate->assign ("THREADID" , $latest_array["threadid"]);
$displaytemplate->parse ("FORUMINFO" , ".ActiveMessage");
}
/*
##############################################################################
# Parse the Data and Output the whole Page #
##############################################################################
*/
if ($post_to_file == 1) {
$displaytemplate->parse ("GLOBAL" , "ActivePage");
$displaybody = $displaytemplate->fetch("GLOBAL");
$fp = fopen("$Post_File_Name", "w");
fwrite($fp, $displaybody);
fclose($fp);
exit();
}
$displaytemplate->parse ("GLOBAL" , "ActivePage");
$displaytemplate->FastPrint();
exit();
</script>
|
|
#9
|
|||
|
|||
|
Um.. could you also post the tpl file?
I still havent figured out FastTemplates well enough to create my own.Thanks! Shri |
|
#10
|
|||
|
|||
|
the tpl files all come frm the active threads hack. this is just a hack of a hack.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|