Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg

    Facebook extracts complete story instead of title

    Hi

    While copying the link of any story on facebook, it extracts the complete story in Link rather than just the story title.

    Can you please let me know what needs to be change.

  2. #2
    Senior Member JoeWa's Avatar
    Joined
    Mar 2012
    Location
    Prague, Czech Republic
    Posts
    172
    Thanks
    Received:13
    Given: 35
    Facebook will display what it scrapes (you can check exactly what it sees by pasting your link into the query box here: developers.facebook.com/tools/debug). If you'd like to specify exactly what Facebook will scrape you need to add Open Graph meta tags (ogp.me) to your templates/meta.tpl file.
    Last edited by JoeWa; 06-12-2012 at 03:51 PM.

  3. #3
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg

  4. #4
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg
    http://developers.facebook.com/tools...the-viewspaper

    Hi I ran the debugger and found these warning but have no idea at all, how to fix these.

  5. #5
    Senior Member/Coder/Designer cmstheme's Avatar
    Joined
    Jan 2007
    Location
    Philippines
    Posts
    732
    Thanks
    Received:15
    Given: 1
    Site
    http://www.oxythemes.com
    Try this on your Meta Tags:
    PHP Code:
    {if $pagename eq "story"}
    <
    meta property="og:title" content="{$posttitle}" />
    <
    meta property="og:description" content="{$meta_description}" />
    <
    meta property="og:url" content="{$my_base_url}{$navbar_where.link2}" />
    {/if} 

  6. #6
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg
    Hi
    Thanks for the help.. Please let me know exactly which file I should edit.

    I tried my hands with meta.tpl , tried to put this code along with the existing code and then this code only but no success. Besides that one more file name with meta "c_1_meta_tpl.php" I can see .

    Code of existing meta.tpl is :

    {* define your meta data here *}

    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    {if $meta_description neq ""}
    <meta name="description" content="{$meta_description}" />
    {elseif $pagename eq "search"}
    <meta name="description" content="{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes} " />
    {else}
    <meta name="description" content="{#PLIGG_Visual_What_Is_Pligg_Text#|htmlen tities}" />
    {/if}

    {if $meta_keywords neq ""}
    <meta name="keywords" content="{$meta_keywords}" />
    {elseif $pagename eq "search"}
    <meta name="keywords" content="{$templatelite.get.search|sanitize:2|stri pslashes}" />
    {else}
    <meta name="keywords" content="{#PLIGG_Visual_Meta_Keywords#}" />
    {/if}

    <meta name="Language" content="{#PLIGG_Visual_Meta_Language#}" />
    <meta name="Robots" content="All" />

    Code of existing c_1_meta_tpl.php is :

    <?php require_once('C:\softwares and setups\php+sql\xampp\htdocs\Competition\plugins\mo difier.sanitize.php'); $this->register_modifier("sanitize", "tpl_modifier_sanitize"); /* V2.20 Template Lite, 8 March 2008. (c) Mark Dickenson, Jon Langevin. GNU LGPL. 2012-06-07 18:26:30 India Daylight Time */ ?>



    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <?php if ($this->_vars['meta_description'] != ""): ?>
    <meta name="description" content="<?php echo $this->_vars['meta_description']; ?>
    " />
    <?php elseif ($this->_vars['pagename'] == "search"): ?>
    <meta name="description" content="<?php echo $this->_confs['PLIGG_Visual_Search_SearchResults']; ?>
    <?php echo $this->_run_modifier($this->_run_modifier($_GET['search'], 'sanitize', 'plugin', 1, 2), 'stripslashes', 'PHP', 1); ?>
    " />
    <?php else: ?>
    <meta name="description" content="<?php echo $this->_run_modifier($this->_confs['PLIGG_Visual_What_Is_Pligg_Text'], 'htmlentities', 'PHP', 1); ?>
    " />
    <?php endif; ?>

    <?php if ($this->_vars['meta_keywords'] != ""): ?>
    <meta name="keywords" content="<?php echo $this->_vars['meta_keywords']; ?>
    " />
    <?php elseif ($this->_vars['pagename'] == "search"): ?>
    <meta name="keywords" content="<?php echo $this->_run_modifier($this->_run_modifier($_GET['search'], 'sanitize', 'plugin', 1, 2), 'stripslashes', 'PHP', 1); ?>
    " />
    <?php else: ?>
    <meta name="keywords" content="<?php echo $this->_confs['PLIGG_Visual_Meta_Keywords']; ?>
    " />
    <?php endif; ?>

    <meta name="Language" content="<?php echo $this->_confs['PLIGG_Visual_Meta_Language']; ?>
    " />
    <meta name="Robots" content="All" />

  7. #7
    Senior Member/Coder/Designer cmstheme's Avatar
    Joined
    Jan 2007
    Location
    Philippines
    Posts
    732
    Thanks
    Received:15
    Given: 1
    Site
    http://www.oxythemes.com
    After you add that code in meta.tpl, go to Admin > Delete Template Cache.

    It would also help if you post your whole meta.tpl code (enclose it with [php] or [code] tags)

  8. #8
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg
    Please find the meta.tpl code after adding your suggested code and enclosed in php tags..

    Please let me know what is actually wrong with this.. Even i deleted the cache templates too.

    {php}

    {* define your meta data here *}

    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    {if $pagename eq "story"}
    <meta property="og:title" content="{$posttitle}" />
    <meta property="og:description" content="{$meta_description}" />
    <meta property="og:url" content="{$my_base_url}{$navbar_where.link2}" />
    {/if}

    {if $meta_description neq ""}
    <meta name="description" content="{$meta_description}" />
    {elseif $pagename eq "search"}
    <meta name="description" content="{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes} " />
    {else}
    <meta name="description" content="{#PLIGG_Visual_What_Is_Pligg_Text#|htmlen tities}" />
    {/if}

    {if $meta_keywords neq ""}
    <meta name="keywords" content="{$meta_keywords}" />
    {elseif $pagename eq "search"}
    <meta name="keywords" content="{$templatelite.get.search|sanitize:2|stri pslashes}" />
    {else}
    <meta name="keywords" content="{#PLIGG_Visual_Meta_Keywords#}" />
    {/if}

    <meta name="Language" content="{#PLIGG_Visual_Meta_Language#}" />
    <meta name="Robots" content="All" />


    {/php}

  9. #9
    Junior Member sunnydays's Avatar
    Joined
    Jun 2012
    Location
    Noida, India
    Posts
    12
    Thanks
    Received:0
    Given: 0
    Version
    1.2.0
    Site
    http://vlookup.in/events/pligg
    Hi after placing above code the site went down it was coming blank !!

  10. #10
    Senior Member/Coder/Designer cmstheme's Avatar
    Joined
    Jan 2007
    Location
    Philippines
    Posts
    732
    Thanks
    Received:15
    Given: 1
    Site
    http://www.oxythemes.com
    Nope, don't enclose your code in meta.tpl with {php} tags. What I mean is when you post some code here in the forum, enclose it with [php] or [code] tags so that it will be easy to read, just like the code below.

    Try to use this code in meta.tpl:
    Code:
    {* define your meta data here *}
     
        <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
     
    {if $meta_description neq ""}
        <meta name="description" content="{$meta_description}" />
    {elseif $pagename eq "search"}
        <meta name="description" content="{#PLIGG_Visual_Search_SearchResults#} {$templatelite.get.search|sanitize:2|stripslashes}" />
    {else}
        <meta name="description" content="{#PLIGG_Visual_What_Is_Pligg_Text#|htmlentities}" />
    {/if}
     
    {if $meta_keywords neq ""}
        <meta name="keywords" content="{$meta_keywords}" />
    {elseif $pagename eq "search"}
        <meta name="keywords" content="{$templatelite.get.search|sanitize:2|stripslashes}" />
    {else}
        <meta name="keywords" content="{#PLIGG_Visual_Meta_Keywords#}" />
    {/if}  
     
        <meta name="Language" content="{#PLIGG_Visual_Meta_Language#}" /> <meta name="Robots" content="All" />
    {if $pagename eq "story"}
    <meta property="og:title" content="{$posttitle}" /> <meta property="og:description" content="{$meta_description}" /> <meta property="og:url" content="{$my_base_url}{$navbar_where.link2}" />
    {/if}

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Web Hosting Services by Midphase Dreamhost Web Hosting Donate to Pligg