Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 09:06 pm EST

Geeklog Forums

Using [ code ] tags inline?


boblet

Anonymous

I recently worked out to use the [ code ] tag if I want to add html and not have it be rendered if I submit as 'HTML Formatted'. However the [ code ] tag seems to be a block-level thing, whereas I'm after something inline. Example:
I want this sentence about

Text Formatted Code
<br>
tags to be on one line not three.
Is there a cunning workaround to this? Any help would be appreciated!

peace - boblet

PS using a [ code ] tag (without the spaces) in a story's title does some funky stuff to the formatting!! ;-)
 Quote

boblet

Anonymous

Hrm, nobody has commented - Perhaps I wasn't clear enough? I want to place html code examples in the middle of sentences without a line break before and after the code. When I use the [ code ] tag, a line break is inserted before and after, breaking the sentence. So if I want to write "This is a sentence about the br tag" (all on one line with no line breaks), and have the br tag inside angle brackets, what should I do?

Any ideas would be appreciated!!

boblet

 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Oooooh. Have you tried using the <code></code> tags instead?? They don't insert a line break before and after. You can use them in the middle of a sentence. See if that works for you.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That won't work. HTML <code> tags don't escape the < and > signs, thus <code><b>test</b></code> would display the word "test" in a bold typewriter font. boblet: What you want is quite clear and it's already listed as a feature request on the Feature Tracker. It hasn't been implemented yet, though ... bye, Dirk
 Quote

Status: offline

rawdata

Forum User
Full Member
Registered: 02/17/03
Posts: 236
Oooops sorry, I should have tested it out first.
 Quote

boblet

Anonymous

Sorry Dirk! I shoulda checked there first. Will know for next time! Since you haven't mentioned anything, I'm also guessing there are no work-arounds. I'll survive until it's implemented ;-) Maybe I'll make a special CSS style for them or something, and implement as a span.

By the way, I'm presently trying to convert the default XSilver theme into a mainly CSS and minimally tables-based layout that looks as identical as possible (stripping out nested padding tables, changing px fonts to relative etc). If you have time could I run it past you when I'm getting near finished? I'll put it up for public consumption, but I already have a few questions that I prolly should be asking you rather than the userbase (ie non-breaking spaces in the language resources, paragraph tags around story text even if it's html-formatted leading to double tags, etc).

If you're interested in checking out the work in progress, take a look at the (still mainly not-yet-pretty ;-) oli.boblet.net, my humble playground.

Once I get that sorted, I want to move on to a CSS-only/table-free and fully compliant theme. Someday (tm)!

Thanks for your time!

 Quote

boblet

Anonymous
Until the [ inline ] tag is implemented (or however it's done), you can get code examples inline and formatted as such, but you have to work to do so :/

you need to make sure the code tag is in your list of allowed html tags beneath the story/comment text box. It should be as part of the default install, but if not open config.php and search for "allowablehtml".

next you need to submit the story as html-formatted. For sections you want formatted inline as code, use the html code tag, and use entities for the angle brackets on all contained html. Then you have to save/submit the story without previewing it, because if you preview the entities will all be converted to angle brackets and then become real code when you save

to make this easier it's probably best to write in a text/html editor then copy and paste into Geeklog, previewing except for the last time you paste before saving

Note that comments must be able to be saved without previewing for this to work in comments - not the standard setup. To change this search for "skip_preview" in config.php

 Quote

All times are EST. The time is now 09:06 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content