3245 Posted October 17, 2018 Share Posted October 17, 2018 Hello i want when i post on twitter, it show post on news section at whmcs, btw i want replace twiterr posts with whmcs news its possible? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
string Posted October 18, 2018 Share Posted October 18, 2018 According to the documentation you just have to disable the twitter integration to only show the announcements (General Settings -> Social -> clear "Twitter Username" field). Alternatively you can remove the following part of the file /templates/<your_template_name>/homepage.tpl to display the announcements: {if $twitterusername} <h2>{$LANG.twitterlatesttweets}</h2> <div id="twitterFeedOutput"> <p class="text-center"><img src="{$BASE_PATH_IMG}/loading.gif" /></p> </div> <script type="text/javascript" src="templates/{$template}/js/twitter.js"></script> {elseif $announcements} .... .... .... And at the end of the file remove the line {/if}. Or more simple: Just rename {if $twitterusername} to {if $twitterusername_disabled} 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 18, 2018 Share Posted October 18, 2018 8 hours ago, string said: Or more simple: Just rename {if $twitterusername} to {if $twitterusername_disabled} there's no point editing the template as you'll have to repeat the process after every WHMCS update - if you don't want to show tweets on the homepage, than as @string suggests either remove the Twitter username from settings, or use an action hook to null the $twitterusername variable only on the homepage - the advantage of using the hook being that you wouldn't need to edit the template again after an update - the hook would continue to work. so you would create a .php file in /includes/hooks/ and call it removetweets.php and paste the code below into it... <?php # Remove Tweets from Homepage # Written by brian! function remove_tweets_from_homepage_hook($vars) { return array("twitterusername" => ""); } add_hook("ClientAreaPageHome", 1, "remove_tweets_from_homepage_hook"); ?> ... then the next time you visit the homepage, the tweets will be gone and only the announcements (if they exist) will be shown. 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.