Jump to content
  • 0

White on White Old Code Snippets


Woz 1st MRB

Question

It seems like some code tags from the old forums were converted to a format of:

<pre class="ipsCode">
  [content here with <br /> for new lines]
</pre>

And when making new code snippets in the new editor, the result is: 

<pre class="ipsCode prettyprint lang-html prettyprinted">
  <span class="pln">
    [content here with no <br /> for new lines]
  </span>
</pre>

The class .ipsCode has a background property that makes it white, but the old code tags that were converted are missing the .pln class surrounding them to change the default text color to black, as well as the other classes that do color formatting, etc.

 

I'm not proposing we change the white background (it looks great as is). I'm more posting this so that other staff members can edit their old forms so that they are not white on white.

 

 

 

So, for anyone stumbling across this looking for a quick fix, try one of these three options:

 

White Background, Black Text:

On 3/1/2016 at 2:54 PM, Yamagata 1st MRB said:
  1. Copy the pre-existing "invisible" code, then edit the post.
  2. Double-click the codebox
  3. If you lost text styling, paste the old code back in
  4. Click the button that says "Insert into post"

 

White Background, Black Text:

<pre class="ipsCode">
  <span class="pln">[content here]</span>
</pre>

Black Background, White Text with White Bar to the Side:

<pre class="ipsCode" style="background: black;">
  [content here with <br /> for new lines]
</pre>

 

Edited by Woz 1st MRB
Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0
On 3/26/2016 at 6:02 AM, J. Hill 1st MRB said:

The forms in the DI Office are messed up too, especially links and spacing.  Can someone look at those please?  I am not very good at code.

I think I got them all.  Just link any other topics that need fixing.  (Hopefully we have more MSO Staff willing to edit them as needed, but I'll fix them when I see them)

Link to comment
Share on other sites

  • 0

When I copy and paste the forms in the DI Office, the spacing is non existent.  I have to manually go through and manually adjust the spacing because everything is stuck together,  I think it is happening because the forms were first in BB Code then changed to HTML automatically when they are posted.  Is it possible to get this corrected?  Maybe we need to change all the forms to HTML.  I find it MUCH easier to adjust rosters and such using the HTML instead of the BB Code myself. 

Link to comment
Share on other sites

  • 0

not sure what is happening, but it is a little frustrating.  Seems that all the forms are like that and have to be manually spaced, and not just for the DI Office.  Once everything is set where they will work correctly, it will be easy to do everything and to maintain it. 

Link to comment
Share on other sites

  • 0
1 hour ago, Woz 1st MRB said:

The topic that lists the bbcode for ribbons, crests, and badges has many code boxes that need to have their snippets refreshed. 

 

Would you mind if I went through and did all of them?

 

http://www.1stmarineraiders.com/forums/topic/1450-ribbons-crests-badges-for-signatures/

Woz I think that this an excellent idea and a good project. I spent a good 2 hours fixing my signature the other day so that when you hover over  the medal it displays what the medal stands for. I am sure the Lt. Col. would not mind if you took this momentous project off his hands.  Moffat assisted me with correct formatting for the code, maybe send him a PM, he might be able to help.

 

On March 27, 2016 at 0:10 PM, Yamagata 1st MRB said:

 (Hopefully we have more MSO Staff willing to edit them as needed, but I'll fix them when I see them)

 

Link to comment
Share on other sites

  • 0
1 hour ago, Candy 1st MRB said:

Woz I think that this an excellent idea and a good project. I spent a good 2 hours fixing my signature the other day so that when you hover over  the medal it displays what the medal stands for. I am sure the Lt. Col. would not mind if you took this momentous project off his hands.  Moffat assisted me with correct formatting for the code, maybe send him a PM, he might be able to help.

 

 

All of the code boxes and formatting have now been fixed on all posts in the Ribbons, Crests, and Badges topic.

 

Edited by Woz 1st MRB
Link to comment
Share on other sites

  • 0

Good work, now the question is, will the code work? 

 

This is a copy of the code as is for the Defense Superior Service Medal directly from the corrected box:

 

DefenseSuperiorServiceMedalRibbon.jpg

 

The code displays the medal fine in the forums here, but this is the code I had to convert it to in my signature to have the floating description text thanks to Moffat's example, using "< and >" instead of "[ and ]" with a bit different wording:

 

<acronym title="Defense Superior Service Medal is granted to a member of the 1st Marine Raider Battalion who has participated in 15 Realisms, all of them being victorious."><img alt="DefenseSuperiorServiceMedalRibbon.jpg" class="ipsImage" src="http://i578.photobucket.com/albums/ss228/1stMarineRaiders/DefenseSuperiorServiceMedalRibbon.jpg"></acronym>

 

I am no coder but I had to convert each of my signature's medals to the latter format. Is there an easier way or will everyone have to change them.

Link to comment
Share on other sites

  • 0
1 hour ago, Candy 1st MRB said:

Good work, now the question is, will the code work? 

 

This is a copy of the code as is for the Defense Superior Service Medal directly from the corrected box:

 

DefenseSuperiorServiceMedalRibbon.jpg

 

The code displays the medal fine in the forums here, but this is the code I had to convert it to in my signature to have the floating description text thanks to Moffat's example, using "< and >" instead of "[ and ]" with a bit different wording:

 

<acronym title="Defense Superior Service Medal is granted to a member of the 1st Marine Raider Battalion who has participated in 15 Realisms, all of them being victorious."><img alt="DefenseSuperiorServiceMedalRibbon.jpg" class="ipsImage" src="http://i578.photobucket.com/albums/ss228/1stMarineRaiders/DefenseSuperiorServiceMedalRibbon.jpg"></acronym>

 

I am no coder but I had to convert each of my signature's medals to the latter format. Is there an easier way or will everyone have to change them.

The editor parses bbcode upon posting and converts it into the corresponding html. For example, this text in the post:

[b]This is bold[/b]

becomes this html in the source:

<strong>This is bold</strong>

 

Edited by Woz 1st MRB
POC
Link to comment
Share on other sites

  • 0

The biggest bummer is that IPS is actively moving away from bbcode and putting more focus into the RTE.  They've gone as far to say that bbcode will be fully deprecated within the next few major releases.  That's the main reason that when you use bbcode it gets parsed into HTML and your bbcode tags are gone forever, it's their way of migrating the system to a bbcode-free one.  So if you had used bbcode before, it's already converted to HTML.

 

What frustrates me is that with that logic, you should be able to throw some HTML into the RTE and have it work, but it doesn't.  I think that once we lose all bbcode functionality, I'll turn back on the "paste with formatting" setting so we don't have to make code boxes anymore.

Link to comment
Share on other sites

  • 0

Yama, why not do a select from the DB  "WHERE post_table.content_column LIKE '%' + '"ipsCode">' + '%'", then fix the broken code tags in one go in excel and update the rows in the database with the correction from excel? you should be able to basically automate the whole thing, so in excel there would be a column

="UPDATE post_table set content_column = '" & SUBSTITUTE(B2,"'","''") & "' WHERE id_column = " & A2

Then just copy that whole column into an SQL window

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Recent Posts

    • Name: TRT user   Steam I.D: STEAM_0:0:139065980   Duration of Ban: Permanent   Reasons for the Ban: Aimbot   Demo Provided?: Y   Comments: trtuser.dem
    • 2nd Platoon Weekly Attendance   Week of 21APR2024   P = Present | E = Excused | A = Absent   Platoon Staff WO. A. Pitteway - Excused MSgt. J Candy - Present TSgt. A, Yoder - Present   1st Squad Squad leader:  Cpl. R. Fielding - Excused Cpl. B. Grande - Present Pfc. R. Smith - Excused Pfc. W. Swift - Excused* Resigned Pfc. X. Hocker - Excused Pvt. B. Niles - Absent III Pvt. M. Noel - Excused   2nd Squad Squad leader:  Cpl. C. Dilley - Excused Cpl. H. Nielsen - Present Cpl. S. Holquist - Excused Pfc. R. Mcspadden - Absent III Pfc. T. Scary - Present Pfc. C. Marsh - Present Pvt. K. Bradley - Absent II   Reserves: Pvt. T. Mongillo - Excused   Helpers: Pfc. J. Lindsay, Pfc. Z. Duckers, Ret. A. Ucar   Attendance Policy    1. Each Week you must submit a TDR through Perscomm on the website before practice starts     2. If you do not submit a TDR you will get an Unexcused absence    3. Three (3) Unexcused absences in a row you receive an Infraction Report with a possible demerit with Command Staff approval.    4. Five (5) Unexcused absences in a row will result in being moved from Active duty to Reserves   If you need any assistance learning how to fill out a TDR contact your Squad Leader or your Platoon Sergeant.
    • Name: u1dm   Steam I.D: STEAM_0:0:585704837   Duration of Ban: Permanent   Reasons for the Ban: No recoil hack   Demo Provided?:  Y   Additional comments: When I came to make another demo of my own, he froze in spawn for about 20 seconds, and then just started mowing down teammates in spawn. You can see with the demo provided that there is clearly no recoil on the STG udm1 (2).dem
    • Thank you for bringing this to our attention, player has been permanently banned.
    • Name: Avarija Steam I.D:  [U:1:375578978]  Reasons for the Ban: rasicm Recommended duration of ban: Perm Demo Provided?: Y
×
×
  • Create New...