Results 1 to 10 of 76

Hybrid View

  1. #1
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by kamion View Post
    Would something like this work?

    PHP Code:
    if(isset($product_info_metatags->fields) && !empty($product_info_metatags->fields)) {
        
    extract($product_info_metatags->fields);
    }
    if(isset(
    $category_metatags->fields) && !empty($category_metatags->fields)) {
        
    extract($category_metatags->fields);

    Thank you for this.

    I just installed the opengraph stuff and noticed my cache folder was filling up (50k files).

    This code resolved the issue for me.

  2. #2
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by Limitless View Post
    Thank you for this.

    I just installed the opengraph stuff and noticed my cache folder was filling up (50k files).

    This code resolved the issue for me.
    You're welcome. :) Glad it helped you.

  3. #3
    Join Date
    Jun 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by kamion View Post
    You're welcome. :) Glad it helped you.
    Where exactly do you put this code? TIA

  4. #4
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by Joseph Heinen View Post
    Where exactly do you put this code? TIA
    It replaces the two extract() calls in:

    includes/templates/<your template>/common/html_header.php

  5. #5
    Join Date
    Jun 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by kamion View Post
    It replaces the two extract() calls in:

    includes/templates/<your template>/common/html_header.php
    Thanks!
    But I have one little problem. I know very little about coding, so could you post a before and after?

    I tried replacing
    extract($product_info_metatags->fields);
    extract($category_metatags->fields);
    with
    if(isset($product_info_metatags->fields) && !empty($product_info_metatags->fields)) {
    extract($product_info_metatags->fields);
    }
    if(isset(
    $category_metatags->fields) && !empty($category_metatags->fields)) {
    extract($category_metatags->fields);
    }
    but I am still getting these errors (BTW I turned off logging)

    [20-Nov-2013 20:16:40] PHP Warning: extract() [<a href='function.extract'>function.extract</a>]: First argument should be an array in /common/html_header.php on line 50
    [20-Nov-2013 20:16:40] PHP Warning: extract() [<a href='function.extract'>function.extract</a>]: First argument should be an array in /common/html_header.php on line 51
    [20-Nov-2013 20:16:40] PHP Warning: error_log(/var/log/www/zen/page_parse_time.log) [<a href='function.error-log'>function.error-log</a>]: failed to open stream: Permission denied in /public_html/catalog/includes/modules/footer.php on line 19

  6. #6
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Doesn't look like you modified your templates html_header.php file, but the default one.

  7. #7
    Join Date
    Jun 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by Limitless View Post
    Doesn't look like you modified your templates html_header.php file, but the default one.
    Nope the changes are in my template

  8. #8
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    image problem Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Not sure why these errors are now popping up.


    Code:
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in /common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): prop="image" src="images/large/gs/mecgpicmgcgov40n.jpg" alt="Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): 40n.jpg" alt="Mecgar 1911 .40 S&W 8 Standard Nickel" title=" Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63

  9. #9
    Join Date
    Mar 2011
    Posts
    93
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by Limitless View Post
    Not sure why these errors are now popping up.


    Code:
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in /common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): prop="image" src="images/large/gs/mecgpicmgcgov40n.jpg" alt="Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): Entity: line 1: parser error : EntityRef: expecting ';' in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): 40n.jpg" alt="Mecgar 1911 .40 S&W 8 Standard Nickel" title=" Mecgar 1911 .40 S&W in XXXXXXXXXXXX/common/html_header.php on line 63
    [20-Nov-2013 19:10:55] PHP Warning:  simplexml_load_string(): ^ in XXXXXXXXXXXX/common/html_header.php on line 63
    I can't remember what my error message was, but I added a line before the call to simplexml_load_string. You can try it:

    Code:
    $myImage = zen_get_products_image((int)$_GET['products_id']);
    $myImage = str_replace("&nbsp;", "", $myImage);
    $img = simplexml_load_string($myImage);

  10. #10
    Join Date
    Jan 2012
    Posts
    488
    Plugin Contributions
    0

    Default Re: "Google Plus One (+1), Facebook Send and Twitter Follow" addon Support

    Quote Originally Posted by Joseph Heinen View Post
    Thanks!
    But I have one little problem. I know very little about coding, so could you post a before and after?

    I tried replacing

    with


    but I am still getting these errors (BTW I turned off logging)


    I think with for your permission denied error, you might just need to touch /var/log/www/zen/page_parse_time.log to create it or manually create it and make sure apache (or whatever account that is running webserver) can modify that file.

 

 

Similar Threads

  1. Facebook, Twitter, Google buttons and W3C validation
    By crazysarah in forum General Questions
    Replies: 0
    Last Post: 6 Sep 2012, 10:49 AM
  2. v150 Facebook google plus twitter
    By oitem in forum General Questions
    Replies: 0
    Last Post: 4 Jun 2012, 06:56 PM
  3. Replies: 0
    Last Post: 22 Dec 2011, 12:59 AM
  4. Facebook Sidebox, identifying "profile" and "api"
    By styledata in forum Addon Sideboxes
    Replies: 4
    Last Post: 3 Nov 2011, 08:25 PM
  5. Replies: 1
    Last Post: 22 Aug 2010, 01:16 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