image in the header

Discussion in 'Integration' started by lupino, Dec 6, 2012.

  1. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    how to insert a background image in the header of a form? Forgive the English is not perfect but I used an automatic translator.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    What form do you mean? Where background should be applied? To the whole page or just to form or row?
  3. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    I would like the header, it is a jpg image 693 x 134 px, and I would put it in the signup form and profile.
    The instructions I found, I find incomprehensible. I do not know if they are the right ones.
  4. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    Edit file amember/application/default/views/signup/signup.phtml
    after line
    PHP:
    <?php echo $this->blocks('signup/form/before'?>
    insert your html, for example
    PHP:
    <img src="/my-image.jpg" width=693 height=134 />
  5. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
  6. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    I tried but does not work
  7. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
  8. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    This is the file in which I put signup.phtml education html:
    <? php
    if (empty ($ title)) $ title = ___ ('Sign-up');
    else $ title = ___ ($ title);
    $ this-> setLayout ('layout.phtml');
    include $ this-> _script ('_error.phtml');

    $ this-> headScript ()
    -> appendFile (REL_ROOT_URL '. / application / default / views / public / js / jquery / jquery.validate.js');
    ?>
    <div class="am-signup">
    <? php echo $ this-> blocks ('signup / login / before')?>
    <? php include $ this-> _script ('signup / _login-offer.phtml');?>
    <? php echo $ this-> blocks ('signup / login / after')?>
    <? php echo $ this-> blocks ('signup / form / before')?>
    <img src="http://www.homomentis.it/immaginipersitoelibri/headeraddiotimidezzaarcob.jpg" width=693 height=134 />
    <? php include $ this-> _script ('_form.phtml');?>
    <? php echo $ this-> blocks ('signup / form / after')?>

    </ div>
    <? php include $ this-> _script ('js.country_state.js');?>

    :(
  9. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Code was inserted I can see it in signup page source, however the problem is in closing double quote sign.
    http://en.wikipedia.org/wiki/Quotation_mark_glyphs
    You have:
    Code:
    <img src="http://www.homomentis.it/immaginipersitoelibri/headeraddiotimidezzaarcob.jpg” width=693 height=134 />  
    
    but it should be
    Code:
    <img src="http://www.homomentis.it/immaginipersitoelibri/headeraddiotimidezzaarcob.jpg" width=693 height=134 />  
    
    Jsut copy exact code from last block.
  10. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    Thanks for the information, I was going crazy, this time I used the ASCII characters and I inserted in my head. I just have to center the image and then you also add this instruction.

    Now if I want to delete the title (signup) which in my case is ADDIO TIMIDEZZA, as in the image
    https://sites.google.com/site/tuttifeed/_/rsrc/1355417937102/prova-form/Immagine%201.jpg
    I have to cancel the instructions I have marked in red?
    <img src="http://www.homomentis.it/immaginipersitoelibri/headeraddiotimidezzaarcob.jpg" width=693 height=134 />
    <?php
    if (empty($title)) $title=___('Sign-up');
    else $title=___($title);
    $this->setLayout('layout.phtml');
    include $this->_script('_error.phtml');

    $this->headScript()
    ->appendFile(REL_ROOT_URL . '/application/default/views/public/js/jquery/jquery.validate.js');
    ?>
    <div class="am-signup">
    <?php echo $this->blocks('signup/login/before') ?>
    <?php include $this->_script('signup/_login-offer.phtml'); ?>
    <?php echo $this->blocks('signup/login/after') ?>
    <?php echo $this->blocks('signup/form/before') ?>
    <?php include $this->_script('_form.phtml'); ?>
    <?php echo $this->blocks('signup/form/after') ?>

    </div>
    <?php include $this->_script('js.country_state.js'); ?>
    ciao
  11. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    No.
    If you want to remove title from all pages edit layout.phtml template and remove this line:
    layout.phtml: <h1><?php echo $title ?></h1>
  12. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    In fact, everything ok.
    Only that I can not center the image

    I used the command align = "center" or align = "middle". Maybe I'm wrong position or grammar, Bo!

    :oops:
  13. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Place your img tag inside a div:
    Code:
    <div align="center"><img src="..."></div>
    
  14. lupino

    lupino aMember Pro Customer

    Joined:
    Sep 17, 2012
    Messages:
    33
    grazie, I've been valuable

    :)

Share This Page