Jump to content

Script help please.


Polymath

Recommended Posts

ok I want to get this:



<!-- Begin E-Mail-This-Page Script //-->

<form name="eMailer">

E-MAIL THIS LINK

<br>

Enter recipient's e-mail:

<br>

<input type="text" name="address" size="25">

<br>

<input type="button" value="Send this URL" onClick="mailThisUrl();">

</form>

<script language="JavaScript1.2">

// (C) 2000 CodeLifter.com - Software and Scripts by CodeBrain.com

// CodeLifter.com - Software and Scripts by CodeBrain.com

// Free for all users, but leave in this header

var good;

function checkEmailAddress(field) {

// the following expression must be all on one line...

var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);

if (goodEmail){

good = true

} else {

alert('Please enter a valid e-mail address.')

field.focus()

field.select()

good = false

}

}

u = window.location;

m = "I thought this might interest you...";

function mailThisUrl(){

good = false

checkEmailAddress(document.eMailer.address)

if (good){

// the following expression must be all on one line...

window.location = "<A href="mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title">mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u;

}

}

</script>

<!-- End E-Mail-This-Page Script //-->

into this php script:



// Play screen

function template_arcade_game_play()

{

global $scripturl, $txt, $context, $settings;

echo '

<div class="tborder">

<table class="bordercolor" border="0" cellpadding="4" cellspacing="1" width="100%">

<tr class="catbg">

<td>', $context['arcade']['game']['name'], '</td>

</tr>

<tr class="windowbg">

<td>

<div style="text-align: center;">

', $context['arcade']['game']['html'], '

', !$context['arcade']['can_submit'] ? '<br /><b>' . $txt['arcade_cannot_save'] . '</b>' : '', '



</div>

</td>

</tr>

</table>

</div>';

}

so that it shows under the games

That will keep the Google ad further from the game.

what is it?

This script automatically captures the title of the current page and the url of the current page and sends them via the user's e-mail client to an address entered in a box on the form. The e-mail address field is also checked to see that it is not empty, and that the e-mail address is in valid format.

Not what I want really but it will have to do.

I would rather have one that uses the site to send the email without the page refreshing, just a new blank page with ' your message has been sent.' But its a start.

Anybody get that into there for me?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...
Please Sign In or Sign Up