SMF Linkleri Kisalt(Trim URL)

Son güncelleme: 15.08.2008 18:36
  • Subs.php de bu kodu bul.
    // No type means 'parsed_content'.
    if (!isset($tag['type']))
    {
    // !!! Check for end tag first, so people can say "I like that tag"?
    $open_tags[] = $tag;
    $message = substr($message, 0, $pos) . $tag['before'] . substr($message, $pos1);
    $pos += strlen($tag['before']) - 1;
    }


    öncesine ekle;
    // 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;
    // Creates an image/text button
    function create_button($name, $alt, $label = '', $custom = '')


    sonras?na ekle;
    // 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;
    array(
    'tag' => 'url',
    'type' => 'unparsed_content',
    'content' => '<a href="$1" target="_blank">$1</a>',
    'validate' => create_function('&$tag, &$data, $disabled[/swf2][swf3]$data = strtr($data, array(\'<br />\' => \'\'));'),
    ),


    bunlarla de?i?;
    array(
    'tag' => 'url',
    'type' => 'unparsed_content',
    'content' => '<a href="$1" target="_blank">$2</a>',
    'validate' => create_function('&$tag, &$data, $disabled[/swf2][swf3]$data = strtr($data, array(\'<br />\' => \'\'));'),
    ),


    Subs-Post.php de bu kodu gör;
    elseif ($hasEqualSign)
    $replaces['[' . $matches[1][$k] . '=' . $matches[2][$k] . ']'] = '[' . $this_tag . '=' . $replace . ']';


    öncesine ekle;
    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;
    'disabledBBC' => implode(',', array_diff($bbcTags, $_POST['enabledTags'])),

    öncesine ekle;
    'urlLength' => empty($_POST['urlLength']) ? 50 : (int)$_POST['urlLength'],


    Admin.template.php de bu kodlar? bul;
    </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"[/swf2][swf3] class="check" />
    </td>
    </tr><tr class="windowbg2">

    bunlarla de?i?;
    </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"[/swf2][swf3] 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;
    // 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
#18.01.2008 03:22 0 0 0
  • deneyen olmadımı :/
#15.08.2008 18:36 0 0 0