Results 1 to 10 of 298

Hybrid View

  1. #1
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Hello lat9,
    Thanks for the correction, I tested and indeed that works just as well( aside: I tried to find out what the dot notation means here, but without success. I understand that if the variable is an integer then quotes are not required (field = int_value), but how is the languages_id part different, if it is also cast into an int? I tested, and there the single quotes do not seem to be required either. So the total query is then:
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = ' . (int)$ezpage_id . "
            AND et.languages_id = ' . (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";
    Is that consistent and correct?

  2. #2
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Addition: removal of single quotes can then be done similarly in line 7 of the pages_order_query around (int)$_SESSION['languages_id'] .

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,942
    Plugin Contributions
    96

    Default Re: Multi-Language Support for EZ-Pages

    Quote Originally Posted by gernot View Post
    Hello lat9,
    Thanks for the correction, I tested and indeed that works just as well( aside: I tried to find out what the dot notation means here, but without success. I understand that if the variable is an integer then quotes are not required (field = int_value), but how is the languages_id part different, if it is also cast into an int? I tested, and there the single quotes do not seem to be required either. So the total query is then:
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = ' . (int)$ezpage_id . "
            AND et.languages_id = ' . (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";
    Is that consistent and correct?
    Actually, you've got single-quotes (highlighted above) that should be a double-quote (or a debug-log will be generated):
    Code:
    $sql = "SELECT e.*, et.*
            FROM  " . TABLE_EZPAGES . " e, " . TABLE_EZPAGES_TEXT . " et
            WHERE e.pages_id = " . (int)$ezpage_id . "
            AND et.languages_id = ". (int)$_SESSION['languages_id'] . "
            AND e.pages_id = et.pages_id";

  4. #4
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    334
    Plugin Contributions
    0

    Default Re: Multi-Language Support for EZ-Pages

    Hello lat9,
    Sorry, it looks like that was a mistake in my quote (editing while posting not good idea!), I checked and I see in the current code I have double quotes as you state in your post. Whew, thanks for correcting that.

 

 

Similar Threads

  1. v150 EZ-Pages Meta tag fields + Multi-Language Support for EZ-Pages
    By ShopVille in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Nov 2012, 09:25 PM
  2. "Multi-Language Support for EZ-Pages" prints "Array" in Sidebox
    By andreas.hennig in forum All Other Contributions/Addons
    Replies: 9
    Last Post: 13 Jul 2010, 08:23 AM
  3. multi language ez-pages doesnt work for me
    By bluesky2008 in forum Addon Language Packs
    Replies: 2
    Last Post: 31 Jul 2008, 04:23 PM
  4. multi language button image in header, links to multi language pages
    By bluesky2008 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Jul 2008, 04:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg