Webmaster общности: Predpriemach.com | SearchEngines.bg

    BBCODE : Скриване или показване на пост с бутон

    Автор: Smirnoff

    Когато цъкнете на бутона show поста се показва когато цъкнете hide Поста се скрива 

    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    includes/bbcode.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    // and for bolding text.
    $text = str_replace("[b:$uid]", $bbcode_tpl['b_ОТВОРИ'], $text);
    $text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text);
    
    #
    #-----[ ПРЕДИ НАМЕРЕНОТО, ДОБАВИ ]------------------------------------------
    #
    // Begin 'SPOILER BBcode MOD'
    // [spoiler] and [/spoiler] for spoiler-textbocks
    $text = str_replace("[spoiler:$uid]", $bbcode_tpl['spoiler_ОТВОРИ'], $text);
    $text = str_replace("[/spoiler:$uid]", $bbcode_tpl['spoiler_close'], $text);
    // End 'SPOILER BBcode MOD'
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    // and for bolding text.
    $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
    
    #
    #-----[ ПРЕДИ НАМЕРЕНОТО, ДОБАВИ ]------------------------------------------
    #
    // Begin 'SPOILER BBcode MOD'
    // [spoiler] and [/spoiler] for setting spoiler-textblocks
    $text = preg_replace("#\[spoiler\](.*?)\[/spoiler\]#si", "[spoiler:$uid]\\1[/spoiler:$uid]", $text);
    // End 'SPOILER BBcode MOD'
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    templates/subSilver/bbcode.tpl
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    <!-- BEGIN b_ОТВОРИ --><span style="font-weight: bold"><!-- END b_ОТВОРИ -->
    <!-- BEGIN b_close --></span><!-- END b_close -->
    
    #
    #-----[ ПРЕДИ НАМЕРЕНОТО, ДОБАВИ ]------------------------------------------
    #
    <!-- BEGIN spoiler_ОТВОРИ -->
    <table width="90%" cellspacing="1" cellpadding="3" border="0" align="center">
    <tr>
    <td>
    <span style="font-size: 11px;">
    <div style="margin:20px; margin-top:5px">
    <div class="smallfont" style="margin-bottom:2px">
    <b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onClick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }">
    </div>
    <p>
    <div class="alt2" style="margin: 0px; padding: 6px; border: 1px inset; background-color: #FAFAFA; border: #D1D7DC; border-style: solid; border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px">
    <div style="display: none;">
    <!-- END spoiler_ОТВОРИ -->
    <!-- BEGIN spoiler_close -->
    </div>
    </p>
    </div>
    </div>
    </span>
    </td>
    </tr>
    </table>
    <!-- END spoiler_close -->
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    templates/subSilver/posting_body.tpl
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    f_help = "{L_BBCODE_F_HELP}";
    
    #
    #-----[ СЛЕД ТОВА, ДОБАВИ ]------------------------------------------
    #
    r_help = "{L_BBCODE_R_HELP}";
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    ('','','[i]','[/i]',
    
    #
    #-----[ В РЕДА НАМЕРИ ]------------------------------------------
    #
    '[/url]'
    #
    #-----[ В РЕДА СЛЕД ТОВА, ДОБАВИ ]------------------------------------------
    # If you have other added BBcode then move this to the last place.
    ,'[spoiler]','[/spoiler]'
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    <td><span class="genmed">
    <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
    </span></td>
    
    #
    #-----[ СЛЕД ТОВА, ДОБАВИ ]------------------------------------------
    #If you already have an '18' BBcode, manually change '18' to the next even number that you haven't got. e.g. '20'
    <td><span class="genmed">
    <input type="button" class="button" accesskey="r" name="addbbcode18" value="Spoiler" style="width: 60px" onClick="bbstyle(18)" onMouseOver="helpline('r')" />
    </span></td>
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
    
    #
    #-----[ REPLACE WITH ]------------------------------------------
    #If you already have an '20' or above as the number, manually change '20' to the next even number that you haven't got. e.g. '22'
    <select name="addbbcode20" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode20.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    </select>  {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
    
    
    #
    #-----[ ЗАМЕСТИ С ТОВА ]------------------------------------------
    #If you already have an '22' or above as a number, manually change '22' to the next even number that you haven't got. e.g. '24'
    </select>  {L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
    
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    posting.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
    
    #
    #-----[ СЛЕД ТОВА, ДОБАВИ ]------------------------------------------
    #
    'L_BBCODE_R_HELP' => $lang['bbcode_r_help'],
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    language/lang_english/lang_main.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    $lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
    
    #
    #-----[ СЛЕД ТОВА, ДОБАВИ ]------------------------------------------
    #
    $lang['bbcode_r_help'] = "Spoiler inside text: [spoil]spoiler text[/spoil] (alt+r)";
    
    #
    #-----[ SAVE & ЗАТВОРИ ВСИЧКИ ФАЙЛОВЕ ]------------------------------------------
    #
    #