Jump to content

Re: send page to friends help please


lounger

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

[b]where[/b] is that, or anywhere else, is the code that actually produces this stuff below:

[code]<div style="padding-top:4px;padding-left:10px;"><input type="text" size="70" name="url" value="http://www..com/gallery/I/2005/01/01/510.jpg" /></div>[/code]

Unless you can identify that, there's no hope of ever getting the image name [b]variable[/b] and being able to add it to your email script.  It's not a matter of everybody going silent (even though some people do have other things to do), it's all about not even getting close to the informaiton that's needed.
Link to comment
Share on other sites

[quote author=lounger link=topic=106569.msg426788#msg426788 date=1157232459]
i thought the image.php had the code that i needed to add to my email page script??
[/quote]

Look at the code you posted for image.php and tell me what is the variable name for the image that will be displayed.  As far as I can tell, it isn't there any more than there's anything on that page that would echo the html that's wrapped around it.
Link to comment
Share on other sites

hi andy the code for the variable is located in the gallery.php and here it is what do i need to do next with it??

*##############################
START IMAGE CLASS
##############################*/
$IMAGE2 = '<table style="margin-left:auto;margin-right:auto;"><tr><td>'."\n";

if ($b['rating'] >= '9.00') {

$IMAGE2 .= '<div class="pics2">'."\n";
$IMAGE2 .= '<div class="pics1">'.$LANG['116'].'</div>'."\n";
$IMAGE2 .= '</div>'."\n";

} elseif (checkdiff($b['time'],time(),"") == '17') {

$IMAGE2 .= '<div class="pics2">'."\n";
$IMAGE2 .= '<div class="pics1">'.$LANG['117'].'</div>'."\n";
$IMAGE2 .= '</div>'."\n";

}
$IMAGE2 .= "<div class=\"wrap1\">\n<div class=\"wrap2\">\n<div class=\"wrap3\">\n ".$IMAGELINK."\n";

$extra = $VAR[0]."/".$img2;

if (file_exists("".$VAR[5]."/".$img.""))
{
$IMAGE2 .= setIMAGE("".$VAR[0]."/$img",1,$extra,$b['width'],$b['height'],$b['id'],$newsize,$minussize);
}
else
{
if (file_exists("".$VAR[5]."/".$img2."")) {

$IMAGE2 .= setIMAGE("".$VAR[0]."/$img2",1,$extra,$b['width'],$b['height'],$b['id'],$newsize,$minussize);

} else {

$IMAGE2 .= '<img src="'.$VAR[0].'/images/noimage.jpg" alt="" width="120" height="90" />';

}
}

$IMAGE2 .= "</a>\n</div>\n</div>\n</div>\n</td>\n</tr>\n</table>\n";
/*##############################
END IMAGE CLASS
##############################*/

Link to comment
Share on other sites

this might be useful too-

if ($NUM7 == '2') // TEXT MODE
{

$IMAGE .= '<td style="text-align:left;vertical-align;middle;" onmouseover="this.className=\'border14\';" onmouseout="this.className=\'\';"> '."\n";
$IMAGE .= '<table style="width:100%;"><tr><td style="width:60%;font-size:8pt;" class="color">'."\n";

if (is_int($i / 2))
{
if ($i != $TOTALG) { $newtr = 'class="border13"'; } else { $newtr = ''; }
}
else
{
$newtr = '';
}

if ($b['text'] == '') $b['text'] = "Untitled";
if ($b['gcatagory'] == '') $b['gcatagory'] = "All";

$IMAGE .= ''.$i.'. '.$IMAGELINK .''.$b['text'].'</a> '.$LANG['181'].' '.ulink($b['user']).' '."\n";
$IMAGE .= '</td><td style="width:20%;font-size:8pt;" class="color"> '.ucfirst($b['gcatagory']).' </td>'."\n";
$IMAGE .= '<td style="width:20%;font-size:8pt;" class="color"> '.date("M d, Y",$b['time']).' </td>'."\n";
$IMAGE .= '</tr></table>'."\n";
$IMAGE .= '</td></tr><tr '.$newtr.'>'."\n";

}
elseif ($NUM7 == '3') // INFOPIC MODE
{


$IMAGE .= '<td style="text-align:left;vertical-align;middle;">'."\n";
$IMAGE .= '<table style="width:100%;"><tr><td style="width:30%;text-align:center;">'."\n";

if (is_int($i / 2))
{
if ($i != $TOTALG) { $newtr = 'class="border13"'; } else { $newtr = ''; }
}
else
{
$newtr = '';
}

$IMAGE .= $IMAGE2;

if ($b['text'] == '') $b['text'] = "Untitled";
if ($b['gcatagory'] == '') $b['gcatagory'] = "All";


$IMAGE .= '</td><td style="width:70%;vertical-align:top;font-size:8pt;" class="color"> asd'."\n";

$newwidth = "";
$newheight = "";



$IMAGE .= '<b>'.$LANG['172'].'</b>: '.ulink($b['user']).' <br />'."\n";


$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG[183].'</b>: '.$b['text'].' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['173'].'</b>: '.$b['view'].' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['175'].'</b>: '.$b['comment'].' </div>'."\n";



if (file_exists("".$VAR[5]."/".$img2."")) {

list($newwidth, $newheight) = @getimagesize("".$VAR[5]."/".$img2."");

$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['182'].'</b>: '.$newwidth.'x'.$newheight.' </div>'."\n";
$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['184'].'</b>: '.newsize(filesize("".$VAR[5]."/".$img2."")).' </div>'."\n";

}


$IMAGE .= '<div style="padding-top:4px;"><b>'.$LANG['185'].'</b>: <div style="padding:4px;"><input type="text" size="70" name="url" value="'.$ilocation.'" /></div></div>'."\n";



$IMAGE .= '</td></tr></table>'."\n";
$IMAGE .= '</td></tr><tr '.$newtr.'>'."\n";


}
else // MAIN GALLERY MODE
{


$IMAGE .= '<td style="text-align:center;vertical-align;middle;"> '."\n";
$IMAGE .= '<table style="margin-left:auto;margin-right:auto;"><tr><td style="font-size:8pt;" class="color">'."\n";

$IMAGE .= $IMAGE2;

if (member_types2($VAR[4]) == '0') {

$IMAGE .= '<div>[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('delete_image').'&amp;id='.base64_encode($b['id']).'">Delete</a> ] ';

if ($b['feature'] == '1') {

$IMAGE .= '[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('remove_feature_image').'&amp;id='.base64_encode($b['id']).'&amp;return='.base64_encode($VAR[3]).'">Remove Feature</a> ]';

} else {

$IMAGE .= '[ <a href="'.$VAR[0].'/admin/?action='.base64_encode('feature_image').'&amp;id='.base64_encode($b['id']).'&amp;return='.base64_encode($VAR[3]).'">Feature</a> ]';

}

$IMAGE .= '</div>';


}


$IMAGE .= "</td>\n</tr>\n</table></td>\n".$tr."\n";



} // END IMAGE MODE
Link to comment
Share on other sites

Cripes. Do I have to read all that!!

If I did, I'd see that the very same chunk of html you're looking for is buried near the bottom:

[code]    $IMAGE .= '<div style="padding-top:4px;">'.$LANG['185'].': <div style="padding:4px;"><input type="text" size="70" name="url" value="'.$ilocation.'" /></div></div>'."\n";[/code]

So it looks as if the full URL for the image is $ilocation.  And if that's right, then the message you want to send to your friend is something like:

[code]echo "See my fabulous picture at ". $ilocation;[/code]
Link to comment
Share on other sites

hi andy now i need to add this in to my send page to friend script below where will it need to go exactly?

[quote author=lounger link=topic=106569.msg426625#msg426625 date=1157218279]
sorry redarrow heres the mail code
thanks in advance -


<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>(.com)</title>

<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#330000" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<a href="http://www..com" target="_blank" ><BR><center><img src="http://.com/images/emailpagefriend.jpg" width="800" height="104" border="0" /></a>
<BR>
<BR>
<b>
<?
$status = "OK";
$msg="";
if (!stristr($y_email,"@") OR !stristr($y_email,".")) { // checking your email
$msg .="Your email address is not correct<BR>";
$status= "NOTOK";}

if (strlen($y_name) <2 ) { // checking your name
$msg .="Please enter your name<BR>";
$status= "NOTOK";}

if (!stristr($f_email,"@") OR !stristr($f_email,".")) { // checking friends email
$msg .="Your Friends address is not correct<BR>";
$status= "NOTOK";}

if (strlen($f_name) <2 ) { // checking freinds name
$msg .="Please enter your friend's name<BR>";
$status= "NOTOK";}

if (strlen($y_msg) <2 ) { // checking Message details
$msg .="Please enter your message details<BR>";
$status= "NOTOK";}


[/quote]
Link to comment
Share on other sites

pastebin appears to have gone to the waste bin. I can't connect to it.  basically what you want to do is change wherever it says something like "please visit the page ". $url to "please look at my picture at ". $ilocation ... give it a try.
Link to comment
Share on other sites

hi andy i changed it to-

$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at $ilocation";
/// Body message prepared with the message entered by the user ////
$body_message =$header_message."\n".$y_msg."\n";

but now there is not a link at all being sent in this email?[
Link to comment
Share on other sites

for the record this used to read-

$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";
/// Body message prepared with the message entered by the user ////
$body_message =$header_message."\n".$y_msg."\n";
$body_message .="\n Get your FREE 25MB email address by visiting http://www..com";
Link to comment
Share on other sites

My reply - post #31 in this thread - was because based on the code you posted, the only thing I saw that looked like it would generate the html code to show the image was if the variable $ilocation was the image URL.

[quote]$ref=@$HTTP_REFERER to $ilocation=@$HTTP_REFERER [/quote]

[u]Don't do that[/u]. All it does to change the value of $ilocation to the referring page URL - exactly what we're trying to overcome.

Try with a really, really simple email ... or just echo the email content without sending it. Either of those will speed the process.

I still think this ought to work, so change:

[code]$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";[/code]

to:

[code]$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";
echo "image location = ". $ilocation;
exit();
[/code]
Link to comment
Share on other sites

OK, unchange it back to the way it was. I can't work with these random snippets of code strewn through this thread (it isn't helping you and it's giving me a headache).

Post the complete current code for the script that's supposed to 'send this to your friend' and separately post the script that displays the image where you want to have the 'email this whatever to a friend'. Post them both at pastebin then post the pastebin refs here.
Link to comment
Share on other sites

i just made this for you to understand the concept of sending a profile please copy and past and use it to futher your study.

good luck.

test_result.php

[code]

<?php session_start();

if($_POST['submit']){


$to=$email;

$subject = 'A profile sent to you from a friend';

$message="<html>
<title>members profile</title>
<body>
<h1> members profile for $name</h1>
<br>
<br>
<b>username</b>
<br>
$name
<br>
<b>age</b>
<br>
$age
<br>
<b>members location</b>
<br>
$location
<br>
<b>members description</b>
<br>
$description
<br>
</html>
</body>
";



$headers = "From: Do not email back\r\n" .
      'X-Mailer: PHP/' . phpversion() . "\r\n" .
      "MIME-Version: 1.0\r\n" .
      "Content-Type: text/html; charset=utf-8\r\n" .
      "Content-Transfer-Encoding: 8bit\r\n\r\n";mail($to, $subject, $message, $headers);

echo "profile sent to $email";
}
?>

sending a profile to your friend <?php echo $name ?>

<form method="POST" action="">
<br>
please enter friends email address
<br>
<input type="text" name="email">
<br>
<input type="submit" name="submit" value="send this profile">
<br>
</form>

[/code]


test.php

[code]

<?php session_start();

$name="redarrow";
$age="32";
$location="london";
$description="redarrow loves php";

$name=$_SESSION['name']=$name;
$age=$_SESSION['age']=$age;
$location=$_SESSION['location']=$location;
$description=$_SESSION['description']=$description;

?>

<html>
<title>members profile</title>
<body>
<h1> members profile for <?php echo $name?></h1>
<br>
<br>
<b>username</b>
<br>
<?php echo $name?>
<br>
<b>age</b>
<br>
<?php echo $age ?>
<br>
<b>members location</b>
<br>
<?php echo $location?>
<br>
<b>members description</b>
<br>
<?php echo $description?>
<br>
<br>
<br>
<a href="test_result.php">email profile to friend</a>
</html>
</body>

[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.