The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Condition "if you have posted in this thread
Hi i'm making a plugin in the showthread hook and i'm looking for a condition (read title)
Or an array of who post in the thread i can make something like this PHP Code:
|
#2
|
|||
|
|||
If you're using hook showthread_complete, you could do something like make another plugin using hook showthread_postbit_create and code like:
Code:
if ($vbulletin->userinfo['userid'] == $post['userid']) { $user_posted = true; } then just use if ($user_posted) { ... |
Благодарность от: | ||
TTayfun |
#3
|
||||
|
||||
It works great thank you kh99 you are the best
--------------- Added [DATE]1343064496[/DATE] at [TIME]1343064496[/TIME] --------------- Just a last question: in the other thread you gave me the array $ids that contains all the postid that you see, how can i remove my postid from that array? For example in thread 1 there are 5 post. The firs post is your, the $ids array contains these post ids: 1, 2, 3, 4, 5. The post id 1 is the one of your post. How do i remove it? |
#4
|
|||
|
|||
Are you asking how to remove a value from an array, or are you asking how to keep your posts from displaying?
|
#5
|
||||
|
||||
How to remove your posts form the array $ids (that you gave me in the other thread)
|
#6
|
|||
|
|||
Oh, I see - well, you could modify the above plugin code like this:
Code:
if ($vbulletin->userinfo['userid'] == $post['userid']) { $user_posted = true; $user_postids[] = $post['postid']; } then do something like $ids = array_diff($ids, $user_postids). |
#7
|
||||
|
||||
Awesome thank you
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|