The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have a little problem with my latest topic page wich you can see on: www.theplayer.nl (scroll down for the latest 10 topics.
I have a subforum that I will exclude from the latest topic page. This subforum is only for admins and moderators. This works fine, nobody see the subforum only the moderators and admins. But the topics in this forum are vissible on the latest 10 topis on the frontpage (www.theplayer.nl) Is there hack to don't show up the subforum that are for admins and moderators on the latest 10 topics? The code i'm using on www.theplayer.nl is the following: Code:
// LATEST FORUM POSTS if(!function_exists('forums_comment_latest')){ include_once("{$CONFIG['dir_main']}/modules/forums_{$CONFIG["forum_integration"]}_func.php"); } $DB_FORUM_BITS=forums_comment_latest(0,10); // FORUM POST OUTPUT $THEMES_VAR['forum_latest']=" <!--- START LATEST FORUM BITS --> <table width='98%' cellspacing=1 cellpadding=2 align='center'> <tr> <td class='tcheader'><b>Laatste Forum Topics</b></td> <td class='tcheader' align='middle'><b>Poster</b></td> <td class='tcheader' align='middle'><b>Datum</b></td> </tr>"; $int_color=0; while(list($key,$HASH_BIT)=each($DB_FORUM_BITS)){ $HASH_BIT['comment_date'] = func_date($HASH_BIT['comment_date'],"d-m-Y"); if($HASH_BIT['comment_title']==''){ $HASH_BIT['comment_title']=$HASH_BIT['comment_msg']; } if(strlen($HASH_BIT['comment_title'])>40){ $HASH_BIT['comment_title']=substr($HASH_BIT['comment_title'],0,55)."..."; } if($int_color%2==0){ $ALT_COLOR='#eef2f6'; } else { $ALT_COLOR='#FFFFFF'; } $THEMES_VAR['forum_latest'].=" <tr> <td align='left' bgColor='$ALT_COLOR'><font size=1><b><a href='{$INT_CONF["forum_url"]}/{$INT_CONF["fl_view_thread"]}{$HASH_BIT['comment_id']}#post{$HASH_BIT['comment_id']}' style='color: #19334A'>{$HASH_BIT['comment_title']}</a></b></td> <td align='left' bgColor='$ALT_COLOR'><font size=1>{$HASH_BIT['comment_uname']}</font></td> <td align='left' bgColor='$ALT_COLOR'><font size=1>{$HASH_BIT['comment_date']}</font></td> </tr>"; $int_color++; } $THEMES_VAR['forum_latest'].="</table><br>"; |
#2
|
|||
|
|||
![]()
No one?
|
#3
|
||||
|
||||
![]()
You will need to alter the query that fetches this info.
You need to show what's inside this file "forums_{$CONFIG["forum_integration"]}_func.php" |
#4
|
|||
|
|||
![]()
I think you mean this file "forums_vb_func.php"
Code:
<? if(file_exists("{$CONFIG['dir_config']}/forums_vb.inc.php")) { include("{$CONFIG['dir_config']}/forums_vb.inc.php"); } ////////////////////////////////////////////////////////////////////////////////////// // VARIABLE MAP // ////////////////////////////////////////////////////////////////////////////////////// $MAP_DB=array(); $MAP_DB['comment_id'] = 'nnet_rid'; $MAP_DB['article_id'] = 'nnet_aid'; $MAP_DB['category_id'] = 'nnet_cid'; $MAP_DB['comment_uid'] = 'nnet_uid'; $MAP_DB['comment_uname'] = 'nnet_poster'; $MAP_DB['comment_title'] = 'nnet_title'; $MAP_DB['comment_rate'] = 'nnet_rate'; $MAP_DB['comment_msg'] = 'nnet_msg'; $MAP_DB['comment_date'] = 'nnet_date'; ////////////////////////////////////////////////////////////////////////////////////// // REQUIRED FUNCTIONS // ////////////////////////////////////////////////////////////////////////////////////// if(PHP_ACCESS!='1'){ print "This file doesn't support direct access."; exit; } function forums_comment_insert($input){ global $CONFIG,$MAP_DB; mysql_query("INSERT INTO `{$CONFIG['sql_db']}`.`nnet_reviews` SET `{$MAP_DB['article_id']}`='{$input['article_id']}',`{$MAP_DB['category_id']}`='{$input['category_id']}',`{$MAP_DB['comment_uid']}`='{$input['comment_uid']}',`{$MAP_DB['comment_uname']}`='{$input['comment_uname']}',`{$MAP_DB['comment_title']}`='{$input['comment_title']}',`{$MAP_DB['comment_rate']}`='{$input['comment_rate']}',`{$MAP_DB['comment_msg']}`='{$input['comment_msg']}',`{$MAP_DB['comment_date']}`='{$input['comment_date']}'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); return true; } function forums_comment_remove($in_id,$type){ global $CONFIG,$MAP_DB; switch($type){ case 0: $type='nnet_rid';break; case 1: $type='nnet_aid';break; case 2: $type='nnet_cid';break; default: $type='nnet_rid';break; }; mysql_query("DELETE FROM `{$CONFIG['sql_db']}`.`nnet_reviews` WHERE `$type`='$in_id'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); } function forums_auto_insert($input){ global $CONFIG,$MAP_DB,$INT_CONF; /* Available Input Variables $input['comment_id'] =addslashes( $input['comment_desc'] =addslashes( $input['category_id'] =addslashes( $input['comment_uid'] =addslashes( $input['comment_uname'] =addslashes( $input['comment_title'] =addslashes( $input['comment_rate'] =addslashes( $input['comment_msg'] =addslashes( $input['comment_date'] =addslashes( */ if($INT_CONF["auto_insert_type"]==2){ // LOOK FOR APPROPRIATE FORUM foreach($INT_CONF as $key => $value){ if(preg_match("/^it_/",$key) && $value==$input['category_id']){ list($null,$TRUE_FID)=explode("_",$key); } } if($TRUE_FID!=''){ $INT_CONF["auto_insertID"]=$TRUE_FID; } else { $INT_CONF["auto_insertID"]=$INT_CONF["auto_insert_default"]; } } if($INT_CONF["auto_insertID"]>0){ if(strlen($input['comment_title'])>1){ forum_sql_connect(1); $input['comment_desc'].=" [}?m=show&id={$input['comment_id']}]details]"; $result=mysql_query("INSERT INTO `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}thread` SET `title`='{$input['comment_title']}',`lastpost`='{$input['comment_date']}',`nnet_aid`='{$input['comment_id']}',`forumid`='{$INT_CONF["auto_insertID"]}',`open`='1',`postusername`='{$input['comment_uname']}',`postuserid`='{$input['comment_uid']}',`lastposter`='{$input['comment_uname']}',`dateline`='{$input['comment_date']}',`visible`='1'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); $data=mysql_fetch_row(mysql_query("SELECT LAST_INSERT_ID() FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}thread`")); mysql_free_result($result); mysql_query("INSERT INTO `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}post` SET `threadid`='{$data[0]}',`username`='{$input['comment_uname']}',`userid`='{$input['comment_uid']}',`title`='{$input['comment_title']}',`nnet_aid`='{$input['comment_id']}',`pagetext`='{$input['comment_desc']}',`ipaddress`='".getenv("HTTP_REFERER")."',`allowsmilie`='1',`iconid`='1',`visible`='1',`dateline`='{$input['comment_date']}'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); mysql_query("UPDATE `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}forum` SET `threadcount`=`threadcount`+1 WHERE `forumid`='{$INT_CONF["auto_insertID"]}' LIMIT 1") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); forum_sql_connect(2); } } // ends forum id check } function forums_thread_id($input){ global $CONFIG,$MAP_DB,$INT_CONF; forum_sql_connect(1); extract(v45_sql_stripper(mysql_fetch_array(mysql_query("SELECT `threadid` FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}thread` WHERE `nnet_aid`='$input' LIMIT 1"),MYSQL_ASSOC))); forum_sql_connect(2); return $threadid; } function forums_comment_retrieve($input,$type,$start,$end){ global $CONFIG,$MAP_DB,$INT_CONF;$tmp_array=array(); forum_sql_connect(1); $type=($type==1)?'nnet_cid':'nnet_aid'; if($INT_CONF["auto_insert"]==1){ forum_sql_connect(1); $id_thread=forums_thread_id($input); $result=mysql_query("SELECT `postid` AS `comment_id`,`userid` AS `comment_uid`,`title` AS `comment_title`,`username` AS `comment_uname`,`pagetext` AS `comment_msg`,`dateline` AS `comment_date` FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}post` WHERE `threadid`='$id_thread' AND `nnet_aid`='' ORDER BY `postid` DESC LIMIT $start,$end;") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $data['article_id']=$input; $tmp_array[]=$data; } mysql_free_result($result); forum_sql_connect(2); } else { $int_counter=0; $result=mysql_query("SELECT `nnet_rid` AS `comment_id`, `nnet_aid` AS `article_id`, `nnet_cid` AS `category_id`, `nnet_uid` AS `comment_uid`, `nnet_title` AS `comment_title`, `nnet_poster` AS `comment_uname`, `nnet_rate` AS `comment_rate`, `nnet_msg` AS `comment_msg`, `nnet_date` AS `comment_date` FROM `{$CONFIG['sql_db']}`.`nnet_reviews` WHERE `$type`='$input' ORDER BY `nnet_rid` DESC LIMIT $start,$end;") or die("sMYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $tmp_array[$int_counter]=$data; $int_counter++; } mysql_free_result($result); } return $tmp_array; } function forums_comment_search($input,$field,$keywords,$start,$end){ global $CONFIG,$MAP_DB;$tmp_array=array(); $int_counter=0;$keywords=addslashes(stripslashes($keywords)); $result=mysql_query("SELECT `nnet_rid` AS `comment_id`,`nnet_aid` AS `article_id`,`nnet_cid` AS `category_id`,`nnet_uid` AS `comment_uid`,`nnet_title` AS `comment_title`,`nnet_poster` AS `comment_uname`,`nnet_rate` AS `comment_rate`,`nnet_msg` AS `comment_msg`,`nnet_date` AS `comment_date` FROM `{$CONFIG['sql_db']}`.`nnet_reviews` WHERE `{$MAP_DB[$field]}` REGEXP '$keywords' ORDER BY `nnet_rid` DESC LIMIT $start,$end;") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $tmp_array[$int_counter]=$data; $int_counter++; } mysql_free_result($result); return $tmp_array; } function forums_comment_total($input,$type){ global $CONFIG,$MAP_DB; $type=($type==1)? 'nnet_cid' : 'nnet_aid'; extract(v45_sql_stripper(mysql_fetch_array(mysql_query("SELECT COUNT(`nnet_rid`) AS `totalsize` FROM `{$CONFIG['sql_db']}`.`nnet_reviews` WHERE `$type`='$input'"),MYSQL_ASSOC))); return $totalsize; } function forums_comment_edit($input,$action){ global $CONFIG,$MAP_DB; if($action=='r'){ return (v45_sql_stripper(mysql_fetch_array(mysql_query("SELECT `nnet_rid` AS `comment_id`,`nnet_aid` AS `article_id`,`nnet_cid` AS `category_id`,`nnet_uid` AS `comment_uid`,`nnet_title` AS `comment_title`,`nnet_poster` AS `comment_uname`,`nnet_rate` AS `comment_rate`,`nnet_msg` AS `comment_msg`,`nnet_date` AS `comment_date` FROM `{$CONFIG['sql_db']}`.`nnet_reviews` WHERE `nnet_rid`='{$input}' LIMIT 1"),MYSQL_ASSOC))); } else { mysql_query("UPDATE `{$CONFIG['sql_db']}`.`nnet_reviews` SET `nnet_aid`='{$input['article_id']}',`nnet_cid`='{$input['category_id']}',`nnet_uid`='{$input['comment_uid']}',`net_title`='{$input['comment_title']}',`nnet_poster`='{$input['comment_uname']}',`nnet_rate`='{$input['comment_rate']}',`nnet_msg`='{$input['comment_msg']}',`nnet_date`='{NEPHP_CTIME}' WHERE `nnet_rid`='{$input['comment_id']}' LIMIT 1") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); } } function forums_login($input){ global $gbl_env,$CONFIG,$INT_CONF,$access_hash,$_SERVER; forum_sql_connect(1); extract(v45_sql_stripper(mysql_fetch_array(mysql_query("SELECT `userid` AS `user_uid`,`styleid`,`lastactivity` FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}user` WHERE `username`='{$gbl_env['user_usr']}' AND `password`='".md5($gbl_env['user_pwd'])."' LIMIT 1"),MYSQL_ASSOC))); if($user_uid<1){ printr("javascript:history.go(-1);","Invalid access combination. Please go back and try again....","{$CONFIG['dir_main']}/templates/common_redirect.html"); } mysql_query("INSERT INTO `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}session` SET `sessionhash`='$access_hash',`userid`='$user_uid',`host`='".getenv("HTTP_REFERER")."',`useragent`='".addslashes(stripslashes($_SERVER["HTTP_USER_AGENT"]))."',`lastactivity`='$lastactivity',`styleid`='$styleid'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); forum_sql_connect(2); $int_long= time() + 30240000; setcookie('sessionhash',"$access_hash","$int_long",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); setcookie('bbuserid',"$user_uid","$int_long",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); setcookie('bbpassword',md5($gbl_env['user_pwd']),"$int_long",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); } function forums_logout($input){ global $HTTP_COOKIE_VARS,$INT_CONF; forum_sql_connect(1); mysql_query("DELETE FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}session` WHERE `sessionhash`='{$HTTP_COOKIE_VARS['sessionhash']}' LIMIT 1") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); $int_del = time()-31536001 ; /////////////////////////////////////////////////////////////////////////////////////////////// // DELETE COOKIES HERE // /////////////////////////////////////////////////////////////////////////////////////////////// setcookie('sessionhash',"","$int_del",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); setcookie('bbuserid',"","$int_del",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); setcookie('bbpassword',"","$int_del",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); setcookie('nephp4x',"","$int_del",HTTP_COOKIE_PATH,HTTP_COOKIE_DOMAIN,HTTP_COOKIE_SECURE); forum_sql_connect(2); } function forums_get_groups($db_info){ global $HTTP_COOKIE_VARS,$INT_CONF; forum_sql_connect(1); $result=mysql_query("SELECT `usergroupid` AS `forum_group_id`,`title` AS `forum_group_title` FROM `$db_info`.`usergroup`") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); $tmp_array=array(); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $tmp_array[]=$data; } mysql_free_result($result); forum_sql_connect(2); return $tmp_array; } function forums_forums_fetch(){ global $HTTP_COOKIE_VARS,$INT_CONF; forum_sql_connect(1); $result=mysql_query("SELECT `forumid`,`title` FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}forum` WHERE `allowposting`='1'") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); $tmp_hash=array(); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $tmp_hash[]=$data; } mysql_free_result($result); forum_sql_connect(2); return $tmp_hash; } function forum_db_setup($input=''){ ///////////////////////////////////////////////////////////////////////////// // ADD MORE FIELDS IF NECCESSARY // ///////////////////////////////////////////////////////////////////////////// global $CONFIG,$HTTP_COOKIE_VARS,$INT_CONF,$gbl_env,$NEPHP_IMG,$m_connect; forum_sql_connect(1); $result=mysql_query("ALTER TABLE `$input`.`user` ADD `user_favs` TEXT NOT NULL;"); mysql_free_result($result); $result=mysql_query("ALTER TABLE `$input`.`user` ADD `user_cats` TEXT NOT NULL;"); mysql_free_result($result); $result=mysql_query("ALTER TABLE `$input`.`post` ADD `nnet_aid` TEXT NOT NULL;"); mysql_free_result($result); $result=mysql_query("ALTER TABLE `$input`.`thread` ADD `nnet_aid` TEXT NOT NULL;"); mysql_free_result($result); forum_sql_connect(2); } function forum_review_simulator(){ global $CONFIG,$HTTP_COOKIE_VARS,$INT_CONF,$gbl_env,$NEPHP_IMG; $id_thread=forums_thread_id($gbl_env['nnet_aid']); Header("Location: {$INT_CONF["forum_url"]}/newreply.php?action=newreply&threadid=$id_thread&preview=Preview%20Reply&title=".htmlspecialchars($gbl_env['comment_title'])."&message=".htmlspecialchars($gbl_env['comment_text'])); } function forum_favs_update($input,$user_uid){ global $CONFIG,$HTTP_COOKIE_VARS,$INT_CONF,$gbl_env,$NEPHP_IMG; forum_sql_connect(1); mysql_query("UPDATE `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}user` SET `user_favs`='$input' WHERE `userid`='$user_uid'LIMIT 1") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); forum_sql_connect(2); } function forum_sql_connect($stage){ global $CONFIG,$HTTP_COOKIE_VARS,$INT_CONF,$gbl_env,$NEPHP_IMG,$m_connect,$db; if($INT_CONF['db_user']!='' && $INT_CONF['db_user']!=$CONFIG['sql_username']){ if($stage==1 && $CONNECTION_SWITCH != 1){ // establish connection $db->sql_disconnect(); $db = new nephp(); $db->sql_connect($CONFIG['sql_server'],$INT_CONF['db_user'],$INT_CONF['db_pass'],$CONFIG['sql_persistant'],'ERROR'); $db->set_db($INT_CONF["db"]); $CONNECTION_SWITCH = 1; } if($stage==2){ // establish connection $db->sql_disconnect(); $db = new nephp(); $db->sql_connect($CONFIG['sql_server'],$CONFIG['sql_username'],$CONFIG['sql_password'],$CONFIG['sql_persistant'],'ERROR'); $db->set_db($CONFIG['sql_db']); $CONNECTION_SWITCH = 0; } } } function forums_comment_latest($start,$end){ global $CONFIG,$MAP_DB,$INT_CONF;$tmp_array=array(); forum_sql_connect(1); $id_thread=forums_thread_id($input); $result=mysql_query("SELECT `postid` AS `comment_id`,`userid` AS `comment_uid`,`title` AS `comment_title`,`username` AS `comment_uname`,`pagetext` AS `comment_msg`,`dateline` AS `comment_date` FROM `{$INT_CONF['db']}`.`{$INT_CONF['prefix']}post` WHERE 1 ORDER BY `postid` DESC LIMIT $start,$end;") or die("MYSQL_QUERY ERROR NUMBER ".mysql_errno().": ".mysql_error()); while($data=mysql_fetch_array($result,MYSQL_ASSOC)){ $data=v45_sql_stripper($data); $data['article_id']=$input; $tmp_array[]=$data; } mysql_free_result($result); forum_sql_connect(2); return $tmp_array; } $var_test_pass=1; $var_int_pass =1; |
#5
|
||||
|
||||
![]()
Yes that file. Try to replace it with the following code
NOTE: On line 273 change the XX in "thread.forumid NOT IN (XX)" to the forumid of the forum you want to exclude. In your case your admin/mod forum. PHP Code:
|
#6
|
|||
|
|||
![]()
Don't working.... its still te same, anybody can see the post in latest 10 topics but can't read it. (only mods and admins) the forum id is 37 the thread id is 38 but none works :-(
"thread.threadid AND thread.forumid NOT IN (38)" Or "thread.threadid AND thread.forumid NOT IN (37; 38)" Can you take another look? Thanks in advance! |
#7
|
||||
|
||||
![]()
I'm sorry I'm not able to test this out.
Try thread.threadid AND thread.forumid != '38' |
#8
|
|||
|
|||
![]()
nope.... no go
I tried also: thread.threadid AND thread.forumid NOT IN '38; 37' thread.threadid AND thread.forumid NOT IN (38; 37) thread.threadid AND thread.forumid != '38' If i can help you with something so you can test it out.... lett me know. |
#9
|
|||
|
|||
![]()
where did you get that hack, as I really need it to!
I'm using latest threads hack on my site, buts its different to yours: www.TrickFly.com How do I get your hack ? Please helo |
#10
|
|||
|
|||
![]()
Its custom made for my cms, so all the code you see above for the latest topics.
But with some simple html/php you can change you look from you latest 10 topics? Quote:
|
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|