1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

insert code adsense on PHP homepage

Discussion in 'Placement / Reviews / Examples' started by tonyhoang, Sep 1, 2009.

  1. #1
    with FTP program what open folder to open file (using notepad) to edit and insert code Adsense?
    thanks all!
     
    tonyhoang, Sep 1, 2009 IP
  2. fluor

    fluor Active Member

    Messages:
    571
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #2
    You can edit index.php and put the javascript adsense code.
     
    fluor, Sep 1, 2009 IP
  3. aninfo

    aninfo Well-Known Member

    Messages:
    552
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    120
    #3
    That simply depends on your site not on the FTP program which you are using. If your site is a static site then you need to put code in all the pages in which you want to display ad, if it is a worpress site then you need to insert the code in a few files like single.php or sidebar.php or header.php or in all of them, but you need to chose the proper file from the theme folder, which will be there in wp-content folder. For other sites too you need to chose the proper files, there might be some templates too, in which you need to modify the templates files.
     
    aninfo, Sep 1, 2009 IP
  4. tonyhoang

    tonyhoang Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    my index.php is
    <?php
    /**
    * @version		$Id: index.php 11407 2009-01-09 17:23:42Z willebil $
    * @package		Joomla
    * @copyright	Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
    * @license		GNU/GPL, see LICENSE.php
    * Joomla! is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * See COPYRIGHT.php for copyright notices and details.
    */
    
    // Set flag that this is a parent file
    define( '_JEXEC', 1 );
    
    define('JPATH_BASE', dirname(__FILE__) );
    
    define( 'DS', DIRECTORY_SEPARATOR );
    
    require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
    require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
    
    JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
    
    /**
     * CREATE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe =& JFactory::getApplication('site');
    
    /**
     * INITIALISE THE APPLICATION
     *
     * NOTE :
     */
    // set the language
    $mainframe->initialise();
    
    JPluginHelper::importPlugin('system');
    
    // trigger the onAfterInitialise events
    JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
    $mainframe->triggerEvent('onAfterInitialise');
    
    /**
     * ROUTE THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->route();
    
    // authorization
    $Itemid = JRequest::getInt( 'Itemid');
    $mainframe->authorize($Itemid);
    
    // trigger the onAfterRoute events
    JDEBUG ? $_PROFILER->mark('afterRoute') : null;
    $mainframe->triggerEvent('onAfterRoute');
    
    /**
     * DISPATCH THE APPLICATION
     *
     * NOTE :
     */
    $option = JRequest::getCmd('option');
    $mainframe->dispatch($option);
    
    // trigger the onAfterDispatch events
    JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
    $mainframe->triggerEvent('onAfterDispatch');
    
    /**
     * RENDER  THE APPLICATION
     *
     * NOTE :
     */
    $mainframe->render();
    
    // trigger the onAfterRender events
    JDEBUG ? $_PROFILER->mark('afterRender') : null;
    $mainframe->triggerEvent('onAfterRender');
    
    /**
     * RETURN THE RESPONSE
     */
    echo JResponse::toString($mainframe->getCfg('gzip'));
    
    Code (markup):
    insert where?:confused: which mod templates files?where in folder?(administrator,components,inclues,jscripts,langague,libraries,modules,plugins,sources,templates....)
    need creat adsense.php?
     
    tonyhoang, Sep 1, 2009 IP
  5. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #5
    abdussamad, Sep 1, 2009 IP
  6. tonyhoang

    tonyhoang Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    i dont remember pass to login admin, just can login by FTP program to edit file.
    please give me a guide!how to install and config to using it?thanks!
     
    tonyhoang, Sep 1, 2009 IP
  7. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #7
    CMS like joomla store website content in a database. There are no files you can edit. The files just contain the code that provides you with an interface to the database.

    What you should do is try to recover the admin password and then install the module I referred to before. See if their is a lost password link that you can use. If not you'll have to edit the database:

    http://forum.joomla.org/viewtopic.php?t=10985

    As for step by step instructions if you take the time to read the pages I linked to before you'll understand. If you can't understand I suggest you hire somebody to do it for you.
     
    abdussamad, Sep 1, 2009 IP
  8. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #8
    why? joomla doesn't have a "I've lost my password" option? Drupal has :)
     
    JamesColin, Sep 2, 2009 IP