Parse error: syntax error, unexpected T_VARIABLE in /home/qaresear/public_html/classe

Discussion in 'PHP' started by azkp, Feb 2, 2011.

  1. #1
    Hello i am very very new to php i am facing this problem plz support me here is complete coding

    <?php


    /**
    * @author <a href = mailto:stefan@synthasite.com>Stefan Lourens</a>
    *
    * Renders child components as defined in $pageProperties in the
    * relative page's component definition file.
    */
    function smarty_function_region($params, & $smarty) {

    $pageProperties = $smarty->get_template_vars("properties");
    $components = $pageProperties['regions'][$params['name']];
    $componentProperties = $smarty->get_template_vars('properties');
    $system = $smarty->get_template_vars("system");
    $paletteName = strtolower($system['palette']['name']);

    $tagName = 'div';

    if (array_key_exists('tagName', $params)) {
    $tagName = $params['tagName'];
    }

    if ($componentProperties['id']) {
    $id = str_replace(' ', '', $params['name']) . '_' . $componentProperties['id'];
    } else {
    $id = str_replace(' ', '', $params['name']);
    }

    $paramExcludes = array (
    '',
    'id',
    'name',
    'defaultHeight',
    'description',
    'tagName'
    );

    //Rendering
    if ($components) {

    $tagParams = '';

    foreach ($params as $key => $value) {

    if (!array_search($key, $paramExcludes)) {
    $tagParams .= $key . '="' . $value . '" ';
    }
    }

    echo '<' . $tagName . ' id="' . $id . '" ' . $tagParams . '>';
    foreach ($components as & $component) {
    $css = '';

    if ($component->getComponentProperty('width')) {
    $css = $css . 'width:' . $component->getComponentProperty('width') . ';';
    }

    if ($component->getComponentProperty('height')) {
    $css = $css . 'height:' . $component->getComponentProperty('height') . ';';
    }

    if($component->getComponentProperty('position')) {

    $css = $css . 'text-align:' . $component->getComponentProperty('position') . ';';
    }
    if($component->getComponentProperty('margin')) {
    $css = $css . 'margin:' . $component->getComponentProperty('margin') . ';';
    }
    if($component->getComponentProperty('padding')) {
    $css = $css . 'padding:' . $component->getComponentProperty('padding') . ';';
    }

    if(_SYSTEM_MODE == "DESIGN") {
    echo '<div id="' . $component->getComponentProperty('id') . '" style="padding:0 0 1px 0; position:relative; display:' . $component->getComponentProperty('sys_displayType') . ';' . $css . '" class="' . $component->getComponentProperty('sys_className') . '">';
    }
    else {
    echo '<div id="' . $component->getComponentProperty('id') . '" style="display:' . $component->getComponentProperty('sys_displayType') . ';clear: both;' . $css . '" class="' . $component->getComponentProperty('sys_className') . '">';
    }

    // Bind domain to locale directory
    // print "\n<!-- LOCALE: " . $system['locale'] . " -->\n";
    // print "\n<!-- LOCALE DIR: " . $component->locale_dir . " -->\n";
    LINE 84 ("messages" $component->locale_dir);

    // Render!
    $component->render();

    echo '</div>';

    }
    echo '</' . $tagName . '>';

    } else {

    $tagParams = '';
    $addedDefaultHeight = false;

    foreach ($params as $key => $value) {

    if (!array_search($key, $paramExcludes)) {

    if ($key == 'style' && $params['defaultHeight'] && _SYSTEM_MODE == 'DESIGN') {
    $tagParams .= $key . '="' . $value . ' height:' . $params['defaultHeight'] . ';" ';
    $addedDefaultHeight = true;
    } else {
    $tagParams .= $key . '="' . $value . '" ';
    }

    }
    }

    if (!$addedDefaultHeight && _SYSTEM_MODE == 'DESIGN') {
    $tagParams .= 'style="height:' . $params['defaultHeight'] . ';" ';
    }
    echo '<' . $tagName . ' id="' . $id . '" ' . $tagParams . '>&nbsp;</' . $tagName . '>';

    }

    }
    ?>
     
    azkp, Feb 2, 2011 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    The problem lies in line number 84. You may opt to comment this line or change to correct code.

    
    LINE 84 ("messages" $component->locale_dir);
    
    PHP:
     
    mastermunj, Feb 2, 2011 IP
  3. azkp

    azkp Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have written that LINE84 as you mentioned but still the problem is same please help how can i solve it? any soultion is acceptable
     
    azkp, Feb 2, 2011 IP