Jump to content

Recommended Posts

 

Hoping the admins of this place have a gander...

 

Some times in longer threads one tends to quote a small section from the thread, comment on it, then quote another section from the same thread and comment again (here is a fine example). The problem is, you have to manually delete bits of the quoted thread and inserts and remove unwanted quote tags... almost like your doing some blummin html coding, pretty time consuming.

 

A really nice feature to have (one which i am currently in the process of adding onto my own forum) would be to have a "quote selection". Which essentially mean you only insert the text you want into the quote tags:

1. User highlights the section of the thread they wish to quote within a thread.

2. With the section still selected, the user presses "quote selection". This then simply grabs the selected text, and inserts the quote into the textarea (where the reply is being written) along with the userID and the rest of the jazz required for quoting.

 

Much slicker. Slicker is quicker. Quicker is better. :)

Link to comment
https://forums.phpfreaks.com/topic/241657-forum-thread-quote-selection/
Share on other sites

Hi freelance84,

 

Some nice suggestions there, some of which I have often thought about myself though I don't really use the WYSIWYG editor. I simply copy what I need and past them between

tags.

 

Anyway, generally we like to keep mods to the boards pretty slim for easier maintenance. If we can find a mod that's easy enough to install / patch into the system it might be worth discussing further. I'll see what we can find.

For the most part, when I multi-quote, I usually start out with the full block of text I am quoting, and then break it up chunk by chunk.  Or I'm quoting multiple people, in which case I can just click on each quote button.

 

But there are times when I want to quote just part of something and it's buried within a whole lot of something else, and something like what you mention would indeed be convenient.

 

Not sure how feasible that really is though... ideally it would have to not only capture the text, but the markup and styling behind all the pieces of what you select and then translate it back to the bbcode version..something I don't think the SMF software currently does at any point.  I'm pretty sure the posts are stored in the DB as how you enter it in when posting (with bbcode) and then it gets parsed when displayed.  IOW, there's code that goes one way, but not the other.  And for the quote, it just pulls what is currently in the db.  Which is easy enough when you're just pulling an entire entry by an id, but trying to figure out the correct bbcode wrapped around selected text (even individual parts of it)...

 

 

We were wondering how to apply this feature to our own custom made forum... (the forum that we made does indeed store the posts in the same format as was typed in by the 'poster'. And the algorithm written for turning the said post into html is kind of one way).

 

The ultimate goal (we think, as it would require less data transmission between server and client) would be to write a JS function which could grab the selected text from the page, replace the html tags with the appropriate "forum tags" (bbcode), and insert into the textarea... but then to do that you would have to be making your selection from the html source it self.. bit tricky as in the browser you don't actually see the html source

 

So, as a work around one suggestion we came up with would be:

 

1 - user clicks "quote selection"

 

2 - by clicking this link/button, js temporarily places the "html formatted post" into a hidden container, the postID is sent back to the server, and the server returns with the non-altered forum post.

 

3 - js then inserts the responseText into the original post container

 

4 - the user then selects the bit of the post they wish to quote

 

5 - the user then clicks a confirm button

 

6 - a) js then simply grabs the selected "forum formatted" text and inserts it into the textarea between the quote tags with all the rest of the relavent post id data... etc which it can simply grab from screen.

    b) also, js then gets the "html formatted text" back out of the temporary hidden container and places it back into its rightful place.

 

Granted this is not as slick as could be, but most likely better than the current method.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.