looking for some creative thinking

hello;

I’m using a script on my site called greybox located here http://orangoo.com/labs/GreyBox/

I make links that popup nice boxes that are not blocked - the links look like this

makes a clickable link -

here’s what I’m trying to accomplish–

I want to use some php to look for certain credentials

if ($usercount <= 5) {
automatically popup a greybox
}

problem with using window.open JS is that first off they are ugly and blockable

can anyone think of a way and be able to show me how I can achive this…

hmmm ok I found this and it works off the site but can’t seem to figure out how I can still use this but manage to control the location to center and the size of the frame like I do in the static links…

[php]if ($loggincount <= 5) { ?>

<? } ?>[/php]

Using jQuery you could simply trigger the click on your anchor. For example

Assign an ID to your anchor, if needed:

<a id="myLog" href="logfile.php" title="VPC Logfile" rel="gb_page_center[690, 500]">

Trigger click on #myLog

[php]

<?php if ($loggincount <= 5) { ?>

$(document).ready(function() {
$(’#myLog’).trigger(‘click’);
});

<?php } ?>

[/php]

Hey I was talking over with a buddy of mine and this was a conversation we had also was using java to automate a click - using your code when I loggin what happens is it seems to create the whole screen as a clickable item -

is there anything I can add or remove from that code for it to simply launch the popup if the conditions are met?

[php]
if ($loggincount <= 5) { ?>

<? } ?>

[/php]

Like this here works perfect however don’t allow me to control any properties??

I don’t understand. You want to trigger a click on a greybox item. That is all the code does. Here is a more complete example to trigger a click.

<html>
<head>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		$('#myAnchor').click(function(e) {
			alert('Link was clicked!');
		});
		$('#myAnchor').trigger('click');
	});
	</script>
</head>
<body>
<a id="myAnchor" href="#">Click Me</a>
</body>
</html>

Did you close the anchor ()?? I only posted that code to show you that you would need to add an ID to the anchor.

Here is what I have

below the tag I have

<a id="myLog" href="logfile.php" title="VPC Logfile" rel="gb_page_center[690, 500]"></a>

and lower down

[php]if ($loggincount <= 5) { ?>

<? } ?>[/php]

Now when I added the tag now it does nothing??? what am I missing

Did you include the jQuery library? Without seeing all the code I can’t say what the problem is.

[php]

<?php session_start(); if (!isset($_SESSION['username'])) { echo "Sorry you must be logged in to view this page
"; echo "Please GO BACK and try again"; exit(); } else { if ($_SESSION['username']) { $username = $_SESSION['username']; } } ?> Heavens Hackers - Virtual Desktop Hacking Simulation <?php

//make connect with server and select database
//$connect = mysql_connect(“localhost”,“heaven”,“jefF0614”) or die (“Could Not Connect To Server”);
include (‘connect_live.php’);
mysql_select_db(‘heaven_users’) or die (“Could Not Select Database”);
//end

//query database
$sql = mysql_query(“SELECT * FROM members WHERE username=’$username’”);

while ($result = mysql_fetch_assoc($sql)) {
$loggincount = $result[‘userloggin’];
$userip = long2ip($result[‘IPaddress’]);
$player = $result[‘username’];
$virus = $result[‘virusscanner’];
$cracker = $result[‘passwordcracker’];
$tracer = $result[‘iptracer’];
$account = $result[‘bankaccountnumber’];
$virusscanner = $result[‘virusscanner’];
$passwordcracker = $result[‘passwordcracker’];
$IP_snooper = $result[‘IP_snooper’];
$IPseekPlus = $result[‘IPseekPlus’];
$systemkey = $result[‘systemkey’];
$register_date = $result[‘register_date’];
$count_crack = $result[‘count_crack’];
$userid = $result[‘id’];
$reputationname = $result[‘reputationname’];

// $IP_Monitor = $result[‘IP_Monitor’];

$cash = $result[‘balance’];
$exper = $result[‘exper’];
$rep = $result[‘rep’];
$level = $result[‘level’];
$systemkey = $result[‘systemkey’];
$cpuspeed = $result[‘cpuspeed’];
$bounce1 = long2ip($result[‘bounceone’]);
$bounce2 = long2ip($result[‘bouncetwo’]);
$bounce3 = long2ip($result[‘bouncethree’]);
}
//set session varibles
$_SESSION[‘virusscanner’] = $virusscanner;
$_SESSION[‘passwordcracker’] = $passwordcracker;
$_SESSION[‘IP_snooper’] = $IP_snooper;
$_SESSION[‘IPseekPlus’] = $IPseekPlus;
$_SESSION[‘systemkey’] = $systemkey;
$_SESSION[‘register_date’] = $register_date;
$_SESSION[‘count_crack’] = $count_crack;

$_SESSION[‘userlevel’] = $level;
$_SESSION[‘player’] = $player;
$_SESSION[‘cracker’] = $cracker;
$_SESSION[‘systemkey’] = $systemkey;
$_SESSION[‘cpuspeed’] = $cpuspeed;
$_SESSION[‘userip’] = $userip;
$_SESSION[‘exper’] = $exper;
$_SESSION[‘rep’] = $rep;

$_SESSION[‘reputationname’] = $reputationname;
$_SESSION[‘account’] = $account;
$_SESSION[‘virus’] = $virus;
$_SESSION[‘balance’] = $cash;
$_SESSION[‘userid’] = $userid;
// $_SESSION[‘IP_Monitor’] = $IP_Monitor ;

//end session editing

//if users loggin count is below 5 loggins show the tutorial

if ($loggincount <= 5) { ?>

<? } ?>
</table>
Welcome <?php echo "$player"; ?>
Available cash <?php $cash = number_format($cash, 2, '.',','); echo "\$$cash"; ?>
Experience <?php echo "$exper"?>
Reputation <?php echo "$reputationname"?>
Level <?php echo "$level"?>
My IP <?php echo "$userip"?>
Bank Number <?php echo "$account"?>
Active Bounces
<?php echo $bounce1." delete
" .$bounce2." delete
" .$bounce3." delete
" ?>
 
My Computer
User Interface
Programs
IP Database
Finances
Email
Internet
My Files
LogFile
[/php]

Where are you including the jQuery library?

I dunno :frowning:

Did you see my example? My code is using jQuery so you must include the library.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
Sponsor our Newsletter | Privacy Policy | Terms of Service