5wayshost Posted August 10, 2006 Share Posted August 10, 2006 i was wondering if customers could login first to get to the download area. This would stop everybody downloading from the server 10 downloads in the last 2 hours lol 0 Quote Link to comment Share on other sites More sharing options...
pxtek Posted August 10, 2006 Share Posted August 10, 2006 I believe this is being implemented for the 2.5 version. 0 Quote Link to comment Share on other sites More sharing options...
xxkylexx Posted August 10, 2006 Share Posted August 10, 2006 Looks like he is using v2.5. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 10, 2006 Share Posted August 10, 2006 Thats pretty easy to implement if your just wanting to hide the downloads section, etc. Let me look at the smarty templates and i will get back with you. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 10, 2006 Share Posted August 10, 2006 Here would be the easiest way to block the downloads section from users that are not logged in. Just replace your templates\WHMCSDefault\downloads.tpl contents with this. {$LANG.downloadsintrotext}</p> {if $loggedin} <blockquote> {foreach key=num item=download from=$downloads} {$download.type} [url="{$download.link}"][b]{$download.title}[/b][/url] {$download.description} </p> {foreachelse} <p align=center>[b]{$LANG.downloadsnone}[/b]</p> {/foreach} </blockquote> {else} SHOW THIS {/if} Replace SHOWTHIS with whatever text, links, etc, that you want to how to users that arent logged in. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 10, 2006 WHMCS CEO Share Posted August 10, 2006 Nice one! Matt 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 10, 2006 Share Posted August 10, 2006 one of the many reasons I love smarty. =P 0 Quote Link to comment Share on other sites More sharing options...
taylorwilsdon Posted August 11, 2006 Share Posted August 11, 2006 The smarty template engine is perhaps the best widescale implementation of a template system available, period. I applaud your choice to use it 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 11, 2006 Share Posted August 11, 2006 see Matt, told you so :wink: 0 Quote Link to comment Share on other sites More sharing options...
thernes Posted August 11, 2006 Share Posted August 11, 2006 Until now, I've barely looked at Smarty. Gotta say I love what I see... 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 11, 2006 Share Posted August 11, 2006 We really should change the delimiter thought to something different, the default one can cause inuse with in document styles and javascript. I always change it to . Its easier to read as well. Also, I noticed that the smarty library is encoded. Thats just plain wrong and their is absolutely no reason to encode a open source library. I might be remembering wrong, but this also does no allow us to tweak smarty settings or change the patch to to templates_c directory. I always move that to a sub site root location. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 11, 2006 WHMCS CEO Share Posted August 11, 2006 Hi, I prefer the {$tag} style. The smarty library is not intended to be encoded so I will correct this for the stable release. However, the path to the templates_c directory can be changed in the configuration.php file. Matt 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 11, 2006 Share Posted August 11, 2006 ah, i had issues with beta 5.5, so i havent updated to that yet. 5.3 didnt have the smarty config paths in it. And like a said, smarty is going to have an issue any time it sees a bracket thats not smarty related, so if you try to do something like: <SCRIPT language="JavaScript"> <!-- function printKB(article_id) { ........ or <style type="text/css"> td { text-align:left; ................... Smarty will fail if you try either of those in the templates. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 11, 2006 WHMCS CEO Share Posted August 11, 2006 Well that's a simple problem to avoid. Just always put the css in a stylesheet file and js in a javscript file then include as required with the relevant html. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 11, 2006 Share Posted August 11, 2006 lol, i knew you were going to say that. =P Just kind of annoying when all you want to do is override something simple like a generic ul or maybe body attributes, etc. 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted August 11, 2006 Share Posted August 11, 2006 Eh, it is nice being able to code a little faster with { }. Ive been using the other delimiters for years and just had gotten used to it. Im sure there is a work around. 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted September 10, 2006 Share Posted September 10, 2006 Here would be the easiest way to block the downloads section from users that are not logged in. Just replace your templates\WHMCSDefault\downloads.tpl contents with this. {$LANG.downloadsintrotext}</p> {if $loggedin} <blockquote> {foreach key=num item=download from=$downloads} {$download.type} [url="{$download.link}"][b]{$download.title}[/b][/url] {$download.description} </p> {foreachelse} <p align=center>[b]{$LANG.downloadsnone}[/b]</p> {/foreach} </blockquote> {else} SHOW THIS {/if} Replace SHOWTHIS with whatever text, links, etc, that you want to how to users that arent logged in. Can I replace SHOWTHIS with {$LANG.downloadsnotlogged} and add like $_LANG['downloadsnotlogged'] = "Client's area only. Log in to access this area."; to the language file? 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted September 10, 2006 Share Posted September 10, 2006 Yep, that would work fine. Just replace SHOW THIS with the language variable that you suggested. 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted September 10, 2006 Share Posted September 10, 2006 Great! Tks for the quick answer. 0 Quote Link to comment Share on other sites More sharing options...
gismo Posted September 17, 2006 Share Posted September 17, 2006 I use this string {$LANG.loginintrotext} 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.