Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: rakicko on January 03, 2011, 10:55:49 AM

Title: auto code live links
Post by: rakicko on January 03, 2011, 10:55:49 AM
I found this mod for smf 1.1.8 ..is there any mod for smf 2.0.rc.4?
Title: Re: auto code live links
Post by: Masterd on January 03, 2011, 12:52:27 PM
I can create this for. you in the several days.
Title: Re: auto code live links
Post by: rakicko on January 03, 2011, 01:05:02 PM
koliko se secam ..ti znas srpski..pa jel bi to naplatio..i ako bi..koliko?
Title: Re: auto code live links
Post by: DoctorMalboro on January 03, 2011, 01:25:21 PM
Quote from: rakicko on January 03, 2011, 01:05:02 PMkoliko se secam ..ti znas srpski..pa jel bi to naplatio..i ako bi..koliko?
:o

It can't be that hard actually... i would try to help you if Masterd don't mind me :)
Title: Re: auto code live links
Post by: rakicko on January 03, 2011, 01:29:18 PM
great..can you help me?
Title: Re: auto code live links
Post by: Masterd on January 03, 2011, 01:32:01 PM
Quote from: DoctorMalboro on January 03, 2011, 01:25:21 PM
Quote from: rakicko on January 03, 2011, 01:05:02 PMkoliko se secam ..ti znas srpski..pa jel bi to naplatio..i ako bi..koliko?
:o

Serbian language. Croatian and Serbian are almost the same.
Title: Re: auto code live links
Post by: DoctorMalboro on January 03, 2011, 01:39:15 PM
./Sources/Subs.php

find:
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


and replace with...
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<a href="$1" class="bbc_link new_win" target="_blank">$1</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'<pre style="display: inline;">http://</pre>\') !== 0 && strpos($data, \'<pre style="display: inline;">https://</pre>\') !== 0)
$data = \'<pre style="display: inline;">http://</pre>\' . $data;
'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<a href="$1" class="bbc_link new_win" target="_blank">',
'after' => '</a>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'<pre style="display: inline;">http://</pre>\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),
Title: Re: auto code live links
Post by: rakicko on January 03, 2011, 05:34:22 PM
nothing..still the same
Title: Re: auto code live links
Post by: DoctorMalboro on January 03, 2011, 06:07:20 PM
array(
'tag' => 'url',
'type' => 'unparsed_content',
'content' => '<pre style="display: inline;"><a href="$1" class="bbc_link new_win" target="_blank">$1</a></pre>',
'validate' => create_function('&$tag, &$data, $disabled', '
$data = strtr($data, array(\'<br />\' => \'\'));
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
),
array(
'tag' => 'url',
'type' => 'unparsed_equals',
'before' => '<pre style="display: inline;"><a href="$1" class="bbc_link new_win" target="_blank">',
'after' => '</a></pre>',
'validate' => create_function('&$tag, &$data, $disabled', '
if (strpos($data, \'http://\') !== 0 && strpos($data, \'https://\') !== 0)
$data = \'http://\' . $data;
'),
'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
'disabled_after' => ' ($1)',
),


Try with this...
Title: Re: auto code live links
Post by: rakicko on January 03, 2011, 06:37:39 PM
no acctuly ..this work..but some new look my links in code have..thanks man
Title: Re: auto code live links
Post by: rakicko on January 03, 2011, 08:26:02 PM
how to make a solved topic ?
Title: Re: auto code live links
Post by: Arantor on January 04, 2011, 03:55:29 AM
Can't mark ones solved in this board.
Title: Re: auto code live links
Post by: Masterd on January 04, 2011, 07:50:46 AM
Here's the improved version:

http://www.simplemachines.org/community/index.php?topic=415898.0 (http://www.simplemachines.org/community/index.php?topic=415898.0)