Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-10-17 01:35:26
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Can someone tell me how to post code, quote, etc... here in the forum?
Ever time I try to post a snippet of code here in the forum, I use the [code] tag (only with less than greater than arrows) my code is never formatted properly when I do this. Code will be all jumbled together with no separation or line breaks. Then, if I try and start another sentence after I’ve posted the code, I have to place a <br /> tag directly after the code to get a space before the sentence starts so it’s not jumbled up next to the code also.
See how JM’s code is all nice and neat in <a href=“http://forum.textpattern.com/viewtopic.php?id=19089”>THIS</a> thread?
Seems like always my code starts out with a different font than it finishes with. Like it always starts out with times new roman and then finishes with arial.
I can’t seem to figure out how to quote someone either. When I click “quote” on a post, it simply quotes like the first line in their post and nothing else.
Last edited by deronsizemore (2006-10-17 01:37:22)
Offline
#2 2006-10-17 03:13:14
- playpiggy
- Member

- From: Changchun, China
- Registered: 2004-11-23
- Posts: 55
Re: Can someone tell me how to post code, quote, etc... here in the forum?
You can try <code>pre</code>.
Welcome to the REAL World…
Offline
Re: Can someone tell me how to post code, quote, etc... here in the forum?
deron, I’ve learned by looking at when Mary or Zem paste code, then I click quote on theor post to see how they did it.
I’m wondering of the new enhancements to Textile in Textpattern 4.0.4 will make into the forum.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#4 2006-10-17 04:03:15
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Can someone tell me how to post code, quote, etc... here in the forum?
If you look under the message textarea, there is “Formatting: Textile (Quick Help)”. Click on “Quick Help” and you’ll find Posting tags and code.
If you use the muliple block mechanism for code or blockquotes (..), then when you want to break out of it, you just need to directly call a paragraph (or whatever tag is appropriate).
Fo
Offline
#5 2006-10-17 12:54:33
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Can someone tell me how to post code, quote, etc... here in the forum?
Mary, I’ve looked at that link and it tells me to do the same thing I’ve already been doing for months (that hasn’t been working) doesn’t it?
I’ve been using the “code” tag around my code and it makes it where the code shows up but the formatting is way wrong. Half of it is all jumbled together, half of it looks like it’s in a different font than the other half, etc….
I tried using pre (saw that in another post in the forum) and I must not know what I’m doing with it either as when I used the pre tag before my code and a closing pre tag after my code, it just makes a big blank where my code should have gone.
hcgtv: I’ll try that next time and see if I can figure something out. Thanks
———————————————————————————————————————————————————————————————-
For example: Maybe someone can click “quote” on this and see what I’m doing wrong (as you can see when you click quote that it’s all nice and neatly formatted but when I post it with code tags, it’s a mess:
<code>
<txp:if_section name=“article”>
<txp:if_article_list>
We are on an article list
<txp:article />
<txp:else />
We are on a single article
<txp:article />
<txp:output_form form=“comments_display” />
</txp:if_article_list>
</txp:if_section>
<txp:if_section name=“about”>
<txp:output_form form=“contact” />
</txp:if_section>
</code>
———————————————————————————————————————————————————————————————-
Here is the same code with “pre” tags:
<pre>
<code>
<txp:if_section name=“article”>
<txp:if_article_list>
We are on an article list
<txp:article />
<txp:else />
We are on a single article
<txp:article />
<txp:output_form form=“comments_display” />
</txp:if_article_list>
</txp:if_section>
<txp:if_section name=“about”>
<txp:output_form form=“contact” />
</txp:if_section>
</code>
</pre>
Last edited by deronsizemore (2006-10-17 13:04:10)
Offline
Re: Can someone tell me how to post code, quote, etc... here in the forum?
The only way I’ve found to properly display indented code that contains tags is to replace all occurrences of <code><</code> with <code>& lt;</code> (remove space before lt) and put the whole thing in <code>pre</code> tags. If there is an easier way to post HTML/TXP tags while preserving indentation and have that yellow background with dotted border around it, then I’d love to know how, because that would be a big time saver.
Last edited by ruud (2006-10-17 16:16:57)
Offline
#7 2006-10-17 17:58:46
- deronsizemore
- Member

- From: Kentucky
- Registered: 2005-11-02
- Posts: 324
Re: Can someone tell me how to post code, quote, etc... here in the forum?
So if all occurances of < are replaced with & lt; then what are > replaced with? What about /> closing tags…what are they replaced with?
Offline
Re: Can someone tell me how to post code, quote, etc... here in the forum?
No need to replace those, although you can replace the > with & gt; and /> with /& gt;
Last edited by ruud (2006-10-17 20:54:24)
Offline
#9 2006-10-17 21:02:52
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can someone tell me how to post code, quote, etc... here in the forum?
ruud wrote:
If there is an easier way to post HTML/TXP tags while preserving indentation and have that yellow background with dotted border around it, then I’d love to know how, because that would be a big time saver.
What’s wrong with bc..?
<a href="some code">
<div id="some more code">
<txp:even more />
Offline
Re: Can someone tell me how to post code, quote, etc... here in the forum?
Wow… thank you very much.
I had tried bq.., but always combined with CODE or PRE tags and that didn’t work. Never just bq.. alone.
edit: aaaah… bc, not bq. thanks again!
Last edited by ruud (2006-10-17 21:50:23)
Offline
#11 2006-10-17 21:11:37
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Can someone tell me how to post code, quote, etc... here in the forum?
ruud wrote:
Never just
bq..alone.
No, bc.. (block code?). Don’t forget to start the next paragraph with p.
Offline