adtastichosting Posted May 29, 2016 Share Posted May 29, 2016 I've read thru various threads on this subject all of them old and purporting to offer solutions but haven't found one. I am trying to put latest announcements on the portal home page using the six template in version 6x of whmcs. looking at homepage.tpl it looks like there is code in there intimating that this is a feature that can be turned on or off via a setup function in the admin but I don't see anything there in that regard. Would be nice if it was something that could be controlled via admin. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 29, 2016 Share Posted May 29, 2016 Do you mean this home page http://demo.whmcs.com/clientarea.php where client redirected after login? 0 Quote Link to comment Share on other sites More sharing options...
adtastichosting Posted May 29, 2016 Author Share Posted May 29, 2016 Do you mean this home page http://demo.whmcs.com/clientarea.php where client redirected after login? No, the main index page: http://demo.whmcs.com/index.php 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 29, 2016 Share Posted May 29, 2016 but it already display latest 3 announcements isn't, what difference you need? 0 Quote Link to comment Share on other sites More sharing options...
adtastichosting Posted May 30, 2016 Author Share Posted May 30, 2016 but it already display latest 3 announcements isn't, what difference you need? No it doesn't display any announcements. Just tweets if you configure it to do that. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 30, 2016 Share Posted May 30, 2016 if Twitter username defined in General Setting it will display latest tweets, otherwise Announcements will be displayed so all you have to do is to make Twitter Username field in General Settings empty - - - Updated - - - another option if you need to display both "Twitter Feed" and "Announcements" in home page is to edit /templates/six/homepage.tpl replace this: {elseif $announcements} with {/if} {if $announcements} 1 Quote Link to comment Share on other sites More sharing options...
adtastichosting Posted May 30, 2016 Author Share Posted May 30, 2016 Beautiful. Perfect answer. I appreciate you taking the time to respond and for providing the solution! 0 Quote Link to comment Share on other sites More sharing options...
ITWolfy Posted June 3, 2016 Share Posted June 3, 2016 sentq Thanks Man! I was also looking for this. 0 Quote Link to comment Share on other sites More sharing options...
adtastichosting Posted June 3, 2016 Author Share Posted June 3, 2016 Yes good solution. Only problem I have now is I have {if $announcement@index < 6} and still only 3 show up but seems should be 6. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 4, 2016 Share Posted June 4, 2016 Yes good solution. Only problem I have now is I have {if $announcement@index < 6} and still only 3 show up but seems should be 6. this will be caused because the $announcements array available to the homepage only contains 3 announcements... by default, the latest two are shown... you could change that to three, but you can't go beyond it. the only way to get around it would be to get more announcements via querying the database - using an action hook would be the obvious way, a data feed would be another... the thread below includes a hook to display announcements in the footer. http://forum.whmcs.com/showthread.php?108358-Announcements-in-Footer-tpl&p=443910#post443910 it will give you a new variable {$footerannoucements} that you can add to your template... not necessarily in the footer, but anywhere in the homepage.tpl template - you'd just need to modify the output to suit your website styling... change the limit value from 3 to 6 and perhaps use the ClientAreaPageHome hook instead (so that it's only available to the homepage and not all pages). long-term, you'd have to rewrite it to use Capsule instead of mysql, but it would certainly work in the short-term. 0 Quote Link to comment Share on other sites More sharing options...
HostGenius Posted June 6, 2016 Share Posted June 6, 2016 It works thanks 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.