inserting an image

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   inserting an image
blackplague
CZ Newbie
blackplague has been a member for over 20 year's 20 Year Member
usa.gif wyoming.gif
Occupation: Linguistical Assembler
Age: 63
Gender: Male
Website:
Status: Offline
Joined: Sep 21, 2004
0.00 posts per day
Posts: 6
Points: 4,052
 Yahoo Messenger  
i cant understand how to get an image in the RandomImage Scroller<?php
/********************************************************/
/* Random Image Block */
/* Version 1.0.0 8-02-04 */
/* By: Telli (telli@codezwiz.com) */
/* [ Register or login to view links on this board. ] */
/* Copyright © 2001-2004 by Codezwiz */
/********************************************************/
if( eregi( "block-Random_Image.php",$PHP_SELF ) ) {
Header( "Location: index.php" );
die();
}
function Seed() {
list($usec, $sec) = explode(' ', microtime());
return (float) $sec + ((float) $usec * 100000);
}

//Add your image in this format <img src= you can also use links.
function ImageShow($whichimage) {
switch($whichimage)
{
case 1:
return "how can i put an image in here???";
break;
case 2:
return "<!---ADD IMAGE #2 HERE----->";
break;
case 3:
return "<!---ADD IMAGE #3 HERE----->"; I have tryed <img src="logo.gif"> And it returns as an error.please help.



Back to top Reply with quote
#2   
Staffie
CZ Revered Member
 Codezwiz Site Donator
uk.gif
Occupation: Investigation Officer
Age: 39
Gender: Male
Website:
Status: Offline
Joined: May 27, 2003
0.19 posts per day
Posts: 1454
Points: 401,085
   
what type of error are you getting?




_________________
Back to top Reply with quote
#3   re: inserting an image
blackplague
CZ Newbie
blackplague has been a member for over 20 year's 20 Year Member
usa.gif wyoming.gif
Occupation: Linguistical Assembler
Age: 63
Gender: Male
Website:
Status: Offline
Joined: Sep 21, 2004
0.00 posts per day
Posts: 6
Points: 4,052
 Yahoo Messenger  
Im getting this error
Parse error: parse error, unexpected T_STRING in /home/thebakm/public_html/blocks/block-Random_Image.php on line 23



Back to top Reply with quote
#4   re: inserting an image
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
Just put the path to the image in between the quotation marks. You don't need the src="" part.

case 1:
return "http://www.mywebsite.com/images/image.jpg";
break;
case 2:
return "http://www.mywebsite.com/images/image2.jpg";
break;
case 3:
return "http://www.mywebsite.com/images/image3.jpg";



Back to top Reply with quote
#5   re: inserting an image
blackplague
CZ Newbie
blackplague has been a member for over 20 year's 20 Year Member
usa.gif wyoming.gif
Occupation: Linguistical Assembler
Age: 63
Gender: Male
Website:
Status: Offline
Joined: Sep 21, 2004
0.00 posts per day
Posts: 6
Points: 4,052
 Yahoo Messenger  
all that does is prints "http://theblackplague.name/images.blackplague1.gif" does it only take .jpg's?im trying to have a scrolling gif links.



Back to top Reply with quote
#6   re: inserting an image
Kelly_Hero
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif southcarolina.gif
Occupation: Web Developer
Age: 59
Gender: Female
Website:
Status: Offline
Joined: Aug 20, 2003
0.49 posts per day
Posts: 3765
Points: 351,412
   
Sorry. I didn't read the code through. This should be correct:

case 1:
return "<img src=\"image.gif\">";
break;
case 2:
return "<img src=\"image2.jpg\">";
break;
case 3:
return "<a href=\"mypage.html\"><img src=\"image3.gif\"></a>";


The last one shows you how to make the image a link. The reason you were getting an error is probably because you didn't put the \ in front of your quotation marks.


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum