Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 - 0 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Can a file include tag be used in a language file define?
by trspice on 2007/4/16 23:26:55

Many thanks :)
Re: Can a file include tag be used in a language file define?
by Catzwolf on 2007/4/16 18:34:22

Actually there is an easier way of doing this.

Do as dave says, and include your define files and use this smarty tag instead:
like

define('_MY_DEFINE', 'My Text');

and in the html file:

<{$smarty.const._MY_DEFINE}>

Catz
Re: Can a file include tag be used in a language file define?
by Dave_L on 2007/4/16 18:26:21

I don't think you can embed an "include" within a "define" value, unless there's a tricky way of doing it with "eval".

You could either (1) add the text in main.php:

define("_USERPAGE_EMPTY_PAGE","
text
more text
and more text
");

or (2) put it in a separate file other.php:

<?php define("_USERPAGE_EMPTY_PAGE"," text more text and more text ... "); ?>


and change main.php:

#define("_USERPAGE_EMPTY_PAGE","Disclaimer and rules");
include('other.php');
Re: Can a file include tag be used in a language file define?
by trspice on 2007/4/16 17:34:24

Thanks for the suggestions. Both still print the code on the page instead of the text from the file. Here is exactly what I am doing

I am using Userpages module and want to add significant amount of text to language/main.php line 38
le="color: #000000"><?php define("_USERPAGE_EMPTY_PAGE","Disclaimer and rules");
Re: Can a file include tag be used in a language file define?
by skenow on 2007/4/15 13:10:28

What is the filetype of the language file you are using? If you are using a php file, your include statement would be
Quote:
include 'path/file.html';


The <{include file="path/file.html"}> would be for use in an html file.

Who's Online

163 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits