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.

Select Content Button in Quote and Spoiler?

View previous topic View next topic Go down

In progress Select Content Button in Quote and Spoiler?

Post by Aconitin on 27/12/2012, 09:13

I've read this tutorial >> http://help.forumotion.com/t93456-select-content-button
It works but I want to add Select Content button in Quote and Spoiler too, not only in Code box..
Any ideas? Wink

Thanks..
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 28/12/2012, 13:10

Boom Boom Poow..
Up.. Up.. Up..
Very Happy
Any Help?
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 30/12/2012, 06:50

Bump.. Shocked
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Cassius Dio on 30/12/2012, 10:16

Hi,

Replace that code with:
Code:
function selectCode(a)
    {
    // Get ID of code block
    var e = jQuery(a).closest('tr').next().find('.cont_code')[0];

    // Not IE
    if (window.getSelection)
    {
    var s = window.getSelection();
    // Safari
    if (s.setBaseAndExtent)
    {
    s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
    }
    // Firefox and Opera
    else
    {
    // workaround for bug # 42885
    if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
    {
    e.innerHTML = e.innerHTML + ' ';
    }

    var r = document.createRange();
    r.selectNodeContents(e);
    s.removeAllRanges();
    s.addRange(r);
    }
    }
    // Some older browsers
    else if (document.getSelection)
    {
    var s = document.getSelection();
    var r = document.createRange();
    r.selectNodeContents(e);
    s.removeAllRanges();
    s.addRange(r);
    }
    // IE
    else if (document.selection)
    {
    var r = document.body.createTextRange();
    r.moveToElementText(e);
    r.select();
    }
    }
    jQuery(function(){

    jQuery('div.postbody td.code').parent().prev().find('b').html('Code:
    <a href="javascript:void()" ><font
    face="verdana" color="red"></font> Select Content </a>');
    });






function selectCode(b)
    {
    // Get ID of code block
    var e = jQuery(b).closest('tr').next().find('.quote')[0];

    // Not IE
    if (window.getSelection)
    {
    var s = window.getSelection();
    // Safari
    if (s.setBaseAndExtent)
    {
    s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
    }
    // Firefox and Opera
    else
    {
    // workaround for bug # 42885
    if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')
    {
    e.innerHTML = e.innerHTML + ' ';
    }

    var r = document.createRange();
    r.selectNodeContents(e);
    s.removeAllRanges();
    s.addRange(r);
    }
    }
    // Some older browsers
    else if (document.getSelection)
    {
    var s = document.getSelection();
    var r = document.createRange();
    r.selectNodeContents(e);
    s.removeAllRanges();
    s.addRange(r);
    }
    // IE
    else if (document.selection)
    {
    var r = document.body.createTextRange();
    r.moveToElementText(e);
    r.select();
    }
    }
    jQuery(function(){

    jQuery('div.postbody td.quote').parent().prev().find('b').html('Quote:
    <a href="javascript:void()" ><font
    face="verdana" color="red"></font> Select Content </a>');
    });

I tried to add for Spoilers too, but I couldn't.
avatar
Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 30/12/2012, 14:09

Well, I will wait for the complete code (including Spoiler)..
But, thanks for your reply.. Wink
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Cassius Dio on 31/12/2012, 22:23

Rideem3, I think he use phpBB2. Smile
avatar
Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 2/1/2013, 08:25

Um.. Bump? Very Happy
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 3/1/2013, 14:23

Guys? Any help?
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 5/1/2013, 09:30

Bump..
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 7/1/2013, 15:48

Bumpz.. Razz
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 8/1/2013, 19:58

Bump.. pirat
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 11/1/2013, 12:52

Bump.. Hem
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 13/1/2013, 02:10

Bump.. Laughing
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 16/1/2013, 09:09

I'm tired to bumping this topic.. LOL :lol;
Bump again..
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 24/1/2013, 03:49

Please lock this topic.. :/
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 24/1/2013, 13:28

No problem.. Wink
I don't need this code anymore..
You can lock this topic..

BTW, if I change my forum version to PhpBB3, my forum display will back to zero, isn't it?
I'm too lazy to re-built my forum from zero..
Correct me if I'm wrong..
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Sanket on 24/1/2013, 17:16

Just changing the version via admin panel for a specific skin will make the skin look bugged. Install skins for specific versions via Hitskin.com
avatar
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2828
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 25/1/2013, 12:58

The problem is I have a lot of codes and if I change my forum version, much of them will doesn't work anymore.. Wink
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Sanket on 25/1/2013, 17:00

Its a choice you have to make.
avatar
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2828
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

In progress Re: Select Content Button in Quote and Spoiler?

Post by Aconitin on 29/1/2013, 15:08

Haha, sure.. Very Happy
Ok, please lock this topic if no answer can be given.. Wink
avatar
Aconitin
Forumember

Male Posts : 246
Reputation : 7
Language : Indonesian
Location : Indonesia

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