Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 08-12-2003, 08:29 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't see the difference in codes just the double slashes you could use triple or quadruple it wouldn't make a difference...

at least to my knowledge...

g-force2k2
Reply With Quote
  #12  
Old 08-12-2003, 08:35 PM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 05:29 PM g-force2k2 said this in Post #11
i don't see the difference in codes just the double slashes you could use triple or quadruple it wouldn't make a difference...

at least to my knowledge...

g-force2k2

You still need to keep the escape for the value and the name in the database...
Reply With Quote
  #13  
Old 08-12-2003, 08:45 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no you don't because they aren't variables until they pass on the HTTP submit...

regards,
g-force2k2
Reply With Quote
  #14  
Old 08-12-2003, 09:37 PM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed. I re-ran the query. This ran cleanly.

Code:
UPDATE setting SET optioncode='<select name=\"setting[$setting[allowmultiregs]]\">
<option value=\"0\" ".iif($setting[value]==0,"selected","").">NO - Dont allow multiples</option>
<option value=\"1\" ".iif($setting[value]==1,"selected","").">YES - allow multiples</option>
<option value=\"2\" ".iif($setting[value]==2,"selected","").">YES - but track multiples</option>
</select>' WHERE varname='allowmultiregs'
Yet I'm still getting this error under the spot it should be displayed in the CP.

Parse error: parse error, expecting `','' or `';'' in /mnt/web/guide/skullport/forum/admin/options.php(72) : eval()'d code on line 1

I've tried to put a ; at the end of
Code:
</select>;'
or
Code:
</select>';
or at the end of
Code:
varname='allowmultiregs';
or even
Code:
varname='allowmultiregs;'
All of these run with success yet still generate a parse error.

I even tried this, based on a hack made by Drak and the query runs OK but it still generates a parse error.

I'm stumped

Syl...
Reply With Quote
  #15  
Old 08-12-2003, 09:40 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try updating the optioncode='' and see if it still generates a parse error...

if so it has something to do with an eval function have you done any other modifications or edited any templates?

regards,
g-force2k2
Reply With Quote
  #16  
Old 08-13-2003, 12:16 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ack! I had left my post reply open for over an hour and didn't see all the posts above mine. I'm going to read those and go through the steps you suggested and see what I can come up with before I reply to your question above.

I just ran:
Code:
UPDATE setting SET optioncode='<select name=\"setting[\$setting[allowmultiregs]]\">
<option value=\"0\" \".iif(\$setting[value]==0,\"selected\",\"\").\">NO - Dont allow multiples</option>
<option value=\"1\" \".iif(\$setting[value]==1,\"selected\",\"\").\">YES - allow multiples</option>
<option value=\"2\" \".iif(\$setting[value]==2,\"selected\",\"\").\">YES - but track multiples</option></select>' WHERE varname='allowmultiregs';
This was the result:

Query added to database: ... Success!
Viewing changes in CP: Parse error: parse error, expecting `','' or `';'

So on to Dark_Wizards suggestion of running:

Code:
UPDATE setting SET optioncode='<select name=\\"setting[\$setting[allowmultiregs]]\\">
<option value=\\"0\\" \".iif(\$setting[value]==0,\"selected\",\"\").\">NO - Dont allow multiples</option>
<option value=\\"1\\" \".iif(\$setting[value]==1,\"selected\",\"\").\">YES - allow multiples</option>
<option value=\\"2\\" \".iif(\$setting[value]==2,\"selected\",\"\").\">YES - but track multiples</option></select>' WHERE varname='allowmultiregs';
Query added to database: ... Success!
Viewing changes in CP: WORKED!

Sorry about the post above where I state "
Fixed. I re-ran the query. This ran cleanly." as that was a post I left replying to for over an hour.

This issue is resolved but now my question is, could one of you make me understand why Dark_Wizards suggestion worked and the others did not?

Syl...
Reply With Quote
  #17  
Old 08-13-2003, 01:06 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let g-force2k2 explain it as he said what I did wouldn't make a difference.
Reply With Quote
  #18  
Old 08-13-2003, 01:23 AM
Sylvus Sylvus is offline
 
Join Date: Apr 2003
Location: Toronto
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh come on! Don't be like that

The two of you took the time to help me out and I'm thankful for that. It's not going to help me learn how things work if you say stuff like that Mr. Wizard!

I'm sure G-Force2k2 didn't mean anything personal by his comment but rather, going on what he has learned from being here.

Well, I hope someone explains it.

Thanks again, both of you, right or wrong, it was a great lesson in syntax.

Syl...
Reply With Quote
  #19  
Old 08-13-2003, 02:15 AM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:06 PM Dark_Wizard said this in Post #17
Let g-force2k2 explain it as he said what I did wouldn't make a difference.
wtf is up with the attitude?

you have a problem then act your age not like some two year old whinning that he was right...

i said "to my knowledge" so i learned something new like wtf is your problem with that?

i helped and you helped you don't like me helping then fine, can't help that im still learning... do a favor and get a life instead of starting fights because im just trying to help and you acting like an ass only shows how immature you are.

And don't say you aren't trying to prove that you're better because in another thread i was helping someone and you stepped in and just felt like showing that you're some kind of special person... well i hope you feel special for trying to act all bad online...

take Syl's advice we both learned something... if you want to be an ass and keep on targeting me then i won't waste my time helping others... get a life...

g-force2k2
Reply With Quote
  #20  
Old 08-13-2003, 10:02 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't have an attitude, sorry if it was taken that way I was only trying to make a point and actually forgot to add the wink smilie as I originally intended. This had nothing to do with anything other than letting people learn why this works and why that doesn't. I struggled over this many months ago and couldn't understand why until I asked over at sitepointforums.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04943 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete