Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Tags SEO


Jack_mcs

Recommended Posts

Can there a feature be added to save any existing keywords that was manually added in catalog in case all keywords was converted to title description.

The keyword generator isn't adding keywords as per page control product_info.php - getting 1 keyword: var,

I'm sorry but I don't understand the question. What's the keyword generator?

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I'm sorry but I don't understand the question. What's the keyword generator?

Under page control - Use keywords from text on the actual page radio button

 

Once this option is selected we loose all the manually inputted keywords for all products

 

Also I found when he fill tags is selected the html is stripped - correct, but like me I don't want to use this function as I loose my keywords that was manually inserted

 

So, how can I edit the product_info.php file so that the following code strips out the html special characters - removing _p_ , _br_ and so on

 

<head>
<?php
/*** Begin Header Tags SEO ***/
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
/*** End Header Tags SEO ***/
?>

Getting the Phoenix off the ground

Link to comment
Share on other sites

Under page control - Use keywords from text on the actual page radio button

 

Once this option is selected we loose all the manually inputted keywords for all products

 

Also I found when he fill tags is selected the html is stripped - correct, but like me I don't want to use this function as I loose my keywords that was manually inserted

 

So, how can I edit the product_info.php file so that the following code strips out the html special characters - removing _p_ , _br_ and so on

 

Oh, I see. There isn't any code in place to merge existing keywords with what is read from the page. I will add that to the next version though.

 

Code is already in place to strip html code. If it isn't working for you, then you would need to edit the includes/header_tags.php file for the product_info section.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Oh, I see. There isn't any code in place to merge existing keywords with what is read from the page. I will add that to the next version though.

 

Code is already in place to strip html code. If it isn't working for you, then you would need to edit the includes/header_tags.php file for the product_info section.

Thanks, the merge part sounds good!

 

The part that's actually giving me hassle is when a new product is added and header tags is not updated we are left with html code in the description.

 

Any recommended code changes in includes/header_tags.php or product_info.php to strip html tags from these new products

Getting the Phoenix off the ground

Link to comment
Share on other sites

Any recommended code changes in includes/header_tags.php or product_info.php to strip html tags from these new products

php has a function named strip_tags. That might do it for you.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

php has a function named strip_tags. That might do it for you.

Thanks for reply

 

In header_tags.php we have:

echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n";
echo ' <meta name="Description" content="' . $header_tags_array['desc'] . '" >' . "\n";
echo ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" >' . "\n";

 

I cant put

echo strip_tags(' <meta name="Description" content="' . $header_tags_array['desc']) . '" >' . "\n";

as it removes the meta description

 

Any suggestion of what code where to put?

This will really help me

Thanks

Getting the Phoenix off the ground

Link to comment
Share on other sites

Hi

i uninstall old verson and install new one by phpmyadmin all show ok

but in admin when go to heated tags SEO is show error

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /home/sexychi1/public_html/shop/admin/includes/functions/general.php  on line 1195

from 1193

 function tep_call_function($function, $parameter, $object = '') {
   if ($object == '') {
     return call_user_func($function, $parameter);
   } elseif (PHP_VERSION < 4) {
     return call_user_method($function, $object, $parameter);
   } else {
     return call_user_func(array($object, $function), $parameter);
   }
 }

dont have that problem before

thex for info

Edited by sexychickfashion
Link to comment
Share on other sites

In header_tags.php we have:

echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n";
echo ' <meta name="Description" content="' . $header_tags_array['desc'] . '" >' . "\n";
echo ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" >' . "\n";

 

I cant put

echo strip_tags(' <meta name="Description" content="' . $header_tags_array['desc']) . '" >' . "\n";

as it removes the meta description

It goes around $header_tags_array['desc']. Please post any other programing questions in the general forum since this thread is only for questions about the contribution.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi

i uninstall old verson and install new one by phpmyadmin all show ok

but in admin when go to heated tags SEO is show error

Warning: call_user_func(header_tags_reset_cache) [function.call-user-func]: First argument is expected to be a valid callback in /home/sexychi1/public_html/shop/admin/includes/functions/general.php  on line 1195

from 1193

dont have that problem before

thex for info

You have to install the new code from the contribution. Please see the update instructions before posting.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

ok :D thank you I start edit files but one more q.

<html <?php echo HTML_PARAMS; ?>>
<head>
<!-- Simple multi image addon -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<!-- EOF Simple multi image addon	 -->
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

when I replace meta and title will be work with simple multi?

Link to comment
Share on other sites

Hi Jack,

 

I tried to search this topic, but with no luck.

 

Regarding the social bookmarks feature, I already figured out, how to select and display only some of them. The next thing I would like to do is to place them on a more visible place on the product_info page, lets say directly under the H1 heading with left alignment. Since my coding skills are very limited, I hope You or somebody else can help me with that.

 

Thanks a lot.

Link to comment
Share on other sites

Hi Jack,

 

I tried to search this topic, but with no luck.

 

Regarding the social bookmarks feature, I already figured out, how to select and display only some of them. The next thing I would like to do is to place them on a more visible place on the product_info page, lets say directly under the H1 heading with left alignment. Since my coding skills are very limited, I hope You or somebody else can help me with that.

 

Thanks a lot.

The code for the bookmark images is enclosed in a table row so you can copy the code that includes themanywhere on the page you want as long as you follow another table row. If you want it beside something else (probably wouldn't look right) you would have to add a table cell around it.

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The code for the bookmark images is enclosed in a table row so you can copy the code that includes themanywhere on the page you want as long as you follow another table row. If you want it beside something else (probably wouldn't look right) you would have to add a table cell around it.

 

Will try that tonight thanks for the advice.

Link to comment
Share on other sites

Hi, Jack!

 

I've got an issue with pseudo pages and cache option. When the cache is disabled everething is OK. But if I enable the cache, all pseudo pages has the same titles, keywords, etc. like the very first record in headertags_cache with accessed pseudo page.

Eg. Pseudo pages newsdesk_info.php?newsdesk_id=1 and newsdesk_info.php?newsdesk_id=2 with different settings works fine, when cache is disabled. Enable the cache and reset it. Next access to newsdesk_info.php?newsdesk_id=2, than newsdesk_info.php?newsdesk_id=1. On the second page we see same info as on previous.

 

Seems, the code

    $page = 'newsdesk_info.php?newsdesk_id=1';
   $parts = explode("?",$page);
   $getStr = substr($parts[1], 0, -1);
   $getID = isset($_GET[$getStr]) ? $_GET[$getStr] : '';
   $parts = explode("=", $parts[1]);

doesn't work properly. At least on line 3 and 4.

As I understand the idea, we should take id from a given page and store it in $getID. After that this variable is used in cache saving and reading using cache name pattern like header_tags_<page>_<language>_cache_id_<pseudo_page_id> where <pseudo_page_id> = id of accessed eg. newsdesk article (newsdesk_id) = $getID. But $getID in my case is allways equivalent to empty string. The cache table allways read the first entry.

 

Correct me, please if I'am wrong.

Edited by RusNN
Link to comment
Share on other sites

And another one:

 

I have 3 pseudo pages, like:

 

1. newsdesk_info.php?newsdesk_id=1

2. newsdesk_info.php?newsdesk_id=8

3. newsdesk_info.php?newsdesk_id=15

 

Now I want to delete one of them. If this are number 2 or 3 everything is OK. But if I choose number 1 to delete, pages number 1 and 3 are delete in one time. I doublecheck in diffrent combination. If the part of several pages from beginning is equivalent to deleting page name all this pages will be deleted.

Edited by RusNN
Link to comment
Share on other sites

Correct me, please if I'am wrong.

By my first issue I carefuly test it and seems I found where is the bug. This line

$incArray['pseudo']  = "    \$page = '" . substr($file, 0, -1) . "';" . "\n";

generates in catalog\includes\header_tags.php next line:

$page = 'newsdesk_info.php?newsdesk_id=';

. The trouble is that my first added pseudo page was newsdesk_info.php?newsdesk_id=15. So the code on first block generate

$page = 'newsdesk_info.php?newsdesk_id=1';

and pseudo pages goes wrong.

 

The solution is to check id of given pseudo page in function AddedToHeaderTagsIncludesFilePseudo(); before generate code for it in catalog\includes\header_tags.php.

 

 

And by my second issue. The way why it be so is clear. We may delete all pseudopages with one click. But if we got several and want to delete just one, seems it should not work as it works now.

Edited by RusNN
Link to comment
Share on other sites

Variable $id in catalog\includes\header_tags.php used in lines 34, 36, 73, 95, 97, 145 is conflicted with NewsDesk contribution in catalog\includes\boxes\newsdesk.php in function newsedsk_show_category($counter) causing multiple warnings. $id used in newsdesk function as global variable.

 

Solution is to rename $id in catalog\includes\header_tags.php on lines shown above or to insert code

$id = array();

just above lines

if ($newsPath) {
$new_path = '';

in catalog\includes\boxes\newsdesk.php

Edited by RusNN
Link to comment
Share on other sites

Hi Jack

 

I am doing some rehearsals with wamp to update to last version of this incredible contribution.

 

When trying to replace a piece of code in admin/categories.php

 

FIND (around line 386):

<?php // START tinyMCE Anywhere
if (HEADER_TAGS_ENABLE_TINYMCE_META_DESC == 'true' || HEADER_TAGS_ENABLE_TINYMCE_CATEGORIES == 'true' || HEADER_TAGS_ENABLE_TINYMCE_PRODUCTS == 'true')
{
if ($action == 'new_product' || $action == 'new_category' || $action == 'edit_category') { // No need to put JS on all pages.
 $languages = tep_get_languages(); // Get all languages
// Build list of textareas to convert

..........ETC ETC

 

I can not find this code in my categories.php . I do not have any editor in the shop and the one that comes with OSC is erased due to security concerns.

 

How i should proceed?

 

Thank you.

Link to comment
Share on other sites

Hi Jack

 

I am doing some rehearsals with wamp to update to last version of this incredible contribution.

 

When trying to replace a piece of code in admin/categories.php

 

FIND (around line 386):

<?php // START tinyMCE Anywhere
if (HEADER_TAGS_ENABLE_TINYMCE_META_DESC == 'true' || HEADER_TAGS_ENABLE_TINYMCE_CATEGORIES == 'true' || HEADER_TAGS_ENABLE_TINYMCE_PRODUCTS == 'true')
{
if ($action == 'new_product' || $action == 'new_category' || $action == 'edit_category') { // No need to put JS on all pages.
 $languages = tep_get_languages(); // Get all languages
// Build list of textareas to convert

..........ETC ETC

 

I can not find this code in my categories.php . I do not have any editor in the shop and the one that comes with OSC is erased due to security concerns.

 

How i should proceed?

 

Thank you.

Simply skip this step. If no editor present in your system this code is unnecessary. But keep in mind, that if ever install one of that editor it is better to come back and do this step.

Link to comment
Share on other sites

Jack, got a quick question.

 

In the settings for my product_info.php, I have set to include the categories name behind.

That is necessary for my page title and I cannot / don't want to change it.

 

But now, I want to display the HT-Keywords as well at another place of the product_info.

 

So, I tried this:

<?php echo $header_tags_array['keywords']; ?>

But as result, I got:

keyword, category

which, of course, is correct, according to my settings.

 

I also looked up the whole header_tags_array for another solution, but with no success.

 

So I want to ask you, if I can somehow extract or access the keyword without the appendix of the category.

Is this somehow possible?

 

Thank you very much in advance.

Regards

Andreas

Edited by Andreas2003
Link to comment
Share on other sites

So I want to ask you, if I can somehow extract or access the keyword without the appendix of the category.

The database field, where the info is coming from, is called "products_head_keywords_tag" in Table products_description.

Is there a way to access it through the array, because I don't want an additional query.

Thanks

Link to comment
Share on other sites

The database field, where the info is coming from, is called "products_head_keywords_tag" in Table products_description.

Is there a way to access it through the array, because I don't want an additional query.

Thanks

No additional query needed. You may asc for field "products_head_keywords_tag" in your general question for product on products_info.php and access frough product array. Of course if you need this only on product_info.php.

Link to comment
Share on other sites

RusNN, yes, I need it only in my product_info.php.

 

But which existing query or array do you mean.

I did not found any, where "products_head_keywords_tag" is fetched or avail too.

Find

$product_info_query = tep_db_query("select p.products_id, pd.products_name, 

... and so on. Try to paste just after word select:

pd.products_head_keywords_tag, 

So your query should be present like

$product_info_query = tep_db_query("select pd.products_head_keywords_tag, p.products_id, pd.products_name, 

After that you can access to the products_head_keywords_tag through $product_info array as usual. You may paste "pd.products_head_keywords_tag, " where you want between words select and from.

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