vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - [WIDGET] Recent Threads (https://vborg.vbsupport.ru/showthread.php?t=236404)

GONUMBER6 03-08-2010 12:34 AM

Quote:

Originally Posted by Inflikted (Post 1994657)
is there an easy way to block out private forums from this?

nevermind figured it out... for those others who wanted to know how

change
Code:

if (!in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))) {
to the proper forumid's you would like to block
PHP Code:

ob_start(); 
global 
$vbulletin$db
//Begin Thread Counts 
$toutput=''
$recent_threads $vbulletin->db->query_read(
SELECT thread.threadid, thread.title, thread.dateline, thread.lastpost, thread.lastposter, thread.lastposterid, thread.visible, thread.open, thread.postusername, thread.postuserid, thread.replycount, thread.views, forum.forumid, forum.title as forumtitle
FROM  " 
TABLE_PREFIX "thread AS thread 
LEFT JOIN  " 
TABLE_PREFIX "forum AS forum ON ( forum.forumid = thread.forumid ) 
WHERE NOT ISNULL(threadid) AND visible = '1' AND open!='10' 
ORDER BY lastpost DESC 
LIMIT 0, 10 
"
); 
$i 0
while (
$recent_thread $db->fetch_array($recent_threads)) 

$i++;
if (!
in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))) { 
if (
$i 1) {$class='alt1';} else {$class='alt2';} 
$recent_thread[title] = unhtmlspecialchars($recent_thread[title]); 
$recent_thread[lastpostdate] = vbdate('M jS'$recent_thread[lastpost], 1); 
$recent_thread[lastposttime] = vbdate($vbulletin->options['timeformat'], $recent_thread[lastpost]); 
$toutput .='<tr><td class="'.$class.'" align="left"><b><font color="#98B5E2" size="1" face="verdana,arial"><a href="showthread.php?t='.    $recent_thread[threadid].'">'.    $recent_thread[title].'</a></font></b><br/>'
$toutput .='<b><span style="color: #E1E1E2"><font size="1" face="verdana,arial">Last Post By: <a href="member.php?u='.$recent_thread[lastposterid].'">'.$recent_thread[lastposter].'</a></font><br/></span></b>'
$toutput .='<font size="1" face="verdana,arial">Forum: <a href="forumdisplay.php?f='.$recent_thread[forumid].'">'.$recent_thread[forumtitle].'</a> | Replies: '.$recent_thread[replycount].'</font><br/>'
$toutput .='<font size="1" face="verdana,arial">Posted: <strong>'.$recent_thread[lastpostdate].'</strong> at: <strong>'.    $recent_thread[lastposttime].'</strong></font><hr/></td></tr>'

}
//End Thread Counts 

//Sidebar - Begin Forum Threads 
$sb_threads 
<table class="tborder" cellpadding="'
.$stylevar[cellpadding].'" cellspacing="'.$stylevar[cellspacing].'" border="0" width="100%" align="center"> <thead> <tr> <td class="tcat"></td> </tr> </thead> <tbody> <div class="smallfont"> <tr> <td>
'
.$toutput.
</td> </tr> </div> </tbody> </table> 
'

//Sidebar - End Forum Threads 
echo $sb_threads
$db->free_result($recent_threads); 
$output=ob_get_contents(); 
ob_end_clean(); 


I tried to change it, but must be doing something wrong. What exactly do I change?

I pasted this into the widget where you placed it:
if (!in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))) {

and then changed the forum id to the forum I want hidden:

if (!in_array($recent_thread[Moderators Area], array(105,83,121,110,82,112,109,101,102,72))) {

How do I do it the right way??? Thank you in advance cuz I really like this widget!!! :)

AURFSCAN 03-08-2010 12:44 AM

If you want forum id's 1,2,3,4 hidden then it would look like this

if (!in_array($recent_thread[forumid], array(1,2,3,4))) {

GONUMBER6 03-08-2010 01:31 AM

Awesome, but it did not work for me. :( I tried 3 times.

Here is the error I am getting:


Parse error: syntax error, unexpected $end in /home/content/32/5565332/html/forums/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 39

GONUMBER6 03-08-2010 01:36 AM

Thanks, I finally got it.

GONUMBER6 03-08-2010 01:57 AM

I am sorry to bug you all again, but now the "last post by:" is white, which does not show on the white background of this widget.

Can you tell me what sylvars or coding to change the background (not the font) to the same color as my board? Thanks in advance....

Here is my CMS page: http://www.englishbulldognews.com/forums/content.php

I have the new widget on the bottom of the page until I get it up and running properly to replace the 4.02 standard one, so scroll down plz... :)

Inflikted 03-08-2010 04:27 AM

change the font colors in the script, i had to modify the colors to make it look right with my theme. sorry i forgot to remove those parts out.

RedHacker 03-08-2010 07:32 AM

Quote:

Originally Posted by AURFSCAN (Post 1999517)
If you want forum id's 1,2,3,4 hidden then it would look like this

if (!in_array($recent_thread[forumid], array(1,2,3,4))) {

Parse error: syntax error, unexpected $end in /home/*****/public_html/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 41

GONUMBER6 03-08-2010 01:17 PM

Make sure you use the entire code, don't just add the code to the original. Same thing happened to me until I earased and used the entire code.

Inflikted 03-08-2010 02:21 PM

ya.. its not just one line there is a bracket at the bottom your missing, which doesnt properly close the script.

RedHacker 03-08-2010 06:57 PM

Quote:

Originally Posted by GONUMBER6 (Post 1999812)
Make sure you use the entire code, don't just add the code to the original. Same thing happened to me until I earased and used the entire code.

I cant understand...


All times are GMT. The time now is 04:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01220 seconds
  • Memory Usage 1,767KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete