You are here: Home > Forum > Newbie's Corner > WP-Plugins Goto page Previous  1, 2 Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Wed Apr 23, 2008 1:23 am    Post subject: Reply with quote

Quote:
Oh and congratulations are in order here.
You have officially stumped me.Question


Sorry about that! It certainly wasn't intentional! But it good to know that you're still only human! Laughing

Have sent him an email and will let you know how it goes.

Thanks again for your help!

Cheers

Kimberley
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Wed Apr 23, 2008 1:41 am    Post subject: Reply with quote

Me again...

Just in case I thought I'd let you know that this is now coming up...(just to keep you in the loop! Smile )

Parse error: syntax error, unexpected ',' in -----/wp-content/plugins/wb-Quiz/active_quick_quiz.php on line 40

And I didn't change a thing. Go figure. Question

Cheers!
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Wed Apr 23, 2008 2:05 am    Post subject: Reply with quote

That comma is supposed to be inside a nested array.

Array level 1:
$questions = array(

Array level 2:
1 => array(

Array level 3:
"options" => array(


The comma separates each of the array items.
The comma on line 40 in the original file closes the array for 2 => array(

I went through the script and matched all the brackets. That comma is in the right place.

Two things I would change though. One of them is not using contractions, such as "What's" on line 26. That will mess you up.

The other thing is to make the second array consistent with the others by quoting the entries after =>

"scores" => array (
1 => 1,
2 => -4,
3 => -6,
4 => -5
)
should be
"scores" => array (
1 => "1",
2 => "-4",
3 => "-6",
4 => "-5"
)

Not sure if any of that helps though.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Thu Apr 24, 2008 12:24 am    Post subject: Reply with quote

Okay,

Still having trouble so I went in and activated the example -> wb_quiz_questions.php to see if maybe it was just how I filled in my questions that was the problem.

Sure enough, it works perfectly! So, yes, it was me. Embarassed So, I am going to go in and re-do it and figure out what went wrong. Will let you know how it goes!

Thanks again. And yep, I feel pretty stupid right now...but I'll get over it!

Cheers!

Kimberley
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Thu Apr 24, 2008 12:34 am    Post subject: Reply with quote

No need to feel stupid. Very few people are brave enough to try editing PHP files. Just be careful with your quotes and punctuation. One quote out of place will break your entire script.

Keep us informed on how things are going or if you need more help.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Thu Apr 24, 2008 1:14 am    Post subject: Reply with quote

Thanks Jim.

I've gone through it and I was confident everything was good, so I had a look and it is having problems with the following line in the file -->

Code:
"text" => "You scored %s <br /><h3>Oh Dear! </h3><br />Time to get your butt moving! You have a very low level of activity. Did you know that doing 10 minutes of intense exercise three times a day can be as good as doing a moderate intensity 30 minute exercise once a day?<br /> For some inspiration see <a href="http://healthyfitnesslifestyle.com/spice-it-up/" target="_self">'Spice It Up!'</a>"


It keeps coming up as -->

Parse error: syntax error, unexpected T_STRING, expecting ')'

I have the ')' on the next line looking like this...

Code:
),


I know I've asked a lot of you on this topic but if you have any spare time could I ask... if I send you the question file I have done, could you have a look at it for me?

I'll be Forever in your debt!
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Thu Apr 24, 2008 1:44 am    Post subject: Reply with quote

Add a semi-colon after </a>" so it is </a>";

In PHP all statements have to end with the semi-colon to signify the end of the statement.

Try that.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Thu Apr 24, 2008 4:32 am    Post subject: Reply with quote

Sorry, it's still coming up with this...

Parse error: syntax error, unexpected T_STRING, expecting ')'

Hmmm....
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Fri Apr 25, 2008 1:22 pm    Post subject: Reply with quote

Email the modified file to me. You have my address. That way I can start from the top and check each line.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Mon Apr 28, 2008 12:28 am    Post subject: BMI Reply with quote

Thanks for that Jim! Very Happy

I don't know what I did with your email address so I have just contacted you through your site.

I've also come across another little problem! I noticed that since I upgraded to wp 2.5 that my BMI calculator does not work and it did previously.

I went back to the site where I got it from to double check that everything was correct and it seems to be fine but it is just not working.

The site is -->
http://javascript.about.com/library/blbmi1.htm

Does that sort of thing usually happen? And if so, does anyone know what to do?

Cheers!

Kimberley
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Mon Apr 28, 2008 4:03 am    Post subject: Reply with quote

Hi Kimberley

Strange that I did not get the email from the contact form. So I set up a temporary address: npt at websitemanagers.net

When upgrading to WP 2.5, some plugins like your BMI calculator have to be deactivated, then activated again to make them work. Try that.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Mon Apr 28, 2008 4:43 am    Post subject: Reply with quote

Thanks for that!

With the BMI calculator, as far as I know, it's not a plugin. Once you've put in your form on the page you want it on, you put in a snippet of code in the head and then copy and paste the bmicalc.js code into a file and that's it. Buggered if I know how I got it working last time!

I'll keep fiddling around with it.
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Mon Apr 28, 2008 5:24 am    Post subject: Reply with quote

Hmm... I feel like I've tried everything I can think of but, still nothing. I'm starting to wish I had've stayed with the previous version of wordpress! Confused
Back to top
Jim Hutchinson
Moderator


Joined: 17 Jan 2006
Posts: 409
Location: Iowa, USA

PostPosted: Mon Apr 28, 2008 6:45 am    Post subject: Reply with quote

Are you running the inline-javascript plugin? If so, reset that one too. It allows you to put JavaScript code right into your posts and pages.

WP 2.5 is by far the best version yet, even though there are some bugs in it (80 of them patched in 2.5.1).

I sent you an email.

Jim
Back to top
aussie



Joined: 25 Jan 2008
Posts: 78
Location: Brisbane

PostPosted: Mon Apr 28, 2008 11:29 pm    Post subject: Reply with quote

Thank you again for that. I didn't know about that plugin, so I just got it and still nothing. I think I'll do the upgrade to 2.5.1 over the next couple of days!

I've also just sent you an email.

Cheers again!

Kimberley
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetProfitsToday.com Forum Index -> Newbie's Corner All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum