Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 09:06 pm EST
Geeklog Forums
Using [ code ] tags inline?
boblet
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
Is there a cunning workaround to this? Any help would be appreciated!
PS using a [ code ] tag (without the spaces) in a story's title does some funky stuff to the formatting!! ;-)
boblet
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
Dirk
boblet
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!
boblet
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
- 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