Forum gratuit: forum de suport al utilizatorilor
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.

Cod reply la topic

Vezi subiectul anterior Vezi subiectul urmator In jos

Rezolvat Cod reply la topic

Mesaj Scris de Dani David Vin Sept 01, 2017 5:20 pm

Va salut ,un cod pentru a se posta direct cand dai reply la un mesaj fara sa se mai incarce pagina
Multumesc


Ultima editare efectuata de catre Dani David in Vin Sept 01, 2017 7:07 pm, editata de 1 ori
Dani David

Dani David
Membru activ

Mesaje : 551
Varsta : 56
Localizare : Bucuresti
Data înscrierii : 04/06/2017
Mulțumiri : 9
Google Chrome ModernBB

Dani David a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Cod reply la topic

Mesaj Scris de Petronel Vin Sept 01, 2017 5:23 pm

Cod JS :
Cod:
$(function() {
 var u = _userdata, l = _lang;
 var content = $('body').get();
  for (i = 0; i < content.length; i++) {
        content[i].innerHTML = content[i].innerHTML.replace(/\{IM_ONLINE\}/g, u.session_logged_in).replace(/\{USER_NAME\}|\{.USER_NAME\}/g, u.username).replace(/\{AVATAR\}|\{.AVATAR\}/g, u.avatar).replace(/\{USER_PRIVATE_MSG\}|\{.USER_PRIVATE_MSG\}/g, u.user_nb_privmsg).replace(/\{USER_REPUTATION\}|\{.USER_REPUTATION\}/g, u.point_reputation).replace(/\{USERID\}|\{.USERID\}/g, "/u" + u.user_id).replace(/\{USER_POST\}|\{.USER_POST\}/g, u.user_posts).replace(/\{USER_LEVEL\}|\{.USER_LEVEL\}/g, u.user_level).replace(/\{RANK_TITLE\}|\{.RANK_TITLE\}/g, l.rank_title);
    }
});
$(function(){
  var name = $('.homepageTitle strong').html();
  $('a[href="/privmsg?folder=inbox"]').each(function(){ 
    var pms = $(this).text().match(/\d+/g);
      if(pms&&pms.length>0){
      $('a[href="/privmsg?folder=inbox"]').attr('style','font-size: 10px !impotant').addClass('newpm').html('<b>'+pms+' </b> mesaj nou');
          $("body").append('<div id="ET_notifications"><div class="alerta alerta-blue" style="display: block;"><i class="fa fa-info"></i><i class="fa fa-check"></i>Salut &nbsp;'+ name +',aveti&nbsp;<b>'+pms+'</b>&nbsp;mesaj&nbsp;privat&nbsp;necitit&nbsp;!&nbsp;Verificati&nbsp;inbox-ul&nbsp;de&nbsp;pe&nbsp;forum</div></div>');
            setTimeout(function(){
              $('#ET_notifications').fadeOut().remove()},25000);
                  }
              });
      });
jQuery(function($) {
    var form = $('form#quick_reply');
    var tid1 = $('input[type="hidden"][name="tid"]', form).val();
    var lt = $('input[type="hidden"][name="lt"]', form).val();
    var t = $('input[type="hidden"][name="t"]', form).val();
    $('input[name="preview"]', form).val('Previzualizare');
    $('input[name="post"]', form).val('Trimite raspuns');
    var notifMe = $('input[name="topic_auto_follow"]').prop("checked") ? 1 : 0;
    console.log(notifMe);
    $('input[name="post"]', form).click(function(d) {
        d.preventDefault();
        if ($('input[name="post_icon"]:checked', form).attr('id')) var icon = "\"post_icon\": $('input[name=\"post_icon\"]:checked', form).attr('id').split('icon_')[1]";
        else var icon = "\"post_icon\": \"\"";
        $('input[name="post"]', form).hide().after('<span class="submit-msg">Se posteaza mesajul dvs...</span>');
        $.post('/post', {
                "message": $('textarea', form).sceditor('instance').val(),
                "mode": "reply",
                "attach_sig": 1,
                icon,
                "tid": tid1,
                "notify": notifMe,
                "t": t,
                "lt": lt,
                "post": 1
            }).done(function(result) {
                $('textarea', form).sceditor('instance').val("");
                var topicURL = $('.panel a[href^="/viewtopic?"]', result).attr('href');
                var topicID = $('.panel a[href^="/viewtopic?"]', result).attr('href').match(/#(\d+)/g)[0];
                topicID = topicID.split('#')[1];
                console.log(topicID);
                $.post(topicURL).done(function(res) {
                    $('.post[id^="p"]:has(".postbody"):last').after($('#p' + topicID, res));
                    $("html, body").animate({
                            scrollTop: ($('#p' + topicID).offset().top - 20) + "px"
                        });
                    $('input[name="post"]', form).show().val('Trimite raspuns');
                    $('.submit-msg').remove();
                    $("body").append('<div class="notif">Mesajul dvs. a fost postat cu succes !</div>');
                    setTimeout(function() {
                        $('.notif').fadeOut().remove()
                    }, 3000)
                })
            })
    })
});
/fgdesign.forumgratuit.ro/.test(location.host) && $(function() {
    $(".new-message").parent().addClass("newpm");
    $('[type="radio"]').after('<span class="fa fa-check"></span>');
    var head = document.getElementById('page-header');
    if (head) {
        for (var cleanURI = window.location.href.replace(/\?.*|#.*/, ''), a = head.getElementsByTagName('A'), i = 0, j = a.length; i < j; i++) {
            if (/mainmenu/.test(a[i].className) && cleanURI == a[i].href.replace(/\?.*|#.*/, '')) {
                a[i].className += ' fa_navactif';
                break
            }
        }
    }
    $('ul.tabs').each(function() {
        var $active, $content, $links = $(this).find('a');
        $active = $($links.filter('[href="' + location.hash + '"]')[0] || $links[0]);
        $active.addClass('active');
        $content = $($active[0].hash);
        $links.not($active).each(function() {
            $(this.hash).hide()
        });
        $(this).on('click', 'a', function(e) {
            $active.removeClass('active');
            $content.hide();
            $active = $(this);
            $content = $(this.hash);
            $active.addClass('active');
            $content.show();
            e.preventDefault()
        });
    });
    $(function() {
        if (_userdata.session_logged_in === '0') return 0;
        var avatar = _userdata.avatar;
        $('#fa_welcome').prepend(avatar)
    });
    if (location.pathname == '/post' && location.search == '?f=35&mode=newtopic') $('#textarea_content textarea').val('Tipul de imagine: \nMarimea imaginii (in pixels): \nCu sau fara animatie: \nCuloarea de fundal: \nImagine/i link/s: \nTextul dorit: \nCuloare/i font: \nLink-ul forumului dumneavoastra:\nNumele dvs. in cadrul forumului: \nInformatii suplimentare: \n');
    $(".inputbox.post.ltr:last-child").after('<div class="note_email"><i class="fa fa-info-circle"></i> Introduceti o adresa la care aveti acces in acest moment, pentru ca este necesarea confirmarea pe e-mail.</div>');
    location.pathname == '/post' && $(function() {
        if (!document.post || document.post.mode.value != 'newtopic' || (document.post.f.value != 13 && document.post.f.value != 14)) return;
        $(document.post.poll_title).closest('fieldset').html('<strong>Sondajul a fost adaugat  automat.</strong><input type="hidden" name="poll_title" value="Sunteti de acord cu aceasta propunere?" /><input type="hidden" name="poll_option_text" value="Sunt de acord\nNu sunt de acord"><input type="hidden" name="poll_length" value="30" /><input type="hidden" name="poll_cancel_vote" value="1" />')
    });
    var lang = {
        display_as: '<b>Afiseaza rezultate din : </b>',
        posts: 'Mesaje',
        topics: 'Subiecte',
        tags: '<b>Hashtag : </b>',
        advanced: '<b>Cautare avansata</b>',
        options_title: 'Search options'
    }, search = document.getElementById('search'),
        settings = document.createElement('DIV'),
        opts = document.createElement('A');
    if (search) {
        settings.style.display = 'none';
        settings.id = 'fa_search_settings';
        settings.innerHTML = '<p>' + lang.display_as + '</p><p><input id="searchOptsPosts" type="radio" name="show_results" value="posts"/><label for="searchOptsPosts">' + lang.posts + '</label><input id="searchOptsTopics" type="radio" name="show_results" value="topics" checked="true"/><label for="searchOptsTopics">' + lang.topics + '</label></p><p><label for="searchOptsTags">' + lang.tags + '</label> <input id="searchOptsTags" type="checkbox" name="is_tag" value="tags"/></p><hr class="dashed"/><p><a href="/search">' + lang.advanced + '</a></p>';
        opts.href = '#';
        opts.title = lang.options_title;
        opts.id = 'fa_search_opts';
        opts.onclick = function(e) {
            e.preventDefault();
            var settings = document.getElementById('fa_search_settings');
            settings.style.display = /none/.test(settings.style.display) ? 'block' : 'none'
        };
        search.search_keywords.onfocus = function() {
            var settings = document.getElementById('fa_search_settings');
            if (!/none/.test(settings.style.display)) settings.style.display = 'none'
        };
        search.appendChild(opts);
        search.appendChild(settings)
    }
    $(function() {
        var area = document.getElementById('fa_textarea');
        if (area) {
            if (area.setAttribute) area.setAttribute('style', 'text-indent:0px !important;');
            area.value = 'Cautare...';
            area.onclick = function() {
                if (this.value == 'Cautare...') this.value = ''
            };
            area.onblur = function() {
                if (!this.value) this.value = 'Cautare...'
            };
            document.getElementById('fa_magnifier').onclick = function() {
                this.parentNode.submit()
            }
        }
        var noclick = document.getElementById('textarea_content');
        if (noclick) {
            $("#text_editor_textarea").length && ($(window).on("beforeunload", function() {
                        if ($(".sceditor-container textarea").val().length || $(".sceditor-container iframe").contents().find("body").text().length) return ""
                    }), $("form[name='post']").submit(function() {
                        $(window).off("beforeunload")
                    }))
        }
    });
Petronel

Petronel
Membru onorific
Membru onorific

Mesaje : 1045
Varsta : 21
Localizare : Constanţa & Calarasi
Data înscrierii : 21/05/2016
Mulțumiri : 113
Google Chrome AwesomeBB

https://www.fgdesign.biz/
Petronel a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Cod reply la topic

Mesaj Scris de Dani David Vin Sept 01, 2017 7:07 pm

Un mare like de la mine si mii de multumiri @Lucifer problema rezolvata
Dani David

Dani David
Membru activ

Mesaje : 551
Varsta : 56
Localizare : Bucuresti
Data înscrierii : 04/06/2017
Mulțumiri : 9
Google Chrome ModernBB

Dani David a fost mulțumit de autorul acestui subiect.

Rezolvat Re: Cod reply la topic

Mesaj Scris de SSYT Vin Sept 01, 2017 7:12 pm

topic rezolvat
SSYT

SSYT
Membru onorific
Membru onorific

Mesaje : 1424
Varsta : 29
Localizare : Romania, localhost:80
Data înscrierii : 10/08/2015
Mulțumiri : 199
Opera phpBB3

https://help.forumgratuit.ro
SSYT a fost mulțumit de autorul acestui subiect.

Vezi subiectul anterior Vezi subiectul urmator Sus

- Subiecte similare

Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum