Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

converting a HTML File into BBCode for phpBB3

Status
Not open for further replies.

appi

IS-IT--Management
Mar 17, 2003
296
CH
Hi
I have to convert /rewrite several html-files to be able to work as BBCode for a phpBB3 Software.
We are not using the Forum by now, only the PHP Functions for mysql connects.
The Forum works in behind.
But the HTML-Files will only show Code instead of the expected Layout.
I understand that HTML Coding is replaced by BBCode in phpBB3
But I am not able to rewrite the HTML Files
And If I use a converter from the net I have the same result and probably too less code

This is the Main HTML File:

HTML:
<span class="head">{T_LIGANAME} - Saison {T_SAISONNAME}<br /><br />
<a href="{L_PREV_DAY}"><img src="./images/prev.gif" alt="vorhergehender spieltag" /></a>&nbsp;&nbsp;&nbsp;{T_SPIELTAG}&nbsp;&nbsp;&nbsp;<a href="{L_NEXT_DAY}"><img src="./images/next.gif" alt="nächster spieltag" /></a></span>
<br /><br /><br />
<table class="tbl-scores" cellpadding="4">
    <!-- BEGIN ansetzungen -->
    <tr>
        <td class="{ansetzungen.C_TEAM_A}">{ansetzungen.T_TEAM_A}</td>
        <td class="{ansetzungen.C_SONST}">-</td>
        <td class="{ansetzungen.C_TEAM_B}">{ansetzungen.T_TEAM_B}</td>
        <td class="{ansetzungen.C_TORE}"><span class="{ansetzungen.C_SPAN_TORE_A}">{ansetzungen.T_TORE_A}</span> : <span class="{ansetzungen.C_SPAN_TORE_B}">{ansetzungen.T_TORE_B}</span></td>
        <td class="{ansetzungen.C_QUOTE}">[ <span class="{ansetzungen.C_SPAN_QUOTE_A}">{ansetzungen.T_QUOTE_A}</span> - <span class="{ansetzungen.C_SPAN_QUOTE_B}">{ansetzungen.T_QUOTE_B}</span> ]</td>
        <td class="{ansetzungen.C_SONST}"><a href="{ansetzungen.A_DETAIL}"><img src="./images/{ansetzungen.I_DETAIL}" alt="{ansetzungen.T_IMG_DETAIL_ALT}" onclick="opwin('{ansetzungen.A_DETAIL}'); return false;" /></a></td>
    </tr>
<!-- END ansetzungen -->
</table>
<br /><br /><span class="tbl-headline">{T_TABELLENARTNAME}</span><br /><br />
<table class="tbl-standings" cellpadding="4">
    <!-- BEGIN tabelle -->
    <tr>
        <td class="{tabelle.C_IMG}"><a href="{tabelle.A_VERLAUF}"><img src="./images/{tabelle.I_TREND}" alt="trend" onclick="opwinC('{tabelle.A_VERLAUF}'); return false;" /></a></td>
        <td class="{tabelle.C_PLATZ}">{tabelle.T_PLATZ}</td>
        <td class="{tabelle.C_TEAM}"><a href="{tabelle.A_KALENDER}" onclick="opwinB('{tabelle.A_KALENDER}'); return false;">{tabelle.T_TEAM}</a>{tabelle.T_MARKER}</td>
        <td class="{tabelle.C_SPIELE}">{tabelle.T_SPIELE}</td>
        <td class="{tabelle.C_SIEGE}">{tabelle.T_SIEGE}</td>
        <td class="{tabelle.C_REMIS}">{tabelle.T_REMIS}</td>
        <td class="{tabelle.C_NIEDERLAGEN}">{tabelle.T_NIEDERLAGEN}</td>
        <td class="{tabelle.C_PUNKTE}">{tabelle.T_PUNKTE}</td>
        <td class="{tabelle.C_DIFF}">{tabelle.T_DIFF}</td>
        <td class="{tabelle.C_TORE}">{tabelle.T_TORE}</td>
        <td class="{tabelle.C_SONST}">:</td>
        <td class="{tabelle.C_GEGENTORE}">{tabelle.T_GEGENTORE}</td>
        <td class="{tabelle.C_QUOTE}">{tabelle.T_QUOTE}</td>
        <td class="{tabelle.C_SONST}">-</td>
        <td class="{tabelle.C_GEGENQUOTE}">{tabelle.T_GEGENQUOTE}</td>
    </tr>
    <!-- END tabelle -->
</table>
<br />
{HINWEIS}

Thanks if anybody can help me out and our game will be able to continue ..
appi
 
Your question is a little confusing. And not sure its really related to PHP.

HTML is code. If you open an HTML file in anything but browser it will only show code.

phpBB3 is a parser, it needs to read in the bbcode and convert it into normal HTML code for the browser to display it properly.

You will not see layout and images unless the bbcode is correctly parsed by the BB engine and then displayed in the browser somehow.

You say you are not the actual forum software, but then how are you displaying the parsed bb files? Where exactly are you trying to see the bbcoded files?







----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
Hi Phil

I know and understand what you say.
My problem is that we have HTML Files with the layout of our sites.
Now, phpBb3 does not allow to load html direct into their code via php programs.
In older versions it seems to work, phpBB3.0 does not allow this anymore
I postet this here because BBCode, which I have to use, is more for PHP as for other, I guess.
If not I appoligize for misposting and hope to find answers somewhere else

I opened the codes via PHP scripts in a Browser but only see the codes and variables.

regards
appi
 
Your HTML seems to be more than just HTML. Are you using other things? Maybe something like ColdFusion?

I'm still a little confused of what you are trying to do.

If you are not using the forum software and are only using some of the functions why are you trying to convert everything to bbcode?

The main issue here, is, you have not told us enough to understand how you are trying to load it in your php code? What functions from bb2 are you suing that would require you to change this into BBcode?

Since you are not using the forum software, it seems turning all this into BBCode would be unnecessary.

I would generally advise to start small before trying to convert a bunch of complex code. Try passing it some simpler bbcode without variables and things and see if it works. The conversion to BBCode should not be too difficult as its just turning things like <b></b> for bold into [ignore][/ignore].







----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
We have a Tip-Game with a MySQL Database.
The former programmer / hoster used Software from PHPBB and now I have to renew the code for new PHP / MySQL and also phBB3 (3.2)
The PHP Code used only MySQL Functions from this Board Software.
Now in phpBB3 HTML is not working within this coding.
When I start the PHP via Browser I get only Code and no Graphics.
I find out that for several Codings I have to use BBCOde instead of HTML. But I am not sure which parts I have to switch
You can see the result if running [link]www.appmeier.eu/phpbb3/phpBB3[/url]
I expect to get two tables on that site - one with the matches and one with Standings. This Tables has to be dynamicly updated when called from the results out of the database.
The Db works fine, also the mysql-calls work.
Let me know if you need mor details or files.


 
None of your PHP is actually being run. Which means your index file is either not a PHP file, or your PHP parser is not working.

Before anything can get done with the BBcode conversion, you need to get your PHP running.

What extension does your index file have? HTML or PHP?



----------------------------------
Phil AKA Vacunita
----------------------------------
OS-ception: Running Linux on a Virtual Machine in Windows which itself is running in a Virtual Machine on Mac OSx.

Web & Tech
 
But if I ran
I see thsat PHP is running this file does only phpinfo()

Might it be a problem that I am not using the main directory for m scripts?
The index-file used in subdir is phpBB3/phpBB3/indrex.php which only includes the scores.php
This file is the main page of our site to be shown


Get it a bit more. It was really the subdirectory. I copied all the dirs and files from the subdir phpbb3/phpBB3 up to the main dir and get a bit more shown what I wanted to see.
Not at all, but some more informations. Now I can work on it, I guess
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top