The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Strip Everything except [IMG]url[/IMG] tag
Hi guys, I am hoping that you could help me. I have been googleing for over 2 hours and haven't found my solution.
I am creating a custom search which will enable me to search for all [ IMG]http://www.url.com[/IMG ]. But since I am pulling the information directly from vbulletin.post.pagetext, I am left with entire posts. Is there a PHP function to strip everything except the [ IMG]http://url.com[/IMG ] tags? Thanks in advanced, Sincerely, Jean |
#2
|
||||
|
||||
Regular expressions will be your friend..
PHP Code:
|
#3
|
|||
|
|||
Thanks for your help! But I am getting an error when using it,
Warning: preg_match() [function.preg-match]: Unknown modifier 'g' in /search_media.php on line 88 I tried looking at the preg_match manual but couldn't fix the problem, I will look at it again. |
#4
|
||||
|
||||
Actually you should probably use "preg_match_all" because we are looking for multiples rather singular.
PHP Code:
|
#5
|
|||
|
|||
I am still getting this error:
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier 'g' in /search_media.php on line 92 I must be doing something wrong here... MMM, I'll try looking at the manual again. Thanks for your help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|