Jump to content

Question

Posted (edited)

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

20 answers to this question

Recommended Posts

  • 0
Posted
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)

  • 0
Posted

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.

  • 0
Posted

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. 

  • 0
Posted

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. 

  • 0
Posted

Problem there too is the links.  When you go to a medal and click the link for multiple awards, it does not go to the link for the multiple awards.  It instead goes directly to the page you are on. 

  • 0
Posted
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)

 

  • 0
Posted (edited)
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
  • 0
Posted

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.

  • 0
Posted

I stand corrected Woz. I double checked and the result is the same in my signature with the corrected boxes you have created as the time consuming text corrections I made. If only I would have waited to redo my signature...cheers!

  • 0
Posted (edited)
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
  • 0
Posted

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.

  • 0
Posted

I guess I got a little spoiled on the old system. had it down pretty good. I am not familiar with the coding languages and I probably am not the only one.  I hope we can make the new system as easy to understand as the old system.

  • 0
Posted

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

 

  • 0
Posted
On 4/13/2016 at 0:40 PM, Yamagata 1st MRB said:

It never occurred to me to actually use database for queries... The only thing is, if I break the DB, I break everything :P

So be very careful with your update query

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: CHOCOMOCO_SD   Steam I.D: STEAM_0:0:52447046   Duration of Ban: Permanent   Reasons for the Ban: Racist comments   Demo Provided?: N   Comments: Said the N word twice
    • Its Friday Night Fight Night in HLL and me and Muthas are in different squads. We meet up while attacking a point: Me: Muthas! Let's go get the poiple toineps! Muthas: Hah poi....   We are immediately cut down by a MG.   Steam messages:  Muthas: LMFAOO Me:OMFG! ROFLMAO!
    • Name: elon musk   Steam I.D: STEAM_0:0:918906720   Duration of Ban: Permanent   Reasons for the Ban: Racist comments and Mass Team Killing   Demo Provided?: N   Comments: Keebler reported in public chat, sent screen shot of typed comments  
    • Hey Reis! Great to see you again, man. The unit means a lot to all of us and I know you were here for quite some time. There’s always room for you to come back   *Salute*
    • I dont know how many of the people that know me or what i did in the unit are still here. But i just wanted to leave a huge thank you on the forums to this unit, that i was a part of for so many years, and all the good times and hardships i shared with a lot of different people from all over the world.    Maybe i'll still see you in DoD:s   *Salute*
×
×
  • Create New...