can anyone post a guide for the site.php

Discussion in 'Customization & add-ons' started by ccwjames, Oct 31, 2014.

  1. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    i have been trying for a week to make 2 small html blocks ops the Active Resources to put in 2 small banners from google.
    each time i make the site.php my site will just go all white?
    can anyone post a step by step please,
    we could then pin this for other users
  2. thehpmc

    thehpmc Member

    Joined:
    Aug 24, 2006
    Messages:
    901
    What you put in this file is dependant on what you are trying to achieve. The chances are no two site.php files are the same so step by step instructions not really viable.

    Post up what you are trying to achieve and the actual code you are using then maybe someone can come up with suggestions on how to achieve what you are trying to do.
  3. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    thanks

    basically as per wiki

    <?php
    //add new block at position member/main/left
    Am_Di::getInstance()->blocks->add(new Am_Block('member/main/left', 'google advert', 'my-block-id', null, 'renderMyBlock'));

    function renderMyBlock() {
    $html = <<<CUT
    <p>in here i added google advert</p>
    CUT;
    return $html;
    }

    //remove block with id member-main-unsubscribe
    Am_Di::getInstance()->blocks->remove('member-main-unsubscribe');

    when i save and go to site, its all white
  4. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    werid, weeks of working and worked :)

    had to remove the

    <?php

    if (!defined('INCLUDED_AMEMBER_CONFIG'))
    die("Direct access to this location is not allowed");

    how dumb am i :)
  5. frenchwealthdiva

    frenchwealthdiva New Member

    Joined:
    Jan 20, 2014
    Messages:
    10
    How can I center a block
  6. ccwjames

    ccwjames Member

    Joined:
    Sep 11, 2014
    Messages:
    430
    this is basic knowledge

    you use <center> tags

Share This Page