vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Users Threads in Profile [vB3] (https://vborg.vbsupport.ru/showthread.php?t=61020)

assassingod 02-01-2004 03:14 PM

You havent defined one of the variables (The exluded forums one)

NuclioN 02-01-2004 03:23 PM

I've defined the variables but the error remains so i've removed the line to see why the error is showing up. I use table prefix so the 'SELECT threadid,title,dateline
FROM thread'

was not working. I've added the prefix before 'thread' and now it's working. :)

assassingod 02-01-2004 03:37 PM

Ah yes, I forgot that - thanks for reminding me.

g-force2k2 02-01-2004 03:56 PM

Quote:

Originally Posted by assassingod
// Coming Soon:
Thread Permissions (No need to manually exclude forums!)

assassingod you can use my permissions code from one of my hacks.

The function:
PHP Code:

function get_noaccess_forumids (  )
{
    global 
$forumcache$bbuserinfo ;

    
$_naforumids = array (  ) ;
    
$_naforumids[] = ;
    foreach ( 
$forumcache AS $forumid => $farray ) :
        if ( ! ( 
$farray['permissions']["$bbuserinfo[usergroupid]"] & CANVIEW ) ) :
            
$_naforumids[] = $forumid ;
        endif ;
    endforeach ;

    return 
$_naforumids ;


It use the forumcache to run through user permissions so it doesn't require a query to check which users can access which forums, though it doesn't run a check on the access masks it does do the forum permissions.

Then in the member.php? im guessing add:

PHP Code:

$forumids implode "', '"get_noaccess_forumids (  ) ) ; 

This takes the forums which users have no access to and sets it up for the sql statement.

Then in the WHERE section of the sql statement add:

PHP Code:

thread.forumid NOT IN '$forumids' 

Cheers,
g-force2k2

assassingod 02-01-2004 04:07 PM

Thanks very much g-force! I'll test this out right away

MGM 02-02-2004 01:35 AM

assassingod... does that code work properly and correctly? let us know :P

/me clicks Install to know when the new version is released

also: does this show the person's latest threads or just random threads?

MGM out

AutomatikStudio 02-02-2004 12:05 PM

I'm getting the same database error NuclioN got.

assassingod 02-02-2004 12:58 PM

AutomatikStudio;
Have defined the $excluded variable? and do you have a table prefix?

AutomatikStudio 02-02-2004 01:09 PM

Quote:

Originally Posted by assassingod
AutomatikStudio;
Have defined the $excluded variable? and do you have a table prefix?

I ended up just putting "0" in the excluded variable and it's fine now.

assassingod 02-02-2004 01:10 PM

Quote:

Originally Posted by AutomatikStudio
I ended up just putting "0" in the excluded variable and it's fine now.

I'll add that as default.

MGM;
This shows the latest threads.


All times are GMT. The time now is 07:59 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.01157 seconds
  • Memory Usage 1,743KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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