The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to hide this?
Hello guys,
Maybe someone can help me... I have this code: PHP Code:
I need that: - the link only shows when the user have threads at least in one of that two forums. - If not, the link doesn't appear. It is possible? Please? Or else, I had another idea... The links only appear If the user belongs to a specific group. |
#2
|
||||
|
||||
You didn't post the full code. We would need to see the whole thing in order to suggest how to modify it to get what you want.
|
#3
|
|||
|
|||
Thank you for helping me Lynne
Here is full plugin code: PHP Code:
|
#4
|
||||
|
||||
Hmm, nowhere in that code do you check for threads at all. If you put a query in there that checks to see if the user has any posts (or is it only starting threads?), then that is going to add one query per post on the page (20 extra queries?). Is that an issue for you?
|
#5
|
|||
|
|||
hello Lynne, thank you for your reply!
hmmm, 20 extra queries is too many no? but ok, I can try to see how the server handles. can you help me? and is starting threads only. Thank you! |
#6
|
||||
|
||||
Just write a query that looks at the 'thread' table and counts how many times the $post[userid] = thread.postuserid. Then, use the count in a condition around the template_hook code (if $variable >= 1, then.....)
|
#7
|
|||
|
|||
Hello Lynne, thank you for your reply, but I dont have any knowledge to write a query.
Can you help me? |
#8
|
||||
|
||||
Actually, I'm a trial and error query writer which is why I do not like writing queries for people - they never work the first time. (And yes, I have killed my site a few times because of this!)
|
#9
|
|||
|
|||
Hello Lynne,
I already have this working BirdOPrey5 has helped me: https://vborg.vbsupport.ru/showthread.php?t=268443 Thank you anyway for your help mate! |
#10
|
||||
|
||||
Glad you got it working!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|