vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   help with displaying multiple menu choice in postbit (https://vborg.vbsupport.ru/showthread.php?t=93743)

FatalBreeze 08-06-2005 05:04 PM

help with displaying multiple menu choice in postbit
 
Hello i've created a new profile field in my forum.
his id is: field8 and his type is Multiple-Selection-Checkbox.
now i wanted to display its value in the postbit_legacy,
so i went a bit through member.php and i came up with the following code:

PHP Code:

$profilefields $DB_site->query("
SELECT profilefieldid, required, title, type, data, def, height
FROM " 
TABLE_PREFIX "profilefield
WHERE form = 0 " 
iif(!($permissions['genericpermissions'] & CANSEEHIDDENCUSTOMFIELDS), "
AND hidden = 0"
) . "
ORDER BY displayorder
"
);
while (
$profilefield $DB_site->fetch_array($profilefields))
{
exec_switch_bg();
if (
$profilefield['type'] == 'checkbox')
{
$data unserialize($profilefield['data']);
foreach (
$data AS $key => $val)
{
if (
$post["field8"] & pow(2$key))
{
    
$profilefield['value'] .= iif($profilefield['value'], ', ') . $val;
}
}
}
}
$games $profilefield['value']; 

and put it in functions_showthread.
and in the postbit_legacy template i added the variable $games of course.
the problem is, that it doesn't work.... :(

Can you please help me?

Andrew111888 08-07-2005 07:21 AM

If you have added a post field via the Admin CP all you need to do to display it in the postbit is add $post[fieldx] to your postbit template, where x is the profile field id.

FatalBreeze 08-07-2005 10:23 AM

you right, but only if i add a text profile field or something like that, but i added a multiple check-box and if ill put in the postbit the code $post[field8] then the value will be 7 or something like that... because before the value is stored in the db it goes through some changes(pow and some more) and to decrypte you need to do some of the changes that i wrote above.

bigcurt 08-07-2005 12:25 PM

<a href="http://www.vbulletin.com/forum/showthread.php?t=108785" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=108785</a> ---read all that

~Curt

FatalBreeze 08-07-2005 09:37 PM

thanks mate :)

bigcurt 08-08-2005 08:41 AM

No problem man ;).



~Curt


All times are GMT. The time now is 11:17 AM.

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.00976 seconds
  • Memory Usage 1,726KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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