vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Need help with phrases and profile fields... (https://vborg.vbsupport.ru/showthread.php?t=157323)

ab420 09-08-2007 01:55 PM

Need help with phrases and profile fields...
 
I have the MySpace profile's thing going on my site, and I have designed several styles that I would like to offer in a drop down menu in "edit profile"

I added a user profile field (field83) that contains the list of styles
I added phrases (using the names from above) that contain the css needed for each style

Now... I'm trying to code this into the memberinfo template... and can't figure it out...

I know the code below doesn't work... but I'm hoping you can see from it what I'm trying to do:
<style type="text/css">$vbphrase[$userinfo[field83]]</phrase></style>

I want it to use a vbphrase for css... but it has to look at user profile field #83, as that contains the name of the phrase it needs to use...

is this possible, and how do I code this?

Thanks you VERY much in advance, I'm not very good at this stuff, and my head is close to exploding now lol.

djdonx 09-08-2007 02:16 PM

Have you actually got the phrase in place?

ab420 09-08-2007 02:22 PM

What do you mean? Did I already make the phrase in vBulletin? Yes... the problem is: the above code gives me the whole:
Quote:

Parse error: syntax error, unexpected '[', expecting ']' in /home/customfi/public_html/forums/includes/adminfunctions_template.php(3596) : eval()'d code on line 6
I just don't know how to write the code properly so it doesn't toss an error....

Thanks for your help, this is driving me nuts!

djdonx 09-08-2007 02:23 PM

Could you post the lines around line 6 then?

ab420 09-08-2007 02:30 PM

This is line 6:
<style type="text/css">$vbphrase[$userinfo[field83]]</phrase></style>

The problem is:

$vbphrase[$userinfo[field83]]</phrase>

I just don't know how to code it properly...

djdonx 09-08-2007 02:34 PM

Why do you have a closing </phrase> tag? Phrases are usually PHP variables and it shouldn't need a tag..

ab420 09-08-2007 02:36 PM

Oh really? Hahaha... like I said, I'm not that good at this stuff... I just took it out, but it still gives me the error.... I think it just doesn't like having the user profile field inside the phrase? I just don't know... any ideas?

djdonx 09-08-2007 02:39 PM

$vbphrase[$userinfo[field83] - You had two ]]'s

EDIT: I don't think thats right

I'm hardly a leet coder xD

ab420 09-08-2007 02:40 PM

thats not it either, because 1 of them was for the $vbphrase, and the other is for the $userinfo...

so it still gives an error

djdonx 09-08-2007 02:47 PM

$vbphrase['$userinfo[field83]']

What about that? :S


All times are GMT. The time now is 04:48 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.00978 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete