Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-11-2002, 03:58 AM   #1
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Need some php help. Please!

Ok, i'm trying to work on this random banner thing. And it all works fine..

Except for the onmouseover status window bit..

For example.

IMG SRC works fine:

src=\"$img\"

and the Alt attribute works fine:

alt=\"[$alt]\"

now.. i've tried everything i can think of to put the $status_url into the code.. but i keep winding up with errors..

onmouseover="window.status='http://www.somewhere.com';return true;"

Stuff i've tried already that doesn't work:

onmouseover="window.status='$status_url';return true;"
onmouseover="window.status=/'$status_url/';return true;"
onmouseover=/"window.status='$status_url';return true;/"
onmouseover=/"window.status=/'$status_ur/l';return true;/"

Some help would be greatly appreciated!

Thanks in advance.
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 04:25 AM   #2
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Unless you made a typo, you are escaping the quotes backwards

onmouseover="window.status=/'$status_url/';return true;"
onmouseover=/"window.status='$status_url';return true;/"
onmouseover=/"window.status=/'$status_ur/l';return true;/"


You have / instead of \
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 04:31 AM   #3
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Yeah, that was a typo i made during the post, but not what i had done in the code. So just.. swap those around! :P

Any ideas on what i should be doing though, besides that? i'm really stumped!
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 04:39 AM   #4
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
PHP Code:
echo "<a href=\"http://www.domain.com\" onmouseover=\"window.status='http://www.somewhere.com';return true;\">test</a>"
This works

DynaMite
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |

Last edited by ServerGenius; 04-11-2002 at 04:42 AM..
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 04:49 AM   #5
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Thanks dude. But the http://www.somewhere.com isn't supposed to be there. i want the variable $status_url in there.
but no matter how i do it.. i get errors.. i've tried escaping every way i can think of!
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 05:20 AM   #6
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
*bump*

i know that's an annoying thing to do, but i need this ASAP! :D

A&H, come back! :P
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 05:37 AM   #7
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
hey. i figured it's not actually a problem with my escaping..

this is the line of the code i wanna change:

list($img, $url, $alt) = explode("|", $line[$rIndex]);

i wanna add anotehr category.. so i figured.. it'd be as simple as changing it to this:

list($img, $url, $alt, $status_url) = explode("|", $line[$rIndex]);

and then changing:

blah.gif|http://blah.com|Teens 4 Free

To

blah.gif|http://blah.com|Teens 4 Free|http://www.statusurl.com

What am i forgetting to do?

This is the entire code by the way:
-------------

PHP Code:
<?php

function PrintBanner() {
$fp fopen("banners.txt""r");
$index 0;
while (!
feof($fp)) {
  
$line[$index] = fgets($fp256);
  
$index++;
 }

$rIndex mt_rand(0$index -1);
list(
$img$url$alt) = explode("|"$line[$rIndex]);
$banner =  "<a href=\"$url\" target=_blank> <img src=\"$img\" width=\"468\" height=\"60\" border=\"0\" alt=\"[$alt]\"></a>\n";
return 
$banner;
}

?>
----------

and the text file with the data

----------

image1.gif|http://somewhere.com/?wm=47887|Sexy Teens
image2.gif|http://somewhere.com/?wm=47888|Sexy Lesbians
image3.gif|http://somewhere.com/?wm=47889|Sexy Asians

-----------


Once again, i'm fucking cluseless here!

PS. After 23047 edits, i think i got this whore of a thing to display corrently

Last edited by chodadog; 04-11-2002 at 05:49 AM..
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 07:05 AM   #8
spanky
Confirmed User
 
Industry Role:
Join Date: Apr 2002
Posts: 231
howdy do,
My first post but I don't really have anything to say other than chodadog, this sucker below works for me.
PHP Code:
<?php

$banners_dat 
"./banners.txt";

function 
PrintBanner() {
    global 
$banners_dat;

    
$arry = @file($banners_dat);
    if( !isset(
$arry) || !$arry || !is_array($arry) )
        return 
false;

    list(
$img$url$alt$status) = explode("|"$arry[rand(0,sizeof($arry)-1)]);
    
$focus=$mouseover="\"window.status='$status'; return true;\"";
    
$mouseout="\"window.status='Done'; return true;\"";

    return 
"<a 
        href=\"
$url\" 
        target=_blank 
        OnMouseOver=
$mouseover 
        OnFocus=
$focus 
        OnMouseOut=
$mouseout><img 
                    src=\"
$img\" 
                    width=\"468\" 
                    height=\"60\" 
                    border=\"0\" 
                    alt=\"[
$alt]\"></a>\n";
}

print 
PrintBanner();
?>
cheers
spanky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-11-2002, 07:45 AM   #9
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
Thanks dude. Just figured out what the problem with the one i posted was. But thanks anyways ;)
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.