Total Users Online: 0 üye, 298 guest | Tarih/Saat: 2025-02-12 03:32
 
Forumlarda Link Gizleme Döküman
#78
2009-11-21 19:51 GMT  oklu Alnt
qharez

User is: Online status   Gender_M
Posts: 172
Ülke: --- - 00
Meslek:
Age: 33

Otomatik link Gizleme..

system/fonksiyon.php a? alttakini bul

Kod:
global $L, $skin, $sys, $cfg, $sed_groups;

Alt?na Ekle
Kod:
/* Gizli Link CoraHack Kaan */
        $text=hge_correct_ed2k_link($text);
        $hge_hiddentext = hge_test_hidden_acces();
        /* Gizli Link CoraHack Kaan */

Alttakini bul
Kod:
$bbcodes = array(
'\\[colleft\\]([^\\[]*)\\[/colleft\\]' => '<div class="colleft">\\1</div>',
'\\[colright\\]([^\\[]*)\\[/colright\\]' => '<div class="colright">\\1</div>',
'\\[center\\]([^\\[]*)\\[/center\\]' => '<div style="text-align:center;">\\1</div>',
'\\[right\\]([^\\[]*)\\[/right\\]' => '<div style="text-align:right;">\\1</div>',
'\\[left\\]([^\\[]*)\\[/left\\]' => '<div style="text-align:left;">\\1</div>',
'\\[c1\\:([^\\[]*)\\]([^\\[]*)\\[c2\\:([^\\[]*)\\]([^\\[]*)\\[c3\\]' => '<table style="margin:0; vertical-align:top; width:100%;"><tr><td style="padding:8px; vertical-align:top; width:\\1%;">\\2</td><td  style="padding:8px; vertical-align:top; width:\\3%;">\\4</td></tr></table>',

Alt?na ekle
Kod:
/* Gizli Link CoraHack Kaan */
        '\\[hide\\]([^\\[]*)\\[/hide\\]' => $hge_hiddentext
        /* Gizli Link CoraHack Kaan */

Alttakini bul
Kod:
function sed_load_structure()

?stekinin ?st?ne Alttakileri ekle
Kod:
function hge_corrected_link($matches)
{
  //this is a callback function for preg_replace_callback to
  //strip all unwanted characters that break ed2k links
  //
  //-- REMINDER: stripping of ' fails for unknown reason --> there is a %03 visible in link.
  $text_in_front = '[img]images/EzelLinkIcon.gif[/img] [url=AAAA://|file|';
  $matches[2] = preg_replace("#[\f\n\r\t]|\x39;#is","",$matches[2]);
  $matches[2] = preg_replace("#[\[\]\(\)+]|(%20)#is",".",$matches[2]);
  $matches[2] = preg_replace('(\.+)','.',$matches[2]);
  $filesize = ' ('.number_format((((float)$matches[3])/(1024*1024)),2).') MB';
  return $text_in_front.$matches[2].'|'.$matches[3].'|'.$matches[4].'|/]'.$matches[2].'[/url]'.$filesize;
}

function hge_correct_ed2k_link($text)
{
   //structure and clean up ed2k-link and make sure old-style links are not affected in the wrong way.
   //the trick with setting  to AAAA is needed to prevent the two different link-types of interference
   $text = preg_replace_callback('#(\[url=ed2k://\|file\|)(.+?)\|(.+?)\|(.+?)\|/\](.+?)\[/url\]#is','hge_corrected_link',$text);
   $text = preg_replace_callback('#(ed2k://\|file\|)(.+?)\|(.+?)\|(.+?)\|/#is','hge_corrected_link',$text);
   $text = preg_replace('#\[url=AAAA://\|file\|#is','[url=ed2k://|file|',$text);
   return ($text);
}

function hge_test_hidden_acces()
{
   global $db_forum_posts, $usr;
   //Hide option get needed constants from URL; LDU way for using $_GET
        if (!defined('SED_CODE')) { die('Wrong URL.'); }
   $m = sed_import('m','G','STX');

        /* testing for acces to hidden content -- currently only when requesting forum or post */
   $RequestedTopic = 0;
   $hge_hiddentext = '<b>Linkleri G?rmek i?in Konuya Cevap Yazmal?s?n?z.</b> <i>CoreHack <font color="red">Kaan</font></i>';
   if (!empty($m) && ($m == 'posts'))
   {
      //get other variables -- if put earlier it gives unintended warnings in the logfile
      $q = sed_import('q','G','INT');
      $p = sed_import('p','G','INT');
      if (!empty($q))
      {
         $RequestedTopic = $q;
      }
      elseif (!empty($p))
      {
         $RequestedPost = $p;
         $sql = sed_sql_query("SELECT fp_topicid FROM $db_forum_posts WHERE fp_id=$RequestedPost");
         if ($row = sed_sql_fetcharray($sql))
         {
           $RequestedTopic = $row['fp_topicid'];
         }
      }

     if ($RequestedTopic>0)
     {
       $sql = sed_sql_query("SELECT fp_posterid FROM $db_forum_posts WHERE fp_topicid=$RequestedTopic");
       while ($row = sed_sql_fetcharray($sql))
            {
              if ($usr['id'] == ($row['fp_posterid']))
              {
                $hge_hiddentext = '<div style="text-align:left;">\\1</div>';

                break;
              }
            }
     }
   }
   return ($hge_hiddentext);
}


Alttakini bulun
Kod:
'\\[url=([^\\\'\;([]*)\\]([^\\[]*)\\[/url\\]' => '<a href="\\1">\\2</a>',
'\\[url\\]([^\\([]*)\\[/url\\]' => '<a href="\\1">\\1</a>',

Alttakiyle degi?tirin
Kod:
'\\[url=([^\\\'\;([]*)\\]([^\\[]*)\\[/url\\]' => '[hide]<a href="\\1">\\2</a>[/hide]',
'\\[url\\]([^\\([]*)\\[/url\\]' => '[hide.]<a href="\\1">\\1</a>[./hide]',

system/core/forums/forums.posts.inc.php yi a??n alttakini bulun
Kod:
if ($row4 = sed_sql_fetcharray($sql4))

Alt?na Ekleyin.
Kod:
/* Al?nt? Yap?lmaz */
               $StrippedText = preg_replace('#\[hide\](.+?)\[/hide\]#is','[b]Gizli Link Al?nt? yap?lamaz[/b]',$row4['fp_text']);
                   /* Al?nt? Yap?lmaz     */

Not: Hide Bulunan Yerlere . (nokta) ekledim gizli link uygulamas? oldugu i?in sitemizde.
Konuyla İlgili Diğer Başlıklar
LiteSpeed Sunucu için sef Link oluşturmak..
Link Kısaltarak Para Kazanın.
PHP: SEO Uyumlu Link Fonksiyonu
videolarda sade link eklensin
Bbcodeye resimli link ekleme ?

 

Powered by Seditio © 2009-2012 All Rights Reserved