Jump to content
Latest News: (loading..)
Jack_mcs

Header Tags SEO

Recommended Posts

I have a question about "Install_Admin.txt", during "admin/categories.php" file update, when editing product description textarea field :

} else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { 
                        echo tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .$languages[$i]['id'] . ']');

Find at the end of the line 312, this sentence that prevents any view content of the expected $products_description[$languages[$i]['id']])

,'id = products_description[' .$languages[$i]['id'] . ']'

Same for "tep_draw_textarea_ckeditor" entry that don't match with any contribution for CKeditor install.
 

 

@@Jack_mcs could you provide more information about this code and explain how it can work ?

Surely it's needed to create a "function tep_draw_textarea_ckeditor" in "admin/includes/functions/html_output.php" file but no information about this... nowhere... Google can't help me this time ! :/

Extra information on "Install_Admin.txt" will be nice to explain the CKeditor integration sequence with this great contribution. ^_^

Edited by milerwan

Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

@@milerwan There are two addons that install the CKEditor differently. One adds a function and is used when called while the other is always on. The latter is the more recent version. The code in this addon is for the other version. I've installed this addon into shops using both versions of CKEditor and it always works. Be sure to enable the editor in the Header Tags SEO settings though or it will be ignored.

Share this post


Link to post
Share on other sites

@@Jack_mcs could you give me the link of the CKeditor addon that works with your contrib because it 100% sure that the actual CKEditor osC 2.3.1 contribution is not compatible.

Edited by milerwan

Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

I'm not sure what you mean by "actual" since there are probably at least five addons for the CKEditor. As mentioned, it shouldn't matter since they should work with this addon but here is one that I have used before. 

Share this post


Link to post
Share on other sites

I'm not sure what you mean by "actual" since there are probably at least five addons for the CKEditor. As mentioned, it shouldn't matter since they should work with this addon but here is one that I have used before. 

 

Thank you, this addon works but there is something wrong with your code that need to be modified to do it.

In "Install_Admin.txt" tutorial, during "admin/categories.php" file update, when editing textarea_field (line 312) :

                    } else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { 
                        echo tep_draw_textarea_ckeditor('products_description[' . $languages[$i]['id'] . ']', '70', '10',(isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' .$languages[$i]['id'] . ']');

Need to replace by this one :

                    } else if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'CKEditor') { 
 					  echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '10', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id'])),'id = products_description[' . $languages[$i]['id'] . '] class="ckeditor"');

Like this all works perfect, no need to create specific "tep_draw_textarea_ckeditor" function. :)

Edited by milerwan

Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

This is the first time I added this to a bootstrap shop (edge).  Everything works great except I think I messed something up.

 

When I use the admin/includes/template_top.php file that is in the add-on it totally hoses my left column.

 

If I do the the individual change in the instructions it hoses my Header, but only on the page control (header_tags_seo.php) page.

 

Everything still works just thought I might of did something wrong.

 

post-269658-0-96603100-1464263130_thumb.png

Share this post


Link to post
Share on other sites

@@IWAS maybe you should install the check update controller codes for this module.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

@@IWAS When it comes to the BS version, you usually can't use included files because they change so often. For the problem on Page Control, please be sure your template_top file has the code to load the headertags_seo_styles.css file and that that file exists in the includes directory,

Share this post


Link to post
Share on other sites

Thanks Jack :) . I'm not using the included file.

 

This is the instructions for template_top, I guess the css call is missing.  I added it like it was in the included file and all is good.  Little <div> runover, but I can live with this.

===================================================================
In admin/includes/template_top.php,  
 
FIND (around line 39):
 
</head>
 
ADD ABOVE:
 
<?php
/*** Begin Header Tags SEO ***/
switch (HEADER_TAGS_ENABLE_HTML_EDITOR) {
   case 'CKEditor':
     echo '<script type="text/javascript" src="./ckeditor/ckeditor.js"></script>';
   break;
 
   case 'FCKEditor':
   break;
          
   case 'TinyMCE':
     if (HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'true'   ||  
         HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'true'     ||
         HEADER_TAGS_ENABLE_EDITOR_LISTING_TEXT == 'true' ||
         HEADER_TAGS_ENABLE_EDITOR_SUB_TEXT == '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
         $str = '';
         for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
           if (HEADER_TAGS_ENABLE_EDITOR_CATEGORIES == 'true') $str .= "categories_htc_description[".$languages[$i]['id']."],";
           if (HEADER_TAGS_ENABLE_EDITOR_PRODUCTS == 'true') $str .= "products_description[".$languages[$i]['id']."],";
           if (HEADER_TAGS_ENABLE_EDITOR_LISTING_TEXT == 'true') $str .= "products_head_listing_text[".$languages[$i]['id']."],";
           if (HEADER_TAGS_ENABLE_EDITOR_SUB_TEXT == 'true') $str .= "products_head_sub_text[".$languages[$i]['id']."],";
         }  //end for each language
         $mce_str = rtrim ($str,","); // Removed the last comma from the string.
       // You can add more textareas to convert in the $str, be careful that they are all separated by a comma.
         echo '<script language="javascript" type="text/javascript" src="includes/javascript/tiny_mce/tiny_mce.js"></script>';
         include "includes/javascript/tiny_mce/general.php";
       }  
     }
   break;
 
   default: break;  
}      
/*** End Header Tags SEO ***/
?>

===================================================================

post-269658-0-05761300-1464278393_thumb.png

Share this post


Link to post
Share on other sites

@@Jack_mcs

 

Nice job on the Social Bookmarks.

 

I was going to add a blogspot.com link to your social bookmarks, and noticed you already had the image for it in the images directory.  Is this something you already had tried before or is it something intended for the future?

Share this post


Link to post
Share on other sites

Thanks for mentioning this mistake. The correction has been made in the next version. The way it looks in the image you posted is not quite right. The problem is because not all left columns are the same width and it messes with the css I used, You can adjust that by changing the 230 number in this line:

div.statsLeft {display:inline-block; margin-left:10px; width:230px}

Share this post


Link to post
Share on other sites

For the social bookmarks, I just added all I could find at the time. Some are no longer available. To use one, you just need to follow the instructions on that page. It just involves adding the common command and checking the image.

Share this post


Link to post
Share on other sites

Thanks for the fix.

 

For the social bookmarks, I just added all I could find at the time. Some are no longer available. To use one, you just need to follow the instructions on that page. It just involves adding the common command and checking the image.

 

You had the image for blogspot in the images file but not on the page where it can be checked and command entered.  I'll take a closer look later. 

Share this post


Link to post
Share on other sites

I don't see such an image, assuming it would be named something like blog_spot. You may be looking in the social icon images directory of oscommerce, not the one added by this addon. If you copy the image to this images directory, using the name format of the others, it should show up in admin in the social section and you can then enable it.

Share this post


Link to post
Share on other sites

You're right it was in the osc-BS build.

 

I was looking at the JS of that, was wondering if that is how it worked.  Sweet. :)

 

I attached the scaled images if you want to include it on the next release.

 

I think Google has something to do with blogger and blog_spot. 

 

 

post-269658-0-75196300-1464288751.png

post-269658-0-70496200-1464288763.png

post-269658-0-11196800-1464288778.png

post-269658-0-65146200-1464288797.png

Share this post


Link to post
Share on other sites

I guess it pays to read your instructions, LOL.  Didn't see that it was posted in front of my face :rolleyes:

Share this post


Link to post
Share on other sites

Hi Jack,

 

Is there a way to change the double quote character to " in the meta tags description and keywords?

 

I have double quotes in my descriptions and keywords, so that is messing up the html.

 

Thanks!!

Share this post


Link to post
Share on other sites

The last version has that change in it. If you are not using the latest version, then updating should fix it. If you are using the latest version, I may have missed a statement that uses quotes but I wouldn't know where that is without troubleshooting the code and it works fine for me so I can't do that.

Share this post


Link to post
Share on other sites

I found it,  in the left collum.php  I removed 
 

/*** Begin Header Tags SEO ***/
include(DIR_WS_BOXES . 'header_tags_seo.php');
/*** End Header Tags SEO ***/

Share this post


Link to post
Share on other sites

I miss some meta's  for local targeting and language like

 

<meta name="language" content=" xx ">
<meta name="Geography" content=" xxxx ">

 

this will help me alot to get my local ranking higher.

 

How ?

Share this post


Link to post
Share on other sites

There is a check box in Page Control for the language meta tag. There isn't anything in place for GEO Tags. Since that would be the same for all pages, you can edit the header_tags_social_bookmarks.php file in modules to include them for your site.

Share this post


Link to post
Share on other sites

Jack, apparently I installed this contribution to one of my sites with no problems years ago, mostly for the SEO benefits. I was recently trying to find a way to add text to the category page, and read that this could also be done with Header Tags SEO. I had never noticed or realized that. But I can't see how to do this. I ran the test and there were no problems really, but when I add text to the Header Tags Categories Description box and save my changes in admin....none of it appears on the category page of the site. Am I overlooking something simple? Any help appreciated in advance.

Share this post


Link to post
Share on other sites

If you edit a category and see text in the larger Header Tags box, then the admin side is working correctly. If you visit that category on the shop side and don't see the description then something is wrong with the code changes on that page. You would need to run through the instructions to see where the mistake is at. You can upload the included index.php file as some other name, like index_hts.php and then visit that page with a browser. You will need to go to a category page and then alter the url to use the new name. If you are using a url rewriter, just turn it off for this test. If the descriptions show up, then you can compare that file with yours to see where the problem is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×