Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

It's hard to tell from that partial code but there is probably a statement before that that says something like if categories == true. If that is the case, then edit the second section, after the line with the else in it, using the instructions in Header Tags.

 

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

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Hi, everybody! Can I save fomatted text in my header_tags_description, with the paragraphs that i defined? What happens now is that even if i put paragraphs in the text box, what is saved to the database is the text without any paragraphs. How can i format this?

 

Thank you, and sorry for my English.

Link to comment
Share on other sites

Can I save fomatted text in my header_tags_description, with the paragraphs that i defined?

This not only wouldn't be a good idea, but w3c.org specs for the Title tag actually forbid using any HTML tags within the <title> tag (http://www.w3.org/MarkUp/html3/dochead.html at the bottom). There really shouldn't be any reason to. generally speaking, you should avoid html tags in any of these fields.

Edited by surfalot
Link to comment
Share on other sites

Thanks - I changed the code to this

 

	// 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, c.categories_status, 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, c.categories_status, 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

 

and all seems to be well :D

 

Many thanks for your help

 

Ben

Link to comment
Share on other sites

This not only wouldn't be a good idea, but w3c.org specs for the Title tag actually forbid using any HTML tags within the <title> tag (http://www.w3.org/MarkUp/html3/dochead.html at the bottom). There really shouldn't be any reason to. generally speaking, you should avoid html tags in any of these fields.

 

What happens is that i have a text to descript my category, and without paragraghs it really sucks.

 

I put in my category header_tag_description, something like this:

 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.

 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

 

XXXXXXX.

 

And what is saved is:

 

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXX.XXXXXXX

 

And so, in the page we see what is saved. It don't look fine. How can I do this, if the text is so important do descript the category?

Link to comment
Share on other sites

Yes text is important, and only the text. It's what is written, not how. These are nothing more then search engine directives. Search engines don't care how it's formatted.

 

The title, description, and keyword tags in the <head> of your document are suppose to be all on one line. The code in this contrib only controls text only unformatted categorizable searchable plain text.

Link to comment
Share on other sites

Yes text is important, and only the text. It's what is written, not how. These are nothing more then search engine directives. Search engines don't care how it's formatted.

 

The title, description, and keyword tags in the <head> of your document are suppose to be all on one line. The code in this contrib only controls text only unformatted categorizable searchable plain text.

 

In my store, one of my categories is Cheese, and i have a long description about it. If i can't put the formatted text in the header, how can i save it formatted to a database and put in the body of the page?

Link to comment
Share on other sites

In my store, one of my categories is Cheese, and i have a long description about it. If i can't put the formatted text in the header, how can i save it formatted to a database and put in the body of the page?

you want to use category descriptions contrib. http://www.oscommerce.com/community/contributions,1373. it lets you add all the text you want to the top of a category.

Link to comment
Share on other sites

Or just use the categories description option built into Header Tags. It can be formatted with html code without any problems.

 

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 store, one of my categories is Cheese, and i have a long description about it. If i can't put the formatted text in the header, how can i save it formatted to a database and put in the body of the page?

OK, I see where you are talking about now. But it seems to work on the base install I have. Are the HTML tags getting removed from the text you are saving in that field or just not displaying right?

Link to comment
Share on other sites

My bust. That seems like a little bit of a tangent for this contrib. Then I guess you should know better then I what danimaia's asking about, Jack :thumbsup:
The more text you have on a page, the better it is for the SE's. That was added for this purpose.

 

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

Surfalot, what Danimaia wants to do is to have some text underneath the

category name, so when people go to that category, it has a description.

 

I added a brief description to one of my pages (which I will be changing,

but I added something just to have in there for now):

 

My Birds Category

 

Danimaia, here is a picture of my admin page where I added the text:

(In your Admin Panel, go to Catalog, then Categories/Products, then

select the category you want to change, and then click Edit)

 

BirdCategory.jpg

Link to comment
Share on other sites

danimaia,

 

I'll bet what you are doing is this...

 

Type type type type type type type type.[hit return]

[hit return]

Type type type type type type type type type type type type type type type type.[hit return]

etc...

 

then it comes out in one line without the spacing from [return]s. When it is displayed on a page the browser ignores [return]s.

 

What you need to do is to use basic HTML tags to create the spacing you require.

 

HTML Example with 2 paragraphs:

<p>Type type type type type type type type.</p>
<p>Type type type type type type type type.</p>

 

If you want formatting in that box, you need to use some basic HTML. Go Googling for a basic HTML tutorial that will show you how to make paragraphs, bold & italicize items, font sizes, etc.

 

Sorry for the misunderstanding. I talk about code so much sometimes I forget not everyone here knows HTML. There are a couple of good contributions here that are what we call a WYSIWYG editor. A WYSIWYG text entry box will let you just type what you want and your page will display it exactly like you formatted it. If you have one of these installed in your admin you can avoid learning HTML for now.

 

Hope this helped.

Edited by surfalot
Link to comment
Share on other sites

Hi there. At this point I'm totally lost and this icon seemed to be the best fit :blink: I will admit that this is totally a user error on my part. Now i'm just trying to find a way back out of it. Tried using my backups but they leave me with the same error and it seems like i'm only making things worse.. I have a couple of ideas on what i've messed up and thought someone might have some solutions or see my errors.

 

I am getting the following error messages upon checkout. The site is www.sunsethilljewelry.com The place that this occurs is in the checkout so if you do want to check this out maybe you could make a bogus customer name.

 

Warning: fopen(/home/sunse6/public_html/catalog/temp/598101-4-data.txt): failed to open stream: No such file or directory in /home/sunse6/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 349

 

Warning: fwrite(): supplied argument is not a valid stream resource in /home/sunse6/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 350

 

Warning: fclose(): supplied argument is not a valid stream resource in /home/sunse6/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 351

 

Warning: openssl_pkcs7_sign(): error opening input file /home/sunse6/public_html/catalog/temp/598101-4-data.txt! in /home/sunse6/public_html/catalog/includes/modules/payment/paypal_ipn.php on line 356

 

Warning: unlink(/home/sunse6/public_html/catalog/temp/598101-4-data.txt): No such file or directory in /home/sunse6/public_html/catalog/includes/modules/payment/paypal_ipn.php

 

I saw a post on here about changing the admin/header_tags_controller.php and admin/header_tags_controller.php and I tried modifying them to solve it. I think I made it worse so I restored those two original files. I'm wondering if something in this area needs to be modified and i'm not doing it correctly.

 

the shop was working. I am using the paypal.ipn contribution. Did I mess sometthing up when I installed this contribution.

 

Just some thougths I have. I'm at the point where I'm going to try working backwords removing the header tags contribution to see if I can get back to the state of working. Just thought those of you that have a clue might see my errors here or have some tips.

 

I appreciate anything you might be able to offer.

 

Thanks so much.

Link to comment
Share on other sites

I don't think this is related to HTC. The error would tell me you haven't setup the PayPal IPN temp directory correctly in the modules/payment of your admin. make sure there is write permissions to the folder you specify.

Link to comment
Share on other sites

I don't think this is related to HTC. The error would tell me you haven't setup the PayPal IPN temp directory correctly in the modules/payment of your admin. make sure there is write permissions to the folder you specify.

 

thanks for the advice. I will try to work on that area this weekend and see if I can find what i'm doing wrong. I must have changed something and not realized it since it was working before. Thanks for pointing me in a direction to try. thank you!

Link to comment
Share on other sites

Hello,

 

Currently my store displays the word "Categories" when some one clicks on a category and "Lets see what we have here" when the product listing comes up.

 

I want to replace "Categories" with the title I gave that page and I also want to do the same with "Lets see what we have here"

 

For example at the following link I want to replace "Categories" with "VoIP IP Telephones" (title of page)

 

http://www.voipon.co.uk/index.php?cPath=1

 

For example at the following link i want to replace "Let's See What We Have Here" with "Aastra IP Telephones" (title of page)

 

http://www.voipon.co.uk/index.php?cPath=1_50

 

What changes do I have to make to the code to implement this?

 

Thanks for your help.

Edited by AlecUK
Link to comment
Share on other sites

did you complete all the changes to index.php in Install_Catalog.TXT ?? I think at least one of those (Let's See What We Have Here) are covered by the install directions. If not both. please double check that.

Link to comment
Share on other sites

thanks for the advice. I will try to work on that area this weekend and see if I can find what i'm doing wrong. I must have changed something and not realized it since it was working before. Thanks for pointing me in a direction to try. thank you!

 

thanks surfalot. My problem was with my temprory directory. Somehow I delted the temp folder. Now it has been solved. It had nothing to do with the header tags and was a user error just like i figured.

Link to comment
Share on other sites

Warning: file(../catalog/includes/languages/english/header_tags.php): failed to open stream: No such file or directory in .../public_html/catalog/admin/header_tags_controller.php on line 254

 

 

I have the same error message in the admin section, althoug the contribution seems to be working normally. The mentioned header_tag.php is in the right folder, and the permission was set to "777", have anybody find the problem?

Link to comment
Share on other sites

Is your shop located in the catalog directory? If not, you will need to edit the paths in the header tags files in admin.

 

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