PDA

View Full Version : Hook ... forumbit_display


SorentoUltimate
09-14-2009, 08:37 PM
Hi all, i need your help

I want to know two thinks at forumbit_display Hook

1st ... Can User ADD NEW THREAD to that Forum
2nd ... User ALLREADY Subscribed to that Forum or NOT

I try $show['newthreadlink'] and $show['subscribed_to_forum']
but don't work there...

Lynne
09-14-2009, 10:00 PM
If you look at the code, you'll see that the hook forumbit_display is in the function construct_forum_bit. It is called around line 433 of forumdisplay.php. $show['newthreadlink'] is defined on line 236 (I didn't look up the other) which would lead you to think it should be available, *however*, the show variables are not passed to the function construct_forum_bit so they aren't available for use there.

SorentoUltimate
09-14-2009, 10:15 PM
If you look at the code, you'll see that the hook forumbit_display is in the function construct_forum_bit. It is called around line 433 of forumdisplay.php. $show['newthreadlink'] is defined on line 236 (I didn't look up the other) which would lead you to think it should be available, *however*, the show variables are not passed to the function construct_forum_bit so they aren't available for use there.

thanks Lynne,
one more question, is there any way to have information i need at forumbit_display Hook ?

Lynne
09-14-2009, 10:33 PM
You can pass it in the arrays that are passed to the function, I would think. That's what I have done before.

SorentoUltimate
09-14-2009, 11:21 PM
You can pass it in the arrays that are passed to the function, I would think. That's what I have done before.

i try that, ok with newthreadlink but not work for subscribed_to_forum .

any idea??

Lynne
09-15-2009, 01:44 AM
I don't know. It's defined right around where newthreadlink is defined, so you should be able to pass it the same way also.