0

i added this code to my index.php (joomla ja-purity file 1.5)

<?php if($this->countModules('user6')) : ?>
<table class="nopad user6user7">
<tr valign="top">
<?php if($this->countModules('user6')) : ?>
<td>
<jdoc:include type="modules" name="user6" style="xhtml" />
</td>
<?php endif; ?>
<?php if ($this->countModules('user6') and $this->countModules('user7')) : ?>
<td class="greyline">&#160;</td>
<?php endif; ?>
<?php if ($this->countModules('user7')) : ?>
<td>
<td>
<jdoc:include type="modules" name="position-7" style="xhtml" />
</td>
<?php endif; ?> 

i got this error
Parse error: syntax error, unexpected $end in ------------------ on line 293
what could be the issue
anyone knows how to fix it.
thanks all

Edited by pritaeas: Added code tags

3
Contributors
3
Replies
5
Views
5 Years
Discussion Span
Last Post by scales
0

If you indent your code:

<?php if($this->countModules('user6')) : ?>
    <table class="nopad user6user7">
    <tr valign="top">
    <?php if($this->countModules('user6')) : ?>
        <td>
        <jdoc:include type="modules" name="user6" style="xhtml" ></jdoc:include>
        </td>
    <?php endif; ?>
    <?php if ($this->countModules('user6') and $this->countModules('user7')) : ?>
        <td class="greyline"> </td>
    <?php endif; ?>
    <?php if ($this->countModules('user7')) : ?>
        <td>
        <td>
        <jdoc:include type="modules" name="position-7" style="xhtml" ></jdoc:include>
        </td>
    <?php endif; ?> 
<?php endif; ?>    /* MISSING */

you could have easily seen that an endif is missing somewhere. I assumed it to be at the bottom.

Edited by pritaeas

0

You need to had another "endif;"
The code:

<?php if($this->countModules('user6')) : ?>

Is currently still true at the end of the file. This needs to be ended before the end of the file.

0

hi Pritaeas / XNZxAssAssiNx thank you guys for the swift replies.
For some reasons it still did not work.
i checked in this site
(http://validator.w3.org/check?uri=&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3)
and i got the following errors.Sorry am still very new to the whole website stuff.

Error Line 127, Column 43: there is no attribute "type"

…                   <jdoc:include type="modules" name="user6" style="xhtml"></j…

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Error Line 127, Column 58: there is no attribute "name"

…        <jdoc:include type="modules" name="user6" style="xhtml"></jdoc:include>

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Error Line 127, Column 72: there is no attribute "style"

…        <jdoc:include type="modules" name="user6" style="xhtml"></jdoc:include>

?

You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
Error Line 127, Column 79: element "jdoc:include" undefined

…        <jdoc:include type="modules" name="user6" style="xhtml"></jdoc:include>

?

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
    incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
    by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
Error Line 131, Column 27: document type does not allow element "td" here

                       <td>

?

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Error Line 132, Column 85: element "jdoc:include" undefined

…  <jdoc:include type="modules" name="position-7" style="xhtml" ></jdoc:include>

?

thanks again

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.