Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Hi Thanks for the great contrib

 

i have just installed page cache 1.5 and it is seams to have a few probs with this contrib i.e Once Enabled i get

 

Warning: main(includes/languages//header_tags.php): failed to open stream: No such file or directory in /home/sites/aromacraft.co.uk/public_html/includes/header_tags.php on line 15

Warning: main(includes/languages//header_tags.php): failed to open stream: No such file or directory in /home/sites/aromacraft.co.uk/public_html/includes/header_tags.php on line 15

Fatal error: main(): Failed opening required 'includes/languages//header_tags.php' (include_path='.:/usr/share/pear') in /home/sites/aromacraft.co.uk/public_html/includes/header_tags.php on line 15

 

i have edited the includes/header_tags.php on line 15 with no luck and was wonering if any of you had any suggestions

 

 

Any help would be greatly appreciated

 

 

 

Thanks

 

 

Marc

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

ok, so this contribution is completely wrecking my site. The first step went in no problem. The second step was a little weird, because the code wasn't exactly like I'd expected it to be, but I worked around it. The third is nonsense. The code in the examples is nothing like what it is in my install, and if I'd known ahead of time the just pages of changes I'd have to make, I never would have bothered with the contrib in the first place. But now I don't know how to finish the install, and my Admin tool won't load anymore. I'm getting

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/*REMOVED*/public_html/admin/includes/application_top.php on line 130

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /home/*REMOVED*/public_html/admin/includes/application_top.php on line 130

 

Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/*REMOVED*/public_html/admin/includes/application_top.php on line 130

 

I removed the login name from the errors.

 

I'd like to get the contribution working, but I'd like more to get my admin tool back. I still have FTP access to the site, I just don't even know where to begin on fixing this.

 

-Xq

Link to comment
Share on other sites

Why not just restore the files from your backup?  :)

 

Susan

 

Don't I need to get into my Admin tool to do that?

 

I've started getting the "already installed" files from the website mentioned earlier, and just overwriting mine with those, since I figure, how much worse can it get. It seems it's helping, as I can get back into my Admin now.

 

I'll have to see what damage I may have done with this method, though.

 

While I'm here, the smaller problem I'm having is I've got 11 "n" characters going down my main page now. I had modded the main page to have the categories show up on it, so I think that may be part of it...

 

-Xq

Link to comment
Share on other sites

Scott - I don't know if this is your problem or not but the error message you are getting is pointing to line 130 of the includes/application_top.php file. A common problem is that some people insert the code into this file closer to the top instead of the bottom as the instructions mention. This will cause this kind of problem. So take a look at that file and see where you added the code (there is only one change). The code should be near, or at, the bottom (before the ?> though).

 

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

Hmmm, I can't seem to get this contribution to work. All my titles/descriptions are the 'default' set up in header_tags.php

 

define('HEAD_TITLE_TAG_ALL','osCommerce : ');

define('HEAD_DESC_TAG_ALL','osCommerce : What\'s New Here? - Hardware Software DVD Movies');

define('HEAD_KEY_TAG_ALL','Hardware Software DVD Movies What\'s New Here?');

 

Any help would be appreciated.

Link to comment
Share on other sites

Hmmm, I can't seem to get this contribution to work. All my titles/descriptions are the 'default' set up in header_tags.php

 

define('HEAD_TITLE_TAG_ALL','osCommerce : ');

define('HEAD_DESC_TAG_ALL','osCommerce : What\'s New Here? - Hardware Software DVD Movies');

define('HEAD_KEY_TAG_ALL','Hardware Software DVD Movies What\'s New Here?');

 

Any help would be appreciated.

 

Any help?

 

Are there any known incompatibilities with other contributions?

Link to comment
Share on other sites

There are not any incompatibilities that I know of other than Categories Meta Tags, but that is only because they both do the same thing for categories.

 

The code you posted is the default settings for all pages. You need to go below that and setup the pages to display something different. Try posting the file here along with a link to the site.

 

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

Hmm... just noticed this..

 

I added an about us page (about_us.php)...

 

In catalog/includes/header_tags.php it already had (provided by Jack):

   // about_us.PHP - was default.php
  case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US) ):
  $tags_array = tep_header_tag_page(HTTA_ABOUTUS_ON, HEAD_TITLE_TAG_ABOUTUS,
                                    HTDA_ABOUTUS_ON, HEAD_DESC_TAG_ABOUTUS,
                                    HTKA_ABOUTUS_ON, HEAD_KEY_TAG_ABOUTUS );
  break;

 

In catalog/includes/languages/english/header_tags.php I added:

// about_us.php
define('HTTA_ABOUTUS_ON','1');
define('HTKA_ABOUTUS_ON','1');
define('HTDA_ABOUTUS_ON','1');
define('HEAD_TITLE_TAG_ABOUTUS','');
define('HEAD_DESC_TAG_ABOUTUS','');
define('HEAD_KEY_TAG_ABOUTUS','');

 

...NOW .. here is what I missed before.. when viewing the source code I see this:

  <META NAME="Keywords" CONTENT=" HEAD_KEY_TAG_SEO">

 

...everything else seems fine...but how do I correct the 'Keywords'?

Link to comment
Share on other sites

Hmmm, I can't seem to get this contribution to work. All my titles/descriptions are the 'default' set up in header_tags.php

 

define('HEAD_TITLE_TAG_ALL','osCommerce : ');

define('HEAD_DESC_TAG_ALL','osCommerce : What\'s New Here? - Hardware Software DVD Movies');

define('HEAD_KEY_TAG_ALL','Hardware Software DVD Movies What\'s New Here?');

 

Any help would be appreciated.

 

Change the text within the ' ' according to your site...

 

example:

define('HEAD_TITLE_TAG_ALL','Jeff`s Site : ');

Link to comment
Share on other sites

Hmm... just noticed this..

 

I added an about us page (about_us.php)...

 

In catalog/includes/header_tags.php it already had (provided by Jack):

 ? // about_us.PHP - was default.php
? case (strstr($_SERVER['PHP_SELF'],FILENAME_ABOUT_US) or strstr($PHP_SELF, FILENAME_ABOUT_US) ):
? $tags_array = tep_header_tag_page(HTTA_ABOUTUS_ON, HEAD_TITLE_TAG_ABOUTUS,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? HTDA_ABOUTUS_ON, HEAD_DESC_TAG_ABOUTUS,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? HTKA_ABOUTUS_ON, HEAD_KEY_TAG_ABOUTUS );
? break;

 

In catalog/includes/languages/english/header_tags.php I added:

// about_us.php
define('HTTA_ABOUTUS_ON','1');
define('HTKA_ABOUTUS_ON','1');
define('HTDA_ABOUTUS_ON','1');
define('HEAD_TITLE_TAG_ABOUTUS','');
define('HEAD_DESC_TAG_ABOUTUS','');
define('HEAD_KEY_TAG_ABOUTUS','');

 

...NOW .. here is what I missed before.. when viewing the source code I see this:

...everything else seems fine...but how do I correct the 'Keywords'?

That define, HEAD_KEY_TAG_SEO, was added in the last release. The person who did it didn't bother to include instructions nor add the define so I won't be able to help you. You may try contacting him or looking at the version where that option was originally added. It is just a matter of adding a define statement for it so you could always just add it and make it whatever you want.

 

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

Thank you for responding Jack.

 

Well, is there a way I can modify how I 'defined' the about_us.php page. All of the other pages dont have this problem...I only noticed it when I added the new page...

 

Also, I am confident I have either 2.4.0 or 2.4.1 .... because I remember when you released 2.4.2 I kept meaning to set some time out to find the changes....

Link to comment
Share on other sites

Thank you for responding Jack.

 

Well, is there a way I can modify how I 'defined' the about_us.php page.  All of the other pages dont have this problem...I only noticed it when I added the new page...

 

Also, I am confident I have either 2.4.0 or 2.4.1 .... because I remember when you released 2.4.2 I kept meaning to set some time out to find the changes....

I took another look and did find it in includes/functions/header_tags.php. I don't know what I did wrong earlier to miss it in a search but in any event, it turns out to be a typo. It's strange that it is only showing up in the About Us page (it doesn't on mine) but
HEAD_KEY_TAG_SEO

should be

HEAD_KEY_TAG_ALL

 

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

Thanks Jack! That did it. ???That is strange how it doesnt effect any of the other pages???

 

My keywords were 'doubled' in my index.php page and I figured out I could control that in english/header_tags.php I was having the default and index keywords enabled...

 

But how can I control the Category Titles from showing up in the ' center ' section. I want the category Title to still show up in the Browser Title ... ?

 

And if it is possible to modify... is it possible to do it as a 'per' category method..the same way each page is defined in english/header_tags.php

 

Here is a screenshot:

delete1.gif

Link to comment
Share on other sites

Do you mean the page header when you say center section - the title of the page that comes before the other text? If so, this is added in your categories section in admin. You can leave it blank and nothing will display. Or you can remove the code from the index page that displays it. If that is not what you mean, please give me another example. It takes me a few tries sometimes to understand.

 

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

Specifically I was reffering to :

 

Header Tags Category Title

( Administration>>Catalog>>Categories / Products )

 

If I leave it blank, then it the Browser Title just shows the default Title from english/header_tags.php

 

..

Or you can remove the code from the index page that displays it.

 

I think this might be the best option, although I was hoping to leave this behavior alone for certain categories and take it off for others... I ask only because I had previously created images for categories which just consited of Text matching the Sites Banner's Font ... which now looks like this:

 

delete2.gif

 

 

Now I did those 'text images' before this contribution. If I had to do it over again, I would just have to be more creative :lol: .

Link to comment
Share on other sites

Hi there; I've installed the Header Tags controller before and it worked.

 

I opened a new store and tried installing it again on the new site.

 

Seems to work when i got to catalog/index.php - the page title updates as a flick through the store pages.

 

When i try to go to the Admin however, I don't even get the front page. Instead I get:

 

Warning: main(includes/functions/header_tags.php): failed to open stream: No such file or directory in /home/.hacker/sep/exoticplants.com.au/NewOS/catalog/admin/includes/application_top.php on line 210

 

Fatal error: main(): Failed opening required 'includes/functions/header_tags.php' (include_path='.:/usr/local/lib/php') in /home/.hacker/sep/exoticplants.com.au/NewOS/catalog/admin/includes/application_top.php on line 210

 

There are no mods to admin/includes/application.php as far as i can tell. What should I be looking for? I usually can get a hint from these error messages even tho i don't know php. But in this case I just don't know where to start! It's quite a messy contrib, no ffence to anyone ;) Just a big ol' load of work to do, and if you make a mistake it's hard to work out where to start debugging. GREAT contrib tho - maybe the most useful i have downloaded! Just a bugger to install.

 

Thanks for any help.

Link to comment
Share on other sites

Specifically I was reffering to :

 

Header Tags Category Title

( Administration>>Catalog>>Categories / Products )

 

If I leave it blank, then it the Browser Title just shows the default Title from english/header_tags.php

 

..

I think this might be the best option, although I was hoping to leave this behavior alone for certain categories and take it off for others... I ask only because I had previously created images for categories which just consited of Text matching the Sites Banner's Font ... which now looks like this:

 

delete2.gif

Now I did those 'text images' before this contribution.  If I had to do it over again, I would just have to be more creative :lol:  .

As it is now, it always displays whatever is there. You could add code in idex.php to check if the title is empty and display the normal header if it is.

 

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

Hi there; I've installed the Header Tags controller before and it worked.

 

I opened a new store and tried installing it again on the new site.

 

Seems to work when i got to catalog/index.php - the page title updates as a flick through the store pages.

 

When i try to go to the Admin however, I don't even get the front page. Instead I get:

 

Warning: main(includes/functions/header_tags.php): failed to open stream: No such file or directory in /home/.hacker/sep/exoticplants.com.au/NewOS/catalog/admin/includes/application_top.php on line 210

 

Fatal error: main(): Failed opening required 'includes/functions/header_tags.php' (include_path='.:/usr/local/lib/php') in /home/.hacker/sep/exoticplants.com.au/NewOS/catalog/admin/includes/application_top.php on line 210

 

There are no mods to admin/includes/application.php as far as i can tell. What should I be looking for? I usually can get a hint from these error messages even tho i don't know php. But in this case I just don't know where to start! It's quite a messy contrib, no ffence to anyone  ;) Just a big ol' load of work to do, and if you make a mistake it's hard to work out where to start debugging. GREAT contrib tho - maybe the most useful i have downloaded! Just a bugger to install.

 

Thanks for any help.

It looks like you are missing the includes/functions/header_tags.php. If youread the How to Install file, it takes you through installing the contribution step-by-step. If you followed those dierections, the catalog side of your shop should be working. Although I'm not sure how that can be if you are missing the above file.

 

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

It looks like you are missing the includes/functions/header_tags.php.  If youread the How to Install file, it takes you through installing the contribution step-by-step.  If you followed those dierections, the catalog side of your shop should be working. Although I'm not sure how that can be if you are missing the above file.

 

Jack

 

ahhh.. i put it in the includes/functions under catalog, not under Admin ;) Woops. Thanks for thew pointer Jack! All solved now.

Link to comment
Share on other sites

ahhh.. i put it in the includes/functions under catalog, not under Admin ;)  Woops. Thanks for thew pointer Jack! All solved now.

 

i think this whole thing is an example of me not R'ing the F'kn Manual ;)

 

I also forgot to modify application_top, so it had no idea where to find clean_html_comments either.

 

Fixed now, sorry for the brain fart!

Link to comment
Share on other sites

Change the text within the ' ' according to your site...

 

example:

define('HEAD_TITLE_TAG_ALL','Jeff`s Site : ');

 

Ok, I got that part down, but I can't get my title to change according to the product name.

 

see here

 

The only thing that shows up are "if left blank" test.

Edited by dinh
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...