MOD Social Networking for Facebook, Twitter, Google+ 2015-04-09

Use auction listing for Facebook share, and have Share your website with different content.

  1. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
    crashi2k submitted a new resource:

    MOD Social Networking for Facebook, Twitter, Google+ - MOD Social Networking for Facebook, Twitter, Google+

    Read more about this resource...
     
    Last edited by a moderator: Apr 9, 2015
  2. david62311

    david62311 Well-Known Member

    Joined:
    Aug 29, 2013
    Messages:
    2,161
    Likes Received:
    247
    Sharethis and addthis are two different but, similar companies. It looks like it's just the addthis widget you are sharing.

    I have addthis on my site. I put part of the code in the global_header.tpl & part in the global_footer.tpl. It was simple to add with the script that was generated for me. The widget allows users to share any page or item being sold with practically any of the many social sites. You share the page on e.g. Facebook and it will share the exact item being sold. It's a good widget. I just wonder how much info it's actually collecting on visitors.

    The directions you gave sounds like a lot of work when it could easily be added to the global_header.tpl and be on every user page.
     
    Golden and Alo like this.
  3. bgrantland

    bgrantland Donor Donor

    Joined:
    Sep 6, 2012
    Messages:
    114
    Likes Received:
    12
    I installed it on my 1.1.1 WeBid upgraded site, and it looks great so far. We'll be testing it out in coming weeks.

    The instructions were very easy to follow and it really didn't take more than a few minutes.

    Having an easy way for users to share items on the various social networks is essential to moving a WeBid site from an obscure niche to a wide international audience.

    Thanks for creating this!!
     
    crashi2k likes this.
  4. Peter Rattu

    Peter Rattu New Member

    Joined:
    Jan 28, 2014
    Messages:
    4
    Likes Received:
    0
    Thank you so much for creating this, works absolutely fine on my site, Thanks again
     
  5. bgrantland

    bgrantland Donor Donor

    Joined:
    Sep 6, 2012
    Messages:
    114
    Likes Received:
    12
    I followed your instructions, and it looked like it was working right when it was on an empty test installation, but I'm getting a lot of error codes saying:
    Unknown error type: [2] Cannot modify header information - headers already sent by (output started at [my URL]/includes/socialnetwork.php:58) on [my URL]/includes/functions_global.php line 319

    (I replaced the URL in the paste above). I included this mod in the updated installation of 1.1.1 and now I'm having trouble with the database I imported from my current working installation. It is probably unrelated to adding this app, but I am just not sure. I'll post a separate thread about that.
     
  6. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
    Yeah, it is a session/cookie problem and if you like to want to add google analytics just open "themes/yourtheme/global_header.tpl" and above </head> add your google code. hope this will fix it :)
     
    Last edited: Jan 30, 2014
  7. bgrantland

    bgrantland Donor Donor

    Joined:
    Sep 6, 2012
    Messages:
    114
    Likes Received:
    12
    Has anyone else tried this on WeBid 1.1.1?

    I just checked and my version of includes/functions_global.php is the one that came with WeBid 1.1.1, last modified April 1, 2013. My version of themes/default/global_header.tpl is the one that came with WeBid 1.1.1 with the only modifications being substituting GreyBlack.css instead of style.css, and the modification to add the SocialNetwork Meta Mod suggested above.

    Maybe this mod has some incompatibility with WeBid 1.1.1. I did notice in the instructions above for modifying header.php it says to find ?>; and replace it with that last block of code. I did not find any instance of ?>; in the entire document, and I just searched header.php from the unmodded 1.1.1 back up, and it isn't there either. I assumed this was a typo and added this at the end of the document, at the closing ?> tag.

    Until someone else tries this on 1.1.1 and says that it works I am reluctant to add it.
     
  8. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
  9. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
    Hey bgrantland, on a fresh install of webid 1.1.1 the file: "header.php" has the code
    PHP:
    "?>"
    tag on line 68 else the script will run and run and cause issues. double check what you mean plz. thx m8
     
    Last edited: Feb 1, 2014
  10. bgrantland

    bgrantland Donor Donor

    Joined:
    Sep 6, 2012
    Messages:
    114
    Likes Received:
    12
    Crash -- your instructions above say to look for and replace ?>; not ?> (I left the quotation marks off here to avoid confusion.)

    Following David's tip I went to the AddThis.com website and added their widget. It works, and it was easy to add to the global_header following their instructions.

    I don't understand how your solution above would do the same as adding the widget from the AddThis website, because at AddThis they have you put your Facebook, Twitter, Google+ etc. IDs into their form before they generate the code that you insert in your global_header.
     
  11. mobilestimulus

    mobilestimulus Member

    Joined:
    Jan 30, 2014
    Messages:
    85
    Likes Received:
    8
    Installed and working on v 1.1.1, But I had to make 3 small changes......

    This MOD works as described in v 1.1.1. However, I had to deviate from the written install instructions just a bit to get it to work fully.
    Inside the zip was a Install.txt. Around line 70 of that file it states:
    The fix for this is as follows:
    Instead of:
    I used:
    ##Find:
    PHP:
    // for images/ccs/javascript etc on secure pages
    $incurl = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') ? $system->SETTINGS['siteurl'] : $sslurl;
    ##Add after add:
    PHP:
    include $include_path 'socialnetwork.php'//Social-Network MOD
    This was to load the other included variables into the script before I tried using them.
    I also made a 200x200 version of my logo and changed: socialnetwork.php
    at around line 41 to include the URL to this 200x200 image. The change is in the code below:
    PHP:
    //Social-Network Image
    $fb_img_path $uploaded_path $id '/' $auction_data['pict_url'];
    $fb_img_logo  'themes/' $system->SETTINGS['theme'] . '/' $system->SETTINGS['logo'];
    if (isset(
    $auction_data['pict_url'])) {
    $social_img $system->SETTINGS['siteurl']."timthumb.php?src=".$fb_img_path."&h=200&w=200"//Resize image to fit for Facebook
    }else     {
    $social_img $system->SETTINGS['siteurl']."themes/YOUR_TEMPLATE/img/logo_socialmeta.jpg";
    }
    No more logo issue.
    Also, as explained in some of the other posts above, the code:
    does not exist in header.php.
    I believe there is a typo in the instructions both here and in Install.txt from the zip file. Seems like an extra comma slipped in there. Should be:
    Thanks for the easy MOD!
     
    Last edited: Feb 7, 2014
    crashi2k likes this.
  12. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
    Updated the installation instructions
    PHP:
    ?>
    was a typo should be
    PHP:
    ?> 
    -fixed it
    and added screenshots so you see what the difference is with MOD versus just using addthis.com script code to the "global_header.tpl". As well this MOD updates your META tags, so search engines bots when they crawl your website find auction items.

    Example Search string: chevy colorado germany auction

    Google returns with first on the list:
    Code:
    KMC Germany - Auction and Yard Sale in Germany Chevy Colorado ...
    www.kmcgermany.com/item.php?id=2‎
    Selling my US spec Chevy Colorado within the KL area cheap. Detail: LS Pickup 2D 6 ft Engine(s): 4-Cyl, 2.8 Liter Drivetrain(s): Two-Wheel Drive Bed Length(s): ...
     
    Last edited: Feb 3, 2014
  13. crashi2k

    crashi2k New Member

    Joined:
    Oct 10, 2013
    Messages:
    27
    Likes Received:
    9
    lol seems like we posted at the same time I will check out your fix and if it works update the installation instruction and file :)
     
  14. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    449
    Likes Received:
    8
    mine works well
    picks correct link
    correct title
    WRONG IMAGE (facebook) why, am i the only one.
     
    Last edited: Feb 7, 2014
  15. mobilestimulus

    mobilestimulus Member

    Joined:
    Jan 30, 2014
    Messages:
    85
    Likes Received:
    8
    On what page of your site does facebook display the wrong image?
     
    Last edited: Feb 7, 2014
  16. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    449
    Likes Received:
    8
    when i click facebook share on item.php page
     
  17. mobilestimulus

    mobilestimulus Member

    Joined:
    Jan 30, 2014
    Messages:
    85
    Likes Received:
    8
    Can you post a link to the page so I can have a look at the source code?
     
  18. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    449
    Likes Received:
    8
  19. mobilestimulus

    mobilestimulus Member

    Joined:
    Jan 30, 2014
    Messages:
    85
    Likes Received:
    8
  20. skyhigh

    skyhigh Member

    Joined:
    Sep 28, 2010
    Messages:
    449
    Likes Received:
    8
    its in item.php i removed it from header, didnt want it showing every just item.php.
    ps this isnt the first time i have tried other facebook sharing script they still do the same, sometimes it works sometime its just screws up.
     

Share This Page