GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need Help With Code Please (https://gfy.com/showthread.php?t=1012739)

Dennis69 03-03-2011 01:59 PM

Need Help With Code Please
 
I just purchased UU Gallery for wordpress, I'm trying to use HQ images and then have the js scale them but I keep getting errors, I have used this script with robo Gallery and it worked fine

Code:

id="thepic" onClick="scaleImg('thepic')" onLoad="scaleImg('thepic')"
And when I add it like this:

Code:

  $BigLink['active']    = "<a href='#NextLink#'><img id="thepic" onClick="scaleImg('thepic')" onLoad="scaleImg('thepic')"src='#BigPhoto#' width='#Width#' height='#Height#' border='0' alt='Click here for next image'></a>";
  $BigLink['notactive']  = "<img id="thepic" onClick="scaleImg('thepic')" onLoad="scaleImg('thepic')"src='#BigPhoto#' width='#Width#' height='#Height#'>";

I get the error:
Parse error: syntax error, unexpected T_STRING in /home/celebuzz/public_html/galleries/viewer.php on line 8

Any help would be greatly appreciated :thumbsup

Serge Litehead 03-03-2011 02:04 PM

is the code above exact copy?

if so then inside most outer double quotes all other double quotes must be escaped with \

like so

$BigLink['active'] = "<a href='#NextLink#'><img id=\"thepic\" onClick=\"scaleImg('thepic')\" onLoad=\"scaleImg('thepic')\" src='#BigPhoto#' width='#Width#' height='#Height#' border='0' alt='Click here for next image'></a>";
$BigLink['notactive'] = "<img id=\"thepic\" onClick=\"scaleImg('thepic')\" onLoad=\"scaleImg('thepic')\" src='#BigPhoto#' width='#Width#' height='#Height#'>";

Alky 03-03-2011 02:05 PM

you have to escape " when it's inside of "".

so like:
$BigLink['active'] = "This is just an example of \"quoting\"... mm kay?";

FlexxAeon 03-03-2011 02:06 PM

put a backslash (\) in front of all those double quotes in the string

lol i'm too slow i see...

Dennis69 03-03-2011 02:11 PM

Thanks guys... working like a charm :thumbsup


All times are GMT -7. The time now is 12:28 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123