Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

In my IE Explorer bar (the blue bar at the top) it says HEAD_TITLE_TAG_DEFAULT then next to it what I want...I just want to get rid of it saying HEAD_TITLE_TAG_DEFAULT and then it is fine.

 

How would I go about doing this?

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Jack, Thankyou for the advise. I just installed the contribution last night. I don't understand how I could have changed the php. It was and is a fresh install from the contribution. I looked at the line in an editor prior to posting my question. However, I didn't see the problem. The only thing I can imagine is in trying to edit header tags in my admin something went wrong there.

In my admin at the header tags text control I try to edit the default settings but they just revert right back. Why can't I edit these fields? Is there definitions posted somewhere to explain what pages should have the controller and which ones should not. Thanks again,

Moon

Check to make sure your includes/header_tags.php and includes/languages/english/header_tags.php have permissions set to write. The code should check this but I may have missed something.

 

I don't know what you mean as to which pages should have the controller. Do you mean which pages should have header tags entries? If so, then all of them at some point IMO. The SE's will eventually get around to looking at all of your pages. The more pages you can get listed, the better off you are. But it won't do you much good to have the title and meta tags setup and then ignore the rest of the page. So if you set up the title to highlight the word apple, that page should be about apples.

 

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

In my IE Explorer bar (the blue bar at the top) it says HEAD_TITLE_TAG_DEFAULT then next to it what I want...I just want to get rid of it saying  HEAD_TITLE_TAG_DEFAULT and then it is fine.

 

How would I go about doing this?

Usually when you get something like that, it means the item has not been defined or the file cannot be found. However, if your other pages are working correctly, then that wouldn't make sense. The only thing I can think of is that the includes/languages/english/header_tags.php file has been altered in some way that is causing the problem. Try replacing it with the original from the contribution and see if it works then.

 

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 all

I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2. Its a simple update

let me know if anyone finds any problems.

Get it here:

http://www.oscommerce.com/community/contributions,207

 

 

I just pointed to fill_tags.php and the message indicated that adding header tags was successful; however, when I clicked on header tags, the top of the page had the following error message:

 

Warning: file(../includes/languages/english/header_tags.php): failed to open stream: No such file or directory in /hsphere/local/home/name/mydomain/admin/header_tags_controller.php on line 228

 

Since I don't understand in which file to look for the problem, I looked in both, but was unable to determine what the issue is. Does anyone know what this means?

 

Thanks.

Link to comment
Share on other sites

When you say you looked in both, what files would that be? It can find the includes/languages/english/header_tags.php file so be sure that one is there.

 

The error is telling you it cannot find the includes/languages/english/header_tags.php. The code assumes the admin directory is in the same directory as the index.php file is. The ../ tells it to backup one directory (out of admin) and then go into the includes directory. So if your file structure is different, it will fail.

 

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

Ok I commented out

 

 // ? require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// ? require(DIR_WS_FUNCTIONS . 'header_tags.php')

 

In sts_display_output in includes...

 

Site works now, So is the header tag functional? any support on this issue would be great.. Also one more issue seems to be appearing..

 

When I do the fill_tags.php I get this error

 

 ? 
Fatal error: Call to undefined function: tep_db_query() in /home/aliandad/public_html/fill_tags/fill_tags.php on line 18

 

Ok I'm going to start searching around, but any info would be great

 

Thanks,

 

Robert P.

Edited by Panic36
Link to comment
Share on other sites

Gash, fixed the issues I think, I did however have to take the measures stated above by commenting them out, and I also got the fill_tags.php to work... The fill_tags was easy... During installation I simply just copied the dir and pasted it into where it was on the zip file... I didn't know the files had to be put in the admin dir... Well I do have one issue though probably a really simple one but I just haven't been able to put my finger on it...

 

If you look at

 

http://www.aliandadele.com/collectibles-c-21.html you will see

 

Collectibles - Ali & Adele :

 

It works for the categories correctly, but when you're on an item, the title is this

 

http://www.aliandadele.com/blue-glass-carv...hins-p-994.html

 

Blue Glass Carved DolphinsAli & Adele

 

I've mortified every thing I can find in the header_tags.php but some reason when I do change it my categories get double - -'s... Any way to fix this would be great.

 

Thanks,

 

Robert P.

Link to comment
Share on other sites

When you say you looked in both, what files would that be? It can find the includes/languages/english/header_tags.php file so be sure that one is there.

 

The error is telling you it cannot find the includes/languages/english/header_tags.php. The code assumes the admin directory is in the same directory as the index.php file is. The ../ tells it to backup one directory (out of admin) and then go into the includes directory. So if your file structure is different, it will fail.

 

Jack

 

I see what you mean. My file structure is:

 

mydomain

  catalog

      subdirectories

  admin

      subdirectories

 

When I downloaded the tags contribution I noticed that when the file was unzipped the file structure was different than what I have noticed in other contributions. However, this may have been the only contribution that I installed in which the admin file structure was an issue. I just assumed when the instructions referenced admin/header_tags... that admin was in the "mydomain directory" with the catalog directory, as mine is.

 

In any event, what can I do? I would prefer not having to change the location of admin (unless that is my only choice) because it seems that it might be complicated and I am afraid I will break something else.

 

Is there another way? Can the code be easily changed to reflect my file structure?

 

Thanks.

Link to comment
Share on other sites

Check to make sure your includes/header_tags.php and includes/languages/english/header_tags.php have permissions set to write.  The code should check this but I may have missed something.

 

 

 

Hi there have just installed, and as long as I have includes/languages/english/header_tags.php set to 666 can change the settings in Text Control through the admin panel for header_tags_english.php.

My question is, is this a security risk, having this file set to 666?

 

Thanks,

Alistair

Link to comment
Share on other sites

I see what you mean.  My file structure is:

When I downloaded the tags contribution I noticed that when the file was unzipped the file structure was different than what I have noticed in other contributions. However, this may have been the only contribution that I installed in which the admin file structure was an issue.  I just assumed when the instructions referenced admin/header_tags... that admin was in the "mydomain directory" with the catalog directory, as mine is.

 

In any event, what can I do?  I would prefer not having to change the location of admin (unless that is my only choice) because it seems that it might be complicated and I am afraid I will break something else.

 

Is there another way?  Can the code be easily changed to reflect my file structure?

 

Thanks.

You need to edit the files admin/header_tags_controller.php and admin/header_tags_english.php. Search for
../includes/

and change it to[/code]../catalog/includes/

 

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

Ok What I did to fix this was changed

 

$tags_array['title']= $the_category['category_head_title_tag'] .' '.  HEAD_TITLE_TAG_DEFAULT . " " .  $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
       } else {
         $tags_array['title']= $the_category['category_head_title_tag'] .' '.  $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;
       }
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'] . ' - ' . HEAD_TITLE_TAG_ALL;

 

to:

 

          $tags_array['title']= $the_category['category_head_title_tag'] .' '.  HEAD_TITLE_TAG_DEFAULT . " " .  $the_manufacturers['manufacturers_name'] . HEAD_TITLE_TAG_ALL;
       } else {
         $tags_array['title']= $the_category['category_head_title_tag'] .' '.  $the_manufacturers['manufacturers_name'] . HEAD_TITLE_TAG_ALL;
       }
     } else {
       $tags_array['title']= HEAD_TITLE_TAG_DEFAULT . " " . $the_category['categories_name'] . $the_manufacturers['manufacturers_name'] . HEAD_TITLE_TAG_ALL;

 

If there is a better way of doing it, or if this will cause problems now or in future please give me a message

 

Thanks,

 

Robert P.

Link to comment
Share on other sites

You need to edit the files admin/header_tags_controller.php and admin/header_tags_english.php.  Search for
../includes/

and change it to[/code]../catalog/includes/

 

Jack

[right][post=598127]<{POST_SNAPBACK}>[/post][/right]

 

 

Well, that was easy to fix. You are TOO good!

 

Thanks a lot! :D :D

Link to comment
Share on other sites

Hi all

I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2. Its a simple update

let me know if anyone finds any problems.

Get it here:

http://www.oscommerce.com/community/contributions,207

 

 

I can't believe it. I did something to cause the following at the top (above the header) of all my pages:

 

/* /catalog/includes/header_tags.php WebMakers.com Added: Header Tags Generator v2.0 Add META TAGS and Modify TITLE NOTE: Globally replace all fields in products table with current product name just to get things started: In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME Shoppe Enhancement Controller - Copyright © 2003 WebMakers.com Linda McGrath ..........

 

There is a lot of code now visible on all my pages. As I said, I was in header tags in admin, and I changed something. I think I may have checked or unchecked one of the switches/indexes. I thought I knew what these did, but perhaps not.

 

Can anyone help?

Link to comment
Share on other sites

I can't believe it.  I did something  to cause the following at the top (above the header) of all my pages:

 

/* /catalog/includes/header_tags.php WebMakers.com Added: Header Tags Generator v2.0 Add META TAGS and Modify TITLE NOTE: Globally replace all fields in products table with current product name just to get things started: In phpMyAdmin use: UPDATE products_description set PRODUCTS_HEAD_TITLE_TAG = PRODUCTS_NAME Shoppe Enhancement Controller - Copyright ? 2003 WebMakers.com Linda McGrath ..........

 

There is a lot of code now visible on all my pages.  As I said, I was in header tags in admin, and I changed something.  I think I may have checked or unchecked one of the switches/indexes.  I thought I knew what these did, but perhaps not.

 

Can anyone help?

 

I see that it appears to be a verbatim dump of the code in includes/header_tags.php with the following exception:

 

At the end, instead of:

 

echo ' <title>' . $tags_array['title'] . '</title>' . "\n";

echo ' <META NAME="Description" Content="' . $tags_array['desc'] . '">' . "\n";

echo ' <META NAME="Keywords" CONTENT="' . $tags_array['keywords'] . '">' . "\n";

echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."\n";

echo ' <META NAME="Reply-to" CONTENT="' . HEAD_REPLY_TAG_ALL . '">' . "\n";

 

echo '<!-- EOF: Generated Meta Tags -->' . "\n";

 

 

 

this is displayed

echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' '."\n"; echo ' ' . "\n"; echo '' . "\n";

 

Then the header and the rest of page is displayed.

 

What would cause this code to dump to the screen? It doesn't make sense that it could be something I did in admin (header tags), but I didn't make any changes to the file. I'm sure there is a logical explanation.

 

Does anyone know what I need to do?

Link to comment
Share on other sites

The file is corrupted. You may have accidentally deleted part of it. Compare it to the original (or just temporaily replace with the original) to find the problem.

 

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

The file is corrupted. You may have accidentally deleted part of it. Compare it to the original (or just temporaily replace with the original) to find the problem.

 

Jack

 

 

Thanks again for being there to answer my questions. I don't know how the file got corrupted, but I replaced it with the original and all is well.

 

A question about search engine optimization ...

 

I recently read that comment tags (<!--comment-->) shouldn't be used because it might be considered a form of spamdexing, and if you spam a search engine, you might be penalized. I have a lot of comments in my files, so in your opinion, should I remove these?

Link to comment
Share on other sites

No, there is nothing wrong with using comments. In fact, they are reuired for some types of code like that inserted by FrontPage. Howeve, if they are not formatted correctly, the SE's may not list the page because they cannot understand the code. Also, if you are using them to load up with keywords, then that would be a waste of time and possibly get you banned. So use them as you need them for legitimate reasons and you will be fine.

 

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 Jack_mc,

 

I have installed the lastest contribution and found a big bug. When tried to delete a page in the Admin that I created and press update btn... somehow this action deleted most of the codes in the cat/includes/header_tags.php file. Any idea why this is happening?

 

I have to re-install the file to make it work. I think this causes unexpected problems. :o

 

I think the file cat/includes/header_tags.php needs rework.

Edited by akkinmore
Link to comment
Share on other sites

Hi all

I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2. Its a simple update

let me know if anyone finds any problems.

Get it here:

http://www.oscommerce.com/community/contributions,207

 

Should I have the following results after installing tags contribution:

 

I am unable to edit product in admin now. When I try to change product name, description, or any specifics that I used to be able to enter on that page, I cannot. When I try to, the edit results in a blank field. The only way I can edit this is if I go into phpAdmin and run a query to update the field.

 

Is this the way it is supposed to work?

 

Thanks.

Link to comment
Share on other sites

Hi all

I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2. Its a simple update

let me know if anyone finds any problems.

Get it here:

http://www.oscommerce.com/community/contributions,207

 

I have several more questions so bear with me -- this is new to me:

 

I thought I had everything working correctly, but now I am questioning whether it is so let me ask some basic questions: 1) when inputting keywords in admin (header tags) where do these keywords go? I looked in database and see where keywords have been added in products_description, etc. (I suppose by the fill_tags.php), but I don't know what is happening when updating keywords in admin. 2) Should I be separating keywords in admin by commas or would the commas be considered part of the keyword? 3) In header.php I changed products_all.php to all_products.php because the filename associated with the contribution all products is not products_all. Hope this is correct and that I didn't misunderstand something. Also what is allprods.php. I don't have that file. Perhaps it is from another contribution. 4) What is $showCatTags (in header_tags)? Where is this set?

 

Sorry for all the questions.

Link to comment
Share on other sites

1 - The database gets updated.

2 - Keywords should be separated by commas.

3 - It's a different contribution.

4 - Couldn't find that tag. Maybe if you were more specific?

 

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

1 - The database gets updated.

2 - Keywords should be separated by commas.

3 - It's a different contribution.

4 - Couldn't find that tag.  Maybe if you were more specific?

 

Jack

 

1 - I thought it must be the database, but I don't see the keywords I entered in admin in the database field. Would that be the products_description table. If so, they aren't there. Is something wrong.

4. The variable is in cataglog/includes/header.tags, around line 83.

 

Thanks.

Link to comment
Share on other sites

1 - The keywords are in the products_description table in the products_head_keywords_tag column.

4- That variable is only used for the index page when the home section is not being displayed. It allows the insertion of the header_tags tags when on those pages.

 

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...