h2ojunkie
06-04-2008, 04:04 PM
I've been working with a plugin that runs on attachment.php at the attachment_start hook.
I'm looking for a way to prevent this plugin from executing when a user is viewing showthread.php or showpost.php.
For example, a user embeds a attachment image in a post using "http://www.mydomain.com/forum/attachment.php?attachmentid=8015&d=1212540637" I don't want the plugin to run.
I've tried using a this_script conditional to check for showthread or showpost, however that isn't working. I'm not an expert at this, but my assumption is this_script won't work because even though they are viewing showthread, attachment.php is still called in the link which makes this_script = attachment.
Can anyone suggest another way to prevent the plugin from running in this situation?
Thanks in advance!
I'm looking for a way to prevent this plugin from executing when a user is viewing showthread.php or showpost.php.
For example, a user embeds a attachment image in a post using "http://www.mydomain.com/forum/attachment.php?attachmentid=8015&d=1212540637" I don't want the plugin to run.
I've tried using a this_script conditional to check for showthread or showpost, however that isn't working. I'm not an expert at this, but my assumption is this_script won't work because even though they are viewing showthread, attachment.php is still called in the link which makes this_script = attachment.
Can anyone suggest another way to prevent the plugin from running in this situation?
Thanks in advance!