• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Smilies Under type box.

Just a note that I may have figured out how to edit the editor via a template edit and some hacking on my part... It may not be efficient and all but i may be able to add a global variable that then gets referenced via a template I add and then via the editor template via <xen:include>.


Good stuff KK. Look forward in seeing what you come up with. What are the chances that you'll be able to replicate the structure/look as suggested in the first post of this thread? And also the chances of the hide/unhide tab making it in also from the second screenshot in the first post?
 
good grief, I was hoping it wasn't going to be all this complicated.

Thanks for your continued efforts, KK.
 
What I plan on doing sounds complicated, but in theory shouldn't be all that complicated. It just may create a small amount of overhead. And I haven't actually had time to actually look at this, I was just brainstorming. haha.
 
This would be a nice addition. I really do like the ability to hide the smilies as in the OP second picture. Smilies should be hidden by default, and then clicked on to view them.
 
This would be a nice addition. I really do like the ability to hide the smilies as in the OP second picture. Smilies should be hidden by default, and then clicked on to view them.


A tab was just added to hide them by inph like you see on the thread listings. :)
 
Do you mind if I ask how you accomplished it? (Unless its all templates edits).

Javascript/jQuery, one new template (will probably be two due to editor and editor_quick_reply being quite different) and 3 template edits. Smilies are exported in JSON into xenforo_smilies already by XF. So we parse them from that since there's no point duplicating that effort and then populate a div with images wrapped in spans. Make them clickable to insert the smilies into tinyMehheadaChE.

If you want to see the code and where it's currently at drop me a pm for my test board url.

This would be a nice addition. I really do like the ability to hide the smilies as in the OP second picture. Smilies should be hidden by default, and then clicked on to view them.

Added a tab in the same fashion as the display thread options tab.
It wont be hard to choose what the default state open/closed.

Will probably drop the fieldset and the Smilies legend from the top of the box since it's sort of obvious.

Open to styling requests at the moment and any suggestions on how to keep it simple but improve how it works.

Also alt text isnt showing on img's generated by jQuery so if anyone knows why that is and a way around it let me know.
 

Attachments

  • xenforo_happy_place2.webp
    xenforo_happy_place2.webp
    25.6 KB · Views: 47
Much better approach than I would have taken. :)

If you want help (with your last problem), send me a PC with the URL and I will see what I can figure out. :)
 
Javascript/jQuery, one new template (will probably be two due to editor and editor_quick_reply being quite different) and 3 template edits. Smilies are exported in JSON into xenforo_smilies already by XF. So we parse them from that since there's no point duplicating that effort and then populate a div with images wrapped in spans. Make them clickable to insert the smilies into tinyMehheadaChE.

If you want to see the code and where it's currently at drop me a pm for my test board url.



Added a tab in the same fashion as the display thread options tab.
It wont be hard to choose what the default state open/closed.

Will probably drop the fieldset and the Smilies legend from the top of the box since it's sort of obvious.

Open to styling requests at the moment and any suggestions on how to keep it simple but improve how it works.

Also alt text isnt showing on img's generated by jQuery so if anyone knows why that is and a way around it let me know.
What's the code you're using?
I think i had the same problem some time ago with the images text.
 
What's the code you're using?
I think i had the same problem some time ago with the images text.
PHP:
var smilieLink  = '<img src="' + smilieFile + '" alt="' + smilieTitle + '" code="' + smilieCode + '" class="smilie" />';
$('#happyplace').append('<span class="rawr" alt="' + smilieTitle + '">' + smilieLink + '</span>');
Generated HTML looks a bit like:
Code:
<span class="rawr" alt="Bounce" style="vertical-align: middle; display: inline-block; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; background-color: rgb(255, 255, 255); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); ">
<img src="styles/default/xenforo/smilies/bbsmiley/bounce.gif" alt="Bounce" code=":bounce:" class="smilie"></span>

I have no idea why the alt text isnt showing.

On a suggestion changed the clickable area so the container span's are now clickable instead of just the image.

Bit happier with the look now, bit more like an expanded bottom menu bar that fits slightly better (see attached image)

Think we're at the point now where a public demo would work for more feedback and further testing.

Live demo: http://doesnotexist.net/xf/index.php?threads/more-smilies-dev-and-testing.1/page-2
 

Attachments

  • xenforo_happy_place5.webp
    xenforo_happy_place5.webp
    45.3 KB · Views: 33
Will be have an option as to how many smilies actually show before the tab is clicked on to show more?
This is looking great!
 
There's a link to the demo board (above) peggy might want to try it out firsthand. :)
Oh I didn't see the link. I'll go try it.


EDIT: I like it!!!

I'd still like to know, tho, if we can control how many smilies show in the box before we have to click the tray tab.

Awesome work inph!
 
No no... the number of smilies that show in the box under the text editor.
 

Attachments

  • Image1.webp
    Image1.webp
    24.3 KB · Views: 31

Similar threads

Replies
56
Views
5K
Back
Top Bottom