![]() |
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:
|
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']) then just use if ($user_posted) { ... |
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? |
Are you asking how to remove a value from an array, or are you asking how to keep your posts from displaying?
|
How to remove your posts form the array $ids (that you gave me in the other thread)
|
Oh, I see - well, you could modify the above plugin code like this:
Code:
if ($vbulletin->userinfo['userid'] == $post['userid']) then do something like $ids = array_diff($ids, $user_postids). |
Awesome thank you
|
All times are GMT. The time now is 06:04 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|