PDA

View Full Version : FAQ system variables


darnoldy
02-20-2015, 03:45 PM
Okay, so here's my off-the-wall question for the day...

I only want to show people the FAQ info on features that they can use. For instance, if private messages are limited to a particular user group, I only want that group to see the FAQ on private messages.

It seems like I ought to be able do that with a template conditional in the FAQbit template. I know how to test for the viewer group membership, but I'm stuck on testing for the FAQ item that's being processed. Each item has a variable e.g., id: vb3_register, and in the conditional, it probably should be referenced like $something["vb3_register"]. I just can't figure out what $something[] is.

Can anyone help?

kh99
02-20-2015, 04:15 PM
Hmm...I've actually never looked at that before. It's more complicated than I thought. Anyway, you might try $faqname == 'vb3_private_messages', but it will depend on where you use it.

darnoldy
02-20-2015, 06:22 PM
eh... it is complicated! I'll try that... thanks.

--don

--------------- Added 20 Feb 2015 at 18:45 ---------------

It turns out that $faq[faqname]=='whatever' was what I needed...your reply gave me the hint to get there. Thanks again.