Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Ok so mayeb I dont have this quite working because when I log into the admin area. I get the main page titles Header Tags Controller (header_tags_controller.php) but when I click on the text control or fill tages, it directs me to the forbiden.php.

 

Now i tried going into admin>member groups and editing the group to see if there are any extra tick boxes which need checking but I get Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\welovedeli.co.uk\wwwroot\catalog\admin\includes\functions\database.php on line 107

 

function tep_db_num_rows($db_query) {

return mysql_num_rows($db_query); -----------------line 107.

}

 

Any ideas please Jack?

Link to comment
Share on other sites

It sunds like you are using the admin access contribution. In that case, you have to add the files in admin before they can be seen. The error you are getting isn't Header Tags related so you will need to fix that before working on Header Tags. You need to ask questions about that contribution in the support thread for it, or ask in general support if it isn't related to admin access.

 

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

Yes, I am using the admin access contribution. Ive been through everything again and notice this one difference in your code for installing admin. This is in categories.php, where you say:

 

Around line 877, find this code:

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");

 

and replace it with

 

// HTC BOC

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");

// HTC EOC

 

Im my original categories.php I think it had already been changed using OLISWISS code. I had:

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");

} else {

 

// BOF: KategorienAdmin / OLISWISS

if ($admin_cat_access == "ALL") {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");

} else if ($admin_cat_access == ""){

$categories_query = tep_db_query("");

} else {

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and (c.parent_id or c.categories_id in (" . $admin_cat_access . ")) and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");

}

// EOF: KategorienAdmin / OLISWISS

 

I have replaced the one line of code with your two lines and am getting no errors now apart from not been able to access text cotrol and fill tags from admin. I was wandering if this could be causing the no access problem?

 

I have checked the Header_tags_controller in the define groups section but should there be sub headers too for access text cotrol and fill tags?

 

Hey, I appreciate your help on this.

 

Thanks

Link to comment
Share on other sites

Just one more thing. I take it I am receiving this error because I am running this on a windows hosting environment?

 

Permissions settings for the D:/********.co.uk/wwwroot/catalog/includes/header_tags.php file appear to be incorrect. Change to 777

 

Thanks Again.

Link to comment
Share on other sites

That could be. I don't have a windows site to test with but if it acts like my local setup, where it is read only, then that would happen. The message is just a warning and doesn't disable any code, so if everything is working for you, you can ignore it or remove the code that displays it (if it bothers you). See somewhere in the last few pages for what that code 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

Yes, I have removed the code thanks.

 

Back to my original query though, I am still getting the category title displaying which is messing up my pages. The only way to remove them is to do a clear all tags in the 'fill tags' section of your contribution.

 

But as soon as I change the category page in catalog it re-appears again. How do I stop this please?

 

Best Regards

Link to comment
Share on other sites

I don't understand the problem. I did respond as to how to prevent them from showing on the product page. I assume you tried that or it isn't the product page (I can only guess). If it is somewhere else, it might be because you have html in your titles.

 

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

Its on each category page (where it lists the products) It put the name of the 'Header Tags Category Title' as a bold title and if left blank it fills it it as the category name.

 

It doesnt matter though because I can just do the clear all tags for the categories.

 

Cheers

Link to comment
Share on other sites

Well I have a image that spans across the whole page with the heading for each category in it. So when it re-adds it it shifts the image across therefore messing up the page. I would rather just not have it. Is this possible.

 

Thanks

Link to comment
Share on other sites

It sounds like you are talking about the categories description option. If so, yes, you can skip that part. In the index.php file, remove all changes to the code except for the part in the head section where the title code is replaced.

 

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 installed the Header tags contribution to my site with a large amount of success - everything seems to be working properly, except that I am unable to edit existing products. My store is still in beta, so it has the default products in the store, but when I click to edit the products info, I get the 'add new product' screen.

It almost appears as if it's failing to retrieve the product info from the database, but that's just me guessing wildly.

Replacing the admin/categories.php file with a previous version corrects the problem, but of course removes the ability to add header tags to the product.

I also have installed the ajax attribute manager contrib and the UltraPics contrib, both of which contain edits to this file, as well as CCGV(trad), newsletter-maillist v4.0 which I don't believe modified the categories file.

 

Any idea as to what might be causing this?

 

Any help is greatly appreciated.

 

-Jesse

Link to comment
Share on other sites

It is a mistake in the categories.php file since that is the only thing that controls that function. With that many other contributions installed, it will be difficult to make the required changes, thus increasing the chances of error. But it is possible, you just have to keep trying. There is an edited categories.php file in the contribution that you can use to compare some of the changes against. That might help.

 

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 is a mistake in the categories.php file since that is the only thing that controls that function. With that many other contributions installed, it will be difficult to make the required changes, thus increasing the chances of error. But it is possible, you just have to keep trying. There is an edited categories.php file in the contribution that you can use to compare some of the changes against. That might help.

 

Jack

 

 

Indeed it was. A missing exclamation mark. But it's working now! Thanks for providing such great support for this contrib, its great to know there's someone to lend a hand.

 

-Jesse

Link to comment
Share on other sites

Hi there,

 

I've installed the header tags contribution - it all seems to work well (thank you!), except when I use the "Fill all tags" option on the Header Tags - Fill Tags admin page, for my categories/ manufacturers/ products, my product pages come back almost entirely empty except for a bit of HTML;

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">
<head>

 

The auto-filled product meta data (TEXT_PRODUCTS_PAGE_TITLE etc.) is appearing in the relevant fields in the admin catalog product pages and if I use the "Clear all tags" option then the product pages reappear, but without the relevant meta data of course. I'd really like to use that fill option, as we've got nearly 1000 products!!

 

Any ideas?

 

Many thanks

 

Ben

Edited by benh
Link to comment
Share on other sites

Hi there,

 

I've installed the header tags contribution - it all seems to work well (thank you!), except when I use the "Fill all tags" option on the Header Tags - Fill Tags admin page, for my categories/ manufacturers/ products, my product pages come back almost entirely empty except for a bit of HTML;

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en">
<head>

 

The auto-filled product meta data (TEXT_PRODUCTS_PAGE_TITLE etc.) is appearing in the relevant fields in the admin catalog product pages and if I use the "Clear all tags" option then the product pages reappear, but without the relevant meta data of course. I'd really like to use that fill option, as we've got nearly 1000 products!!

That's a strange one. My guess is that the code in the product_info.php and/or includes/header_tags.php and english/header_tags.php files is not correct. You can replace the latter two with the ones from the contribution to help isolate 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

What is the large box entitled Header Tags Categories Description used for when a category is edited from admin? I am confused because I have another box for Header Tags Category Description, which shows up as my meta tag description. I know that text entered in Header Tags Categories Description displays under the title on the category page on my store. Is that all it is meant to do?

 

Ron

Link to comment
Share on other sites

Just wanted to say a HUGE Thankyou for this contribution V-2.6.3. Easy to follow instructions, not too difficult and working perfectly.

 

Just wanted to say to anyone else who wants to install this contribution - there is a filename missed on the list of new files to upload in the Install_Catalogue.txt file - includes/boxes/header_tags.php . And you ONLY need to run the header.sql file in phpmyadmin.

 

Just need to decide what keywords to use and test some more.

 

 

Question: I used the "fill tags" option to start with. How do I remove the default tags from pages after I've written my own tags? I wrote all the bits for a manufacturer but if i view source, my own manufacturer text is there, but so is the default text - shouldn't it disapear when i add my own text?

 

 

 

ThanQ muchly

Tiger

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

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

PM me? - I'm not for hire

Link to comment
Share on other sites

What is the large box entitled Header Tags Categories Description used for when a category is edited from admin? I am confused because I have another box for Header Tags Category Description, which shows up as my meta tag description. I know that text entered in Header Tags Categories Description displays under the title on the category page on my store. Is that all it is meant to do?

 

Ron

Yes, it is for text on the categories page. It should be used for best SEO. The text should contain your keyword(s) for that 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

Question: I used the "fill tags" option to start with. How do I remove the default tags from pages after I've written my own tags? I wrote all the bits for a manufacturer but if i view source, my own manufacturer text is there, but so is the default text - shouldn't it disapear when i add my own text?

ThanQ muchly

Tiger

To replace the tags with your own, just change them in the product edit 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

To replace the tags with your own, just change them in the product edit page.

 

Jack

Thanks Jack,

I think I just need to play around with the switches - they're a little confusing but sure I'll work it out in the end. I may write a how to file if I have time once I understand it.

 

Tiger

I'm feeling lucky today......maybe someone will answer my post!

I do try and answer a simple post when I can just to give something back.

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

PM me? - I'm not for hire

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