sequencehost Posted January 9, 2012 Share Posted January 9, 2012 Hello, I've been trying to make use of WHMCS's announcements code (displays announcements of non WHMCS PHP pages) but it doesn't work for me: <?php include("support/dbconnect.php"); include("support/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>'; } ?> I've changed support to the name of my WHMCS directory to no avail. Is this code no longer valid? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 10, 2012 Share Posted January 10, 2012 Though I'm not yet on the latest version, on previous versions that code works if you use full paths. Yours: include("support/dbconnect.php"); Working version (change both paths): include("/home/user/www/support/dbconnect.php"); 0 Quote Link to comment Share on other sites More sharing options...
sequencehost Posted January 10, 2012 Author Share Posted January 10, 2012 Though I'm not yet on the latest version, on previous versions that code works if you use full paths.Yours: include("support/dbconnect.php"); Working version (change both paths): include("/home/user/www/support/dbconnect.php"); Thanks for your reply Bear. I also tried this yesterday but no luck unfortunately. I can confirm that I'm using the latest version. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted January 10, 2012 Share Posted January 10, 2012 Ah, I won't be able to test on the latest until I figure out how to continue using the heavily integrated Kayako login share. Odds are with the move to the newer version of Kayako (which I won't be using) that won't be possible and I'll need to use the built in desk. No time this week. 0 Quote Link to comment Share on other sites More sharing options...
sequencehost Posted January 10, 2012 Author Share Posted January 10, 2012 Ah, I won't be able to test on the latest until I figure out how to continue using the heavily integrated Kayako login share. Odds are with the move to the newer version of Kayako (which I won't be using) that won't be possible and I'll need to use the built in desk. No time this week. No worries Bear. Hopefully Matt will post a revised version of this code. 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.