Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Add To Facebook & MySpace
Topic Started: Mar 5 2009, 07:43 PM (1,261 Views)
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
Code Name: ADD TO FACEBOOK
Author: Codes Rock (a.k.a. HostMyImageSite)
Description: Got a topic or post you want to send to your friends on Facebook, or maybe post on your profile? This is the way to do it!
Preview: see below
Where it goes: Themes > Board Template > section: Below The Board

Installing this script will place a button that links you directly to your Facebook account!

Posted Image

Clicking the link, while viewing a topic, will send the topic to Facebook where you can either message it to your friends or post it on your profile!

Code:
 

<script type="text/javascript">
//Copyright HostMyImageSite
var url = document.location.href;
$("td.c_view").before('<td><a href="http://www.facebook.com/sharer.php?u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/f67th4m5n719sef0fsm.gif" alt="Add To Facebook" border="0" /></a></td>');
</script>


Example of it in use: http://s1.zetaboards.com/hostmyimagesite/topic/1310778/
Edited by Codes Rock, Mar 6 2009, 11:00 AM.
Offline Profile Quote Post Goto Top
 
SonicHyuga
Member Avatar
Member
[ * ]
this is awesome! It's a perfect way to advertise. B-)

Though, the button could use some better quality. :)

EDIT: Like this: Posted Image
Edited by SonicHyuga, Mar 5 2009, 11:02 PM.
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
That is a great image you have there! Glad you like the code!

EDIT: I modified the first post in this topic. I edited the preview and code to utilize SonicHyuga's image.

Edited by Codes Rock, Mar 6 2009, 11:02 AM.
Offline Profile Quote Post Goto Top
 
insanenhead
Member Avatar
Member
[ * ]
great code i've added it, anyway to modify it to make it for myspace to?
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
insanenhead
Mar 6 2009, 04:26 PM
great code i've added it, anyway to modify it to make it for myspace to?


Add To Myspace
Posted Image

Use the code below, instead of the code for Facebook above, and it will add a Add To MySpace: Posted Image button that will post a link to your page to your MySpace Profile.

Code:
 

<script type="text/javascript">
//Copyright HostMyImageSite.com
var url = document.location.href;
$("td.c_view").before('<td><a href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/vzyj2exmt2k9rxdvyzyx.gif" alt="Add To MySpace" border="0" /></a></td>');
</script>





To have both buttons: Posted Image and Posted Image, use the code below:
Code:
 

<script type="text/javascript">
//Copyright HostMyImageSite.com
var url = document.location.href;
$("td.c_view").before('<td><a href="http://www.facebook.com/sharer.php?u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/f67th4m5n719sef0fsm.gif" alt="Add To Facebook" border="0" /></a><br /><br /><a href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/vzyj2exmt2k9rxdvyzyx.gif" alt="Add To MySpace" border="0" /></a></td>');
</script>


Example of it in use: http://s1.zetaboards.com/hostmyimagesite/topic/1310778/

Edited by Codes Rock, Mar 6 2009, 08:10 PM.
Offline Profile Quote Post Goto Top
 
GanstarMan143 (PM)
Member Avatar
The Ganstar Of The House!
[ *  * ]
These Codes Are Awesome!
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
Thanks, GanstarMan143!
Offline Profile Quote Post Goto Top
 
Johnny75
Member
[ *  * ]
funny don't seem to work for me
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
Johnny75
Jun 29 2009, 06:16 PM
funny don't seem to work for me
Give a link to your board and let's see if we can figure it out.
Offline Profile Quote Post Goto Top
 
-Neo Metallix-
Member Avatar
CLICK MY SIG!
[ *  *  *  * ]
Nice, I added it to my forum. Kind of a hassle changing the button color to match each of my skins though, but oh well.
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
That's cool, glad it worked out for you.
Offline Profile Quote Post Goto Top
 
Stec
Member
[ *  * ]
Awesome would love to see a share on Twitter & Tumblr option if possible!
Offline Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
For Twitter, try changing the code above, that shows both Facebook and MySpace, to this:

Code: HTML
 

<script type="text/javascript">
//Copyright HostMyImageSite.com
var url = document.location.href;
$("td.c_view").before('<td><a href="http://www.facebook.com/sharer.php?u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/f67th4m5n719sef0fsm.gif" alt="Add To Facebook" border="0" /></a><br /><br /><a href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=' + url + '" target="_blank"><img src="http://hostmyimagesite.com/images/vzyj2exmt2k9rxdvyzyx.gif" alt="Add To MySpace" border="0" /></a> <br /><a href="http://twitter.com/home?status=Currently reading ' + url +'" title="Click to share this post on Twitter">Share on Twitter</a> </td>');
</script>


The new part, for just Twitter is:
Code: HTML
 

<a href="http://twitter.com/home?status=Currently reading ' + url +'" title="Click to share this post on Twitter">Share on Twitter</a>


NOTE: I have not tested this as I do NOT have a Twitter account.

I'll look at the tumblr thing next.
Offline Profile Quote Post Goto Top
 
peteh
Member Avatar
Member
[ *  *  *  *  * ]
When using the Facebook code it appears correctly in Firefox but in Internet Explorer the image is replaced with a note saying image no longer hosted
Online Profile Quote Post Goto Top
 
Codes Rock
Member Avatar
<?php echo 'Codes Rock rocks!'; ?>
[ *  *  * ]
Yes, the image is no longer being hosted. The image host stopped hosting images.

You'll have to change the image address in the code to something else.

Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code & Modification Database · Next Topic »
Add Reply