
![]() |
SEOidiot
anyone (hi perk!) any idea how i can make it so all links in a post are nofollowed?
though maybe i could do something with the censored words but i dont think thatll work SEOidiot
ok its in subs.
php.... // Are we inside tags that should be auto linked? $no_autolink_area = false; if (!empty($open_tags)) { foreach ($open_tags as $open_tag) if (in_array($open_tag['tag'], $no_autolink_tags)) $no_autolink_area = true; } if (!$no_autolink_area) { // Parse any URLs.... have to get rid of the @ problems some things cause... stupid email addresses. if (!isset($disabled['url']) && (strpos($data, '://') !== false || strpos($data, 'www.') !== false)) { // Switch out quotes really quick because they can cause problems. $data = strtr($data, array('&';' => ''', ' ' => $context['utf8'] ? "xC2xA0" : "xA0", '"' => '>">', '"' => '<"<', '<' => '<lt<')); $data = preg_replace(array('~(?<=[s>.(;'"]|^)((?:http|https|ftp|ftps)://[w-_%@:|]+(?:.[w-_%]+)*(?::d+)?(?:/[w-_~%.@,?&;=#+:'\\]*|[({][w-_~%.@,?&;=#(){}+:'\\]*)*[/w-_~%@?;=#}\\])~i', '~(?<=[s>('<]|^)(www(?:.[w-_]+)+(?::d+)?(?:/[w-_~%.@,?&;=#+:'\\]*|[({][w-_~%.@,?&;=#(){}+:'\\]*)*[/w-_~%@?;=#}\\])~i'), array('[url]$1[/url]', '$1'), $data); $data = strtr($data, array(''' => '&';', $context['utf8'] ? "xC2xA0" : "xA0" => ' ', '>">' => '"', '<"<' => '"', '<lt<' => '<')); } // Next, emails... if (!isset($disabled['email']) && strpos($data, '@') !== false) { $data = preg_replace('~(?<=[?s' . $non_breaking_space . '[]()*\;>]|^)([w-.]{1,80}@[w-]+.[w-.]+[w-])(?=[?,s' . $non_breaking_space . '[]()*\]|$|<br />| |>|<|"|&';|.(?:.|;| |s|$|<br /> ![]() $data = preg_replace('~(?<=<br /> ![]() ![]() } } } where shall i shove the nofollow? Clean answers only please perkiset
Egads... haven't see that chunk of code - yaknow, no matter how cool
Regexs are they are bloody ugly...Anyhoo, here'd be my guess without having tested it: // Next, emails... if (!isset($disabled['email']) && strpos($data, '@') !== false) { $data = preg_replace('~(?<=[?s' . $non_breaking_space . '[]()*\;>]|^)([w-.] {CLIPPED} ... $data = preg_replace('~(?<=<br /> ![]() // RIGHT HERE $data = preg_replace('~<s*as+href[^>]+(> ![]() } CAVEAT: Haven't had a second cuppajoe yet nor am I on my game yet, so that could actually be a code for "Format C:" - use at your own risk ![]() thedarkness
It's actually;
rm -rf /* ![]() Cheers, td |

Thread Categories

![]() |
![]() |
Best of The Cache Home |
![]() |
![]() |
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads