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 December 27th 2012, 9:13 am

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 December 28th 2012, 1:10 pm

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 December 30th 2012, 6:50 am

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 December 30th 2012, 10:16 am

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 December 30th 2012, 2:09 pm

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 December 31st 2012, 10:23 pm

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 January 2nd 2013, 8:25 am

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 January 3rd 2013, 2:23 pm

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 January 5th 2013, 9:30 am

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 January 7th 2013, 3:48 pm

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 January 8th 2013, 7:58 pm

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 January 11th 2013, 12:52 pm

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 January 13th 2013, 2:10 am

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 January 16th 2013, 9:09 am

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 January 24th 2013, 3:49 am

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 January 24th 2013, 1:28 pm

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 January 24th 2013, 5:16 pm

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 : 2822
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 January 25th 2013, 12:58 pm

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 January 25th 2013, 5:00 pm

Its a choice you have to make.
avatar
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2822
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 January 29th 2013, 3:08 pm

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