Home »
FUDforum »
How To »
modify index.tmpl template
modify index.tmpl template [message #25174] |
Mon, 30 May 2005 02:15 |
enicholse
Messages: 30 Registered: May 2005
Karma:
|
Member |
|
|
I want to force any user to login before they see anything, even headers or footers. I tried to wrap the whole INDEX_PAGE in IF: __fud_real_user__ but I get an eror message.
This is 2.6.13 with a copy of default theme. Any suggestions?
Aloha, Eric
The error message is:
Parse error: parse error in /Library/WebServer/Documents/theme/copy/index.php on line 373
Here is the modified index_page template:
{IF: __fud_real_user__}
{TEMPLATE: header}
{TEMPLATE: usercp}
{IF: _uid}<span class="GenText">{MSG: welcome_message}</span><br />{ENDIF}
{TEMPLATE: show_links}{TEMPLATE-DATA: admin_cp}
{TEMPLATE-DATA: cat_path}
<table cellspacing="1" cellpadding="2" class="ContentTable">
<tr>
<th colspan=3 class="wa">{MSG: index_forum}</th>
<th nowrap>{MSG: posts}</th>
<th nowrap>{MSG: threads}</th>
<th nowrap>{MSG: last_post}</th>
</tr>
{TEMPLATE-DATA: forum_list_table_data}
</table>
{IF: _uid}<div class="SmallText ar">[<a href="{TEMPLATE: mark_all_read_lnk}" title="{MSG: mark_all_read_desc}">{MSG: mark_all_read}</a>]</div>{ENDIF}
{TEMPLATE: loged_in_list}
<br /><fieldset>
<legend>{MSG: legend}</legend>
<img src="{THEME_IMAGE_ROOT}/new_content.png" alt="{MSG: index_new_posts}" /> {MSG: index_new_posts}
<img src="{THEME_IMAGE_ROOT}/existing_content.png" alt="{MSG: index_no_new_posts}" /> {MSG: index_no_new_posts}
</fieldset>
{TEMPLATE: curtime}
{TEMPLATE-DATA: page_stats}
{TEMPLATE: footer}
{ELSE}{TEMPLATE: quick_login_on}{END}
This works but does not provide any functionality. As soon as any more arguments/variables are added after IF the thing chokes.
{IF: __fud_real_user__}{TEMPLATE: header}
{ELSE}{TEMPLATE: quick_login_on}{END}
[Updated on: Mon, 30 May 2005 02:16] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Nov 26 05:55:36 GMT 2024
Total time taken to generate the page: 0.03945 seconds