Jump to content

convict

Member
  • Posts

    1,302
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by convict

  1. Temlates are for html code or for temlate variables from appropriate php defined, php commands doesnt work. Search post from 90 days ago and newer....

    Same line problem:

    Yes, <form> makes a 'break'

    Solutions:

    1. make centered table for {SESSION} {SEARCH_FORM}

    2. use realive positons and some float for <div>

    Code below does not center both boxes, but they are at the same line, SESSION on right and SEARCH_FORM on the left side. I think thats the best solution for you. :w00t:

    <div style="position:relative;float:right">{SESSION}</div>
    
     <div style="position:relative;float:left">{SEARCH_FORM}</div>

  2. That is probably why it doesn't work in CubeCartâ„¢ stylesheets  :)

    This is BROWSER mode settings dependet B). Code below is responsible that colored scrollbar doesnt show in IE :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Apply scroll-bar styles and remove code above temorary */*.

    Finally, thats true - scrollbar is non-standard style property.

  3. pippopluto

    You have to write your own box tepmlate file, appropriate php file, additional LANG variable(s).

    I suppose, you dont know anything about PHP TEMPLATES.

    Principle in practice

    -----------------------

    Have look to includes/boxes folder. Lot of boxes php files here. Appropriate templates folder is skins/<-your favorite skin->/styleTemplates/boxes.

    How the whole parsing works?

    ----------------------------------

    Php files for boxes are included into index.php like this

    include("includes/boxes/searchForm.inc.php");
    
    $body->assign("SEARCH_FORM",$box_content);
    
    
    Just have look at SEARCH_FORM in code above, open the main index template skins/<-your favorite skin->/styleTemplates/global/index.tpl and search for SEARCH_FORM. Here is {SEARCH_FORM} - template variable parsed by $body->assign("SEARCH_FORM",$box_content) command . It means, that whole code for this box just in this position resides.
    
    
    
    And what about box code?. Open skins/<-your favorite skin->/styleTemplates/boxes/searchForm.tpl. This is plain html code, except template variables like {LANG_SEARCH_FOR}. This variable is parsed in appropriate php for searchForm.tpl - includes/boxes/searchForm.inc.php just open it and yes, we are right 
    
    $box_content = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/boxes/searchForm.tpl");
    Command like
    
    $box_content->assign("LANG_GO",$lang['front']['boxes']['go']);
    does already used language assignation for {LANG_GO} and $lang['front']['boxes']['go'] is language variable defined within lang.inc.php.
    
    Finally, all of our variables, which are needed for template must be parsed.
    
    
    
    $box_content->parse("search_form");
    
    $box_content = $box_content->text("search_form");

    As you see, $box_content contains search box html code.

    OK, thats all. You are welocome to PM me, if you have any problem.

×
×
  • Create New...