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 03-03-2011, 01:59 PM   #1
Dennis69
Confirmed User
 
Join Date: Feb 2003
Location: Dreamland
Posts: 1,685
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
__________________
HaHaHa
Dennis69 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-03-2011, 02:04 PM   #2
Serge Litehead
Confirmed User
 
Serge Litehead's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: Behind the scenes
Posts: 5,190
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#'>";
__________________

Last edited by Serge Litehead; 03-03-2011 at 02:05 PM..
Serge Litehead is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-03-2011, 02:05 PM   #3
Alky
Confirmed User
 
Alky's Avatar
 
Join Date: Apr 2002
Location: Houston
Posts: 5,651
you have to escape " when it's inside of "".

so like:
$BigLink['active'] = "This is just an example of \"quoting\"... mm kay?";
Alky is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-03-2011, 02:06 PM   #4
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
Industry Role:
Join Date: May 2003
Posts: 3,765
put a backslash (\) in front of all those double quotes in the string

lol i'm too slow i see...
__________________
flexx [dot] aeon [at] gmail
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-03-2011, 02:11 PM   #5
Dennis69
Confirmed User
 
Join Date: Feb 2003
Location: Dreamland
Posts: 1,685
Thanks guys... working like a charm
__________________
HaHaHa
Dennis69 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.