PDA

View Full Version : If a Thread Doesn't Contains Any Links or attacments ....


fai99al99
12-31-2014, 04:16 AM
Hello,

I want to add a code that make this happend:

if a thread doesn't contains any links or attacments :
Adsense code here

else
Don't show


How to do this!?

ozzy47
12-31-2014, 04:26 AM
I don't believe that is something that can be easily added. What is your skill set with PHP and HTML?

fai99al99
12-31-2014, 04:52 AM
Good at HTML
PHP I just start to learn it actually

There is code Iam trying to make it work, but i guess Iam doing it all wrong !

$pagetext = $this->fetch_field('pagetext', '$this->post['message']');
if ( !stristr($pagetext,'[url') || !stristr($pagetext,'[URL' || !stristr($pagetext,'[ATTACH') || !stristr($pagetext,'[attach') )
{
}

else