steadicamop
02-25-2007, 08:50 PM
Hi all,
I'm in the progress of making a product to stop leeching from attachments (I found a member who hot-linked to three attachments, and was leeching bandwidth) - so I've used the hook system to create a referrer check to check the url is from the forum, if not - show a message.
I'm debating whether it's worth adding a DB query to find out which post the attachment is in - so I can put a link in to it (in a way forcing you to view the forum). My question is :
Can you execute a MySQL query inside a template?
How do I make the code required to associate the clicked attachment link with the post, then output the link for that post?
Hope that makes sense.....
Thanks!
Jason
I'm in the progress of making a product to stop leeching from attachments (I found a member who hot-linked to three attachments, and was leeching bandwidth) - so I've used the hook system to create a referrer check to check the url is from the forum, if not - show a message.
I'm debating whether it's worth adding a DB query to find out which post the attachment is in - so I can put a link in to it (in a way forcing you to view the forum). My question is :
Can you execute a MySQL query inside a template?
How do I make the code required to associate the clicked attachment link with the post, then output the link for that post?
Hope that makes sense.....
Thanks!
Jason