User Controllable <!--INCLUDE-->'s?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
Aden
Registered User
Posts: 29
Joined: Sun Sep 17, 2006 8:17 am

User Controllable <!--INCLUDE-->'s?

Post by Aden »

Does anyone know if it is possilbe to add something in the users profile so that they can configure what <!--INCLUDE -->'s Load and what dont.

I have a Top Panel i am working on, it has three sections,
i use includes to get the file content for the three sections.

I was wondering if it would be possilbe to add something in the UCP so that a user could control which includes he wanted the page to load (eg, login panel, welcome message and latest announcements) of a choice.

Any Ideas.

All help appreciated.

User avatar
jojobarjo32
Registered User
Posts: 164
Joined: Wed Jun 22, 2005 7:38 pm
Location: France

Re: User Controllable <!--INCLUDE-->'s?

Post by jojobarjo32 »

Do a simple conditionnal test :

Code: Select all

<!-- IF xxx -->
	<!-- INCLUDE blah1 -->
<!-- ELSEIF yyy -->
	<!-- INCLUDE blah2 -->
<!-- ELSEIF zzz -->
	<!-- INCLUDE blah3 -->
<!-- ENDIF -->

Aden
Registered User
Posts: 29
Joined: Sun Sep 17, 2006 8:17 am

Re: User Controllable <!--INCLUDE-->'s?

Post by Aden »

Ok, i try it.

Aden
Registered User
Posts: 29
Joined: Sun Sep 17, 2006 8:17 am

Re: User Controllable <!--INCLUDE-->'s?

Post by Aden »

I am confused how to get this to work,
what would i create in user profile?

3 new fields?
each one defining an include?

BondGamer
Registered User
Posts: 113
Joined: Mon Dec 15, 2003 8:20 pm
Contact:

Re: User Controllable <!--INCLUDE-->'s?

Post by BondGamer »

For example, if you wanted to include welcome message first create an option such as "Enable Welcome Message" for the user's profile with a Yes/No option. Then you take that variable and use it for your conditional statement.

Code: Select all

<!-- IF EnableWelcome -->
   <!-- INCLUDE WelcomeMessage -->
<!-- IF EnableLoginBox -->
   <!-- INCLUDE LoginBox -->
I don't know if that would work, I have not looked at additional profile options or the template conditional system yet.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: User Controllable <!--INCLUDE-->'s?

Post by Paul »

Code: Select all

<!-- IF ENABLE_WELCOMEMESSAGE --><!-- INCLUDE Wwlcomemessage.html --><!-- ENDIF -->
<!-- IF LOGINBOX --><!-- INCLUDE loginbox.html --><!--ENDIF -->
IF tags must be uppercase, and be closed with <!-- ENDIF -->, included requires existing page.

Post Reply