View Full Version : Please help me [Hide Photo]
v123shine
10-09-2012, 06:33 AM
I using this code to hide image below 1 august 2012
if ($post['dateline'] < 1343797200) //If the date is less than August 1, 2012
{
$this->post['message'] = preg_replace("/<img.+?\>/i" , "<img $1 />", $this->post['message']);
}
Hook location: posbit_diplay_complete
My question is: How to disable image below 1 august 2012 only on category 5, 9, 13, 18, 27.
Please help me, thank you.
Lynne
10-09-2012, 03:29 PM
You haven't said what the actual problem is. You are using that code and...????
v123shine
10-10-2012, 07:39 AM
Forgive me Lynne if my question not clear because my english language not so good :(
I want to hide/disable image below 1 august 2012 only in this category 5, 9, 13, 18, 27.
If other category (example category 35, 38, 45) the image still appear.
How to fix below code?
if ($post['dateline'] < 1343797200) //If the date is less than August 1, 2012
{
$this->post['message'] = preg_replace("/<img.+?\>/i" , "<img $1 />", $this->post['message']);
}
Thank you
Simon Lloyd
10-10-2012, 08:06 AM
when you say "category" do you mean forum? if you do then wrap it in a condition like thisif (is_member_of($vbulletin->userinfo,3,4,5,6,7,9,10,13,15,16,17,18,19,20))
{
SHOW IMAGES;
}else{
DONT SHOW IMAGES;
}
v123shine
10-10-2012, 08:18 AM
Dear Simon Lloyd, i created a little plugin using Hook location: posbit_diplay_complete
Can you help me, please!
Simon Lloyd
10-10-2012, 08:34 AM
help you with what? you haven't said!!, and the code i gave you above is for usergroups, it should have beenif (in_array($forum['forumid'], array(1,2,3,6)))for your forums :)
v123shine
10-10-2012, 02:03 PM
thank you so much Simon Lloydyou, you fix my problem :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.