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)

JaNa 04-21-2004 04:20 PM

Ah, it's not working. When i've finished following the instructions, and try to look at it, I get a fatal error for member.php on line 427, which is this one.

$limit = '5'; // Enter the number of maximum threads you want to be displayed.

Ahhhh :ninja:

assassingod 04-21-2004 05:18 PM

Onkel_Tom; Sorry I forgot to update the install file:) As for your request, im not to sure what you mean

JaNa; I sure you you've installed it correctly? Try reinstalling it:)

Onkel_Tom 04-21-2004 06:45 PM

Quote:

Originally Posted by assassingod
As for your request, im not to sure what you mean

At the moment your hack shows only the threads which were started by this user. I also want to see his latest posts (answers) in his profile not only the threads which were started from this user.

thanks for your answer

JaNa 04-21-2004 07:41 PM

I think I go wrong at this "Add New Phrase"

Is it the "Phrase Manager" in the Languages & Phrases Tab in AdminCp?

EDIT: Erg, I reinstalled it, following the instructions closely, and it still doesn't work :tired:

(same error)

Vivi Ornitier 04-22-2004 07:28 PM

I get

Fatal error: Cannot redeclare get_noaccess_forumids() (previously declared in /home/squareu/public_html/forums/includes/functions_misc.php:20) in /home/squareu/public_html/forums/includes/functions_user.php on line 503

I tried applyin the require('./includes/functions_misc.php'); above the limit='5' and the require('./global.php'); and it's still not working, arrg wtf.

deaconxgp 04-23-2004 01:35 PM

I had this hack installed when I had vB 2.3 and it somehow mapped over when I upgraded to vB 3 Gold

BUT, even though the admin CP options are there for me to designate how many threads and which threads are excluded, THEY DON'T SHOW UP.

Do I have to re-edit some files since I upgraded to 3.0??? I'm guessing that since the template mods are obviously still in tact , all I have to do is edit some .php files....but which ones do I edit in order for this to show?

Like I said, in the Admin CP I still have options for the Show Thread that somehow carried over from my Vb 2.3 hack I did. Which files do I have to re-edit for it to show up in vb 3.0?

JaNa 04-23-2004 10:42 PM

Erg..i guess it doesn't work for my version...this is a very simple hack, and i've done it all correct!

Oh well :nervous:

Grendel 04-26-2004 04:08 PM

Nice.
Is it possible to show the forum-title in the thread-list as well?

ludachris 04-26-2004 07:41 PM

I'm using 3.0.1 and I can't find the line "userfield_select_option" in member.php - has this been implemented in 3.0.1?

Possible that another hack is conflicting I guess...

Onkel_Tom 04-26-2004 08:57 PM

This hack works fine with vB3.0.1 !
The "userfield_select_option" is placed in the pre-cached templates.
Just look for the following lines at the beginning of the member.php, line 32

PHP Code:

// pre-cache templates used by all actions
$globaltemplates = array(
    
'MEMBERINFO',
    
'memberinfo_customfields',
    
'memberinfo_membergroupbit',
    
'im_aim',
    
'im_icq',
    
'im_msn',
    
'im_yahoo',
    
'postbit_reputation',
    
'userfield_checkbox_option',
    
'userfield_select_option',
    
'memberinfo_usersthreads'
); 


pjdaley 04-27-2004 06:50 AM

my question is, what do you exactly edit in the code so it only shows threads started in forums indicated... like how would would i show threads with forumd ids, 1,2,3,4,5 only?

Grendel 04-27-2004 10:55 AM

I did it this way:

Code:

WHERE postuserid = '$userinfo[userid]' AND (forumid=1 OR forumid=2 OR forumid=3 OR forumid=4 OR forumid=5) AND visible='1'
"visible='1'" because you don't want to list soft-deleted or invisible threads.

You don't need
Code:

$forumids = implode ("', '", get_noaccess_forumids()) ;
then. And you don't need to change includes/functions_misc.php then as well (if you have no restricted forums in the list you want to show).

I'm sure there is a better way, eg put it in $forumids, but this works too.

Now all I need is to list the forum-name too and I'm satisfied :D.

Grendel 04-30-2004 09:59 PM

No idea about the forums?

sketch42 05-29-2004 11:24 AM

Fatal error: Call to undefined function: get_noaccess_forumids() in /home/sketch/public_html/vbtest/member.php on line 395

Onkel_Tom 07-01-2004 09:37 AM

Quote:

// Coming Soon:
Thread Permissions (No need to manually exclude forums!
What about this line in the installation instruction ?
any updates planed ?
long time since last post in this thread ;)

Delirion 07-02-2004 08:48 PM

Errr.... if you check the file, it's been done already. Someone else supplied the forum permissions code and that code is Step 2 of the instructions.

Installed it, and it's working just fine :)

Polo 07-15-2004 08:21 PM

I got this error in 3.0.3

Fatal error: Call to undefined function: get_noaccess_forumids() in /home/user/public_html/member.php on line 481

assassingod 07-15-2004 08:25 PM

Quote:

Originally Posted by Polo
I got this error in 3.0.3

Fatal error: Call to undefined function: get_noaccess_forumids() in /home/user/public_html/member.php on line 481

Did you make the edit to functions_misc.php.

If so, try looking at post #25, https://vborg.vbsupport.ru/showpost....2&postcount=25 :) Hope that helps

Polo 07-15-2004 08:34 PM

oh no i didnt, but i deleted this line

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

and it worked...

there is no special forums i want to exclude..

Polo 07-15-2004 08:36 PM

oh forgot to say thanks ;)

and you should update the file in the first post... it may help some people...

regards,

turbidblue 07-21-2004 08:57 PM

in regards to this,

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

will that automatically detect forums that some users are not allowed to view? ot do i need to add the forum ids?

if i need to add them, where in that code??

It works fine on my forum, 3.0.3, until i click on my name and view profile from a thread...then i get an error...

any help??

Logikos 07-24-2004 09:20 PM

/me clicks install!

Logikos 07-31-2004 11:51 AM

is there a way to make it in only certain fourmids? seprate with commas?

assassingod 07-31-2004 12:19 PM

Yep, delete
PHP Code:

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

and replace
PHP Code:

    WHERE postuserid '$userinfo[userid]' AND forumid NOT IN ('$forumids'

with

PHP Code:

    WHERE postuserid '$userinfo[userid]' AND forumid IN ('x,y,z'

Then use the forumids you wish to use there, in replacement of x,y,z :)

Logikos 07-31-2004 12:21 PM

you rock man!!! If i could click the install button twice i would :p

assassingod 07-31-2004 12:26 PM

Thanks:ps

Logikos 08-03-2004 02:23 AM

Quote:

Originally Posted by assassingod
Thanks:ps

Theres a slight bug it seems. When i place this code.

PHP Code:

$getthreads $DB_site->query("
        SELECT threadid,title,dateline
        FROM " 
TABLE_PREFIX ."thread
        WHERE postuserid = '
$userinfo[userid]' AND forumid IN ('27,28,29,30,31,32,11,5')
        ORDER BY dateline DESC
"
); 

It only shows the threads in ID 27. Which is the first on the list. It doesn't grab the rest. Any reason why?

Logikos 08-06-2004 06:27 AM

Any way to do this so just the threads a user starts show up in the profile?

LizerisCHN 08-10-2004 12:12 AM

Quote:

Originally Posted by Live Wire
Theres a slight bug it seems. When i place this code.

PHP Code:

$getthreads $DB_site->query("
        SELECT threadid,title,dateline
        FROM " 
TABLE_PREFIX ."thread
        WHERE postuserid = '
$userinfo[userid]' AND forumid IN ('27,28,29,30,31,32,11,5')
        ORDER BY dateline DESC
"
); 

It only shows the threads in ID 27. Which is the first on the list. It doesn't grab the rest. Any reason why?


Your code would need to look like this:

PHP Code:

$getthreads $DB_site->query("
        SELECT threadid,title,dateline
        FROM " 
TABLE_PREFIX ."thread
        WHERE postuserid = '
$userinfo[userid]' AND forumid IN ('27','28','29','30','31','32','11','5')
        ORDER BY dateline DESC
"
); 

It needs to define each forumid separately.

Lee Wilde 11-17-2004 03:51 PM

Very cool. Installed in minutes, thanks!

MajorFm.com 01-15-2005 01:24 PM

Great hack... however

Step 2:
Open includes/functions_misc.php and find (1 change)
Code:

// ###################### Start microtime_diff #######################
Above, add:

Code:

// ###################### Start no_access_forumids #######################
// This was originally coded by g-force2k1 - Thanks very much buddy!:)
// gets which forumids users dont have access too
function get_noaccess_forumids (  )
{
    global $forumcache, $bbuserinfo ;

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

    return $_naforumids ;
}

I get the following error

Code:

Fatal error: Cannot redeclare get_noaccess_forumids() (previously declared in /usr/local/apache/www/crazyapes/majorfmforum.com/htdocs/forum/includes/functions_user.php:517) in /usr/local/apache/www/crazyapes/majorfmforum.com/htdocs/forum/includes/functions_misc.php on line 18

Ghostsuit 02-11-2005 12:42 AM

Looks like you have the same function installed twice. Once in function_user.php and once in function_misc.php

Try removing the misc one and see what happens.

iceytdot 05-10-2005 06:55 AM

works after i took out that line causing everyone trouble! clicks install thanks for tha hack!

Thug 07-09-2005 09:02 AM

anyone help me

i was installing user threads in (vb3) hack

but i installed user threads(vb3) hack and well i have this error
http://www.oh-twadi.com/forum/member.php?u=24
^^not there its just example of where it was error below

PHP Code:

Fatal errorCall to undefined function: get_noaccess_forumids() in /home/ohtwadi/public_html/upload/member.php on line 421 

it told me to add this

PHP Code:

// THREADS
// By assassingod
// Dont forget to change the variables on line 394

$limit '5'// Enter the number of maximum threads you want to be displayed
$forumids implode ("', '"get_noaccess_forumids()) ; 

last line = error line 421
</b>

Thug 07-09-2005 09:03 AM

also i dont get this

PHP Code:

// Dont forget to change the variables on line 394 

^^^

yoyoyoyo 07-09-2005 12:32 PM

installed flawlessly in 3.0.7 - thanks!

**clicks install**

Thug 07-10-2005 03:12 PM

i have various errors can someone help me

1st error
while creating new thread
http://www.oh-twadi.com/forum/newthr...=newthread&f=7

PHP Code:

Fatal errorCannot redeclare get_noaccess_forumids() (previously declared in /home/ohtwadi/public_html/forum/includes/functions_misc.php:19in /home/ohtwadi/public_html/forum/includes/functions_misc.php on line 34 

2nd error
while veiwing a profile
http://www.oh-twadi.com/forum/member.php?u=1
PHP Code:

Fatal errorCall to undefined function: get_noaccess_forumids() in /home/ohtwadi/public_html/forum/member.php on line 422 

can you help me at all

yoyoyoyo 07-10-2005 05:20 PM

I worked this out with Thug, and got it working for him. If anyone else wants to get this working simply follow the attached instructions instead.

Thug 09-22-2005 07:17 PM

still got a problem now
my members profile shows all threads,even though the limit is at 1
heres my codings

PHP Code:

// THREADS
// By assassingod
// functionality fixed by yoyoyoyo
$limit '1';    // Enter the number of maximum threads you want to be displayed

 
$getthreads $DB_site->query("
        SELECT threadid,title,dateline
        FROM " 
TABLE_PREFIX ."thread
        WHERE postuserid = '
$userinfo[userid]' AND forumid IN ('1','2','')
        ORDER BY dateline DESC
"
); // enter the forums you wish to exclude in the above array  where the numbers represent the forum ID's

    
while($threads $DB_site->fetch_array($getthreads))
    {
        
exec_switch_bg();
        
$threads['date'] = vbdate($vboptions['dateformat'],$threads['dateline']);
        
$threads['time'] = vbdate($vboptions['timeformat'],$threads['dateline']);

        eval(
'$usersthreads .= "' fetch_template('memberinfo_usersthreads') . '";');
    } 


Scribbller 09-27-2005 08:05 AM

Is it possible that threads from a particular forum be displayed like it happens on VB.org threads in hack forums are displayed in profile.


All times are GMT. The time now is 04:21 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.01412 seconds
  • Memory Usage 1,855KB
  • 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
  • (5)bbcode_code_printable
  • (13)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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