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.

Table widgets in quick reply

View previous topic View next topic Go down

In progress Table widgets in quick reply

Post by Guest on January 3rd 2014, 5:34 pm

Need help creating the following in the image I provided below


Last edited by RDM-FlashBack on January 10th 2014, 3:10 am; edited 3 times in total (Reason for editing : Change title but was unsure what to name it hope what i choose is good enough)

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by SLGray on January 3rd 2014, 8:39 pm

Where did you get that screenshot from?

Please change the title of your topic, that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.


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


SLGray
Administrator
Administrator

Male Posts : 35622
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Luffy on January 3rd 2014, 9:01 pm

They are codes in widgets. I cannot give you the code because i got it from an other forum..







Luffy
Manager
Manager

Male Posts : 4035
Reputation : 407
Language : Greek, English
Location : Greece

http://www.thinktankforum.net

Back to top Go down

In progress Re: Table widgets in quick reply

Post by SLGray on January 3rd 2014, 9:06 pm

Have you ask on that forum if they would give you the codes?


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


SLGray
Administrator
Administrator

Male Posts : 35622
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 3rd 2014, 9:32 pm

don't even know what forum that would be so how would I be able to ask if someone is clueless where to turn to? this is suppose to be a help forum and I am seeing that this is not the case Sad sorry don't mean to sound like a *** but this is why you guys created a help section for others to to turn to if they are clueless.

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by SLGray on January 3rd 2014, 9:35 pm

RDM-FlashBack wrote:don't even know what forum that would be so how would I be able to ask if someone is clueless where to turn to? this is suppose to be a help forum and I am seeing that this is not the case Sad sorry don't mean to sound like a *** but this is why you guys created a help section for others to to turn to if they are clueless.
I was not talking to you, sorry if I caused any problems. Where did you get the screenshot in the first post?


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


SLGray
Administrator
Administrator

Male Posts : 35622
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 3rd 2014, 9:46 pm

punbb-design and the people there are ruder then you could imagine so I don't even go to that forum anymore i did to get a screen shot. I have to go pick up my kiddos from school so ill brb.


Last edited by RDM-FlashBack on January 4th 2014, 2:56 am; edited 1 time in total

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 3rd 2014, 11:01 pm

Hello RDM-FlashBack ,

This can be done by appending a new button to the editor and writing a function for it. Additionally you can use a variable from the toolbar to make this show only for the following :

1. ) Administrators
2. ) Moderators
3. ) Members

Currently I've added that variable to the if statement, so it will show only for 1 & 2. Furthermore this can be applied to a dropdown rather span multiple buttons.

First :
Admin Panel > Modules > HTML & JAVASCRIPT > Javascript codes management > Create a new script

Title : What you wish
Placement : In all the pages
Paste the code below and save :
Code:
jQuery(window).load(function() {
if (typeof _userdata === "undefined") return;
if ((_userdata['user_level'] == '1') || (_userdata["user_level"] == '2')) {
/* mod colors */
jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="modOption" id="MTable1">Solved</div><div class="modOption" id="MTable2">Denied</div><div class="modOption" id="MTable3">Information</div>');
jQuery('.sceditor-group:last-child').after('<div class="sceditor-group" id="fa_modtools"><a class="sceditor-button" title="Mod Tables" onclick="selectWysiwyg(this, \'fa_modtable\');"><div style="background:url(http://i56.servimg.com/u/f56/18/45/41/65/modera10.png) no-repeat center;"></div></a></div>');

/* mtable functions */
jQuery('#MTable1').click(function() { /* Solved */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-solved"][tr][td]','[/td][/tr][/table]');
});
jQuery('#MTable2').click(function() { /* Denied */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-denied"][tr][td]','[/td][/tr][/table]');
});
jQuery('#MTable3').click(function() { /* Information */
jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-info"][tr][td]','[/td][/tr][/table]');
});

/* hide list onclick */
jQuery('.modOption').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
}
});

Now we add our style :
Display > Pictures and colors > Colors > CSS stylesheet
paste the code below and submit :
Code:
/* mod options */
.modOption { font-size:10px; color:#000; padding:3px; cursor:pointer; }
.modOption:hover { background:#ddd; }
.modOption:active { background:#ff8; }
/* notice tables */
.notice-info {
background-color:#C0E0F8;
background-image:url('http://i56.servimg.com/u/f56/18/45/41/65/info11.png');
background-position:10px center;
background-repeat:no-repeat;
border:2px solid #99CCF2;
border-radius:5px;
color:#2C5793;
font-style:normal;
margin:5px;
padding:3px 3px 3px 35px
}
.notice-solved {
background-color:#d7e2b7;
background-image:url('http://i56.servimg.com/u/f56/18/45/41/65/solve110.png');
background-position:10px center;
background-repeat:no-repeat;
border:2px solid #b7c19a;
border-radius:5px;
color:#626f3d;
font-style:normal;
margin:5px;
padding:3px 3px 3px 35px
}
.notice-denied {
background-color:#F99;
background-image:url('http://i72.servimg.com/u/f72/18/45/41/65/cross11.png');
background-position:10px center;
background-repeat:no-repeat;
border:2px solid #CC7A7A;
border-radius:5px 5px 5px 5px;
color:#993D3D;
font-style:normal;
margin:5px;
padding:3px 3px 3px 35px
}

The result :



Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 4th 2014, 5:31 pm

do not close this yet is there away to add css java html the same way?

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 4th 2014, 7:15 pm

RDM-FlashBack wrote:do not close this yet is there away to add css java html the same way?
Without understanding what their function is, no.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Mati on January 4th 2014, 10:20 pm

I tried this but didn't work.

Mati
Active Poster

Posts : 1873
Reputation : 281
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://elite-gaming.forumotion.net/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 5th 2014, 1:37 am

Matti_7 wrote:I tried this but didn't work.

@Ange Tuteur wrote:Additionally you can use a variable from the toolbar to make this show only for the following :

1. ) Administrators
2. ) Moderators
3. ) Members

If you're not using the FA toolbar remove the if statements.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Mati on January 5th 2014, 1:47 am

No, I'm not using the FA toolbar and what do you mean "remove the if statements"

Mati
Active Poster

Posts : 1873
Reputation : 281
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://elite-gaming.forumotion.net/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 5th 2014, 1:55 am

If this variable is not defined, the script will not run :
Code:
_userdata

Code:
   jQuery(window).load(function() {
    /* mod tables */
    jQuery('body').append('<div id="fa_modtable" class="select" style="visibility:hidden;width:auto;text-align:left;"><div class="modOption" id="MTable1">Solved</div><div class="modOption" id="MTable2">Denied</div><div class="modOption" id="MTable3">Information</div>');
    jQuery('.sceditor-group:last-child').after('<div class="sceditor-group" id="fa_modtools"><a class="sceditor-button" title="Mod Tables" onclick="selectWysiwyg(this, \'fa_modtable\');"><div style="background:url(http://i56.servimg.com/u/f56/18/45/41/65/modera10.png) no-repeat center;"></div></a></div>');

    /* mtable functions */
    jQuery('#MTable1').click(function() { /* Solved */
    jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-solved"][tr][td]','[/td][/tr][/table]');
    });
    jQuery('#MTable2').click(function() { /* Denied */
    jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-denied"][tr][td]','[/td][/tr][/table]');
    });
    jQuery('#MTable3').click(function() { /* Information */
    jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-info"][tr][td]','[/td][/tr][/table]');
    });

    /* hide list onclick */
    jQuery('.modOption').click(function() { jQuery('#fa_modtable').css('visibility','hidden'); });
    });

Using the FA toolbar _userdata variable you can set this for Admins, mods, or members. All the functions in this script are within a if statement :
Code:
if ((_userdata['user_level'] == '1') || (_userdata["user_level"] == '2'))

if a user is level 1 or level 2 then it will run the functions within the statement. If these conditions are not met then the contents of the statement will not run. By removing the if statement then this will show for all users regardless if you're utilizing the toolbar.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Mati on January 5th 2014, 2:12 am

Ah, oki one last thing is it possible to add text inside the functions

Code:
       /* mtable functions */
        jQuery('#MTable1').click(function() { /* Solved */
        jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-solved"][tr][td]','[/td][/tr][/table]');
        });
        jQuery('#MTable2').click(function() { /* Denied */
        jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-denied"][tr][td]','[/td][/tr][/table]');
        });
        jQuery('#MTable3').click(function() { /* Information */
        jQuery('#text_editor_textarea').sceditor('instance').insertText('[table class="notice-info"][tr][td]','[/td][/tr][/table]');
        });

Something like this:
The question(s) in this topic have been answered and the owner has been able to solve the problem. Because of this, the topic has been locked.

Mati
Active Poster

Posts : 1873
Reputation : 281
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://elite-gaming.forumotion.net/

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 5th 2014, 2:26 am

If you wanted to add text, you would have to add it to either the end of the opening tags, or the beginning of the closing tags.

For example :
Code:
.insertText('[table class="notice-solved"][tr][td]Topic solved and archived','[/td][/tr][/table]')

It is set like this as to prevent deletion of current texts once the content in the function has been added to the SCEditor. The string before the comma is the opening content and the string after the comma is the closing content; think of the comma as the cursor. Wink

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 6th 2014, 6:33 pm

Ange Tuteur sorry I didn't get back to this been extremely busy but you mentioned something about with out knowing their function well here is what I gathered for you.

It works the same way to the recent thing you helped me with but what I am looking for is the same thing but when you select an option it will provide a box in with numbers in the reply box and this is what I gathered.


For (html)
Code:
[code][panda=html][/code]

For (Css)
Code:
[code][panda=css][/code]

For (JS)
Code:
[code][panda=js][/code]
       

Hope you understand what I am coming at Smile

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by Ange Tuteur on January 6th 2014, 11:30 pm

It is fine Smile

I have written a sample you can try however, I really do not understand what the function of this is supposed to be other than to be another code tag.

Javascript :
Title : what you wish
Placement : in all the pages
Code:
jQuery(window).load(function() {
jQuery('.sceditor-button-code').after('<a class="sceditor-button sceditor-button-html" title="HTML"><div style="background:url() no-repeat center;"></div></a>');
jQuery('.sceditor-button-html').click(function() {
jQuery('#text_editor_textarea').sceditor('instance').insertText('[code][panda=html]','[/code]');
});
});

I didn't add an image to this button, but it should display after the code tags button.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Jophy on January 10th 2014, 10:48 am

Hello,

The topic is marked as 'Solved', is this sorted?

Thanks.

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 10th 2014, 2:34 pm

Not yet jophy

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by Guest on January 10th 2014, 4:55 pm

@Ange Tuteur wrote:It is fine Smile

I have written a sample you can try however, I really do not understand what the function of this is supposed to be other than to be another code tag.

Javascript :
Title : what you wish
Placement : in all the pages
Code:
jQuery(window).load(function() {
jQuery('.sceditor-button-code').after('<a class="sceditor-button sceditor-button-html" title="HTML"><div style="background:url() no-repeat center;"></div></a>');
jQuery('.sceditor-button-html').click(function() {
jQuery('#text_editor_textarea').sceditor('instance').insertText('[code][panda=html]','[/code]');
});
});

I didn't add an image to this button, but it should display after the code tags button.
Not working it puts the code box with
Code:
  [panda=html] 
inside the code box. I'm not sure what the issue is. so till the mean time I will not mark this complete or solved I will just leave it open till I find out more.

Guest
Guest


Back to top Go down

In progress Re: Table widgets in quick reply

Post by Jophy on January 10th 2014, 5:33 pm

Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead.

2nd Reminder

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

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