Author Topic: Forcing a line break?  (Read 3064 times)

Bliz

  • Boss
  • ****
  • Posts: 142
    • StudioBliz
Forcing a line break?
« on: January 14, 2010, 03:10:03 PM »
Hey all, I've been restructuring, cleaning and adding data to the Villain and Hero Merit Rewards pages, and I run into a problem when I need to list multiple EB/AV/Heroes in their respective column. Sometimes it will automatically put each entry on the next line down, but most of the time it'll just list everyone it can on one line (Such as... The Slinger Ballista! or Ms. Liberty Sister). For now I've been adding a simple comma to keep things separated, but is there a command to force a line break? In html it'd be < br >.

Liz

My City of Heroes shirts and stuff on RedBubble:
https://www.redbubble.com/people/bliz/collections/261901-city-of-heroes

TonyV

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 2,175
    • Paragon Wiki
Re: Forcing a line break?
« Reply #1 on: January 14, 2010, 03:28:55 PM »
I think you should be able just to use <br> to insert a line break.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,260
Re: Forcing a line break?
« Reply #2 on: January 14, 2010, 03:56:19 PM »
When the Media Wiki translates the formatted text you enter into HTML, it does things this way:

Wiki text
Code: [Select]
text 1
text 2

Generated html
Code: [Select]
<p>text 1
text 2
</p>

What you see
Quote
text 1 text 2


Wiki text
Code: [Select]
text 1

text 2

Generated html
Code: [Select]
<p>text 1
</p><p>text 2
</p>

What you see
Quote
text 1

text 2


In most cases, Media Wiki is able to incorporate HTML code verbatim into an article and include it as-is in the code it creates from the wiki markup.  If you dig around in the wiki, you'll find templates that are using <div> tags (example) and a lot of places that we force line breaks with a < br / >.

(Not all straight HTML works as-is.  Image codes work funny, for instance.)

As far as I know, the < br > and < br / > both behave the same, but the self-terminating version (< br / >) is apparently the more recent standard.  (For web 2.0, maybe?)  I think Sekoia set his bot to work replacing all instances of < br > with < br / > at one point if my memory serves me correctly.

So, long story short (too late), the < br / > tag is perfect for what you want to do.  :)
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Fleeting Whisper

  • Elite Boss
  • *****
  • Posts: 283
Re: Forcing a line break?
« Reply #3 on: January 14, 2010, 11:08:36 PM »
AFAIK, mediawiki already replaces < br > with < br/ > when it displays the page.

Bliz

  • Boss
  • ****
  • Posts: 142
    • StudioBliz
Re: Forcing a line break?
« Reply #4 on: January 15, 2010, 03:11:21 AM »
Awesome! I will start adding those in as I work.

Perhaps you could also answer this.

On contact pages, someone has been going back and adding an orange 'missing text/needs data' tag to the Introduces section, such as here on Psymon Omega, who introduces Technician Naylor:

http://wiki.cohtitan.com/wiki/Psymon_Omega


Is this what is being looked for:
http://wiki.cohtitan.com/wiki/Operative_Rutger

I ask because the introduction text, the blurb about the new contact is on pretty much all the contact pages already, and the line about introducing someone (the clickable link) is fairly generic.  I also ask because was added in after I went thru many of the pre-35 contacts and filling out whatever missing data there was. If it's something I'm not getting, however, please let me know, so I can get it right as I work.
Liz

My City of Heroes shirts and stuff on RedBubble:
https://www.redbubble.com/people/bliz/collections/261901-city-of-heroes

SuckerPunch

  • Elite Boss
  • *****
  • Posts: 1,608
    • Titan Network
Re: Forcing a line break?
« Reply #5 on: January 15, 2010, 12:00:58 PM »
(For web 2.0, maybe?)  

Valid XHTML requires all tags to be closed, either with a matching closing tag or a self-terminating /  for tags that don't wrap around content (like br, hr, link, etc).

XHTML has officially been around since 2001, well before the "Web 2.0" nonsense ;)

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,260
Re: Forcing a line break?
« Reply #6 on: January 15, 2010, 12:31:02 PM »
Ah, contact pages.  It's so much fun to try to keep those formatted the same.   :D

Problem is that there are so many of those that all it takes is a minor little change on one that someone else copies to another and then to another... meanwhile, someone picks up on a different change and copies it to an entirely different contact...

Not that those changes are bad, it's just hard to keep track of what the "current" format for the week is.  ;D

But I digress!

I'm pretty sure you're correct about what we're looking for there.  I do see, however, that in some articles it's been taken one step further and a distinction has been made between when the contact is introducing multiple contacts or only one.  Gordon Stacy is an example of a contact where the two types of introduction have been specified.

I guess at minimum, it would be good to get at least a single line of text in there, but if we can manage to get both, that's even better.

The statements they make are pretty generic, but I can't say that I've ever actually paid enough attention to notice if everyone uses the same ones in a particular level range or anything.  I'm usually more focused on who they introduce than how they introduce them - that is if I think to actually pay attention.

That being said, I guess if you feel confident that you've seen enough of the introduction texts to be certain that they're all the same, go ahead and fill them in.  If we find out they're not all the same later, we can always go back and correct them.

If you're not sure, though, it's probably best to leave the "needs data" or "missing text" in there until we can verify what they really say.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,260
Re: Forcing a line break?
« Reply #7 on: January 15, 2010, 12:33:42 PM »
Valid XHTML requires all tags to be closed, either with a matching closing tag or a self-terminating /  for tags that don't wrap around content (like br, hr, link, etc).

XHTML has officially been around since 2001, well before the "Web 2.0" nonsense ;)

Thanks, SuckerPunch.  I don't really deal with online development all that much, so I can't ever keep web standards straight.  :)
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov

Blondeshell

  • Elite Boss
  • *****
  • Posts: 798
Re: Forcing a line break?
« Reply #8 on: January 15, 2010, 06:02:15 PM »
Yeah, the part about the contact pages has kept me busy trying to standardize them.  Not all of the contacts have the same text, though they all convey the same message about introducing new people.  I've been leaving them blank when not known so the actual text can be used.  Some contacts have a different "flavor" to their dialogue that might be missed if a generic phrase is assumed.

The hero contacts are primarily where the multiple/single contact text will be used because of the way the introduction system works within level ranges and between origins.  Villain contacts follow a more linear introduction path, except for the brokers, so they won't get that option.

It's all still a work in progress, but I'm trying to make it easier for everyone else to help with the consistency.

Bliz

  • Boss
  • ****
  • Posts: 142
    • StudioBliz
Re: Forcing a line break?
« Reply #9 on: January 16, 2010, 02:57:05 AM »
It's true, they don't all say exactly the same thing; mostly I question the need for it as there doesn't seem to be a standard when it comes to the clickable line for regular missions. In the Wiki, the mission headers appear to be what appears in the Nav bar while the Accept line is generally left out. (At least as far as Villain pages go; I haven't touched Heroes yet.)

Is that clickable line something that should be added as well?
Liz

My City of Heroes shirts and stuff on RedBubble:
https://www.redbubble.com/people/bliz/collections/261901-city-of-heroes

Blondeshell

  • Elite Boss
  • *****
  • Posts: 798
Re: Forcing a line break?
« Reply #10 on: January 16, 2010, 04:01:36 AM »
I'm in the opposite boat: I haven't messed with the villain contacts as much as I have for heroes.  The way I've understood it, though, is that the clickable Accept line is typically what's listed as the mission header and the nav info is set up as the mission objectives.  Any time I've found it to be different, I've made it match up that way, at least.  One thing that is consistent, though, is that the mission titles are the same for contacts of the same level and origin.  Hence why they're templated as "common" missions.

eabrace

  • Titan Moderator
  • Elite Boss
  • *****
  • Posts: 4,260
Re: Forcing a line break?
« Reply #11 on: January 16, 2010, 04:31:56 AM »
The clickable acceptance line when getting your mission from the contact should be the mission's header.  The Nav text should be the primary mission objective.
Titan Twitter broadcasting at 5.000 mWh and growing.
Titan Facebook

Paragon Wiki admin
I was once being interviewed by Barbara Walters...In between two of the segments she asked me..."But what would you do if the doctor gave you only six months to live?" I said, "Type faster." - Isaac Asimov