vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Image Displayed from Specific Database Table (https://vborg.vbsupport.ru/showthread.php?t=270000)

RollaJedi 09-09-2011 06:55 PM

Image Displayed from Specific Database Table
 
I am a noob to all this stuff, please go easy on me.

I have a mysql database on vbulletin. Within that database, i have a table for a card collecting mod that my users play on my site. The image i provided is of this table within phpmyadmin. What i hope to accomplish is to be able to put a code into each member's signature that shows an icon of each card they have. The p_userid column represents each member's id number and the p_card column represents each card's id number.

So, for example, Joe Blow is member number 23 at my site. So, his p_userid is 23. He has six cards in his possession, and they are cards 4, 8, 15, 16, 23, and 42. So, these numbers would be in the p_card column.

So, what will happen if the code is in the signature of Joe Blow, is there will be six images, one representing card 4, one representing card 8, etc.

https://vborg.vbsupport.ru/
Can someone please, please just point me in the right direction on this? I've literally been trying for many months to get help with no luck.

Thank you for your time!

Lynne 09-09-2011 09:45 PM

It sounds to me like you need someone to actually write the modification for you since you have posted no code here. I can tell you in the most basic of terms what to do, but you would need to code it.

- do a query of the table to get all card ids for the user
- in a while loop, spit out the html code for each image: <img src="$variable['p_card'].png" alt='' /> and put it all into a variable like $mycards
- preregister the variable $mycards for use in the template you want to use it in
- spit out the variable $mycards where you want it in the template

RollaJedi 10-03-2011 04:17 PM

thank you for this info. how or where do you pre register the variable?

--------------- Added [DATE]1317662445[/DATE] at [TIME]1317662445[/TIME] ---------------

could i maybe hire your services for a small thing like this?


All times are GMT. The time now is 10:02 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.01049 seconds
  • Memory Usage 1,712KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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