[ABD] Facebook Share

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
AngelFRANTIX
Registered User
Posts: 9
Joined: Mon May 04, 2009 1:17 am
Contact:

[ABD] Facebook Share

Post by AngelFRANTIX »

Facebook Share

Prosilver
Open

Code: Select all

styles/THEMES/templates/viewtopic_body.html
Search

Code: Select all

<div class="content">{postrow.MESSAGE}</div>
Replace

Code: Select all

<div class="content"><!-- IF postrow.S_FIRST_ROW --><div align="right"><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link"><img style="border:0" src="http://i47.tinypic.com/1jksg4.gif" alt="windows7sevn.org Facebook Share" border="0" /></a></div><!-- ENDIF -->{postrow.MESSAGE}</div>
Preview
http://windows7seven.org/forum/viewtopi ... 2426#p2426


Subsilver


Open

Code: Select all

styles/THEMES/templates/viewtopic_body.html
Search

Code: Select all

<div class="postbody">{postrow.MESSAGE}</div>
Replace

Code: Select all

<div class="postbody"><!-- IF postrow.S_FIRST_ROW --><div align="right"><script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank" class="fb_share_link"><img style="border:0" src="http://www.eglencesenin.com/images/facebook_paylas.gif" alt="Bu konuyu facebook'ta paylaşın!" border="0" /></a></div><!-- ENDIF -->{postrow.MESSAGE}</div>

Preview
http://windows7seven.org/forum/viewtopi ... 2426#p2426
Last edited by AngelFRANTIX on Wed Dec 30, 2009 8:24 am, edited 1 time in total.
User avatar
RMcGirr83
Former Team Member
Posts: 21823
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Facebook Share

Post by RMcGirr83 »

Code: Select all

target="_blank"
breaks the strict XHTML of prosilver...still kind of neat though.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
joebart72
Registered User
Posts: 743
Joined: Thu Feb 01, 2007 5:54 am

Re: Facebook Share

Post by joebart72 »

Simple but very good. The only problem is bbcode for some posts... It doesn't match with Facebook...
I learn English with phpbb.com :)
User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10967
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Facebook Share

Post by battye »

Could you please add a development state to your topic title (ie. [DEV] or [BETA], etc)
Thank you :)
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: Facebook Share

Post by stickerboy »

I use this for opening in a new window - XHTML 1.0 Strict compatible :)

Code: Select all

 onclick="window.open(this.href); return false;"
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: [DEV]Facebook Share

Post by ChriZathens »

I found an image which is in English if anyone is interested...
Image
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
AngelFRANTIX
Registered User
Posts: 9
Joined: Mon May 04, 2009 1:17 am
Contact:

Re: [DEV]Facebook Share

Post by AngelFRANTIX »

ChriZathens wrote:I found an image which is in English if anyone is interested...
Image
Thanks.
Pond Life
Registered User
Posts: 388
Joined: Sat Jan 20, 2007 1:55 am

Re: [DEV]Facebook Share

Post by Pond Life »

Thanks AngelFRANTIX, I was looking for a simple way of doing this without the need to edit multiple files. :D

I have amended the code a bit and added a twitter button as well. It's not perfect but it works and is really simple. My style is based on prosilver, the path would need to be changed if using the basic prosliver or other style based on it.

viewtopic_body.html
Find (around line 243)

Code: Select all

<div class="topic-actions">
	<div class="buttons">
	<!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
		<div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->reply-icon<!-- ENDIF -->"><a href="{U_POST_REPLY_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED_SHORT}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF --></a></div>
Add after

Code: Select all

		<!-- Facebook share mod -->
			<div class="buttons">
				<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script>
				<a href="" onclick="return fbs_click()" class="fb_share_link"><img style="border:0" src="styles/pondlife/imageset/en/button_fbook_share.gif" alt="Share on Facebook"/></a>
			</div>
		<!-- Facebook share mod end -->
		<!-- Twitter share -->
			<div class="buttons">
				<script type="text/javascript">function twt_click() {u=location.href;t=document.title;window.open('http://twitter.com/home?status='+encodeURIComponent(u)+'&t='+encodeURIComponent(t));return false;}</script>
				<a href="" onclick="return twt_click()" class="fb_share_link"><img style="border:0" src="styles/pondlife/imageset/en/button_twit_share.gif" alt="Tweet this topic"/></a>
			</div>
		<!-- Twitter share end -->
Here are the buttons
Image Image
Never argue with idiots, they will drag you down to their level and beat you with experience.
User avatar
KeithR
Former Team Member
Posts: 750
Joined: Mon Jun 16, 2008 6:59 pm
Location: Manchester, UK
Name: Keith R

Re: [DEV]Facebook Share

Post by KeithR »

This topic has been marked as [ABD] - Abandoned as the mod author has not been active since 11 Jul 2010. If the MOD author wishes to continue development, please PM anyone on the MOD Team to request this topic be unlocked.

Thank you,

On behalf of:

The phpBB Modifications Team

KeithR
Locked

Return to “[3.0.x] Abandoned MODs”