Status
Not open for further replies.

jesslynalvin

Registered
Mar 7, 2010
3
0
51
hi, I'm really confused how to insert meta tag in this cpanel. Actually I use a web builder service to make my website so I don't know exactly how to insert the meta tag. He(my web builder) said that I have to log in to my cpanel then click file manager and edit the file with the php extension.
I find so many file with the php extension and I don't have any idea which file do I have to insert the meta tag. Unlucky me, I've tried to call my web builder several times but still can't find him.
Can everyone please help me?? Which file with php extension that I can insert this :
<title> </title>
<meta name=”description” content=”
<meta name=”keywords” content=”

Is it the index.php??

I found this description in the index.php ;

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<script type="text/javascript" src="iepngfix_tilebg.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
.ie6_png {behavior: url("iepngfix.htc") }
.ie6_png img {behavior: url("iepngfix.htc") }
.ie6_png input {behavior: url("iepngfix.htc") }
</style>
<!--[if IE]>
<script type="text/javascript" src="ie_png.js"></script>
<script type="text/javascript">
ie_png.fix('.png');
</script>
<![endif]-->
</head>

may I change the <title><?php echo TITLE; ?></title> with my own title ??
and insert the <meta name=”description” content=”
<meta name=”keywords” content=”
<meta name="verify" (for google verification)
between this <head> </head> ??

Please your advice... As I'm really frustrated with this html code. thank you very much.

best regards,
jesslynalvin
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
hi, I'm really confused how to insert meta tag in this cpanel. Actually I use a web builder service to make my website so I don't know exactly how to insert the meta tag. He(my web builder) said that I have to log in to my cpanel then click file manager and edit the file with the php extension.
...
You might want to check with him again, or check his notes to you on exactly which file to edit. Reason is this:

may I change the <title><?php echo TITLE; ?></title> with my own title ??
You can easily remove that part in bold and change it to anything you like. But, that part in bold is calling data from another file and is probably being displayed across all your pages for titles. If you change it on one page, you're only changing it on one page. If you change it in the file he's created for this, you'll change it across all pages.

I'm just guessing though, trying to help. ;)
 

jesslynalvin

Registered
Mar 7, 2010
3
0
51
thank you for your reply. I opened the url link that you've given for me. I found that somekind of this php variable has to be added.

<?php

$tpTitle="Helping you to improve your web site";

$pgHeading="Site-Report.com - Helping you to improve your web site";

$pgDesc="Helping you to improve your web site";

$pgKeywords="site-report";

?>

and

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>

<title><?php echo $tpTitle ?></title>

<meta name="description" content="<?php echo $pgDesc ?>"></meta>

<meta name="keywords" content="<?php echo $pgKeywords ?>"></meta>

</head>


while I found that on my index.php file :
PHP:
<?php
/*
  $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
require('includes/functions/dle_function.php');

require('includes/application_top.php');

// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
        $category_depth = 'products'; // display products
    } else {
        $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
        $category_parent = tep_db_fetch_array($category_parent_query);
        if ($category_parent['total'] > 0) {
            $category_depth = 'nested'; // navigate through the categories
        } else {
            $category_depth = 'products'; // category has no products, but display the 'no products' message
        }
    }
}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
        <title><?php echo TITLE; ?></title>
        <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
        <script type="text/javascript" src="iepngfix_tilebg.js"></script>
        <link rel="stylesheet" type="text/css" href="stylesheet.css">
        <style type="text/css">
            .ie6_png 			{behavior: url("iepngfix.htc") }
            .ie6_png img		{behavior: url("iepngfix.htc") }
            .ie6_png input		{behavior: url("iepngfix.htc") }
        </style>
        <!--[if IE]>
           <script type="text/javascript" src="ie_png.js"></script>
           <script type="text/javascript">
               ie_png.fix('.png');
           </script>
        <![endif]-->
    </head>

Please help me what should I do with my php web code as I'm really afraid of making mistakes ??
thank you once again

jesslynalvin
 

jesslynalvin

Registered
Mar 7, 2010
3
0
51
Hi, thank you for your advice. Actually I've tried to follow the instruction from this link:

Adding meta tags using Php - Cre8asite Forums

he said that this php variable has to be inserted.

<?php

$tpTitle="Helping you to improve your web site";

$pgHeading="Site-Report.com - Helping you to improve your web site";

$pgDesc="Helping you to improve your web site";

$pgKeywords="site-report";

?>

and also the meta html for the head section.

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>

<title><?php echo $tpTitle ?></title>

<meta name="description" content="<?php echo $pgDesc ?>"></meta>

<meta name="keywords" content="<?php echo $pgKeywords ?>"></meta>

</head>


I'm really afraid of making mistakes by changing the html on my php file. As I found this code at my index.php

HTML:
<?php
/*
  $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/
require('includes/functions/dle_function.php');

require('includes/application_top.php');

// the following cPath references come from application_top.php
$category_depth = 'top';
if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
        $category_depth = 'products'; // display products
    } else {
        $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
        $category_parent = tep_db_fetch_array($category_parent_query);
        if ($category_parent['total'] > 0) {
            $category_depth = 'nested'; // navigate through the categories
        } else {
            $category_depth = 'products'; // category has no products, but display the 'no products' message
        }
    }
}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
        <title><?php echo TITLE; ?></title>
        <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
        <script type="text/javascript" src="iepngfix_tilebg.js"></script>
        <link rel="stylesheet" type="text/css" href="stylesheet.css">
        <style type="text/css">
            .ie6_png 			{behavior: url("iepngfix.htc") }
            .ie6_png img		{behavior: url("iepngfix.htc") }
            .ie6_png input		{behavior: url("iepngfix.htc") }
        </style>
        <!--[if IE]>
           <script type="text/javascript" src="ie_png.js"></script>
           <script type="text/javascript">
               ie_png.fix('.png');
           </script>
        <![endif]-->
    </head>
Does everyone can help me how should I change it?
thank you.
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
See this part?
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
That line is calling a language file. Look for a language file or directory as this is where the variables will be found I suspect.

This is an osCommerce website issue, not a cPanel problem though. You really should be contacting your host, the person who assisted you with setting it up, or the docs for osCommerce if needed.
osCommerce Knowledge Base: My Store

Most everything you need to edit or change is done via the osCommerce admin panel, not via the files as you're suggesting you want to do.

This thread made be helpful:
Header Tags SEO - osCommerce Community Support Forums
 
Status
Not open for further replies.