Перейти к публикации

6748222

местные
  • Публикации

    68
  • Зарегистрирован

  • Посещение

  • Дней в лидерах

    1

Сообщения, опубликованные пользователем 6748222

  1. type

    TForm16 = class(TForm)

    Server: TWSocketServer;

    BtnBrowse: TButton;

    StatusBar1: TStatusBar;

    Open: TOpenDialog;

    EPath: TLabeledEdit;

    LabeledEdit1: TLabeledEdit;

    LabeledEdit2: TLabeledEdit;

    LabeledEdit3: TLabeledEdit;

    procedure BtnBrowseClick(Sender: TObject);

    procedure FormCreate(Sender: TObject);

    procedure ServerClientConnect(Sender: TObject; Client: TWSocketClient;

    Error: Word);

    procedure SessionAvailable(Sender: TObject; ErrCode: Word);

    private

    LIP : array [0..15] of AnsiChar;

    GLocal: TWSocketClient;

    public

    { Public declarations }

    end;[/??de] [b]<----[/b] !!!??? :huh:

    82005803.png


  2. Site:

    www.cheats.lv
    http://alexgorbatchev.com/SyntaxHighlighter/ вот - http://getdle.org.ru/dle/hacks/13-podsvetka-koda-v-dle.html похоже тот же модуль, но на ДЛЕ 8.5 - UTF8 чото неработает :( Спосибо! :unsure:
    Сегодня я хочу рассказать о том, как подсветить код, тем самым сделать его более читаемым, и прикрутить к движку DataLife Engine, о всём подробнее в полной новости... 1. В файле engine/inc/include/inserttag.php после:
    
    function pagelink()
    
    {
    
        var FoundErrors = '';
    
        var thesel ='';
    
        if ( (ua_vers >= 4) && is_ie && is_win)
    
        {
    
        thesel = document.selection.createRange().text;
    
        } else thesel ='$lang[bb_bb_page]';
    
    
        if (!thesel) {
    
            thesel ='$lang[bb_bb_page]';
    
        }
    
    
        var enterURL   = prompt(text_enter_page, "1");
    
        var enterTITLE = prompt(text_enter_page_name, thesel);
    
    
        if (!enterURL) {
    
            FoundErrors += " " + error_no_url;
    
        }
    
        if (!enterTITLE) {
    
            FoundErrors += " " + error_no_title;
    
        }
    
    
        if (FoundErrors) {
    
            alert("Error!"+FoundErrors);
    
            return;
    
        }
    
    
        doInsert("[page="+enterURL+"]"+enterTITLE+"[/page]", "", false);
    
    }
    
    
    Вставить:
    function code()
    
    {
    
        var FoundErrors = '';
    
    
        var enterTYPE   = prompt("Введите тип добавляемого кода:", "js");
    
        if (!enterTYPE) {
    
            FoundErrors += " Вы не ввели, либо неверно ввели имя типа!";
    
        }
    
    
        if (FoundErrors) {
    
            alert("Error!"+FoundErrors);
    
            return;
    
        }
    
    
        doInsert("[code="+enterTYPE+"]", "[/соde]", true);
    
    }
    
    
    В этом же файле:
    <div id="b_code" class="editor_button" onclick="simpletag('code')"><img title="$lang[bb_t_code]" src="engine/skins/bbcodes/images/code.gif" width="23" height="25" border="0"></div>
    Заменить на:
    <div id="b_code" class="editor_button" onclick="code()"><img title="$lang[bb_t_code]" src="engine/skins/bbcodes/images/code.gif" width="23" height="25" border="0"></div>
    2. В файле engine/classes/parse.class.php:
    $source = preg_replace( "#\[code\](.+?)\[/code\]#is", "<!--code1--><div class=\"scriptcode\"><!--ecode1-->\\1<!--code2--></div><!--ecode2-->", $source );
    Заменить на:
    $source = preg_replace( "#\[code=(.+?)\](.+?)\[/code\]#is", "<pre name=\"code\" class=\"\\1\">\\2</pre>", $source );
    
    
    Далее, в этом же файле:
    $txt = preg_replace( "#<!--code1-->(.+?)<!--ecode1-->#", '[code]', $txt );
    
    $txt = preg_replace( "#<!--code2-->(.+?)<!--ecode2-->#", '[/соde]', $txt );
    
    
    Заменить на:
    $txt = preg_replace( "#<pre name=\"code\" class=\"(.+?)\"#", '[code=\\1]', $txt );
    
    $txt = str_replace( "</pre>", '[/соde]', $txt );
    Здесь же:
    if( $wysiwig != "yes" ) $txt = preg_replace( "#\[code\](.+?)\[/code\]#ies", "\$this->decode_code('\\1', '{$use_html}')", $txt );
    
    
    Заменить на:
    if( $wysiwig != "yes" ) $txt = preg_replace( "#\[code=(.+?)\](.+?)\[/code\]#ies", "\$this->decode_code('\\1', '\\2', '{$use_html}')", $txt );
    Также необходимо заменить две функции:
    function code_tag($txt = "") {
    
        if( $txt == "" ) {
    
            return;
    
        }
    
        $this->code_count ++;
    
        $txt = str_replace( "&", "&amp;", $txt );
    
        $txt = str_replace( "&lt;", "<", $txt );
    
        $txt = str_replace( "'", "'", $txt );
    
        $txt = str_replace( "&gt;", ">", $txt );
    
        $txt = str_replace( "<", "<", $txt );
    
        $txt = str_replace( ">", ">", $txt );
    
        $txt = str_replace( "&quot;", """, $txt );
    
        $txt = str_replace( "\\\"", """, $txt );
    
        $txt = str_replace( ":", ":", $txt );
    
        $txt = str_replace( "[", "[", $txt );
    
        $txt = str_replace( "]", "]", $txt );
    
        $txt = str_replace( ")", ")", $txt );
    
        $txt = str_replace( "(", "(", $txt );
    
        $txt = str_replace( "\r", "", $txt );
    
        $txt = str_replace( "\n", "
    
    ", $txt );
    
        $txt = preg_replace( "#\s{1};#", ";", $txt );
    
        $txt = preg_replace( "#\t#", "    ", $txt );
    
        $txt = preg_replace( "#\s{2}#", "  ", $txt );
    
        $p = "[code]{" . $this->code_count . "}[/соde]";
    
        $this->code_text[$p] = "[code]{$txt}[/соde]";
    
        return $p;
    
    }
    
    
    function decode_code($txt = "", $use_html) { 
    
    
        // $txt = stripslashes( $txt );
    
        $txt = str_replace( "&amp;", "&", $txt );
    
    
        if( $use_html ) {
    
            $txt = str_replace( "&lt;br /&gt;", "\n", $txt );
    
        }
    
    
        return "[code]".$txt."[/соde]";
    
    }
    На:
    function code_tag($codetype = "", $txt = "") {
    
        if( $txt == "" ) {
    
            return;
    
        }
    
        $this->code_count ++;
    
        $txt = str_replace( "&", "&amp;", $txt );
    
        $txt = str_replace( "&lt;", "<", $txt );
    
        $txt = str_replace( "'", "'", $txt );
    
        $txt = str_replace( "&gt;", ">", $txt );
    
        $txt = str_replace( "<", "<", $txt );
    
        $txt = str_replace( ">", ">", $txt );
    
        $txt = str_replace( "&quot;", """, $txt );
    
        $txt = str_replace( "\\\"", """, $txt );
    
        $txt = str_replace( ":", ":", $txt );
    
        $txt = str_replace( "[", "[", $txt );
    
        $txt = str_replace( "]", "]", $txt );
    
        $txt = str_replace( ")", ")", $txt );
    
        $txt = str_replace( "(", "(", $txt );
    
        $txt = str_replace( "\r", "", $txt );
    
        $txt = str_replace( "\n", "
    
    ", $txt );
    
        $txt = preg_replace( "#\s{1};#", ";", $txt );
    
        $txt = preg_replace( "#\t#", "    ", $txt );
    
        $txt = preg_replace( "#\s{2}#", "  ", $txt );
    
        $p = "[code=".$codetype."]{" . $this->code_count . "}[/соde]";
    
        $this->code_text[$p] = "[code=\".$codetype.\"]{$txt}[/соde]";
    
        return $p;
    
    }
    
    
    function decode_code($codetype = "", $txt = "", $use_html) { 
    
    
        // $txt = stripslashes( $txt );
    
        $txt = str_replace( "&amp;", "&", $txt );
    
    
        if( $use_html ) {
    
            $txt = str_replace( "&lt;br /&gt;", "\n", $txt );
    
        }
    
    
        return "[code=\".$codetype.\"]".$txt."[/соde]";
    
    }
    А также:
    if( $this->allow_code )
    
    $source = preg_replace( "#\[code\](.+?)\[/code\]#ies", "\$this->code_tag( '\\1' )", $source );
    Заменить на:
    if( $this->allow_code )
    
    $source = preg_replace( "#\[code=(.+?)\](.+?)\[/code\]#ies", "\$this->code_tag( '\\1', '\\2' )", $source );
    3. В файл main.tpl Вашего шаблона, между тегами , либо перед вставить:
    <link href='http://syntaxhighlighter.googlecode.com/svn/trunk/Styles/SyntaxHighlighter.css' rel='stylesheet' type='text/css'/> 
    
    <script type="text/javascript" src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shCore.js"></script> 
    
    <script type="text/javascript" src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushPhp.js"></script> 
    
    <script type="text/javascript" src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushJScript.js"></script> 
    
    <script type="text/javascript" src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushCss.js"></script> 
    
    <script type="text/javascript" src="http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/shBrushXml.js"></script>
    
    <script>
    
    dp.SyntaxHighlighter.ClipboardSwf = 'http://syntaxhighlighter.googlecode.com/svn/trunk/Scripts/clipboard.swf';
    
    dp.SyntaxHighlighter.BloggerMode(); 
    
    dp.SyntaxHighlighter.HighlightAll('code');
    
    </script>

    Теперь на Вашем DLE блоге(сайте) вставленный Вами в запись исходный код будет подсвечен. Для вставки исходного кода используется та же кнопка что и обычно, но при вставке вылезет всплывающее окно, в котором необходимо будет указать тип вставляемого исходного кода.

    Если не хотите чтобы все необходимые скрипты грузились с серверов Google, можете скачать SyntaxHighlighter библиотеку ниже (версия 1.5.1), залить все необходимые файлы из неё к себе на сервер, и изменить путь для подключаемых файлов.

  3. трудно наверное объеснить чо и как.. даже когда ета пипец просто.. прикольное комунити

    короче сам розобралса и оставлю тут пример для других!

    
    foreach ($topics as $topic)
    
    {
    
    $smffor .= 
    
    <<<HTML
    
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
    
     <tr>
    
      <td width='30%' valign='top' align='left' style="padding-left:7px;">
    
      <li><a href='{$topic['href']}'>{$topic['short_subject']}</a></li>
    
     </td>
    
     <td width="20%" style='text-align:center;'>
    
       Last post by 
    
     </td>
    
     <td width="20%" style='text-align:left;'>
    
     {$topic['poster']['link']}
    
     </td>
    
     <td width="20%" style='text-align:left;'>
    
       {$topic['id']} 
    
     </td>
    
     </tr>
    
     </table>
    
    HTML;
    
    }
    
    ?>
    
    

    2zqvlfq.png

  4. саит:

    http://cheats.lv/
    Добрый день. Зделал себе хак для вывода "Recent Posts" c SMF на страничку в DLE :unsure:
    
    <?php
    
    
    if( ! defined( 'DATALIFEENGINE' ) ) {
    
    	die( "Hacking attempt!" );
    
    }
    
    require("/home/xxxxxx/public_html/forum/SSI.php");
    
    
    $topics = ssi_recentTopics(16, null, null, 'array');
    
    
    foreach ($topics as $topic)
    
    {
    
     $smffor .= "<li>"."<a href=".$topic['href'].">".$topic['subject']."</a>"." ".$txt['by']." ".$topics['poster']['link']."</li>";
    
    }
    
    
    unset($topics);
    
    ?>
    
    
    
    14e723d.png Подскаджите как зделать в столбиках чтоб било:
    Forum category | Topic Title | Last comment | by name | Date and Time |

    пример:

    a0f2uw.png

  5. нужен модуль

    система поинтов - за каждй/ю коментарй/статью дают поинты а также поинты можно заказать через sms/paypal

    - чтоб скочать фаил нужно N поинтов (скочал фаил поинти идут в минус N)

    - скрыть текст,сылки за N количество поинтов (за раскрытие "Хидден" текста идут минус N поинтов (типо обменать поинти на скритй текст))

    - автор скритого контента или фаила получает N% поинтов от указаних им поинтов за каждй раскрытие "Хидден" текста или скачивание фаила

    - пользователы могут дарыть друг другу поинтов

    - автор статьи за каждй "спосиба" получает N поинтов

    ну и ишо всако разно.. пишем лс или на мило

    оплата толко через paypal

    PS.

    не умею писать по-русски! ;)

    translit.ru :)

  6. Ссылка на сайт с лицензией?

    www.cheats.lv

    а вообще, я посмотрел, у меня все хорошо. допущена Вами ошибка в PHP скрипте, а точнее при выводе хтмл формы

    скочал - заинсталил и вот чистий DLE 9.0 :) нечево неменал в движке

    PS.

    и если нажать - "добавить поле" то ошибка:

    Forbidden

    You don't have permission to access /< on this server.

    ета у мена руки кривые ? :) я 2 переинсталлил движок

×
×
  • Создать...