The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Create a button

    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Create a button

    Post by ahmed Salman August 8th 2016, 9:07 am

    How can I create a button

    When click on it
    [example]text[/example]

    But the truth is a text HTML
    like that
    <div class="new"><p>example</p></div>

    i want [example]text[/example] work on <div class="new"><p>example</p></div>
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Create a button Empty Re: Create a button

    Post by Draxion August 8th 2016, 9:43 am

    Hi there,

    Can you explain your issue a little clearer cause I am a little puzzled on what exactly you are needing? Are you just trying to make a simple button that links to somewhere?
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 8th 2016, 9:48 am

    that [example]text[/example] show in topic
    Create a button 2016-014

    that is code html i want that working bbcode
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Create a button Empty Re: Create a button

    Post by Draxion August 8th 2016, 9:51 am

    You just want it working in BBCode or you want HTML to work in posts?
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 8th 2016, 9:55 am

    I want button action in the editor
    Lead to the inclusion of this code

    [example][/example]


    And after sending shows this format

    <div class="new"></div>
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Create a button Empty Re: Create a button

    Post by Draxion August 8th 2016, 9:57 am

    Oh... I get it. There is something that could help. Do you understand code well?
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 8th 2016, 10:09 am

    I did not understand you
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 9th 2016, 12:41 am

    ?????
    YoshiGM
    YoshiGM
    Active Poster


    Male Posts : 1562
    Reputation : 146
    Language : Spanish & English
    Location : Mexico

    Create a button Empty Re: Create a button

    Post by YoshiGM August 9th 2016, 4:15 am

    Hi,
    To do that, you need to use a Javascript code:

    ACP > Modules > HTML & Javascript Management > Javascript Management > Create One
    Place: In all pages

    Code:
    $(function(){
        $(function(){
              $('<a class="sceditor-button sceditor-button-new-button-name" unselectable="on" title="Additional Info on Hover Here"><div unselectable="on" style="background-image:url(http://icons.iconarchive.com/icons/icons8/windows-8/16/City-No-Smoking-icon.png)">NEW_BUTTON_NAME</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
                  $('#text_editor_textarea').sceditor("instance").insertText("[BBCODE]","[/BBCODE]");
              });
          });
    });

    Explatation to edit it:


    ā€¢Change the class ā€œsceditor-button-new-button-nameā€ to your new button name. Useful if you want to add a button after or before it later.
    ā€¢Change the title= to a more descriptive, helpful text for the user.
    ā€¢Change the background-image to what the button will look like.
    ā€¢Change NEW_BUTTON_NAME to the buttons name.

    ā€¢Find the class name of the button where you want this placed after and then change insertAfter(ā€˜.sceditor-button-fahideā€˜) .sceditor-button-fahide to that buttonā€™s class name. You can change insertAfter to insertBefore if needed.

    Finally, change the insertText as you need it.
    NOTE: You can use HTML if you have it enabled on your board.

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3524
    Language : English
    Location : United States

    Create a button Empty Re: Create a button

    Post by SLGray August 9th 2016, 4:48 am

    ahmed Salman wrote:I did not understand you

    ahmed Salman wrote:
    ?????
    Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
    Please read our forum rules: Ā ESF General Rules



    Create a button Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 9th 2016, 12:09 pm

    ok i have that code css

    Code:
    .solved{background:url(http://i35.servimg.com/u/f35/19/50/18/33/solved10.png) no-repeat scroll 99% center #9FF;border:1px solid #0CF;border-radius:5px 5px 5px 5px;color:#999;direction:rtl;margin:10px auto;padding:0 0 2px;width:60%}.solved p{color:#999;font-weight:700;margin:12px 29px 9px 12px;padding-right:18px;text-shadow:0 0 0 #fff}

    i want When click the button show [BBCODE][/BBCODE] when i send post that show my code css (.solved) Rolling Eyes
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 10th 2016, 10:31 am

    i need help
    ahmed Salman
    ahmed Salman
    New Member


    Posts : 24
    Reputation : 1
    Language : en

    Create a button Empty Re: Create a button

    Post by ahmed Salman August 11th 2016, 2:14 pm

    if you cant help me in this
    i want hashtag button

      Current date/time is November 13th 2024, 8:25 pm