Highlighted

Posting code

Engaged ,
Jul 13, 2009

Copy link to clipboard

Copied

I have just spent an exceedingly frustrating half-hour trying to post a few lines of JS to help out an Indesign user. I originally

tried via email; this worked, up to a point, except that some of the spaces used to format the code legibly appeared as HTML codes

at the forum and in the email notification. I then tried to edit the post and could not get the edit box to show what I put there. I

gave up and attached the code as a txt file.

Does anyone have a foolproof method of posting code at the forum?

Noel

Views

7.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Posting code

Engaged ,
Jul 13, 2009

Copy link to clipboard

Copied

I have just spent an exceedingly frustrating half-hour trying to post a few lines of JS to help out an Indesign user. I originally

tried via email; this worked, up to a point, except that some of the spaces used to format the code legibly appeared as HTML codes

at the forum and in the email notification. I then tried to edit the post and could not get the edit box to show what I put there. I

gave up and attached the code as a txt file.

Does anyone have a foolproof method of posting code at the forum?

Noel

Views

7.8K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

save it to a text file and attach it? or better, host it on your own site and link to it. then you don't have to wait for it to sit queued.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

did you try posting in the html view surrounding your code with <pre> tags?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

testing:

function popup() {
   alert("hello world");
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Engaged ,
Jul 13, 2009

Copy link to clipboard

Copied

did you try posting in the html view surrounding your code with <pre> tags?

That's what Insert > Syntax Highlighting > Java does; creates a

<pre class="jive_text_macro jive_macro_code" jivemacro="code" ___default_attr="java"><p> </p></pre>

section, so I tried just pasting the text between the <p></p> pair, but the results were entirely unpredictable. Sometimes the code just got truncated half way through, and sometimes what came after the </pre> found its way into the code section.

I see that where it did work (posted via email) in the Testing forum yesterday,

http://forums.adobe.com/thread/460973

the code block is partitioned off by different tags:

<pre class="jive-pre"><code class="jive-code"> </code></pre>

and I could copy this and paste it without getting a load of & n b s p ; in the middle.

So why what worked yesterday doesn't today remains a mystery.

Noel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

but the results were entirely unpredictable.

exactly. <sigh>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Mentor ,
Jul 13, 2009

Copy link to clipboard

Copied

Well you have to admit this jived up forum is consistent.

Its predictably unpredictable.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Advocate ,
Jul 13, 2009

Copy link to clipboard

Copied

Don't worry about troubleshooting all this technically, if it doesn't work, it doesn't work.  It's total crap, I've seen the same problem posting Java code with nbsp strings all over the place.  I think I could get it to do it consistently but I forgot how, because it's not my damned job to fix it.

We can't fix JiveBugs© or even provide troubleshooting that anyone will read, so why bother? All we can do is complain about the damn things being broken, don't waste your time going further. They don't deserve the help.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Engaged ,
Jul 13, 2009

Copy link to clipboard

Copied

save it to a text file and attach it?

That's what I ended up doing... It shouldn't be necessary, though. I just can't seem to get the order of clicking things right at

the forum.

Noel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

It shouldn't be necessary, though.

agreed. if it's code (and you specifically tell the system it's code!) then they shouldn't touch it!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Enthusiast ,
Jul 13, 2009

Copy link to clipboard

Copied

that seemed to work, and retain spaces (3 spaces before the indented "alert" statement).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
LEGEND ,
Jul 13, 2009

Copy link to clipboard

Copied

Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2009 0
Engaged ,
Jul 14, 2009

Copy link to clipboard

Copied

pwillener wrote:

Instructions how to post code have also been discussed in this topic http://forums.adobe.com/message/2061677

class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}
 

Thanks, Pat. I'd forgotten about that thread.

To get what I've now got, I had to

(a) Select 'Show Full Editor'

(b) Click twice on the 'Quote' icon to get your post to appear in its own box

(c) Click on the 'Insert' icon and select Syntax Highlighting > Java

(d) Click twice on the resulting box to get a cursor inside it.

(e) Paste (Ctrl-V on my Windows system) to place the contents of the clipboard inside the box.

It was these dual clicks that were frustrating me. There is no indication at all that a click has done anything, and so many things at this site take so long to get processed that I've learnt to wait several seconds to see if something happens before doing anything else.


class HelloWorldApp {     public static void main(String[] args) {         System.out.println("Hello World!"); // Display the string.     } }

Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments. I think I'm getting there.

Noel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
LEGEND ,
Jul 14, 2009

Copy link to clipboard

Copied

Ildhund wrote:


Now I'll have to submit this to see whether copying from the code box produces plain text or text with embellishments.

No, copying from a post will copy all the formatting.

I just clicked on the insert.png button, then selected Syntax Highlighting -> Java.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Community Beginner ,
Jul 14, 2009

Copy link to clipboard

Copied

-Ildhund's alter ego here-

OK, now I've established that at the website, copying those two chunks of code (one in a 'quote' box and the other in a 'code' box)

gives identical plain text results, with no extra HTML codes. I'll try again in the testing forum later with something a bit more

complicated like deeper indentation and problematical characters like angle brackets and plus signs.

In the email notification, the code in the quote box is useless. Each line is preceded by &gt;, and the blue highlighting is

simulated by using asterisks. Code in the code box looks pristine. Again, a test with more complicated code might reveal other

faults.

Noel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

Ildhund wrote:

(a) Select 'Show Full Editor'

(b) Click twice on the 'Quote' icon to get your post to appear in its own box

(c) Click on the 'Insert' icon and select Syntax Highlighting > Java

(d) Click twice on the resulting box to get a cursor inside it.

(e) Paste (Ctrl-V on my Windows system) to place the contents of the clipboard inside the box.


A 5-steps of instructions to post a block of _______ code?  Why am I not surprised? (Jive?)  Does this even fix the formatting bug?  What is 'Show Full Editor'?  Why is clicking twice needed anywhere?  There isn't a quote icon if you're starting a new thread, is this for replies only?  Why do all this? 

All I want to be able to do is paste a **** block of code without having to edit out html garbage manually, is this too much to ask?

Nevermind, I'll just resort to not posting any code help for any of Adobe's customers at all, like before. Thanks Jive Software, you tools.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Engaged ,
Jul 14, 2009

Copy link to clipboard

Copied

Come on, be fair. It doesn't take five steps to post code. I was just pointing out that when I wanted to quote Pat's little piece of code*, I had to click twice on the quote button. Not exactly intuitive, and as I said in another post, things usually take so long to process in these forums, I've got used to waiting a bit before deciding that nothing's going to happen.

There's not a word in the FAQ about how to use the styling features like pretty code - or even how to change the font in a post. It's certainly not intuitive or comparable to other situations where you apply formatting. I'm sure there are newcomers who've given up and gone away without posting because it's all so daunting.

Dave gets should get his 5 for introducing me to the use of <pre> tags. I still want to be able to post via email and take advantage of the formatting features the forum offers. I'd forgotten that Mark Boyd had pointed out the dangers of using lots of tabs in code, and that seems to have helped, too.

* This was to find out whether a quoted code block would be usable when copied and pasted, both from the website and from an email notification. It's not, without massage.

Thanks, everybody

Noel

Edited because I can't see how to dish out Dave's reward - no stars or ticks anywhere. Why not, I wonder?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Engaged ,
Jul 14, 2009

Copy link to clipboard

Copied

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Aha! How do I do that by email? Noel

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

Ildhund wrote:

You have to mark the thread "as a question" for the Jive gods to grant you such powers.

Aha! How do I do that by email? Noel

Heh. Hadn't thought of that. Umm... pray to the Jive gods?

Put a question mark at the end of the subject? (lol if that works...) That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.

I think that's +1 missing/bad Jive features, although at least it's only a missing feature in support of a useless feature, so maybe it won't count towards Jive's time in purgatory.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

Ansury wrote on 2009-07-14 19:17:

Put a question mark at the end of the subject? (lol if that works...)* That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.*

I like it so I put in a feature request at Jive.

Jochem

--

Jochem van Dieten

http://jochem.vandieten.net/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Ansury LATEST
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

jochemd wrote:

Ansury wrote on 2009-07-14 19:17:

Put a question mark at the end of the subject? (lol if that works...)* That's how the planet Earth marks something as a question, but on the planet Jive, yep, it's a checkbox.*

I like it so I put in a feature request at Jive.

Jochem

--

Jochem van Dieten

http://jochem.vandieten.net/

heh heh heh... We should charge those Jives a fee for finding solutions to and discovering their bugs and flaws.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Enthusiast ,
Jul 14, 2009

Copy link to clipboard

Copied

sorry, but going back to my post 3 copying and pasting that code out to wordpad reveals unformatted text and it pastes clean with no extra chars. so i stand by my easy (easier) answer: click to get the html editor, surround your code with <pre></pre> and you're done.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Enthusiast ,
Jul 14, 2009

Copy link to clipboard

Copied

wait a second! there's no points available for this thread! now i'm all demotivated, don'tchaknow. so ignore everything i've said here... or post a new thread with some shiny points and i'll post it again...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

Quick, edit your posts and delete the answers so you can hold the information hostage to redeem for points!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Engaged ,
Jul 14, 2009

Copy link to clipboard

Copied

dave milbut wrote:

... a new thread with some shiny points and i'll post it again...

Look in another thread... you just got some points!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Enthusiast ,
Jul 14, 2009

Copy link to clipboard

Copied

lol again! i was kidding! sheesh! talk about not being able to take a joke!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Advocate ,
Jul 14, 2009

Copy link to clipboard

Copied

I know you would think that we'd have picked up on the pattern by now, but ah well. It's not like anyone else is visiting these forums anymore, someone has to keep the post count up so Adobe execs can get their bonuses.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Engaged ,
Jul 14, 2009

Copy link to clipboard

Copied

dave milbut wrote:

lol again! i was kidding! sheesh! talk about not being able to take a joke!

You asked... you got! What are you @@#3##&&!!!^^$%#@@ complaining about?! Aaahh... just realised... Helpful answer instead of correct answer... oh...   Next time?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0
Enthusiast ,
Jul 14, 2009

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 14, 2009 0