PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
diabluntd
Hangin' Around


Joined: Mar 19, 2004
Posts: 31

PostPosted: Mon Jun 07, 2004 12:36 pm Reply with quote Back to top

###############################################
## Hack Title: Restrict images in signatures
## Hack Version: 0.1.1
## Author: Freakin' Booty ;-P
## Description: Restrict the width, the height and the number of images in signatures. Everything
## is configurable from the Administration Control Panel.


currently this addon only works if a user uses bbcode IMG tags around the image url. I'd like to expand it to also check sigs that use html's <img src=........> format. Here is the line that is setup to check the IMG tags. Anyone out there know how i should format this for img src?

Code:
if( preg_match_all("#\[img(:$signature_bbcode_uid)?\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img(:$signature_bbcode_uid)?\]#sie", $signature, $matches) )


Now, i can see the beginning part for the opening IMG tag...
Code:
[img(:$signature_bbcode_uid)?\]


And the middle part which contains the URL (will remain untouched i assume)
Code:
]((ht|f)tp://)([^\r\n\t<\"]*?)


And finally the closing IMG tag
Code:
[/img(:$signature_bbcode_uid)?\]


Any ideas what the #sie is and if it is playing a part in this?
I've tried a few combinations to replace the img parts with img src but none have worked... probably because i'm not a coder and stink at it. Smile
What's up with the \ before the [ or ]? I'm assuming it's similar to how a \ is needed before a quote which means i can ditch those if i'm using <img src....> right?

Any help would be greatly appreciated and it would really help the community cause this is a great addon but just needs a little bit more to it.
Thanks
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jun 07, 2004 5:01 pm Reply with quote Back to top

Quote:
Any ideas what the #sie is and if it is playing a part in this?
Pattern modifiers -
Only registered users can see links on this board!
Get registered or login to the forums!

Quote:
What's up with the \ before the [ or ]? I'm assuming it's similar to how a \ is needed before a quote which means i can ditch those if i'm using <img src....> right?
Not altogether. Certain characters have special meaning to the PCRE functions. For instance, if you were trying to pattern match a \, you would use \\. To match a (, you would use \(.

I have never used this addon so I would have to study it a bit more. Maybe someone else can help you along in the meantime.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum