e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 213 forks source link

Is there a way to enable color text #3353

Open lordmythus opened 5 years ago

lordmythus commented 5 years ago

Posted this question also to the e107help site, but it was suggested that this is a github question, so here you go...

Ok, so basically I am working on hand copying my composr cms powered site to a new e107 powered site. I like some of the things I'm finding better in e107, and well there isn't an importer for composr so I have to do it all by hand.

I've hit a bit of an obstacle however, one which I didn't expect to hit. It is that when I paste a page containing tables from composr to e107, if any of the words in said table have any color except black the words simply don't show up once I save the page. They will appear at first on the edit screen, but after I hit submit, the words disappear and when I go back into the edit screen they remain gone. It is like the tinymce editor isn't parsing colored texts if they are in tables. Note, this does not seem to happen outside of tables - there the words are just recolored black but at least the words are there.

Here is a screenshot to hopefully show you what I'm describing. The last image is the page in composr. The first image is the edit screen in e107 after I have already submitted the page and went back in. If you notice the Hunting row and the Increased Offense row on the left are missing text, and the Hunting one showing simply a bunch of commas. It simply acts like the colored text ain't there at all.

composrtables e107tablesnotextcolor

I'm hoping that there is a file I can edit to fix this?

e107 version 2.1.8

lordmythus commented 5 years ago

Feel free to close, issue solved in chat.

Jimako @Jimmi08 06:34 otherwise: go to handler folders, open e_parse_class.php and find line ccs 3762 protected $allowedTags

Moc commented 5 years ago

Which HTML tags are used to color the text?

Jimmi08 commented 5 years ago

@Moc my quess is <font>, html4 tag, I had the same problem. It's common on old sites. <center> is next one. Correct solution for this would be - prefs to use old html 4 tags and if it's set on, add it to allowed tags. They can be added manually in textarea field. It's webmaster responsivity, it shouldn't be stripped by cms. And top would be - if obsolete tag is used, get warning in debug mode to be able to fix it. But you haven't time for this when you are moving site.

lordmythus commented 5 years ago

@Jimmi08 is correct. It was the usage of old html4 tag that was the problem, from trying to convert an old site using different software to e107.

And it was frustrating to be sure. I consider myself a patient person but to have text simply disappear and not know why nor easily find a solution almost made me give up. The guys in the chat kept me going though and thankfully a solution was found.

Still, while I respect the fact that e107 is truly modern I'd strongly encourage adopting jimmi's last option to include some outdated tags with a warning so sites being made over can later be corrected and brought up to standards. I think it would making porting sites over less frustrating and help with e107 growth and adoption.

lordmythus commented 5 years ago

And it was the font tag in this case.

Moc commented 5 years ago

Thanks for the feedback both 👍

I'm reopening this to see if we can make it easier for users migrating to e107. It's at least worth a consideration.

@CaMer0n what are your thoughts on this? Old content may have outdated tags (not html5 compliant) which are stripped by the parser.

Moc commented 5 years ago

Ohand @lordmythus, I'm glad that you enjoy e107 and I'm even happier to see that our community encourages you to continue. All feedback is welcome so if you have further ideas or if you run into issues, just let us know.

CaMer0n commented 5 years ago

@lordmythus Could you please post the original code (direct from your database table and prior to the parsing changing it) here? I could then run some tests and see if we can have e107 convert it automatically.

lordmythus commented 5 years ago

Um sure @CaMer0n however I'll stipulate that this takes place anytime depreciated tags that are not listed in the allowedtags are used, the stripping will take place. But sure, here's the raw html that caused the issue for me.

I attached a txt of the raw html because I guess the code is too much for the code tag to support?

rawhtml.txt

CaMer0n commented 5 years ago

@lordmythus Thank you. The file appears empty for me. Maybe try wrapping it with the <> button above?

Jimmi08 commented 5 years ago

It's not empty, just big. I selected one table from it.

<div class="wikitable" style="overflow-x: auto;">
<table border="solid 1px" style="width: 100%;">
    <colgroup>
        <col width="82" />
        <col width="95" />
        <col width="259" />
        <col width="145" />
        <col width="63" />
    </colgroup>
    <thead>
        <tr>
            <th style="border: none; padding: 0in" width="82">
            <p>&nbsp;Tier</p>
            </th>
            <th style="border: none; padding: 0in" width="95">
            <p>&nbsp;Ability</p>
            </th>
            <th style="border: none; padding: 0in" width="259">
            <p>&nbsp;Effects</p>
            </th>
            <th style="border: none; padding: 0in" width="145">
            <p>&nbsp;Requirements &amp; Restrictions</p>
            </th>
            <th style="border: none; padding: 0in" width="63">
            <p>Cost to Acquire</p>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>1</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Weapons Mastery</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability increases the damage that you can do with your weapon because you are now more proficient with that weapon. It does so by increasing the weapon&#39;s attack value by <font color="#ff0000">x 1.5</font>. These effects are permanent. You must choose a weapon type to be proficient in when acquiring the ability and must repurchase the ability per weapon type. The weapon types are: <font color="#0000ff">swords</font>, <font color="#0000ff">scythes</font>, <font color="#0000ff">knives &amp; daggers</font>, <font color="#0000ff">thrusting weapons</font>, <font color="#0000ff">axes</font>, <font color="#0000ff">bashing weapons</font>, <font color="#0000ff">whips</font>, <font color="#0000ff">bows &amp; crossbows</font>, <font color="#0000ff">guns</font>, <font color="#0000ff">rune cannons</font>, <font color="#0000ff">thrown weapons</font>, and <font color="#0000ff">unarmed combat</font>.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You can have 1 weapons mastery per every 20 Mental.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>1</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Empathic Combat</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability allows for your emotions to fuel your melee damage. If you attack an enemy with a melee attack, including melee attack skills, and are filled with anger, and apply this ability to that melee attack, your character&#39;s Melee Power will be increased by <font color="#ff0000">+ 10</font> for that attack. If your character has opposite feelings, such as happiness when melee attacking an enemy and this ability, the attack simply won&#39;t do any damage. <font color="#ff0000">You can call upon this instant effect ability at any time by spending </font><strong><font color="#ff0000">50 SA</font></strong>.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>Your character must have the Empathy talent.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>50 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>2</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Combat Enhancement</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability increases the damage of all of your combat skills by<font color="#ff0000"> x 1.3,</font> whether those skills are mastered or not, but increases their stat cost by<font color="#ff0000">&nbsp;</font><strong><font color="#ff0000">x 1.2</font></strong><font color="#ff0000">&nbsp;</font>if you want to apply its effects.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have at least one offensive skill mastered.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>2</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Enforce Skill</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability allows you to spend SA to enforce your skills so that when using skills to attack a target, the target&rsquo;s chance of evasion decreases. You can decrease the target&rsquo;s Evade % by 1 point with every 2 SA spent with this skill.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have at least one offensive skill mastered.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>150 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>2</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Dual Wielding Knives &amp; Daggers</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability allows you to dual wield knives and daggers. When dual wielding you must spend <strong><font color="#ff0000">5 EP per attack</font></strong>, unless you have the <strong><font color="#000080"><span style="background: #ffff00">Ambidexterous talent</span></font></strong> which negates the stat cost.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must either have mastered Trained Strike or have the Ambidexterous talent.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>2</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Hunting</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>With this ability you can increase your damage against a predetermined beast type by <font color="#ff0000">x 1.5</font>. You must make it know to the GM the type of beast you are wishing to hunt when you acquire this ability or before you can ever use it, which are: <font color="#0000ff">insect</font>, <font color="#0000ff">small mammal</font>, <font color="#0000ff">moderate size mammal</font>, <font color="#0000ff">large mammal</font>, <font color="#0000ff">small reptile</font>, <font color="#0000ff">moderate size reptile</font>, <font color="#0000ff">large reptile</font>, <font color="#0000ff">small fowl</font>, <font color="#0000ff">large fowl</font>, <font color="#0000ff">skeleton</font>, <font color="#0000ff">spirit</font>, <font color="#0000ff">zombie</font>, <font color="#0000ff">vampire</font>, <font color="#0000ff">dragon</font>, a particular race, water creature, etc. Once you have determined what you are hunting, the effects of this ability will only work for that type of target. If you wish to hunt another type, you will have to acquire this ability again.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have the Identify Animal skill at 50% mastery.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>2</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Combat Endurance</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability causes you to use only one half of the EP cost for all offensive skills and moves. This is a permanent effect.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You need to have at least one offensive skill mastered.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>200 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>3</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Dual Mastery</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This ability increases your total damage by x 1.25 (x 1.5 if you have the Ambidexterous talent) when dual wielding.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have the dual wielding ability for the weapon you are dual wielding and the weapon mastery ability for that weapon. This ability only applies on weapons that meet these requirements.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>150 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>3</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Knifeplay</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>This is a fancy knife ability which increases your weapon damage by <font color="#ff0000">x 1.3</font> to inflict more damage. It can be used with any knife attack or skill simply by spending an extra<strong><font color="#ff0000"> 5 EP</font></strong>.</p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have Knife-Punch mastered.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
        <tr>
            <td style="border: none; padding: 0in" width="82">
            <p>3</p>
            </td>
            <td style="border: none; padding: 0in" width="95">
            <p>Increased Offense</p>
            </td>
            <td style="border: none; padding: 0in" width="259">
            <p>Using this ability increases your damage value of your attack by<font color="#ff0000"> 2d12 worth of points</font>. <font color="#ff0000">This is an instant effect ability that can be applied to any attack of offensive skill simply by spending </font><strong><font color="#ff0000">20 EP</font></strong><font color="#ff0000">.</font></p>
            </td>
            <td style="border: none; padding: 0in" width="145">
            <p>You must have the Combat Endurance ability.</p>
            </td>
            <td style="border: none; padding: 0in" width="63">
            <p>100 skill points</p>
            </td>
        </tr>
    </tbody>
</table>
</div>
lordmythus commented 5 years ago

Sorry @CaMer0n i was at work followed by sleep. @Jimmi08 got it though.