Jump to content

announcement widget on joomla


avizeke

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated