Help with restrict images in sig addon tweaked by codezwiz

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Help with restrict images in sig addon tweaked by codezwiz
diabluntd
CZ Newbie
diabluntd has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 31, 2003
0.00 posts per day
Posts: 6
Points: 784
   
This addon restricts the size of a users signature but it seems to only work if they use bbcode IMG tags. I'm wondering if anyone can help me figure out how to also have it check the size if they use the html img src= to link their pic.

if( preg_match_all("#\[img(:$signature_bbcode_uid)?\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img(:$signature_bbcode_uid)?\]#sie", $signature, $matches) )
Here is some of the code. Any idea on how to add another else statement and how the code should go to have it check for img src= ?

Any help is greatly appreciated.
Thanks


Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
This isnt tested but you can give it a try just a make a back up

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




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: Help with restrict images in sig addon tweaked by codezw
diabluntd
CZ Newbie
diabluntd has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 31, 2003
0.00 posts per day
Posts: 6
Points: 784
   
Thanks a lot for the reply man, except i think it's a bit off.
What users put in for the IMG is this
[IMG]http://www.blah.com/mysig.gif[/IMG]

that's what the the addon currently checks.

what i'd like to also check is the html version of that
<img src="http://www.blah.com/mysig.gif>


in your code i don't see a src= in the beginning and at the end there's a <img> instead of just a >

Thanks again for your help. I'm sure i'm not the only one who'd like to restrict signatures in the nuke community and it's pretty common for users to use html to link images so this would be a great addition to this addon and phpnuke itself.


Back to top Reply with quote
#4   re: Help with restrict images in sig addon tweaked by codezw
diabluntd
CZ Newbie
diabluntd has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Oct 31, 2003
0.00 posts per day
Posts: 6
Points: 784
   
I took a break from this because i couldn't figure it out but now i'm back. If there's anyone out there who is looking for a little something to work on could you please help me out? This may be pretty quick for someone that knows code pretty well so it might not even take that long.

I also noticed that the restrict sig mod doesn't check for filesize. Does anyone know how to add that functionality to this?



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum