HostinPK Posted July 15, 2015 Share Posted July 15, 2015 I have an HTML page and I want to show the announcement in this style (check attachment) on my page. Is there any way to do it? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 15, 2015 Share Posted July 15, 2015 there are at least three ways I can think of... 1. writing a Data Feed to query the database and then output the announcements in your preferred format... http://docs.whmcs.com/Data_Feeds 2. there is some code on the WHMCS documentation site that could be used as a starting point - though dbconnect.php has been deprecated, so you may need to make some tweaks at the start of the code. http://docs.whmcs.com/Linking_to_WHMCS#Displaying_Announcements_on_your_Site http://docs.whmcs.com/Version_6.0_Release_Notes#Removal_of_Dbconnect.php 3. perhaps by using the announcementsrss.php file and using external software to output this in the format you want on your site. 0 Quote Link to comment Share on other sites More sharing options...
jissh Posted July 16, 2015 Share Posted July 16, 2015 The code provided no longer works. The have removed the dbconnects.php And changed the trigger. The following works for me. <?php include("WHMCSDirectory/init.php"); include("WHMCSDirectory/includes/functions.php"); $query = "SELECT * FROM tblannouncements WHERE published='1' ORDER BY date DESC LIMIT 0,1"; $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 '<font color="#cccccc">'.$date.'</font> - <b>'.$title.'</b><br />'.$announcement.''; } ?> 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.