Flare Breaks PHP Code

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
fadibitz
Propeller Head
Posts: 26
Joined: Tue Jun 26, 2012 4:16 am

Flare Breaks PHP Code

Post by fadibitz »

Hi all,

We have multiple Help systems (for different products and versions) that all share the same corporate contact information. To prevent content anomalies in which some versions or products display different information on their respective contact pages, I decided I would try using <?php include() ?> to import a section of code from a folder common to all Help systems (our web server runs PHP):

Code: Select all

<div>...[content]...</div>

<?php include("../../../../../common_content_file.php") ?>

<div>...[content]...</div>
However, when I built the test project containing the PHP line, the following was the Flare output:

Code: Select all

<div>...[content]...</div>

<p>
</p>

<div>...[content]...</div>

Flare apparently interpreted and replaced the <?php include() ?> line with and empty HTML <p></p> tag.

Two questions:

1. Is this the expected behavior of Flare during the build process?

2. Because snippets are limited in scope to the project in which they reside, is there another way to achieve the effect I seek?

Thanks!
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Flare Breaks PHP Code

Post by RamonS »

This is a problem for a long time. And no, that behaviour is not expected, but Flare does it that way. I reported it as a bug a while ago and apparently it did not get fixed. The only two things I can think of are
- report it as a bug here: https://www.madcapsoftware.com/bugs/submit.aspx
- add the line after building output, a multi-file find & replace might help here
fadibitz
Propeller Head
Posts: 26
Joined: Tue Jun 26, 2012 4:16 am

Re: Flare Breaks PHP Code

Post by fadibitz »

Thanks, Ramon.

That was very helpful. Disheartening, but helpful.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Flare Breaks PHP Code

Post by LTinker68 »

Could use put the PHP code in the toolbar and just invoke it from the topic, like description in this post for JavaScript --> http://forums.madcapsoftware.com/viewto ... 785#p81753
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
fadibitz
Propeller Head
Posts: 26
Joined: Tue Jun 26, 2012 4:16 am

Re: Flare Breaks PHP Code

Post by fadibitz »

That's is a good suggestion. I will check that out and return later with results or questions.

Thanks again, guys.
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Flare Breaks PHP Code

Post by rob hollinger »

There must be more to this than meets the eye. Support has your ticket and will probably be asking for an example topic or project that shows this issue.
Tested it with Flare V7 and V8.

Added this to a topic:

Code: Select all

    <body>
        <h1>Topic Title</h1>
        <div>
            <p>Delete this text and replace it with your own content.</p>
            <p>Delete this text and replace it with your own content.</p>
        </div>
        <?php include("../../../../../common_content_file.php") ?>
        <div>
            <p>Delete this text and replace it with your own content.</p>
            <p>Delete this text and replace it with your own content.</p>
        </div>
    </body>
This is what was in the output:

Code: Select all

<body>
        <div class="MCBreadcrumbsBox_0"><span class="MCBreadcrumbsPrefix">You are here: </span><span class="MCBreadcrumbs">Topic</span>
        </div>
        <h1>Topic Title</h1>
        <div>
            <p>Delete this text and replace it with your own content.</p>
            <p>Delete this text and replace it with your own content.</p>
        </div>
        <?php include("../../../../../common_content_file.php") ?>
        <div>
            <p>Delete this text and replace it with your own content.</p>
            <p>Delete this text and replace it with your own content.</p>
        </div>
        <div class="buttons inline-buttons clearfix topicToolbarProxy" style="mc-topic-toolbar-items: ;">
            <div class="button-group-container-left">
                <div class="button-group">
                    <button class="button needs-pie previous-topic-button" title="Navigate previous">
                    </button>
                    <div class="button current-topic-index-button disabled"><span class="sequence-index"></span> of <span class="sequence-total"></span></div>
                    <button class="button needs-pie next-topic-button" title="Navigate next">
                    </button>
                </div>
            </div>
        </div>
    </body>
Rob Hollinger
MadCap Software
hillaryfay
Propeller Head
Posts: 57
Joined: Fri Jan 21, 2011 12:13 pm

Re: Flare Breaks PHP Code

Post by hillaryfay »

Hi, this might not be the correct area to ask this question, but I thought it was relevant. What is the "needs pie" class?
tschüss!
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Flare Breaks PHP Code

Post by NorthEast »

hillaryfay wrote:Hi, this might not be the correct area to ask this question, but I thought it was relevant. What is the "needs pie" class?
Pretty sure that'll be CSS3 PIE; which helps IE to support CSS3.
hillaryfay
Propeller Head
Posts: 57
Joined: Fri Jan 21, 2011 12:13 pm

Re: Flare Breaks PHP Code

Post by hillaryfay »

Thanks for clarifying!
tschüss!
Post Reply