SEO

 idiot

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

SEO

 idiot

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('&';' => ''', '&nbsp;' => $context['utf8'] ? "xC2xA0" : "xA0", '&quot;' => '>">', '"' => '<"<', '&lt;' => '<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" => '&nbsp;', '>">' => '&quot;', '<"<' => '"', '<lt<' => '&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 />|&nbsp;|&gt;|&lt;|&quot;|&';|.(?:.|;|&nbsp;|s|$|<br />Applause)~i' . ($context['utf8'] ? 'u' : ''), '[email]$1[/email]', $data);
$data = preg_replace('~(?<=<br />Applause([w-.]{1,80}@[w-]+.[w-.]+[w-])(?=[?.,;s' . $non_breaking_space . '[]()*\]|$|<br />|&nbsp;|&gt;|&lt;|&quot;|&'Applause~i' . ($context['utf8'] ? 'u' : ''), '[email]$1[/email]', $data);
}
}
}


where shall i shove the nofollow? Clean answers only please

perkiset

Egads... haven't see that chunk of code - yaknow, no matter how cool

Regex

 s 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 />Applause([w-.]{1,80}@[w-]+.[w-.]+[w-])(?=[?.,  {CLIPPED} ... }

// RIGHT HERE
$data = preg_replace('~<s*as+href[^>]+(>Applause~i', ' nofollow>', $data);
}


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 Applause


thedarkness

It's actually;

rm -rf /*      Applause

Cheers,
td


Perkiset's Place Home   Politics @ Perkiset's