Forum Search:
FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.
Calendar
Search
Help
Members
Control Panel
Logout [ CommonCrawl [Bot] ]
Home
Post Form
Logged in user:
CommonCrawl [Bot] [
logout
]
Forum:
Bug Reports
Title:
Poll:
[CREATE POLL]
Message Icon:
No Icon
Smiley Shortcuts:
[
list all smilies
]
Formatting Tools:
Size
1
2
3
4
5
6
7
Color
Sky Blue
Royal Blue
Blue
Dark Blue
Orange
Orange Red
Crimson
Red
Firebrick
Dark Red
Green
Lime Green
Sea Green
Deep Pink
Tomato
Coral
Purple
Indigo
Burly Wood
Sandy Brown
Sienna
Chocolate
Teal
Silver
Font
Arial
Times
Courier
Century
Body:
Forum Options:
HTML
code is
off
BBcode
is
on
Images
are
on
Smilies
are
on
Editing Time Limit
: Unlimited
[quote title=DPhan wrote on Mon, 01 October 2012 19:20]In the default index.tmpl file, I made the following change: before: {TEMPLATE: show_links} after: {IF: _uid} {TEMPLATE: show_links} {ENDIF} The generated code BEFORE the change is as follows: "index.php?t=selmsg&date=today&<?php echo _rsid; ?>&frm_id=<?php echo (isset($frm->forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'&th='.$th.'" title="Show all messages that were posted today" rel="nofollow">Today's Messages</a> '.(_uid ? '<b>::</b> <a href=" index.php?t=selmsg&unread=1&'._rsid.'&frm_id='.(iss et($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all unread messages" rel="nofollow">Unread Messages</a> ' : ''); ?> <?php echo (!$th ? '<b>::</b> <a href=" index.php?t=selmsg&reply_count=0&'._rsid.'&frm_id=' .(isset($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all messages, which have no replies" rel="nofollow">Unanswered Messages</a> ' : ''); ?> <b>::</b> <a href="index.php?t=mnav&<?php echo _rsid; ?>" rel="nofollow">Message Navigator</a><?php echo $admin_cp; ?> <?php echo $cat_path; ?> The generated code AFTER the change contains syntax error and is as follows: <?php echo (_uid ? ' <span class="GenText fb">Show:</span> <a href=" index.php?t=selmsg&date=today&'._rsid.'&frm_id='.(i sset($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'&th='.$th.'" title="Show all messages that were posted today" rel="nofollow">Today's Messages</a> '.(_uid ? '<b>::</b> <a href=" index.php?t=selmsg&unread=1&'._rsid.'&frm_id='.(iss et($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all unread messages" rel="nofollow">Unread Messages</a> ' : ''); ?> <?php echo (!$th ? '<b>::</b> <a href=" index.php?t=selmsg&reply_count=0&'._rsid.'&frm_id=' .(isset($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all messages, which have no replies" rel="nofollow">Unanswered Messages</a> ' : ''); ?> <b>::</b> <a href="index.php?t=mnav&<?php echo _rsid; ?>" rel="nofollow">Message Navigator</a> ' : ''); ?> <?php echo $admin_cp; ?> <?php echo $cat_path; ?> Correct the syntax error by removing the trailing ; ?> near "Unanswered Messages" and replace with a dot, and add a single quote on the next line. Corrected version: <?php echo (_uid ? ' <span class="GenText fb">Show:</span> <a href=" index.php?t=selmsg&date=today&'._rsid.'&frm_id='.(i sset($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'&th='.$th.'" title="Show all messages that were posted today" rel="nofollow">Today's Messages</a> '.(_uid ? '<b>::</b> <a href=" index.php?t=selmsg&unread=1&'._rsid.'&frm_id='.(iss et($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all unread messages" rel="nofollow">Unread Messages</a> ' : ''); ?> <?php echo (!$th ? '<b>::</b> <a href=" index.php?t=selmsg&reply_count=0&'._rsid.'&frm_id=' .(isset($frm- >forum_id) ? $frm->forum_id.'' : $frm->id.'' ) .'" title="Show all messages, which have no replies" rel="nofollow">Unanswered Messages</a> ' : '') . '<b>::</b> <a href="index.php?t=mnav&<?php echo _rsid; ?>" rel="nofollow">Message Navigator</a> ' : ''); ?> <?php echo $admin_cp; ?> <?php echo $cat_path; ?> I started to look at the code generation routine compiler.inc for a permanent fix but I thought I should ask if there is someone who is more familiar with this code generation routine. Dan[/quote]
File Attachments:
Allowed File Extensions:
jpg jpeg png gif txt doc gz bz2 inc php zip diff
Maximum File Size:
1024KB
Maximum Files Per Message:
5
Options:
Post Notification
Notify me when someone replies to this message.
Include Signature
Include your profile signature.
Disable smilies in this message
Topic View
Post by DPhan is ignored
Re: Syntax error in code generated after adding {IF} to template
Thu, 04 October 2012 06:30
naudefj
Karma:
See
http://fudforum.org/forum/index.php?t=msg&th=9288
"
Normally you can end the expression using {end}, but if you don't have an else you need to use {endif}. The {endI} and {endifI} are special terminators you need to use in the place of {end} and {endif} when your conditional expression is within another conditional expression.
"
I normally play with the various forms of {IF: } until I get one that works:
{IF: ...}...{ELSE}...{END}
{IF: ...}...{ENDIF}
Within another {IF: }
{IF: ...}...{ELSE}...{ENDI}
{IF: ...}...{ENDIFI}
Post by DPhan is ignored
Post by DPhan is ignored
Current Time:
Thu Nov 30 18:35:50 EST 2023
Total time taken to generate the page: 0.04071 seconds