The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

vbox7 by hotrofm

View previous topic View next topic Go down

Solved vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 11:41 am

I'm using a code to add a video sharing button to vbox7, but the code stopped working.
I have not made any changes to the admin panel.



Pressing the vbox7 button and adding a video link generates a code without quotation marks and can not display a video in the forum.
The code appears like this.
[table class=vbox7hotro][tr][td]ee70f0ca49[/td][/tr][/table]

It must be so.
The code must be quoted (""), but it is generated without them.
[table class=vbox7hotro][tr][td]ee70f0ca49[/td][/tr][/table]




Why did you get this problem? Before the code worked without problems.


Code:
$(window).load(function() {
    $('.sceditor-group:last').append('<a title="vbox7 bbcode" class="sceditor-button sceditor-button-vbox7" style="text-indent: 0px;"><img src="http://i97.servimg.com/u/f97/16/34/78/03/p9lwnr10.png" ></a>');
    $('body').append('<div id="bbcodevbox7" style="display:none;position:absolute;z-index:50000;-moz-background-clip:padding;-moz-border-radius:2px;-moz-box-shadow:1px 2px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-webkit-border-radius:2px;-webkit-box-shadow:1px 2px 4px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;border:1px solid #ccc;border-radius:2px;box-shadow:1px 2px 4px rgba(0,0,0,.2);color:#333;line-height:1;padding:10px;position:absolute;z-index:4000"><input id="inputFieldvbox7" type="text"><br><input id="enterContentvbox7" type="submit" value="enter" style="margin-top: 5px;"></div>');
   
    $('.sceditor-button-vbox7').click(function() {
        if ($('#bbcodevbox7').css('display') == 'none') {
            var y = $('.sceditor-button-vbox7').offset().top +25;
            var x = $('.sceditor-button-vbox7').offset().left;
            $('#bbcodevbox7').show().css('top',y + 'px').css('left',x + 'px');
        }
        else $('#bbcodevbox7').hide();
    });
   
    $('#enterContentvbox7').click(function() {
        if ($('#inputFieldvbox7').val().length > 0) $('#text_editor_textarea').sceditor('instance').insertText('[table class=vbox7hotro][tr][td]' + $('#inputFieldvbox7').val(),'[/td][/tr][/table]');
        else $('#text_editor_textarea').sceditor('instance').insertText("[table class=vbox7hotro][tr][td]", "[/td][/tr][/table]");
        $('#inputFieldvbox7').val('');
        $('#bbcodevbox7').hide();
    });
   
    $('.sceditor-button:not(.sceditor-button-vbox7), .sceditor-container textarea, .sceditor-container vbox7').click(function() { $('#bbcodevbox7').hide() });
});
$(document).on('ready', function() {
$('.vbox7hotro td').each(function() {
var davhotrofmvbox7 = $(this).text();
$(this).prepend('<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>');
});
});


Last edited by smurfavr on June 22nd 2017, 1:16 pm; edited 2 times in total
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by skouliki on June 9th 2017, 11:57 am

hello

have you tried to communicate with the owner of that code?
avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 2777
Reputation : 418
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 12:19 pm

This is the author @vietkanpy There is a job and there is no time to visit the forum.

I wrote a private message but still did not respond.

http://www.hotrofm.net/t339-code-frame-bbcode-forumotion#1458
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by skouliki on June 9th 2017, 12:52 pm

sorry i really cant help
the best thing is to wait for vietkanpy
avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 2777
Reputation : 418
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Justice™ on June 9th 2017, 2:56 pm

Hello,

Replace the code with:
Code:
$(window).load(function() {
    $('.sceditor-group:last').append('<a title="vbox7 bbcode" class="sceditor-button sceditor-button-vbox7" style="text-indent: 0px;"><img src="http://i97.servimg.com/u/f97/16/34/78/03/p9lwnr10.png" ></a>');
    $('body').append('<div id="bbcodevbox7" style="display:none;position:absolute;z-index:50000;-moz-background-clip:padding;-moz-border-radius:2px;-moz-box-shadow:1px 2px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-webkit-border-radius:2px;-webkit-box-shadow:1px 2px 4px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;border:1px solid #ccc;border-radius:2px;box-shadow:1px 2px 4px rgba(0,0,0,.2);color:#333;line-height:1;padding:10px;position:absolute;z-index:4000"><input id="inputFieldvbox7" type="text"><br><input id="enterContentvbox7" type="submit" value="enter" style="margin-top: 5px;"></div>');
 
    $('.sceditor-button-vbox7').click(function() {
        if ($('#bbcodevbox7').css('display') == 'none') {
            var y = $('.sceditor-button-vbox7').offset().top +25;
            var x = $('.sceditor-button-vbox7').offset().left;
            $('#bbcodevbox7').show().css('top',y + 'px').css('left',x + 'px');
        }
        else $('#bbcodevbox7').hide();
    });
 
    $('#enterContentvbox7').click(function() {
        if ($('#inputFieldvbox7').val().length > 0) $('#text_editor_textarea').sceditor('instance').insertText('[table class='vbox7hotro'][tr][td]' + $('#inputFieldvbox7').val(),'[/td][/tr][/table]');
        else $('#text_editor_textarea').sceditor('instance').insertText("[table class='vbox7hotro'][tr][td]", "[/td][/tr][/table]");
        $('#inputFieldvbox7').val('');
        $('#bbcodevbox7').hide();
    });
 
    $('.sceditor-button:not(.sceditor-button-vbox7), .sceditor-container textarea, .sceditor-container vbox7').click(function() { $('#bbcodevbox7').hide() });
});
$(document).on('ready', function() {
$('.vbox7hotro td').each(function() {
var davhotrofmvbox7 = $(this).text();
$(this).prepend('<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>');
});
});
avatar
Justice™
Forumember

Posts : 491
Reputation : 116
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 3:13 pm

This code does not work at all.
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Justice™ on June 9th 2017, 3:18 pm

I made a small mistake there(actually whoever made the code messed up quotes in strings). Anyway, see if this code works:
Code:
$(window).load(function() {
            $('.sceditor-group:last').append('<a title="vbox7 bbcode" class="sceditor-button sceditor-button-vbox7" style="text-indent: 0px;"><img src="http://i97.servimg.com/u/f97/16/34/78/03/p9lwnr10.png" ></a>');
            $('body').append('<div id="bbcodevbox7" style="display:none;position:absolute;z-index:50000;-moz-background-clip:padding;-moz-border-radius:2px;-moz-box-shadow:1px 2px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-webkit-border-radius:2px;-webkit-box-shadow:1px 2px 4px rgba(0,0,0,.2);background:#fff;background-clip:padding-box;border:1px solid #ccc;border-radius:2px;box-shadow:1px 2px 4px rgba(0,0,0,.2);color:#333;line-height:1;padding:10px;position:absolute;z-index:4000"><input id="inputFieldvbox7" type="text"><br><input id="enterContentvbox7" type="submit" value="enter" style="margin-top: 5px;"></div>');
         
            $('.sceditor-button-vbox7').click(function() {
                if ($('#bbcodevbox7').css('display') == 'none') {
                    var y = $('.sceditor-button-vbox7').offset().top +25;
                    var x = $('.sceditor-button-vbox7').offset().left;
                    $('#bbcodevbox7').show().css('top',y + 'px').css('left',x + 'px');
                }
                else $('#bbcodevbox7').hide();
            });
         
            $('#enterContentvbox7').click(function() {
                if ($('#inputFieldvbox7').val().length > 0) $('#text_editor_textarea').sceditor('instance').insertText('[table class="vbox7hotro"][tr][td]' + $('#inputFieldvbox7').val(),'[/td][/tr][/table]');
                else $('#text_editor_textarea').sceditor('instance').insertText("[table class='vbox7hotro'][tr][td]", "[/td][/tr][/table]");
                $('#inputFieldvbox7').val('');
                $('#bbcodevbox7').hide();
            });
         
            $('.sceditor-button:not(.sceditor-button-vbox7), .sceditor-container textarea, .sceditor-container vbox7').click(function() { $('#bbcodevbox7').hide() });
        });
        $(document).on('ready', function() {
        $('.vbox7hotro td').each(function() {
        var davhotrofmvbox7 = $(this).text();
        $(this).prepend('<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>');
        });
        });
avatar
Justice™
Forumember

Posts : 491
Reputation : 116
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 3:25 pm

Thanks Now works fine. What is the problem with the original code?
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Justice™ on June 9th 2017, 3:36 pm

The code was simply inserting the text without quotes. That was the way it was made to work.
avatar
Justice™
Forumember

Posts : 491
Reputation : 116
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 3:59 pm

@Wolfuryo @vietkanpy
Can you make the code by adding a video to be displayed immediately in a theme? Right now I need to refresh the page to display the live.
Adding a video from youtube is displayed right away without refreshing the page.

avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Justice™ on June 9th 2017, 4:39 pm

I don't understand what you exactly want. Maybe a screenshot will help...
avatar
Justice™
Forumember

Posts : 491
Reputation : 116
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 9th 2017, 4:47 pm

I've given a gif photo in the front post.
When I put video from vbox7 I need to refresh a page to show it. When I put video from YouTube, it appears right away.
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by vietkanpy on June 15th 2017, 9:50 am

Smile sorry Smile solved? you want replay in topic play video. Smile because use code replquick. delete code quickreply or edit code Smile.

Code:
$(document).on('ready', function() {
    $('.vbox7hotro td').each(function() {
        var davhotrofmvbox7 = $(this).text();
        $(this).prepend('<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>');
    });
});

code in code quickreply
avatar
vietkanpy
Forumember

Male Posts : 56
Reputation : 24
Language : vietnam

http://www.hotrofm.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 15th 2017, 12:43 pm

1. I added the code at the bottom, but it still does not work.
2. By adding a video and showing two video clips, but one gives it as a mistake.


Code:
console.log('//-Written by Chalo ------ Open Source 2014-2016 -----//');
console.log('//--------- http://www.opensourcephpbb3.com ----------//');
console.log('//------------------- Version: 1.5.2 -------------------//');
var os = {
    lang: {
        success_reply: 'Съобщението е изпратено успешно', // <--- change this text exactly like is display in your language board
        flood: 'Flood control is active on this forum, please wait 10 second(s) before replying or posting',
        newpost: 'A new message has been posted',
        error_reply: 'Опитай пак',
        words_reply: 'Съобщението трябва да съдържа поне 5 знака',
        button_send_reply: 'Изпраща се...',
        notice_original: 'Няма предварително зададен текст',
        wait_notice: 'Съобщението се изпраща.',
        color_a: 'linear-gradient(to bottom, #febbbb 0%,#fe9090 45%,#ff5c5c 100%)',
        color_b: 'linear-gradient(to bottom, #ffaf4b 0%,#ff920a 100%)',
        color_c: 'linear-gradient(to bottom, #87e0fd 0%,#53cbf1 40%,#05abe0 100%)',
        color_d: 'linear-gradient(to bottom, #ff3019 0%,#cf0404 100%)',
        color_e: 'linear-gradient(to bottom, #d2ff52 0%,#91e842 100%)'
    },
    length_reply: 5, //min letters in the textarea before reply
    time: 3500,
    init: function() {
        os.isTheme = /\/t\d+/g.test(window.location.pathname);
        os.phpbb2 = document.getElementsByClassName('bodylinewidth').length;
        os.phpbb3 = document.getElementById('phpbb');
        os.invision = document.getElementById('ipbwrapper');
        os.punbb = document.getElementById('pun-intro');
        os.form_reply = document.forms.post;
        os.button_reply = os.form_reply.post;
        os.button_value_reply = os.form_reply.post.value;
        os.textarea = os.form_reply.message;
        os.action_reply = os.form_reply.action;
        os.isTheme && os.post();
    },
    notice_div: function(c, f) {
        var a, b, d, e, g;
        g = document.getElementsByClassName('notice_reply');
        b = document.getElementsByClassName('sceditor-group')[0];
        d = b.parentNode;
        a = !g.length ? document.createElement('DIV') : g[0];
        e = 'height:20px;line-height: 1.5;border-radius: 3px; text-shadow: 0 1px rgba(255, 255, 255, 0.46);text-align:center';
        !g.length && (a.classList.add('notice_reply'), a.setAttribute('style', e), d.insertBefore(a, b));
        a.style.display = 'block';
        a.innerHTML = 'undefined' == typeof c ? os.lang.notice_original : c;
        a.style.background = 'undefined' == typeof f ? os.lang.color_a : f;
        setTimeout(function() {
            a.style.display == 'block' && (a.style.display = 'none')
        }, os.time)
    },
    post: function() {
        var c, h, a, d, b, v, i, x, y, z;
        h = os.action_reply;
        os.form_reply && (os.button_reply.onclick = function() {
            return os.sceditor = $(os.textarea).sceditor('instance'), os.sceditor.updateOriginal(), z = document.getElementsByClassName('new_ajax_post'), z.length && z[0].classList.remove('new_ajax_post'), os.sceditor.val().length > os.length_reply ? (os.button_reply.value = os.lang.button_send_reply, os.XML(os.serialize(os.form_reply) + '&post=1&prevent_post=1', h, function(e) {
                for (x = e.responseXML, y = x.getElementById(os.phpbb2 ? 'page-body' : 'main'), a = y.innerHTML.indexOf(os.lang.success_reply), b = y.innerHTML.indexOf(os.lang.flood), v = x.getElementsByTagName('a'), i = 0; i < v.length; i++) /\/viewtopic/g.test(v[i].href) && (c = v[i].href, d = v[i].href.match(/(\d+)$/g)[0]);
                b > 0 ? (os.notice_div(os.lang.flood, os.lang.color_b), os.button_reply.value = os.button_value_reply) : y.innerHTML.indexOf(os.lang.newpost) > 0 ? os.XML(os.serialize(x.forms.posts), '/post', function() {
                    0 > a ? os.notice_div(os.lang.error_reply) : (os.get_post(c, d), os.button_reply.value = os.button_value_reply)
                }) : 0 > a ? os.notice_div(os.lang.error_reply) : (os.get_post(c, d), os.button_reply.value = os.button_value_reply, os.notice_div(os.lang.wait_notice, os.lang.color_c))
            })) : os.notice_div(os.lang.words_reply, os.lang.color_d), !1
 
        });
    },
    get_post: function(c, a) {
        var b, d;
        os.XML('', c, function(e) {
            d = e.responseXML;
            b = d.getElementsByClassName('post--' + a)[0];
            b.style.display = 'none';
            b.className += ' new_ajax_post';
            os.set_post(b);
            os.sceditor.val('');
            os.notice_div(os.lang.success_reply, os.lang.color_e);
        })
    },
    set_post: function(h) {
        var e = os.punbb ? document.getElementsByClassName('topic')[0] : os.phpbb2 ? document.getElementsByClassName('catBottom')[0].parentNode.previousElementSibling : os.phpbb3 ? document.getElementsByName('bottomtitle')[0].previousElementSibling : os.invision && document.getElementsByClassName('topic-footer')[0].previousElementSibling;
        os.punbb ? e.appendChild(h) : e.parentNode.insertBefore(h, e.nextSibling);
        os.fadeIn(h, 500);
    },
    XML: function(a, b, f) {
        var c;
        c = window.XMLHttpRequest ? new XMLHttpRequest : window.ActiveXObject && (new ActiveXObject('Microsoft.XMLHTTP'));
        'undefined' != typeof a ? c.open('POST', b) : c.open('GET', b, true);
        c.responseType = 'document';
        c.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        'undefined' != typeof a ? c.send(a) : c.send();
        c.onreadystatechange = function() {
            this.readyState == 4 && this.status == 200 && (f(this));
        };
    },
    serialize: function(b) {
        var a, i, j, s = [];
        if ('object' == typeof b && 'FORM' == b.nodeName) {
            var len = b.elements.length;
            for (i = 0; len > i; i++)
                if (a = b.elements[i], a.name && !a.disabled && 'file' != a.type && 'reset' != a.type && 'submit' != a.type && 'button' != a.type)
                    if ('select-multiple' == a.type)
                        for (j = b.elements[i].options.length - 1; j >= 0; j--) a.options[j].selected && (s[s.length] = encodeURIComponent(a.name) + '=' + encodeURIComponent(a.options[j].value));
                    else('checkbox' != a.type && 'radio' != a.type || a.checked) && (s[s.length] = encodeURIComponent(a.name) + '=' + encodeURIComponent(a.value))
        }
        return s.join('&').replace(/%20/g, '+');
    },
    fadeIn: function(a, b) {
        var e, d;
        if (!a) return;
        a.style.opacity = 0, a.style.filter = 'alpha(opacity=0)', a.style.display = '', a.style.visibility = 'visible',
            b ? (e = 0, d = setInterval(function() {
                e += 50 / b, e >= 1 && (clearInterval(d), e = 1), a.style.opacity = e, a.style.filter = 'alpha(opacity=' + e * 100 + ')'
            }, 50)) : (a.style.opacity = 1, a.style.filter = 'alpha(opacity=1)')
    }
};
$(function() {
    (document.getElementById('logout') && /\/t\d+/g.test(window.location.pathname) && $.sceditor) && os.init()
});
$(document).on('ready', function() {
    $('.vbox7hotro td').each(function() {
        var davhotrofmvbox7 = $(this).text();
        $(this).prepend('<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>');
    });
});
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Ch@lo Valdez on June 15th 2017, 8:17 pm

you can't see that video immediately because is a iframe and that code is not loaded until the page is refresh
Code:
<iframe width="560" height="315" src="https://www.vbox7.com/emb/external.php?vid=' + davhotrofmvbox7 + '" frameborder="0" allowfullscreen></iframe><style>.vbox7hotro{font-size: 0px;}</style>


avatar
Ch@lo Valdez
Forumember

Male Posts : 131
Reputation : 45
Language : spanish

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 15th 2017, 9:51 pm

YouTube videos are displayed immediately.
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 15th 2017, 11:59 pm

I also use the vbox7 button in the editor.
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by Ch@lo Valdez on June 16th 2017, 12:34 am

YouTube is diferent
avatar
Ch@lo Valdez
Forumember

Male Posts : 131
Reputation : 45
Language : spanish

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by APE on June 24th 2017, 1:27 pm

Hello @smurfavr

Is this now solved ?

yes please tell us its solved if no then don't change the icons until you are 100% sure it is.



avatar
APE
Manager
Manager

Male Posts : 10450
Reputation : 963
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by smurfavr on June 24th 2017, 8:29 pm

They said they could not help me.
avatar
smurfavr
Active Poster

Male Posts : 1559
Reputation : 13
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: vbox7 by hotrofm

Post by APE on June 25th 2017, 11:18 am

ok thank you i will close this now then.
Problem solved & topic archived.
Please read our forum rules: ESF General Rules



avatar
APE
Manager
Manager

Male Posts : 10450
Reputation : 963
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum