X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   BCSE Static Page Meta Tag Control - xcart 4.1.9 broke it! (https://forum.x-cart.com/showthread.php?t=35265)

carpeperdiem 11-07-2007 11:47 AM

BCSE Static Page Meta Tag Control - xcart 4.1.9 broke it!
 
To anyone with BCSE's OUTSTANDING Static Page Meta Tag Control mod (last I checked, this was a FREE mod! Thanks Carrie!) - if/when you install/upgrade to 4.1.9, you will have to remove it, as it will not work with 4.1.9 until some of the code is rewritten.

I have alerted BCSE about this, but I am hoping to let other users know that this mod was broken by 4.1.9 -- seems xcart decide to use $query_data = array( in 4.1.9, as opposed to the older way of db_query("INSERT INTO -- and this breaks things...

I am hoping a sql expert can sort this out soon -- but in the mean time, this may explain why your upgrade is failing. As usual, there is no discussion of this in the changelog.

To Carrie -- we understand that you were mugged on this -- and hopefully this won't be a big deal to fix. Please keep us posted.

I am a HUGE fan of the BCSE <title> tag mods -- since the title tag is one of the most important elements for SEO. Some would say THE most important. XCART routinely speaks of improving the SEO of xcart, but until each page has unique and relevant title tags, you need a mod. The difference between a generic page title with your site name and a well written custom page name can't be underestimated. I wonder why Xcart broke this...

carpeperdiem 11-18-2007 01:19 PM

Re: BCSE Static Page Meta Tag Control - xcart 4.1.9 broke it!
 
I have fixed most of this mod for 4.1.9

Here are the changes:

In admin/pages.php

FIND:
Code:

if (empty($pageid)) {
                $query_data = array(
                    'filename' => $filename,
                    'title' => $pagetitle,
                    'level' => $level,
                    'orderby' => intval($orderby),
                    'active' => $active,
                    'language' => $current_language,
                    "show_in_menu" => $show_in_menu
                );

REPLACE WITH:
Code:

if (empty($pageid)) {
                $query_data = array(
                    'filename' => $filename,
                    'title' => $pagetitle,
                    'level' => $level,
                    'orderby' => intval($orderby),
                    'active' => $active,
                    'language' => $current_language,
                    // BEGIN BCSE Static Pages Meta Tags Mod
                    // insert next 3 lines
                    'metatitle' => addslashes($metatitle),
                    'metakeywords' => addslashes($metakeywords),
                    'metadescr' => addslashes($metadescr),
                    // END BCSE Static Pages Meta Tags Mod
                    "show_in_menu" => $show_in_menu
                );


FIND:[/quote]
Code:

        $pages_dir = func_pages_dir($page_data["level"]);
        $filename = $pages_dir.$page_data["filename"];

JUST BEFORE, INSERT:
Code:

    // BEGIN BCSE Static Pages Meta Tags Mod
        $page_data["metatitle"]=stripslashes($page_data["metatitle"]);
        $page_data["metakeywords"]=stripslashes($page_data["metakeywords"]);
        $page_data["metadescr"]=stripslashes($page_data["metadescr"]);
    // END BCSE Static Pages Meta Tags Mod


Everything else in the mod is the same.

Jeremy

PS - Carrie: I hope you don't mind that I posted this... this code really doesn't help anyone who doesn't already have your free mod and I left out all edits to files that are not involved. I'll pull this in a heartbeat if you have any objections.

BCSE 12-05-2007 09:19 AM

Re: BCSE Static Page Meta Tag Control - xcart 4.1.9 broke it!
 
We have 4.1.9 specific instructions now available. If anyone has a need for this for 4.1.9, feel free to "buy" the product again for free, or email us your order # and we'll regenerate a new download link for you.

Carrie

nomonkeybiz 01-16-2008 01:38 PM

Re: BCSE Static Page Meta Tag Control - xcart 4.1.9 broke it!
 
The following has to be changed also:

Find:
Code:

else {
                $query_data = array(
                    'title' => $pagetitle,
                    'orderby' => intval($orderby),
                    'active' => $active,
                    'show_in_menu' => $show_in_menu
                );


Change:
Code:

            else {
                $query_data = array(
                    'title' => $pagetitle,
                    'orderby' => intval($orderby),
                    'active' => $active,
                    // BEGIN BCSE Static Pages Meta Tags Mod
                    // insert next 3 lines
                    'metatitle' => addslashes($metatitle),
                    'metakeywords' => addslashes($metakeywords),
                    'metadescr' => addslashes($metadescr),
                    // END BCSE Static Pages Meta Tags Mod
                    'show_in_menu' => $show_in_menu
                );



All times are GMT -8. The time now is 03:44 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.