DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Solved javascript for forum  (Read 11,876 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Solved javascript for forum
« on: October 21, 2005, 10:49 AM »
i've got one or two small ideas for an improvement to the javascript tools that are used here in our forum (and every smf forum), for the little tool buttons available when you create/edit posts.

i'll describe one briefly and i can provide much more info later if desired.

Code
basically there is a snippet of javascript executes when you click the bullet list button when editing a post.
right now it just adds a sample [li][/li] around your entire selected text.
i want it to add an [li][/li] around every line.

i can paste the existing code if someone wants to try it.
or if you write a function to add a string to begining and end of every CR separated line in a string, i'll take it from there and integrate it into existing javascript code.  shouldnt be more than a few lines of javascript i think.

there are other things that might be nice also, like a popup dialog when clicking the url link tool button and maybe some other stuff?

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: Solved javascript for forum
« Reply #1 on: January 03, 2012, 02:22 AM »
I think this one is done, and old, should it be marked complete?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Solved javascript for forum
« Reply #2 on: January 03, 2012, 01:37 PM »
yes, you are right. done and complete.

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: Solved javascript for forum
« Reply #3 on: January 04, 2012, 08:06 AM »
So I guess that is why it is under the "Finished Programs folder!  :-[ I'm an idiot

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Solved javascript for forum
« Reply #4 on: January 04, 2012, 08:12 AM »
no i just moved it because of your report -- it used to be in requests section -- you weren't imagining things :)

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: Solved javascript for forum
« Reply #5 on: January 04, 2012, 12:06 PM »
Glad to know I'm not quite as senile as I thought.
If I come across requests that are way old, should I ask if they are still required, or just use the "Report to moderator" link?

Original address: https://www.donationcoder.com/forum/index.php?topic=1284.0