RE: Convert Text to Images to Protect your Email from Search
Why not look at a Helper file and see how its just a simple php file with functions in it. Maybe give it a try? -Original Message- From: hoss7 [mailto:hoss...@gmail.com] Sent: October-10-10 4:46 AM To: CakePHP Subject: Re: Convert Text to Images to Protect your Email from Search yes but i am new in cake,can you convert this code to helper Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
by the way: http://book.cakephp.org/view/101/Creating-Helpers with this you MUST be able to do it yourself. On 10 Okt., 10:27, euromark wrote: > cake is still php > and php is still a programming language > > this is one of the easiest things to do actually. > i mean there are like 100 things are more complicated than > throwing this in a helper > and changing the one line of code here. > it's like the 1+1 in first class. > > if you are still not capable, i am afraid you should think of doing > something else. > coding might not be the right thing for you after all > > On 10 Okt., 10:14, Jeremy Burns | Class Outfit > > > > wrote: > > With respect, you've been 'new to CakePHP' for six months now (I checked > > back through the email history). Isn't it about time you stepped up to the > > plate a bit like we all have to? > > > Jeremy Burns > > Class Outfit > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > On 10 Oct 2010, at 08:16, hoss7 wrote: > > > > yes but i am new in cake,can you convert this code to helper > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others > > > with their CakePHP related questions. > > > > You received this message because you are subscribed to the Google Groups > > > "CakePHP" group. > > > To post to this group, send email to cake-php@googlegroups.com > > > To unsubscribe from this group, send email to > > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
cake is still php and php is still a programming language this is one of the easiest things to do actually. i mean there are like 100 things are more complicated than throwing this in a helper and changing the one line of code here. it's like the 1+1 in first class. if you are still not capable, i am afraid you should think of doing something else. coding might not be the right thing for you after all On 10 Okt., 10:14, Jeremy Burns | Class Outfit wrote: > With respect, you've been 'new to CakePHP' for six months now (I checked back > through the email history). Isn't it about time you stepped up to the plate a > bit like we all have to? > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 10 Oct 2010, at 08:16, hoss7 wrote: > > > > > yes but i am new in cake,can you convert this code to helper > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com For more options, visit this group > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
With respect, you've been 'new to CakePHP' for six months now (I checked back through the email history). Isn't it about time you stepped up to the plate a bit like we all have to? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Oct 2010, at 08:16, hoss7 wrote: > yes but i am new in cake,can you convert this code to helper > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
yes but i am new in cake,can you convert this code to helper Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
On Fri, Oct 8, 2010 at 4:39 AM, hoss7 wrote: > i need some helper for convert email to image, > i am new in cakephp. > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > I wouldn't bother with doing all that. app/config/bootstrap.php: /** * Wrap an email address in a formatted span tag in such a way * as to allow for easy javascript translation to a normal mailto: link. * * this: * f...@bar.net, 'email foo!', 'some title text' * becomes: * email foo! [ foo AT bar DOT net ] * * @param string address email address * @param string textlink text * @param string title link title * @return string obfuscated address, wrapped in i span tag **/ function obfuscateEmail($address, $text= null, $title = null, $subject = null) { if (empty($address)) return null; $regexp = '^[_a-z0-9-]+(\.[_a-z0-9-]+)*...@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$'; $search = Array('@', '.'); $replace = Array(' AT ', ' DOT '); $class = 'Obfuscated'; if (is_string($address) && eregi($regexp, $address)) { $obfuscated = str_replace($search, $replace, $address); if (!is_null($subject)) { $title .= "|${subject}"; } return ''.trim("${text} [ ${obfuscated} ]").''; } return $address; } app/webroot/js/global.js (jquery): $(function() { ... /* Obfuscated email addresses. See bootstrap.php */ $('.Obfuscated').each(deObfuscateEmail); ... }); /** * De-obfuscate printed email addresses which are of the type: * * * some link text [ someone AT gmail DOT com ] * * * The braces around the address part are hard-wired here; probably shouldn't be **/ function deObfuscateEmail(i) { var content = $(this).text(); /* grab the part inside the braces, swap out placeholders, and trim */ var obfuscated = content.match(/\[(.*)\]/); var address = obfuscated[1] .replace(' AT ', '@') .replace(new RegExp(' DOT ', 'g'), '.') .replace(/^\s+|\s+$/g, ''); /* get everything before the braces and trim */ var text = content.match(/.?[^[]+/); text = (text[0] != content) ? text[0].replace(/^\s+|\s+$/g, '') : address; // if there's no text part, use the address var title = $(this).attr('title') || ''; /* subject may be concatenated with title */ if (title.indexOf('|') >= 0) { var parts = title.split('|'); title = parts[0]; address += '?subject=' + parts[1]; } $(this).replaceWith($('' + text + '')); } Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
did you even try? On 9 Okt., 17:55, hoss7 wrote: > i am create this test code: > function CenterImageString($image, $image_width, $string, $font_size, > $y, $color) > { > $text_width = imagefontwidth($font_size)*strlen($string); > $center = ceil($image_width / 2); > $x = $center - (ceil($text_width/2)); > $bgColor = imagecolorallocate($image, 255, 255, 255); > $txtColor = imagecolorallocate($image, 0, 0, 0); > imagestring($image, $font_size, $x, $y, $string, $txtColor); > } > ?> > header("Content-type: image/png"); > $picture = imagecreate(200,80); > $black = ImageColorAllocate ($picture, 255, 255, 255); > CenterImageString($picture, 100, "test", 2, 45, $black); > ImagePng ($picture); > ?> > > but i cant convert to cakephp helper,please help me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
i am create this test code: but i cant convert to cakephp helper,please help me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
if you succeed you might want to post your result i am sure it can be useful to other as well :) or we can give you ideas for improvements On 8 Okt., 13:47, hoss7 wrote: > thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
you could create a cakephp helper, though, which does exactly that, what xoubaman proposes. not that difficult, i guess. On 8 Okt., 11:47, Xoubaman wrote: > It's a PHP task, not related to Cake. > > Take a look athttp://www.php.net/manual/en/function.imagefttext.php > > On Oct 8, 10:39 am, hoss7 wrote: > > > i need some helper for convert email to image, > > i am new in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Convert Text to Images to Protect your Email from Search
It's a PHP task, not related to Cake. Take a look at http://www.php.net/manual/en/function.imagefttext.php On Oct 8, 10:39 am, hoss7 wrote: > i need some helper for convert email to image, > i am new in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Convert Text to Images to Protect your Email from Search
i need some helper for convert email to image, i am new in cakephp. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en