• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MySpace

austin316

Diamond Member
I have a bunch of quotes I would like to post on my-myspace account, but would like it to be random and only display one quote at a time. Using just HTML, is this possible? I have my own webspace with php, anyway to make this work and have it appear in my profile?
 
You can do it of you link to an image of text, but you have to host that image somewhere on another site, and you can't make that image with just HTML either.
 
If you can put javascript in yeah.

Apparently you can't. That makes no ****** sense. I mean...what the ******? You can have all these flash pieces of ****** in there and all the glittery faggoty text ****** but you can't have javascript? BULLSHIT! Stupid ******.
 
Originally posted by: OdiN
If you can put javascript in yeah.

Apparently you can't. That makes no ****** sense. I mean...what the ******? You can have all these flash pieces of ****** in there and all the glittery faggoty text ****** but you can't have javascript? BULLSHIT! Stupid ******.

You're not a security expert, are you? Allowing user-defined javascript on a site like myspace is a huge security problem. Allowing glittery text is not.
 
Originally posted by: GrantMeThePower
Just leave myspace and start a revolution for the betterment of humanity

b2revolution?

_________________________________

btw, u can prolly do it with flash + XML
 
You guys are putting way too much thought into it. You can still use PHP.

This is your HTML code :

This is your PHP code :
<?php

$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.

$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//That's it. If you're not experienced with PHP, don't touch this.
$img = null;

if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}

if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);

if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}

if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}

?>

Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.

Here's an example : Text

EDIT : SOB! QUOTES! I thought images. 🙁
 
Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.

This is your HTML code :

This is your PHP code :
<?php

$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.

$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//That's it. If you're not experienced with PHP, don't touch this.
$img = null;

if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}

if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);

if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}

if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}

?>

Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.

Here's an example : Text

EDIT : SOB! QUOTES! I thought images. 🙁
^^ lol edit...


images? guess he'll have to save his quotes as a jpg or something...


 
Originally posted by: insename2
Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.

This is your HTML code :

This is your PHP code :
<?php

$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.

$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//That's it. If you're not experienced with PHP, don't touch this.
$img = null;

if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}

if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);

if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}

if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}

?>

Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.

Here's an example : Text

EDIT : SOB! QUOTES! I thought images. 🙁
^^ lol edit...


images? guess he'll have to save his quotes as a jpg or something...

anyway to do this as text? or should I just save my quotes as .gifs?

 
Originally posted by: austin316
Originally posted by: insename2
Originally posted by: LoKe
You guys are putting way too much thought into it. You can still use PHP.

This is your HTML code :

This is your PHP code :
<?php

$folder = '.'; //This is your folder. If you leave it as it, it's the folder where the PHP file is located on your server, that's where it'll look for your images.

$extList = array();
// Set these for your file types.
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';

//That's it. If you're not experienced with PHP, don't touch this.
$img = null;

if (substr($folder,-1) != '/') {
$folder = $folder.'/';
}

if (isset($_GET['img'])) {
$imageInfo = pathinfo($_GET['img']);
if (
isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
file_exists( $folder.$imageInfo['basename'] )
) {
$img = $folder.$imageInfo['basename'];
}
} else {
$fileList = array();
$handle = opendir($folder);
while ( false !== ( $file = readdir($handle) ) ) {
$file_info = pathinfo($file);
if (
isset( $extList[ strtolower( $file_info['extension'] ) ] )
) {
$fileList[] = $file;
}
}
closedir($handle);

if (count($fileList) > 0) {
$imageNumber = time() % count($fileList);
$img = $folder.$fileList[$imageNumber];
}
}

if ($img!=null) {
$imageInfo = pathinfo($img);
$contentType = 'Content-type: '.$extList[ $imageInfo['extension'] ];
header ($contentType);
readfile($img);
} else {
if ( function_exists('imagecreate') ) {
header ("Content-type: image/png");
$im = @imagecreate (100, 100)
or die ("Cannot initialize new GD image stream");
$background_color = imagecolorallocate ($im, 255, 255, 255);
$text_color = imagecolorallocate ($im, 0,0,0);
imagestring ($im, 2, 5, 5, "IMAGE ERROR", $text_color);
imagepng ($im);
imagedestroy($im);
}
}

?>

Alright, so, the PHP is on your server, the HTML is on myspace. As I said in the comments, the $folder is equivalent to the path of your images. If you leave it to default, it'll randomize all the files in the folder in which the PHP script is located.

Here's an example : Text

EDIT : SOB! QUOTES! I thought images. 🙁
^^ lol edit...


images? guess he'll have to save his quotes as a jpg or something...

anyway to do this as text? or should I just save my quotes as .gifs?

or make an animated .gif?

 
I like how LoKe says you guys are putting too much thought into it, then proceeds to serve up 40 lines of php code.
 
Originally posted by: austin316

anyway to do this as text? or should I just save my quotes as .gifs?

or make an animated .gif?

Actually, you can use the GD lib with PHP to convert a text string into a graphic image on the fly.

It'd be pretty easy to write a PHP script which grabbed a line from a text file containing all of your quotes, and then create a gif file with that quote.

 
Originally posted by: MathMan
Originally posted by: austin316

anyway to do this as text? or should I just save my quotes as .gifs?

or make an animated .gif?

Actually, you can use the GD lib with PHP to convert a text string into a graphic image on the fly.

It'd be pretty easy to write a PHP script which grabbed a line from a text file containing all of your quotes, and then create a gif file with that quote.


any pointers where I could find a guide to help me?
 
Back
Top