Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
See all threads of subforums in a main forum Details »»
See all threads of subforums in a main forum
Version: 1.00, by vBarab vBarab is offline
Developer Last Online: Jul 2012 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.8 Rating:
Released: 09-24-2007 Last Update: Never Installs: 3
 
No support by the author.

open forumdisplay.php
find
---
$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid = $foruminfo[forumid]
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
---
replace
---

$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");

if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {

$getparent_id .= ',' . $getparentids[forumid];

}
}

$stickies = $db->query_read_slave("
SELECT thread.threadid, lastpost, open
FROM " . TABLE_PREFIX . "thread AS thread
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 1
$visiblethreads
$limitothers
$globalignore
");
// End SubThread


---
find
---
$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid = $foruminfo[forumid]
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
---
replace
---
$getparent_id = '';
$getparentid = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "forum WHERE parentid='" . $foruminfo[forumid] . "'");
if (mysql_num_rows($getparentid) 0) {
while ($getparentids = $db->fetch_array($getparentid)) {
$getparent_id .= ',' . $getparentids[forumid];
}
}

$getthreadids = $db->query_read_slave("
SELECT " . iif($sortfield == 'voteavg', $votequery) . " thread.threadid
$lastpost_info1
$hook_query_fields
FROM " . TABLE_PREFIX . "thread AS thread
$tachyjoin
$hook_query_joins
WHERE forumid IN (" . $foruminfo[forumid] . $getparent_id . ")
AND sticky = 0
$visiblethreads
$globalignore
$limitothers
$datecut
$hook_query_where
ORDER BY sticky DESC, $sqlsortfield $sqlsortorder
LIMIT $limitlower, $perpage
");
// End SubThread


---

open
threadbit
find :
---
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
---

add after :

---
<span style="float:left"><a href="forumdisplay.php?f=$thread[forumid]">[$thread[forumtitle]]</a></span>
---

hack4: Fnan4arab

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-25-2007, 09:40 PM
dj_f16 dj_f16 is offline
 
Join Date: Sep 2006
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

caps or demo?????
Reply With Quote
  #3  
Old 09-28-2007, 05:44 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A demo of this would be great, and if forum 1 is set to now allow any posts, and only forum 2 and forum 3 are, then does that change anything?
Reply With Quote
  #4  
Old 10-22-2007, 12:54 PM
matt3830 matt3830 is offline
 
Join Date: Dec 2005
Location: Vancouver Canada
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea, but I couldn't get it to work.
Reply With Quote
  #5  
Old 10-23-2007, 07:35 PM
rooban12 rooban12 is offline
 
Join Date: May 2007
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any samples?
Reply With Quote
  #6  
Old 11-23-2007, 03:38 AM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looking for a sample also...

arn
Reply With Quote
  #7  
Old 05-25-2008, 04:58 PM
matt3830 matt3830 is offline
 
Join Date: Dec 2005
Location: Vancouver Canada
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you upgrade this to 3.7?
Reply With Quote
  #8  
Old 05-25-2008, 05:21 PM
koolfire koolfire is offline
 
Join Date: Apr 2008
Location: vBulletin
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Get everythin in codez
Reply With Quote
  #9  
Old 06-08-2008, 08:27 AM
hoku hoku is offline
 
Join Date: May 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack, but a simple:
WHERE forumid IN ($foruminfo[forumid]," . implode(',',$foruminfo['childlist']) . ")
can do the same job in 1 line of code instead of 20, with no extra queries.

for 3.7.x version visit https://vborg.vbsupport.ru/showthread.php?t=181876
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04316 seconds
  • Memory Usage 2,273KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete