SMF Linkleri Kisalt(Trim URL)

Asi Ruh

Kayıtlı Üye
SMF Linkleri Kisalt(Trim URL)


Subs.php de bu kodu bul.

PHP:
// No type means 'parsed_content'.
        if (!isset($tag['type']))
        {
            // !!! Check for end tag first, so people can say "I like that [i] tag"?
            $open_tags[] = $tag;
            $message = substr($message, 0, $pos) . $tag['before'] . substr($message, $pos1);
            $pos += strlen($tag['before']) - 1;
        }

öncesine ekle;

PHP:
// Trim the urls
        elseif (($tag['type'] == 'unparsed_content' && $tag['tag'] == 'url'))
        {
            $pos2 = stripos($message, '[/' . substr($message, $pos + 1, strlen($tag['tag'])) . ']', $pos1);
            if ($pos2 === false)
                continue;
 
            $data = substr($message, $pos1, $pos2 - $pos1);
 
            if (!empty($tag['block_level']) && substr($data, 0, 6) == '<br />')
                $data = substr($data, 6);
 
            if (isset($tag['validate']))
                $tag['validate']($tag, $data, $disabled);
 
            $code = strtr($tag['content'], array('$1' => $data, '$2' => urlTrim($data)));
            $message = substr($message, 0, $pos) . $code . substr($message, $pos2 + 3 + strlen($tag['tag']));
            $pos += strlen($code) - 1;
        }

bu kodu bul;

PHP:
// Creates an image/text button
function create_button($name, $alt, $label = '', $custom = '')

sonrasına ekle;

PHP:
// Shorten url.
function urlTrim($url)
{
    global $modSettings;
 
    $modSettings['urlLength'] = isset($modSettings['urlLength']) ? $modSettings['urlLength'] : 50;
 
    // Check the length of the url
    if (strlen($url) > $modSettings['urlLength'])
    {
        $break = $modSettings['urlLength'] / 2;
        $urlNew = substr($url, 0, $break) . '...' . substr($url, -$break);
    }
    else
        $urlNew = $url;
 
    return $urlNew;
}

bu kodu bul;

PHP:
array(
                'tag' => 'url',
                'type' => 'unparsed_content',
                'content' => '<a href="$1" target="_blank">$1</a>',
                'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
            ),

bunlarla değiş;

PHP:
array(
                'tag' => 'url',
                'type' => 'unparsed_content',
                'content' => '<a href="$1" target="_blank">$2</a>',
                'validate' => create_function('&$tag, &$data, $disabled', '$data = strtr($data, array(\'<br />\' => \'\'));'),
            ),

Subs-Post.php de bu kodu gör;

PHP:
elseif ($hasEqualSign)
            $replaces['[' . $matches[1][$k] . '=' . $matches[2][$k] . ']'] = '[' . $this_tag . '=' . $replace . ']';

öncesine ekle;

PHP:
elseif ($embeddedUrl && $matches[1][$k] == 'url' && !$hasEqualSign)
            $replaces['[' . $matches[1][$k] . ']' . $matches[2][$k] . '[/' . $matches[3][$k] . ']'] = '[' . $this_tag . ']' . $replace . '[/' . $this_close . ']';

ManagePosts.php bu kodlar? bul;


PHP:
    'disabledBBC' => implode(',', array_diff($bbcTags, $_POST['enabledTags'])),

öncesine ekle;

PHP:
'urlLength' => empty($_POST['urlLength']) ? 50 : (int)$_POST['urlLength'],

Admin.template.php de bu kodlar? bul;

PHP:
</tr><tr class="windowbg2">
                <th width="50%" align="right"><label for="autoLinkUrls_check">', $txt['autoLinkUrls'], '</label>:</th>
                <td>
                    <input type="checkbox" name="autoLinkUrls" id="autoLinkUrls_check"', empty($modSettings['autoLinkUrls']) ? '' : ' checked="checked"', ' class="check" />
                </td>
            </tr><tr class="windowbg2">

bunlarla de?i?;

PHP:
</tr><tr class="windowbg2">
                <th width="50%" align="right"><label for="autoLinkUrls_check">', $txt['autoLinkUrls'], '</label>:</th>
                <td>
                    <input type="checkbox" name="autoLinkUrls" id="autoLinkUrls_check"', empty($modSettings['autoLinkUrls']) ? '' : ' checked="checked"', ' class="check" />
                </td>
            </tr><tr class="windowbg2">
                <th width="50%" align="right"><label for="urlLength">', $txt['urlLength'], '</label>:</th>
                <td>
                    <input type="text" name="urlLength" id="urlLength" value="', empty($modSettings['urlLength']) ? '50' : $modSettings['urlLength'], '" size="6" />
                </td>
            </tr><tr class="windowbg2">

Modifications.turkish.php 'nin bitimine bu kodlar? ekleyin;

PHP:
// TrimUrl
$txt['urlLength'] = '(x) karakterden uzun linkleri kisalt.';

http://custom.simplemachines.org/mods/index.php?mod=425

MODU İNDİR Z?PTEN ÇIKAR İÇİNDE install.php dosyasI var onuda SQL Sorgusu ile phpmyadmin'den çalIŞTIR
 
bayigram takipçi satın al instagram beğeni satın al instagram takipçi satın al tiktok takipçi satın al Buy Followers bugün haber
vozol
Geri
Üst