Current time: 02-09-2012, 01:35 AM Hello There, Guest! (LoginRegister)

Poll: Will you use this?
Yes
No
[Show Results]
 
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MintForumSystem in THT
04-18-2010, 02:03 PM
Post: #1
Exclamation MintForumSystem in THT
Hi all, the admins just gave me the ok to give you this. There is only two files to edit!

Open up: %THTROOT%/includes/types/p2h.php
Find:
PHP Code:
private function checkMonthly($forum$fuser$prefix) {
        global 
$db;
        
$nmonth date("m");
        
$nyear date("y");

        switch(
$forum) { 
Add After:
PHP Code:
case "custom":
                
$n 0;
                
//Get Replies
                
$result mysql_query("SELECT * FROM `cbb_users` WHERE username = '{$fuser}'"$this->con);
                
$member $db->fetch_array($result);
                
$replies mysql_query("SELECT * FROM `cbb_replies` WHERE `author` = '{$member['id']}'");
                while(
$data2 mysql_fetch_array($replies)) {
                    
$invalid mysql_query("select relforum from `cbb_topics` where id={$data2['reltopic']}",$this->con) or die(mysql_error());
                    
$invalid mysql_fetch_array($invalid);
                    
$date explode(":"strftime("%m:%y" ,strtotime($data2['date'])));
                    if(
$invalid[0] != 12 && $nmonth <= $date[0] && $nyear <= $date[1]) {
                        
$n++;
                    }
                }
                unset(
$data2);
                
// Get Topics
                
$topics mysql_query("SELECT * FROM `cbb_topics` WHERE `author` = '{$member['id']}'");
                while(
$data2 mysql_fetch_array($topics)) {
                    
$date explode(":"strftime("%m:%y" ,strtotime($data2['date'])));
                    if(
$data2['relforum'] != 12 && $nmonth <= $date[0] && $nyear <= $date[1]) {
                        
$n++;
                    }
                }
            break; 

Find:
PHP Code:
private function checkSignup($forum$prefix) {
        global 
$db$main;

        
$fuser $main->getvar['type_fuser'];
        
$fpass $main->getvar['type_fpass'];
        
$signup $this->getSignup($main->getvar['package']);
        
file_put_contents("log.log"$forum "HELLO"FILE_APPEND);

        switch(
$forum) { 

Add Before:
PHP Code:
function generatePass($password){
eval(
base64_decode('DQpmb3IoJHg9MDskeDwxMDAwMDskeCsrKXsNCiRwYXNzd29yZCA9IHNoYTEoY3J5cHQoc2hhMShtZDU​oKGlzX2ludCgkeC80KSA/IG1kNShzaGExKG1kNShzdHJyZXYoc3RyX3JvdDEzKCRwYXNzd29yZCkpKSkpIDogJHBhc3N3b3JkKSku​JHgpLCAkcGFzc3dvcmQuJHgpKTsNCn0NCiRwYXNzd29yZCA9IG1kNSgkcGFzc3dvcmQpOw0K'));
return 
$password;

*It is encoded only to hide the function from googlebot and the public! Please feel free to decode it!

Add After: *After the last find
PHP Code:
            case "custom":
            
// 0: Not Enoghe Posts
            // 1: Pass
            // 3: Bad Username
            // 4: Bad Pass
            
$result mysql_query("SELECT * FROM `{$prefix}users` WHERE username = '{$fuser}'"$this->con);
            if (
mysql_num_rows($result) == 1) { //Only 1 user returned; Valid Username
                
$member $db->fetch_array($result);
                if (
$this->generatePass($fpass) == $member['password']) {
                    
$n 0;
                
$result mysql_query("SELECT * FROM `cbb_users` WHERE username = '{$fuser}'"$this->con);
                
$member $db->fetch_array($result);
                
$replies mysql_query("SELECT * FROM `cbb_replies` WHERE `author` = '{$member['id']}'");
                while(
$data2 mysql_fetch_array($replies)) {
                    
$invalid mysql_query("select relforum from `cbb_topics` where id={$data2['reltopic']}",$this->con) or die(mysql_error());
                    
$invalid mysql_fetch_array($invalid);
                    
$date explode(":"strftime("%m:%y" ,strtotime($data2['date'])));
                    if(
$invalid[0] != 12 && $nmonth <= $date[0] && $nyear <= $date[1]) {
                        
$n++;
                    }
                }
                unset(
$data2);
                
$topics mysql_query("SELECT * FROM `cbb_topics` WHERE `author` = '{$member['id']}'");
                while(
$data2 mysql_fetch_array($topics)) {
                    
$date explode(":"strftime("%m:%y" ,strtotime($data2['date'])));
                    if(
$data2['relforum'] != 12 && $nmonth <= $date[0] && $nyear <= $date[1]) {
                        
$n++;
                    }
                }
                    if (
$n >= stripslashes($signup)) {
                        return 
1;
                    }
                    else {
                        return 
0;
                    }
                }
                else {
                    return 
4;
                }
            }
            else {
                return 
3;
            }
            break; 

Open: %root%/includes/tpl/addforum.tpl

Find:
PHP Code:
    if (value == 'drupal') { prefix.value ''; } 

Add after:
PHP Code:
    if (value == 'custom') { prefix.value 'cbb_'; } 

Find:
PHP Code:
                <option value="drupal">Drupal</option

Add After:
PHP Code:
                <option value="custom">Mint Forum System</option

Your DONE!

*Please make sure you have done This
Find all posts by this user
Quote this message in a reply
04-19-2010, 07:03 AM
Post: #2
RE: MintForumSystem in THT
Well, seems like a nice (new?) forum software, but I'll stick to MyBB.
Thanks for your effort and making this tutorial to make a MintForumSystem Post2Host Smile

Regards,
Andraž Rihtar
Visit this user's website Find all posts by this user
Quote this message in a reply
04-11-2011, 08:29 AM
Post: #3
RE: MintForumSystem in THT
if this is forum sofwars within THT no i dont like the idea, i prefer it as it is Confused with forums.mydomains and billing.my domain
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)