Any help on this advanced scrypting would be appreciated.
long story short, were attemptig to achieve a whmcs widget for our front page joomla website were the announcements are fed through to the front of our website automatically.
actual code for it :
<?php
include("domain/whmcs/dbconnect.php");
include("domain/whmcs/includes/functions.php");
$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3";
$result = mysql_query($query);
while ($data = mysql_fetch_array($result)) {
$id = $data["id"];
$date = $data["date"];
$title = $data["title"];
$announcement = $data["announcement"];
$date = fromMySQLDate($date);
echo("<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>");
}
?>
Its outcome code
<p><?php<br />include("<a href="http://gameplayservers.com/whmcs/dbconnect.php">http://gameplayservers.com/whmcs/dbconnect.php</a>");<br />include("<a href="http://gameplayservers.com/whmcs/includes/functions.php">http://gameplayservers.com/whmcs/includes/functions.php</a>");<br />$query = "SELECT * FROM tblannouncements WHERE published='on' ORDER BY date DESC LIMIT 0,3"; <br />$result = mysql_query($query);<br />while ($data = mysql_fetch_array($result)) {<br /> $id = $data["id"];<br /> $date = $data["date"];<br /> $title = $data["title"];<br /> $announcement = $data["announcement"];<br /> $date = fromMySQLDate($date);<br /> echo("<p><font color=#cccccc>$date</font> - <b>$title</b><br>$announcement</p>");<br />}<br />?></p>
<p> </p>
-
basically, after inserting the proper code, joomla inserts page breaks and other aspects automatically. but when you go to view it it is as shown above but when you go to edit it it shows alot of additional code.
Joomla changes the code assuming your a noob and require help of altering by interpreting what your trying to attempt, but for advanced users who know what they are doing, it interferes on aspects like this.
again any advice on this guys is appreciated.