Jump to content
Jack_mcs

Information Pages SEO addon

Recommended Posts

This addon allows the easy creation and handling of pages from within admin as well as a way to manage text on any page in the shop. It is based on the Information Pages Unlimited addon that has been around for years. While much of the code is different in this version, I wanted to keep the  compatibility with the original version, thus the similar name.

NOTE: There are three sets of files in this package, for different versions of oscommerce. The BS version is the only one that has all of the new features. The other two  versions are improvements over the original code but nowhere near that which is in the BS version. So any instructions or descriptions may apply to the other versions but are mainly meant for the BS version.

This version fixes many coding mistakes in the other version and adds many new features making it easier to use and more powerful. Some of the features are:

- Has a Box ID setting that allows you to control where the link to the page shows up. So, for example, if there are four footer modules installed, each could have links specific to them.

- A link can have sub-links (currently only available in the included module). So there could be a main link for widgets and sub-links for various kinds of widgets. There are two advantages to this: first, it takes up less room when there are many links and, second, the search engines will still be able to get to the pages.- There is a quick view button to allow displaying the page in a  browser to check the changes.

- There are quick fill options that allows categories and products to be added to a page with just a short statement. For example, if your site sells automobile parts and you are creating a new page about tires, you just need to type in PNAME(tires)PNAME and links for all of the products in your shop with tires in the name will be added to the page. See the Notes section on the editor page for additional methods.

- Allows setting the browser title and meta tags while editing the page in admin (only if Header Tags SEO is installed).

Share this post


Link to post
Share on other sites

Hi, I am using this addon. I have figured how to get the links to add to the Information box. But cannot figure how to add messages and where they go.

I tried editing the custiomer greeting but nothing happens.

I am using the BS version with template. Can send you link if you wish.

Share this post


Link to post
Share on other sites

To use the messages you need to add a line of code to wherever you want the message text to appear. See the readme_additional.txt file for what is needed. Please post again if you can't get it to work.

Share this post


Link to post
Share on other sites

I used a file editor to compared my site with the addon and what I am posting is only the part that is showing up as being different. The first file I am showing is from the (oscom-information addon) and the second file I posted is from my site.

My question is should I use the addon file to replace my site, try to combine them somehow or leave it alone?

 

application_top.php     oscom-information

// add category names or the manufacturer name to the breadcrumb trail

  if (isset($cPath_array)) {

    for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {

      $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");

      if (tep_db_num_rows($categories_query) > 0) {

        $categories = tep_db_fetch_array($categories_query);

        $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));

      } else {

        break;

      }

    }

  } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {

    $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

 

 application_top.php     MY site

 

$n=sizeof($cPath_array);

    for ($i=0; $i<$n; $i++) {     

      if ( defined('MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE') && (MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') ) {

        $categories_query = tep_db_query("select coalesce(NULLIF(categories_seo_title, ''), categories_name) as categories_name from categories_description where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");

      }

      else {

        $categories_query = tep_db_query("select categories_name from categories_description where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");

      }   

      if (tep_db_num_rows($categories_query) > 0) {

        $categories = tep_db_fetch_array($categories_query);

        $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));

      } else {

        break;

      }

    }

  } elseif (isset($_GET['manufacturers_id'])) {

    if ( defined('MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_BREADCRUMB_OVERRIDE') && (MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') ) {

      $manufacturers_query = tep_db_query("select coalesce(NULLIF(mi.manufacturers_seo_title, ''), m.manufacturers_name) as manufacturers_name from manufacturers m, manufacturers_info mi where m.manufacturers_id = mi.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'");

    }

    else {

      $manufacturers_query = tep_db_query("select manufacturers_name from manufacturers where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'");

    }

Share this post


Link to post
Share on other sites

Please read the install readme file. There are two small changes needed. Make those in your files and you're all set.

Share this post


Link to post
Share on other sites

Running Frozen - must I have Header Tags SEO installed to use this add on - Frozen already has header tags within products etc.?

Share this post


Link to post
Share on other sites

I coded it to run without Header Tags SEO though I didn't test it that way so I can't say for sure.  Also, I don't know how, or even if, the stock Header Tags code will work with Information Pages.

Share this post


Link to post
Share on other sites

@Jack_mcs

Thank you very much for this addon. I installed it on BS (frozen) version.
In admin infobox, i can see two page link:
=================================================
Messages (information_manager.php?gID=2)
Pages (information_manager.php?gID=1)
=================================================
Both I have problem of using Browser Title / Meta Description / Meta Keywords.

How can I enable to use those?

 

=================================================
Messages (information_manager.php?gID=2)
=================================================

And when I add Messages, on the front page, i can not see any link of the message, unless I on admin/message, i lick on VIEW and it will link me to the front end with URL: mysite.com/information.php?info_id=8
---> how can i make the message show up in the front end homepage infobox?

ID= 1       HEADING_TITLE                     
ID= 2      TEXT_GREETING_PERSONAL                     
ID= 3       TEXT_GREETING_PERSONAL_RELOGON                       
ID= 4       TEXT_GREETING_GUEST                      
ID= 5        TEXT_MAIN

and at your instruction read_additional.txt

__________________________________________________________________
ADD TEXT TO ANY PAGE:

Find where you want to add the text on the
page and add the following:

 <!-- // BOF: Information Pages SEO -->
 <?php echo GetInformationPageText(XX); ?>
 <!-- // EOF: Information Pages SEO -->

Change the XX to the ID of the message in the Messages section in admin.
__________________________________________________________________

does it means i have to modify all the modules/content/index file so that it can show up? without any modification (no instruction) it doesn't seems modify any index message.

=================================================
Pages (information_manager.php?gID=1)
=================================================
eg, insert two pages: Page A and Page B, if I set up both pages without Parent ID, it will show up both pages on front page without problem, if I setup Page B with Parent ID Page A, on the front Page, I only see Page A, and there is no where has Page B show up, how can I make it works?


 

 

Many thanks!

Lyn

Share this post


Link to post
Share on other sites
6 hours ago, ce7 said:

Both I have problem of using Browser Title / Meta Description / Meta Keywords.

How can I enable to use those?

You don't mention what the problem is so I can only guess. But the title and tags section only works if you have my Header Tags SEO addon installed. If you do have that installed, be sure you have the pseudo_handler.php uploaded. It is located in the Extras directory of this archive. But there is a mistake in that it shows it belonging in the shops includes/modules/ directory while it should be in the admin includes/modules/ directory.

7 hours ago, ce7 said:

does it means i have to modify all the modules/content/index file so that it can show up? without any modification (no instruction) it doesn't seems modify any index message.

Messages only display if you add the code to display them. See the instructions in the readme_additional.txt file.

7 hours ago, ce7 said:

eg, insert two pages: Page A and Page B, if I set up both pages without Parent ID, it will show up both pages on front page without problem, if I setup Page B with Parent ID Page A, on the front Page, I only see Page A, and there is no where has Page B show up, how can I make it works?

Links to child pages only show up in the "Information Pages Block" module. If that is not installed and you want to see the links, you would have to add them by editing the code.

Please let me know if you have any other questions.

Share this post


Link to post
Share on other sites

Yes, it will work. There are some problems with the released version that will still be there but they won't stop it from working. I'll release an update with those fixes but it might be a month or so.

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

×