• 25-05-2007, 20:16:52
    #1
    TrimUrl linkleri kısalt modifikasyonu
    Bu modifikasyon linkleri vB deki gibi kısaltmak içindir.Özellikle paylaşım forumlarındaki alıntı linkler için vazgeçilmez.



    Sources/Subs.php de
    bul

     
    // 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;
    }
    Sonrasına 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;
    }
    Bul

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


    öncesine 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;
    }
    Bul

    '<a href="$1" target="_blank">$1</a>',
    


    Değiştir
    '<a href="$1" target="_blank">$2</a>',
    Sources/Subs-Post.php de

    bul

     
    elseif ($hasEqualSign)
    $replaces['[' . $matches[1][$k] . '=' . $matches[2][$k] . ']'] = '[' . $this_tag . '=' . $replace . ']';
    Sonrasına Ekle
    elseif ($embeddedUrl && $matches[1][$k] == 'url' && !$hasEqualSign)
    $replaces['[' . $matches[1][$k] . ']' . $matches[2][$k] . '[/' . $matches[3][$k] . ']'] = '[' . $this_tag . ']' . $replace . '[/' . $this_close . ']';
    Sources/ManagePosts.php de
    bul
    'disabledBBC' => implode(',', array_diff($bbcTags, $_POST['enabledTags'])),


    Sonrasına Ekle

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


    Themes/default/Admin.template.php de
    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"', ' class="check" />
    </td>
    </tr><tr class="windowbg2">
    Değiştir

    </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">


    languages/Modifications.turkish.php de
    bul

    ?


    Öncesine ekle
    // TrimUrl
    $txt['urlLength'] = '(x) karakterden uzun linkler kısaltılır.';



  • 30-06-2007, 19:48:00
    #2
    duygusal örnek verirmisin. nsl link i nsl hale getirio
  • 30-06-2007, 19:59:37
    #3
    Örnek varmı acaba.Nasıl kısaltıyorki :S
  • 30-06-2007, 20:04:26
    #4
    Üyeliği durduruldu
    sanırım www . hebelehubele . com adresini

    www . he...le . com haline getiriyor.
  • 30-06-2007, 20:12:40
    #5
    Webustad adlı üyeden alıntı: mesajı görüntüle
    sanırım www . hebelehubele . com adresini

    www . he...le . com haline getiriyor.
    hyr öyle değil..
    Örn :
  • 21-09-2007, 23:45:45
    #6
    pek bi işe yaramaz sonuçta adam linki almak istesin yeter

    tıklar linke açılır bidde ordan kopyalar
  • 22-09-2007, 20:22:56
    #7
    Ben kendi sitemde kullanıyorum.bol rapid linklerinin paylaşıldığı sitelere tavsiye ederim.
    Paylaşım için teşekkürler