Nathum Posted September 1, 2014 Share Posted September 1, 2014 Hi, After pointless hours of reading through the forums, google and plugins that won't work without bugs. I have figured out a way to implement the header from wordpress into WHMCS. This is a little dirty but it works with one fault which maybe someone could come up with a solution. Ok so 1st Open your theme's header.tpl file. Remove.... <div id="whmcsheader"> <div class="whmcscontainer"> <div id="whmcstxtlogo"><a href="index.php">{$companyname}</a></div> <div id="whmcsimglogo"><a href="index.php"><img src="templates/{$template}/img/whmcslogo.png" alt="{$companyname}" /></a></div> </div> </div> Insert.... {php} $header = file_get_contents('http://www.clanhost.com.au/index.php', true); $header = substr($header, 0, strpos( $header, '<div class="outer planner">')); echo $header; {/php} So basically what this does.... Downloads your website's front page into a string $header Finds the line in your front pages html <div class="outer planner"> and deletes everything after. Then echo everything from the start of your code to the next <div>. The only downside... Which I am unable to figure out yet is, the div layer sits behind WHMCS so drop down menus appear behind WHMCS. Anyway that's my solution to the header that works flawlessly almost. Nathum - - - Updated - - - I figured out the the bug, Place the {php} code after <div class="navbar navbar-fixed-top"> 0 Quote Link to comment Share on other sites More sharing options...
Nathum Posted September 1, 2014 Author Share Posted September 1, 2014 As for the footer.tpl Which was more tricky. I replaced.... <div class="whmcscontainer"> <div class="footer"> <div id="copyright">{$LANG.copyright} © {$date_year} {$companyname}. {$LANG.allrightsreserved}.</div> {if $langchange}<div id="languagechooser">{$setlanguage}</div>{/if} <div class="clear"></div> </div> </div> {php} $headerstring = file_get_contents('http://www.clanhost.com.au/index.php', true); $headerscripts = substr($headerstring, 0, strpos( $headerstring, '<div id="header">')); $footer = strstr($headerstring, '<div class="outer footsy">'); echo $headerscripts . " " . $footer; {/php} Let me explain. I needed the java/scripts from my site so line 1 puts the site into a string. Line 2 remove anything before <div id="header"> so all I get are the scripts. Line 3 removes anything before the footer div so all I get is the footer. Then I simply echo the scripts and then the footer Nathum 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.