{* $Id$ *} {title help='share' admpage='share'} {if $report != 'y'}{tr}Share this page{/tr}{else}{tr}Report this page{/tr}{/if} {/title} {if isset($sent) && empty($errors)}
{icon name='ok' alt="{tr}OK{/tr}" style="vertical-align:middle" align="left"} {if $report ne 'y'} {tr}Page shared{/tr}
{else} {tr}Your report was sent to the Webmaster{/tr} {/if} {if isset($emailSent) and $report ne 'y'}
{tr}The link was sent via email to the following addresses:{/tr} {$addresses|escape}
{/if} {if isset($tweetId)}
{icon name='twitter' size='2'} {tr}The link was sent via Twitter{/tr}
{/if} {if isset($facebookId) and $facebookId!=false}
{icon name='facebook' size='2'}{tr}The link was posted on your Facebook wall{/tr}
{/if} {if isset($messageSent)}
{tr}The link was sent as message to{/tr} {$messageSentTo|escape}
{/if} {if isset($threadId) and $threadId>0}
{tr}The link was published in a{/tr} {icon name='error' alt="{tr}Error{/tr}" style="vertical-align:middle" align="left"} {foreach from=$errors item=m name=errors} {$m} {if !$smarty.foreach.errors.last}
{/if} {/foreach}
{/if} {if !isset($sent) && empty($errors)}
{if $prefs.share_display_links eq 'y'}
{if $report != 'y' and $shorturl neq $prefix|cat:$url} {/if}
{/if}
{if $report !='y'}
{else} {/if}
{if $twitterRegistered}
{icon name='twitter' size='2'}
{tr}Tweet via Twitter{/tr} {if $twitter} {tr}Yes{/tr} {tr}No{/tr} {else} {remarksbox type="note" title="{tr}Note{/tr}"}

{tr}Authorize with Twitter first{/tr}

{/remarksbox} {/if} {if $twitter} {else}   {/if}
{/if} {if $facebookRegistered}
{icon name='facebook' size='2' alt="Facebook"}
{tr}Put on my Facebook wall{/tr} {if $facebook} {tr}Yes{/tr} {tr}No{/tr} {else} {remarksbox type="note" title="{tr}Note{/tr}"}

{tr}Authorize with Facebook first{/tr}

{/remarksbox} {/if} {if $facebook} {else}   {/if}
{/if} {if $prefs.feature_messages eq 'y' && $report != 'y'}
{if $send_msg=='y'} {else} {remarksbox type="note" title="{tr}Send a message{/tr}" close="n"} {tr}You do not have the permission to send messages or you did not allow other users to send you messages.{/tr} {/remarksbox} {/if}
{/if} {if $prefs.feature_forums eq 'y' && $report != 'y'}
{if count($forums)>0}
{else} {remarksbox type="note" title="{tr}Post on forum{/tr}" close="n"} {tr}There is no forum where you can post a message.{/tr} {/remarksbox} {/if}
{/if} {if $prefs.feature_antibot eq 'y' && $user eq ''} {include file='antibot.tpl'} {/if}
{else}

{tr}Return to previous page{/tr}

{/if} {jq} $('#share-form').submit(function(e){ if($('#addresses').val() !='' || ! $('#emailtable:visible').length) { $(this).tikiModal("Please wait...."); var postData = $(this).serializeArray(); var formURL = 'tiki-share.php?send=share'; $.ajax({ url : formURL, type: "POST", data : postData, success:function(data, textStatus, jqXHR) { var shrsuccess = $($.parseHTML(data)).find("#success").html(); var shrerror = $($.parseHTML(data)).find("#shareerror").html(); if(shrsuccess) { $('#ajaxmsg').html("
"+shrsuccess+"
"); } else { $('#ajaxmsg').html("
"+shrerror+"
"); } $('#share-form').tikiModal(""); $('#addresses').val(''); }, error: function(jqXHR, textStatus, errorThrown) { $('#share-form').tikiModal(""); } }); } else { alert("You must provide at least one recipient email address"); } e.preventDefault(); return false; }); $(".share-email-hide").click(function(){ $(".share-email-details").addClass('hidden'); }); $(".share-email-show").click(function(){ $(".share-email-details").removeClass('hidden'); }); $(".share-message-hide").click(function(){ $(".share-message-details").addClass('hidden'); }); $(".share-message-show").click(function(){ $(".share-message-details").removeClass('hidden'); }); $(".share-forum-hide").click(function(){ $(".share-forum-details").addClass('hidden'); }); $(".share-forum-show").click(function(){ $(".share-forum-details").removeClass('hidden'); }); {/jq}