vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Using array in vbcode (https://vborg.vbsupport.ru/showthread.php?t=148436)

brandondrury 05-29-2007 09:52 PM

Using array in vbcode
 
I same to be having trouble displaying an array value within my vbcode. My searches didn't seam to come up with anything.

I want to send a PM to a user with a link that I'm dynamically creating.

I tried using this, but I think all of the brackets " [ " and " ] " are causing confusion, but it could be the fact that one of keys of my array is [URL].

[URL=www.domain.com/page_product.php?ID=$B[LinkID] ] $B

Well, even the code isn't displaying correctly on this thread.

Well, does anyone know the protocal for using assoc array values with VbCode?

Brandon

harmor19 05-29-2007 09:58 PM

Why do you need to dynamically create the link?

Eikinskjaldi 05-29-2007 10:02 PM

Quote:

Originally Posted by brandondrury (Post 1257153)
I same to be having trouble displaying an array value within my vbcode. My searches didn't seam to come up with anything.

I want to send a PM to a user with a link that I'm dynamically creating.

I tried using this, but I think all of the brackets " [ " and " ] " are causing confusion, but it could be the fact that one of keys of my array is [URL].



[URL=www.textlinkcenter.com/page_product.php?ID=$B[LinkID] ] $B

Well, even the code isn't displaying correctly on this thread.


Well, does anyone know the protocal for using assoc array values with VbCode?


Brandon

You cannot. bbcode is not a mini-php language The system cannot see some tags as bbcode and others as php items.

What you will have to do is code up a custom tag which does what you want it to do. I'd offer help here, but it is not clear to me where $B is coming from.

brandondrury 05-30-2007 06:22 AM

Quote:

Why do you need to dynamically create the link?
Are you serious?

I guess I should have given more info. I'm sending a PM from an external page (outside of vBulletin). The $B is an assoc array that I snagged out of a MySQL database. It holds most of the data that I want to send to the user.

It turns out that I had no trouble putting various array values into my private messages once I understood that bracket URL bracket was off limits. The bracket QUOTE bracket was a little funny, too. I'm not sure why.

So it's all under control now.

Thanks for taking the time to help.
Brandon


All times are GMT. The time now is 04:14 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.00922 seconds
  • Memory Usage 1,719KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete