Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Descriptions for ...? If you mean your cateogires descriptions, then they should be Capitalized. That is proper synax and is not penailzed by the SE's.

 

Jack

 

Hi Jack,

 

Yes the category description that shows up on the index page.

 

Like so:

 

Anything And Everything PC Hardware, This Is Where It Is. BCT Is Constantly Adding To Their List Of Inventory So If There Is Something You Need For Your Computer And You Dont See It Here - Just Drop Us A Line!

 

As an example. Is that correct & OK? If so im happy to leave it i just thought it looked a bit odd thats all.

 

Cheers.

And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit:

"The administrator has enabled flood control - please try again in 30 seconds."

 

Never fails.

 

Every time.

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Oh, I see what you mean. I wouldn't lioke that either. However, I just checked my test site and it doesn't capitalize the text like that so I can't offer any reason why yours is. You ,ay want to doublecheck the acutal text in admin->catalog (although I imagine you've done that).

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Try signing into admin. Then go to the url string and clear everythihng after admin/. Then add the following to it: header_tags_controller.php and press enter. Does the page display properly then?

 

Jack

 

 

This is the error:

 

Warning: main(includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

 

Fatal error: main(): Failed opening required 'includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER' (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

Link to comment
Share on other sites

Greets again Jack,

 

Ok i think this is about the last time i should need to bug you. More a functionality question than a problem. (I hope!)

 

Header tags has gone in, barring my own stupid mistakes it works a treat and greatly simplifies the task.

 

Q. I am assuming that this contrib does not at this stage do Manufacturers - as when i do a search by manufacturer the title is missing, and i dont recall plugging in any code to reflect a manufacturers title.

 

Is this correct?

 

Cheers. :D

And with a 9 in 10 search rate success the no.1 returned Oscommerce forum hit:

"The administrator has enabled flood control - please try again in 30 seconds."

 

Never fails.

 

Every time.

Link to comment
Share on other sites

There shouldn't be any errors like that. It means that that part of admin will not function correctly for Header Tags. If ou don't need that section, I suppose you could ignore it.

 

Jack

 

I have been looking at this more and I maybe some extra info might help for someone to help with this problem. I have checked the installation again and cant see any missed files or missed code.

 

When I go in to the admin--> header Tags it seems to load fine but with this message at the top

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /mnt/web_i/d14/s42/b0244bb2/www/nfoscomm/catalog/admin/header_tags_controller.php on line 233

 

Then if I choose Admin--> Header Tags-->Text control the page again seems to all load but with this message at the top

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /mnt/web_i/d14/s42/b0244bb2/www/nfoscomm/catalog/admin/header_tags_english.php on line 58

 

They both give differnent Lines in different files but the lines they point to both have the same thing there which is

 

$fp = file($filename);

 

This is from the from the header_tags_english.php

 

 

/***************** READ IN DISK FILE ******************/

$main_title = '';

$main_desc = '';

$main_key = '';

$sections = array(); //used for unknown titles

$args = array(); //used for unknown titles

$ctr = 0; //used for unknown titles

$findTitles = false; //used for unknown titles

$fp = file($filename);

 

for ($idx = 0; $idx < count($fp); ++$idx)

{

if (strpos($fp[$idx], "define('HEAD_TITLE_TAG_ALL','") !== FALSE)

{

$main_title = GetMainArgument($fp[$idx], $main_title, $main['title'], $formActive);

}

else if (strpos($fp[$idx], "define('HEAD_DESC_TAG_ALL") !== FALSE)

{

$main_desc = GetMainArgument($fp[$idx], $main_desc, $main['desc'], $formActive);

 

And this is from the header_tags_controller.php

 

/******************** Update the Delete drop down *******************/

$deleteArray = array();

$fp = file($filenameEng);

$checkOnce = true;

for ($idx = 0; $idx < count($fp); ++$idx)

{

if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE)

continue;

$checkOnce = false;

$l = GetSectionName($fp[$idx]);

if (tep_not_null($l))

$deleteArray[] = array('id' => $l, 'text' => $l);

}

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

Hope this helps someone to see what is wrong.

Link to comment
Share on other sites

This is the error:

 

Warning: main(includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

 

Fatal error: main(): Failed opening required 'includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER' (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

No, you misunderstood. Try typing the following into the url string:

http:www/yoursite.com/admin/header_tags_controller.php, where yoursite.com is your domain name. What happens then? The error you showed above has FILENAME_HEADER_TAGS_CONTROLLER in it. That can be correct since what I asked you to do doesn't use that.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Greets again Jack,

 

Ok i think this is about the last time i should need to bug you. More a functionality question than a problem. (I hope!)

 

Header tags has gone in, barring my own stupid mistakes it works a treat and greatly simplifies the task.

 

Q. I am assuming that this contrib does not at this stage do Manufacturers - as when i do a search by manufacturer the title is missing, and i dont recall plugging in any code to reflect a manufacturers title.

 

Is this correct?

 

Cheers.  :D

First, it's not a bother. It handles manufacturers for the title but does not display infomation on the page.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have been looking at this more and I maybe some extra info might help for someone to help with this problem. I have checked the installation again and cant see any missed files or missed code.

 

When I go in to the admin--> header Tags it seems to load fine but with this message at the top

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /mnt/web_i/d14/s42/b0244bb2/www/nfoscomm/catalog/admin/header_tags_controller.php on line 233

 

Then if I choose Admin--> Header Tags-->Text control the page again seems to all load but with this message at the top

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /mnt/web_i/d14/s42/b0244bb2/www/nfoscomm/catalog/admin/header_tags_english.php on line 58

 

They both give differnent Lines in different files but the lines they point to both have the same thing there which is

 

  $fp = file($filename); 

 

This is from the from the header_tags_english.php

 

 

/***************** READ IN DISK FILE ******************/

  $main_title = '';

  $main_desc = '';

  $main_key = '';

  $sections = array();      //used for unknown titles

  $args = array();          //used for unknown titles

  $ctr = 0;                //used for unknown titles

  $findTitles = false;      //used for unknown titles

  $fp = file($filename); 

 

  for ($idx = 0; $idx < count($fp); ++$idx)

  {

      if (strpos($fp[$idx], "define('HEAD_TITLE_TAG_ALL','") !== FALSE)

      {

          $main_title = GetMainArgument($fp[$idx], $main_title, $main['title'], $formActive);

      }

      else if (strpos($fp[$idx], "define('HEAD_DESC_TAG_ALL") !== FALSE)

      {

          $main_desc = GetMainArgument($fp[$idx], $main_desc, $main['desc'], $formActive);

 

And this is from the header_tags_controller.php

 

  /******************** Update the Delete drop down *******************/

  $deleteArray = array();

  $fp = file($filenameEng);

  $checkOnce = true;

  for ($idx = 0; $idx < count($fp); ++$idx)

  {

    if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE)

        continue;

    $checkOnce = false;

    $l = GetSectionName($fp[$idx]);

    if (tep_not_null($l))

      $deleteArray[] = array('id' => $l, 'text' => $l);

  }

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

Hope this helps someone to see what is wrong.

Near the top of the code for header_tags_english.php is this line:
 $filename = '../' . DIR_WS_LANGUAGES . $language . '/header_tags.php';

 

It is pointing to the file in includes/languages/english/header_tags.php (or whatever language you are using). This assumes those files is in the root directory. If your shop is in a catalog directory, for example, you need to change the above to

$filename = '../catalog/' . DIR_WS_LANGUAGES . $language . '/header_tags.php';

If you have some other setup, then you would need to adjust accoringly.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, you misunderstood. Try typing the following into the url string:

http:www/yoursite.com/admin/header_tags_controller.php, where yoursite.com is your domain name. What happens then? The error you showed above has FILENAME_HEADER_TAGS_CONTROLLER in it. That can be correct since what I asked you to do doesn't use that.

 

Jack

 

 

I have written I tighten it http:www/yoursite.com/admin/header_tags_controller.php, where yoursite.com is your domain name in the URL and the error is this:

 

Warning: main(includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

 

Fatal error: main(): Failed opening required 'includes/languages/italian/FILENAME_HEADER_TAGS_CONTROLLER' (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/pollicino-va.it/httpdocs/admin/header_tags_controller.php on line 15

 

 

 

I repeat to you that if I enter in admin and click on the link Header Tags this error appears me:

 

Not Found

The requested URL was not found on this server.

 

 

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

 

Apache Server at mysite.com

 

 

and the link in the URL it is:

 

http://www/mysite/com/admin/FILENAME_HEADE...x=header%20tags

 

and not as it would have to be:

http://www/mysite/com/admin/header_tags_co...x=header%20tags

 

how never?

Link to comment
Share on other sites

I see you are using Italian as your language. Header Tags doesn't come with those languages files. You have to copy the ones from the english directory into the italian directory and change the wording. Did you do that?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Header Tags only comes with the English files. If you want to use it with a different language, you need to create the files. So comparet the files in admin/includes/languages/english with those in admin/includes/languages/italian and copy any ones for Header Tags that don't exist. Do the same for includes/languages/english (the shop side).

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Header Tags only comes with the English files. If you want to use it with a different language, you need to create the files. So comparet the files in admin/includes/languages/english with those in admin/includes/languages/italian and copy any ones for Header Tags that don't exist. Do the same for includes/languages/english (the shop side).

 

Jack

 

 

you correct to me if I have understood badly: I must copy all the rows of contrib the Heather Tag in the cartelle italian instead English?

Link to comment
Share on other sites

I don't understand the question. But, to restate, you any header tags files in the english directory should be in the italian directory.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello

 

I keep getting the following error message when I am trying to update the Tags English section in the Admin section.

 

Warning: chmod(): Operation not permitted in /home/lynd0002/public_html/store/admin/includes/functions/header_tags.php on line 194

Cannot change the mode of file (../includes/languages/english/header_tags.php)

 

Does anyone know how to get this little problem sorted.

Link to comment
Share on other sites

Everything works great! But when I am in admin/header_tags_english.php...

 

I cant change Default Description and Default Keywords.

Only Default Title can be changed.

 

Anyone got the same Problem and any solution?

Link to comment
Share on other sites

I installed this addon to my OSC site. I ran the fill_tags.php so each product would have a title that matched its product name. The only problem is that when browsing by category, none of the categories have a title. It just says Mozilla Firefox (my browser default title page when no title is given from the website.)

 

I went in to the admin portion of this mod and I see no way to add titles for categories.

 

Any idea how to fix this or is there something I'm doing wrong?

Link to comment
Share on other sites

Everything works great! But when I am in admin/header_tags_english.php...

 

I cant change Default Description and Default Keywords.

Only Default Title can be changed.

 

Anyone got the same Problem and any solution?

 

I have the same problem, so happy I am not the only one :)

So I stay with an old manual version until this and languages problems are solved.

 

Hi Jack

 

Solved my problem to get rid of the empty lines in the description with fill_tags, this took me over a hole week of work since I am not a programmer.

 

The fill_tags only uses strip_tags commands but leaves blank lines all over the place instead of the tags.

Not very Search Engine Friendly.

I also modified the DB to 160 characters for the description since that's about the limit for main S.E.

Do you think we should add it to the contribution ???

 

Check my web site here and see.

 

Let me know.

Link to comment
Share on other sites

Everything works great! But when I am in admin/header_tags_english.php...

 

I cant change Default Description and Default Keywords.

Only Default Title can be changed.

 

Anyone got the same Problem and any solution?

 

Wow I cannot even modify my post after ten mn, can the webmaster leave the edit button a little longer, I only type with 2 fingers.

 

Sorry here is what you can do

 

 

You can do it manually by changing header_tags.php in every language(if any):

/includes/languages/english/header_tags.php.

define('HEAD_DESC_TAG_ALL','bla-bla-bla');

define('HEAD_KEY_TAG_ALL','bla-bla-bla');

Hope this help !!!!!

Edited by invitro59
Link to comment
Share on other sites

Everything works great! But when I am in admin/header_tags_english.php...

 

I cant change Default Description and Default Keywords.

Only Default Title can be changed.

 

Anyone got the same Problem and any solution?

My test setup works fine. Are you sure the file is not being changed? The default title, when used, displays at the end of the title so you may not see it in your browser. After trying to make a change, open the english/header_tags.php file in an editor and see it if it were changed or not.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I installed this addon to my OSC site.  I ran the fill_tags.php so each product would have a title that matched its product name.  The only problem is that when browsing by category, none of the categories have a title.  It just says Mozilla Firefox (my browser default title page when no title is given from the website.)

 

I went in to the admin portion of this mod and I see no way to add titles for categories.

 

Any idea how to fix this or is there something I'm doing wrong?

If you select a category in admin and then click on edit, you should see a title field. If you do not, then you have made a mistake in the installation or you have an old version.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have the same problem, so happy I am not the only one :)

So I stay with an old manual version until this and languages problems are solved.

 

Hi Jack

 

Solved my problem to get rid of the empty lines in the description with fill_tags, this took me over a hole week of work since I am not a programmer.

 

The fill_tags only uses strip_tags commands but leaves blank lines all over the place instead of the tags.

Not very Search Engine Friendly.

I also modified the DB to 160 characters for the description since that's about the limit for main S.E.

Do you think we should add it to the contribution ???

 

Check my web site here and see.

 

Let me know.

I don't understand what problem you are having with fill_tags. No one has mentioned any problem before that I recall. I'm not sure it's a good idea to limit the length of the description (I assume you mean the meta description and not the category description). Google doesn't use the meta description tag as it was designed. However, they do occasionally use it. By shortening the length, that may prevent some text from being displayed. It's one of those gray areas. Technically, you are correct but changing it "may" not help. So I don't think there is a clear answer on that one.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...