Jump to content

Manually creating a quote - Can you edit the quote header to be something other than "Quote"?


EdDinIL
 Share

Recommended Posts

From Abraham Lincoln's Gettysburg Address:

"Four score and seven years ago..."

 

The hardest part is getting rid of the "said" that the software wants to use to end every attribution. The second hardest part is the apostrophe.

 

As long as you don't want to do either of those things, you either edit the HTML "data-ipsquote-username" attribute or create a separate HTML document outside the IPS software and copy/paste it.

 

Edited by Euler
Link to comment
Share on other sites

Here's something I posted right after the switch to the new IPS version.

 

On 8/14/2021 at 11:21 PM, Euler said:

For those who used to use BBCode and miss it, the old forum used to store posts as BBCode (exactly like MediaWiki stores articles as wiki markup). However the new forum stores posts as HTML. With a little playing around, it appears storing posts as HTML provides us with a little more flexibility, at the cost of some extra pain.

  1. Compose a new post in HTML in a text editor, like Windows Notepad.
  2. Save the HTML and open it in at new tab/window in your browser.
  3. Copy from the browser and paste into the "new comment" dialog in IPB.

As a sort-of benefit, [pre] didn't work in the old forum, but <pre> works as HTML in the new forum. Also, editing HTML in Notepad (etc.) allows access to all the data fields in IPB quotes.

 

For example:

<!DOCTYPE html><html><head><meta charset="UTF-8"/></head><body>
<blockquote class="ipsQuote" data-ipsquote-timestamp="1628997661" data-ipsquote-username="Self-reference">
<p>blah blah blah</p>
</blockquote>
</body></html>

 

Produces:

On 8/14/2021 at 11:21 PM, Self-reference said:

blah blah blah

 

Link to comment
Share on other sites

On 1/9/2023 at 4:46 PM, Euler said:
  1. Save the HTML and open it in at new tab/window in your browser.
  2. Copy from the browser and paste into the "new comment" dialog in IPB.

 

Curious how to you 'copy' the HTML markup from the browser?  When I do that it copies the "blah blah blah" and even though the forum will says it's rich text all that appears is

 

blah blah blah

Link to comment
Share on other sites

On 1/11/2023 at 3:28 AM, Flynn said:

Hmm...  No select all in the 4 browsers I tried, but CTRL A works and it still only copies the "blah blah blah" text to the forum, the markup in the HTML is not transfered.

 

I wonder if HTML is turned on for some accounts and not others

 

"Select all" exists in Firefox in the Edit menu, both for Linux and Windows, but (as you say) Ctrl-A works. I don't have Chrome in front of me ATM, but I'm pretty I've used it there, too.

 

I don't think the forum software is smart enough to turn off HTML (rich text) for anyone. Specifically, one of the changes going from the previous version to this one is that there is no more plain text (textarea) editing. I've certainly seen plenty of posts other people have copied from other web pages that include lots of references to extraneous class names and "data-" values, so it's not just me.

Link to comment
Share on other sites

On 1/11/2023 at 7:16 PM, mauserme said:

That's interesting.

 

Can post HTML? is set to no by default, for all member groups.

 

I believe that admin option is for "raw" HTML, like if someone explicitly puts HTML in their post as tags to have the forum software render it (like BB code used to be).

 

For example, if I type:

<span style="font-size: 48px;">This is BIG!</span>

 

The forum software interprets it as literal text. But if I copy/paste it from another window/tab where it's already been rendered, it displays as:

This is BIG!

 

The first is an HTML post (HTML interpreted as either text or formatting directives, based on an administrative option). The second is a "rich text" post (HTML rendered as formatted text for everyone). Rich text (already rendered HTML, e.g., from Word) is intended by the software publishers. I've noticed that the forum software does parse rich text to remove some options, so it's clearly validating inputs, not just blindly accepting them all.

Link to comment
Share on other sites

On 1/11/2023 at 7:12 PM, Euler said:

The second is a "rich text" post (HTML rendered as formatted text for everyone). Rich text (already rendered HTML, e.g., from Word) is intended by the software publishers. I've noticed that the forum software does parse rich text to remove some options, so it's clearly validating inputs, not just blindly accepting them all.

 

I agree, the forum won't accept raw HTML unless enabled, and it shouldn't be enabled for security reason, but I'm still at a loss as to how you get the quote to copy and paste properly, as when the blockquote is renderd on a normal webpage outside of the forums backend class, the blockquotes are not rendered like they are in the forum thus when you copy off the webpage and paste in the forum it doesn't render right either, at least for me.

 

Let's take your example

 

<!DOCTYPE html><html><head><meta charset="UTF-8"/></head><body>
<blockquote class="ipsQuote" data-ipsquote-timestamp="1628997661" data-ipsquote-username="Self-reference">
<p>blah blah blah</p>
</blockquote>
</body></html>

 

I uploaded that as a webpage here http://ccola.atwebpages.com/ictest.html

 

If I select all and copy that webpage and paste here I get this, not quote box just the blah, blah, blah text as seen below.

 

blah blah blah

 

And if I take what should render your Gettysburg Address example.

 

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
</head>

<body spellcheck="false">
    <blockquote class="ipsQuote" data-ipsquote-username="From Abraham Lincoln's Gettysburg Address">
        <div class="ipsQuote_citation">From Abraham Lincoln&apos;s Gettysburg Address:</div>
        <div class="ipsQuote_contents">
            <p>&quot;Four score and seven years ago...&quot;</p>
        </div>
    </blockquote>
</body>

</html>

 

I uploaded that here http://ccola.atwebpages.com/ictest2.html it again is not rendered properly and a copy paste results in simply this.

 

From Abraham Lincoln's Gettysburg Address:

"Four score and seven years ago..."

Link to comment
Share on other sites

Indeed what you are apparently copy/pasting is

 

<span style="color:#000000;font-size:medium;">blah blah blah</span>

 

and

 

<div style="color:#000000;font-size:medium;">
        From Abraham Lincoln's Gettysburg Address:
    </div>

<div style="color:#000000;font-size:medium;">
        <p>
            "Four score and seven years ago..."
        </p>
    </div>

 

I know I've seen a ton of other people/copy paste here from various web sources, preserving all the (too much, IMO) HTML formatting. When I copy/paste from the examples you uploaded to atwebpages, I get:

 

On 8/14/2021 at 11:21 PM, Self-reference said:

blah blah blah

 

and

 

From Abraham Lincoln's Gettysburg Address said:

"Four score and seven years ago..."

 

Note that you don't need (and don't necessarily want) the extraneous divs:

<div class="ipsQuote_citation">From Abraham Lincoln&apos;s Gettysburg Address:</div>
        <div class="ipsQuote_contents">

        </div>

 

The forum software creates them automatically. In the case of ipsQuote_citation, it recreates it, because it reinserts the "said."

 

I just tried Edge (Windows), and I notice that Edge doesn't copy the HTML. Edge is pretty much just Chrome with Microsoft window-dressing (no pun intended). I can try genuine Chrome tomorrow.

 

FWIW, Firefox on both Windows and Linux works.

 

Link to comment
Share on other sites

On 1/11/2023 at 11:40 PM, Euler said:

FWIW, Firefox on both Windows and Linux works.

 

Interesting, it appears to be a Chromium copy and paste thing.  If I copy it in Firefox and paste in Firefox it works as expected, on the other hand no matter what I copy or paste using a Chromium based browser (Chrome/Edge/Brave/Opera) it doesn't work, even if I copy it using Firefox and paste in a Chromium browser, Chromium apparently strips the formatting while pasting.  Same with copy, if I copy it in Chromium, and paste it in Firefox the formatting is again stripped.

 

Seems something in Chromium's underlying code removes some HTML elements in both the copy and paste routines.

 

Odd to see such a difference in compatibility in today's browsers, brings me back to the Netscape vs Internet Explorer days, that made making websites that rendered properly in both a nightmare!

 

So the mystery is solved.

 

 

Edited by Flynn
Link to comment
Share on other sites

On 1/12/2023 at 4:55 AM, Flynn said:

Now that we established you can do this in non-Chromium browsers, what is the trick to nuking the "said"?

 

Edit the forum-generated HTML in HTML inspector after the forum software generates the attribution. Editing in inspector would be frustrating to anyone not already familiar with it, which is pretty much everyone, so I'm not going to recommend it.

Link to comment
Share on other sites

On 1/9/2023 at 3:30 PM, EdDinIL said:

The title says it all... When you click the quotation marks, you get a handy quote window for pasting whatever you're quoting:

 

 

Is it possible to edit "Quote" to be "From Abraham Lincoln's Gettysburg Address", for example?

 

Editing this on a PC in Chrome, if that matters.

 

I'm an old school guy that's been using BB code on the forum for a long time.  If you aren't worried about getting rid of "said" you could try this.

 

Posting

 


[quote name="mauserme"]This is how you do it with BB code.[/quote]

 

yields

 

This is how you do it with BB code.

 

 

 

Link to comment
Share on other sites

On 1/12/2023 at 11:50 AM, Euler said:

 

Edit the forum-generated HTML in HTML inspector after the forum software generates the attribution.

 

Make sense, that is honestly more straight forward for me 🤣

 

Constitution of the United States

A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.


 

Link to comment
Share on other sites

On 1/12/2023 at 1:11 AM, Flynn said:

 

Interesting, it appears to be a Chromium copy and paste thing.  If I copy it in Firefox and paste in Firefox it works as expected, on the other hand no matter what I copy or paste using a Chromium based browser (Chrome/Edge/Brave/Opera) it doesn't work, even if I copy it using Firefox and paste in a Chromium browser, Chromium apparently strips the formatting while pasting.  Same with copy, if I copy it in Chromium, and paste it in Firefox the formatting is again stripped.

 

Seems something in Chromium's underlying code removes some HTML elements in both the copy and paste routines.

 

 

What if you typed it in manually, instead of paste?
Will Chromium allow you to enter the text/data that you want?

IT's possible to have a tool that simulates typing what you have in your buffer.

 

Link to comment
Share on other sites

On 1/15/2023 at 9:07 AM, mikew said:

What if you typed it in manually, instead of paste?
Will Chromium allow you to enter the text/data that you want?

IT's possible to have a tool that simulates typing what you have in your buffer.

 

 

I'm guessing not, from what I can see Chromium strips stuff on the paste function itself, as I  tried copying it in Firefox and pasting in Chromium and it failed as well, I know the copy from Firefox is correct as it works if I paste it in Firefox, but still doesn't work in Chromium.

 

There is some quirk in Chromium based browsers, there might be a way to tweak the code that gets past this Chromium quirk but, that is better left to someone that is more up to date on modern website protocols 😂 and things.  I owned a web development company in the late 90s early 2000s so I have a backgroud, but I have not fully kept up with the ever changing plethora of changes that have happened in the last 15 years.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...