ddg8176 Posted January 1, 2008 Share Posted January 1, 2008 I'm curious to know if the Downloads page was added to this section of code on the header.tpl file would Downloads automatically require login when clicked from the homepage? {if $loggedin}<br /> <table width="100%" cellspacing="1" class="clientlinks"> <tr> <td class="clientlinks"><a href="clientarea.php?action=details"><img src="images/clientarea/details.gif" alt="{$LANG.clientareanavdetails}" align="middle" /></a> <a href="clientarea.php?action=details">{$LANG.clientareanavdetails}</a></td> <td class="clientlinks"><a href="clientarea.php?action=invoices"><img src="images/clientarea/invoices.gif" alt="{$LANG.invoices}" align="middle" /></a> <a href="clientarea.php?action=invoices">{$LANG.invoices}</a></td> <td class="clientlinks"><a href="clientarea.php?action=hosting"><img src="images/clientarea/hosting.gif" alt="{$LANG.clientareanavhosting}" align="middle" /></a> <a href="clientarea.php?action=hosting">{$LANG.clientareanavhosting}</a></td> <td class="clientlinks"><a href="clientarea.php?action=domains"><img src="images/clientarea/domains.gif" alt="{$LANG.clientareanavdomains}" align="middle" /></a> <a href="clientarea.php?action=domains">{$LANG.clientareanavdomains}</a></td> </tr> <tr> <td class="clientlinks"><a href="supporttickets.php"><img src="images/clientarea/supporttickets.gif" alt="{$LANG.clientareanavsupporttickets}" align="middle" /></a> <a href="supporttickets.php">{$LANG.clientareanavsupporttickets}</a></td> <td class="clientlinks"><a href="order.php"><img src="images/clientarea/order.gif" alt="{$LANG.clientareanavorder}" align="middle" /></a> <a href="order.php">{$LANG.clientareanavorder}</a></td> <td class="clientlinks"><a href="clientarea.php?action=products"><img src="images/clientarea/products.gif" alt="{$LANG.clientareaproducts}" align="middle" /></a> <a href="clientarea.php?action=products">{$LANG.clientareaproducts}</a></td> <td class="clientlinks"><a href="clientarea.php?action=emails"><img src="images/clientarea/emails.gif" alt="{$LANG.clientareaemails}" align="middle" /></a> <a href="clientarea.php?action=emails">{$LANG.clientareaemails}</a></td> </tr> </table> {/if} 0 Quote Link to comment Share on other sites More sharing options...
Brett Posted January 1, 2008 Share Posted January 1, 2008 No. Do not add or edit anything in the header.tpl for access to the downloads. What you want to do is put at the beginning of the downloads.tpl file {if $loggedin} and at the very bottom put {else} Please Login to view downloads section. {/if} You can change the text above for directions to login. What you are telling the template is IF user is logged in display this, ELSE display this. That is what you are looking for. You will also want to do this for the downloadscat.tpl file as well. 1 Quote Link to comment Share on other sites More sharing options...
ddg8176 Posted January 1, 2008 Author Share Posted January 1, 2008 Thanks for your help. I appreciate the fact that you didn't just tell me what code to put into which file but you gave a brief explanation about what the code does. 0 Quote Link to comment Share on other sites More sharing options...
Brett Posted January 1, 2008 Share Posted January 1, 2008 Not a problem! Glad I could help you out with that. Have a happy new year! 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted March 4, 2008 Share Posted March 4, 2008 Thanks for this solution guys. I'd like to add an enhancement. I wanted to do this same mod to both my KB and downloads, but there would be little incentive for the potential client to register, (if there was little info). On the other hand, didn;'t want potential clients to stroll through and 'cherry pick' without giving me the chance to do business with them. So by applying this mod to the knowlegdebasecat.tpl and downloadscat.tpl files, the potential client gets to see the first page of your DL & KB, but if they clieck a categorie, they get a login or register code. On the donside, they can access your top5 Kb or Dl articles, but thats a small price to pay. Don't you agree? The following slight hack displays the login/reg link {else} <p><h4>Please <a href="/whmcs/clientarea.php" target="_blank">Login</a> or <a href="/whmcs/register.php" target="_blank">Register</a> to use our knowledgebase.</h4></p> {/if} or change KB to DL. Cheers Dan 0 Quote Link to comment Share on other sites More sharing options...
bitwise Posted March 31, 2008 Share Posted March 31, 2008 I think this would be a great feature. I used to use phpcoin and the knowledgebase for that would allow certain categories be only for clients logged in. This was very handy so I could put links for the cpanel and ftp as well has paths for GD, imagemagik, etc... 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.