XFileSharing Pro - Custom <TMPL_IF> Tags?

Posts: 5
Joined: May 01, 2010 10:44 am

Custom <TMPL_IF> Tags?

#1 Postby pengalor » May 06, 2010 10:11 am


My site layout contains a main frame and a sidebar. I was wondering if there is a custom <TMPL_IF> tag display content on specific sites only.

In example, I have figured out that <TMPL_IF user_total> hides content unless the user is on the main site.

Also, <TMPL_UNLESS my_login> in example, hides content when user is logged in.

What I am looking for is to show/hide content when a user is on a certain page. For example: Show X in sidebar when user is on registration.html.

Additionally I was wondering if its possible to automatically redirect a user after login to a certain page? I have noticed that the user gets redirected to whatever page he was before he logged in, but I´d like to redirect them to a spefic page every time they login.


Site Admin
Posts: 1838
Joined: Mar 22, 2006 12:32 pm

#2 Postby admin » May 06, 2010 1:25 pm

Well, no. But you can stick to specific variable which is only on that page where you want to show your stuff.

Posts: 5
Joined: May 01, 2010 10:44 am

#3 Postby pengalor » May 07, 2010 9:19 am

Got it working! Thanks. One last thing:

Is it possible to use English as default language for all users? (i noticed language automatically changes to browser language)


User avatar
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#4 Postby PilgrimX182 » May 11, 2010 12:55 pm

Try to remove extra languages from this code from XFileConfig.pm:

Code: Select all

 language_codes => {'en.*'             => 'english',
                    'cs'               => 'czech',
                    'da'               => 'danish',
                    'fr.*'             => 'french',
                    'de.*'             => 'german',
                    'p'                => 'polish',
                    'ru'               => 'russian',
                    'es.*'             => 'spanish',