Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2004, 06:47 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default custom profile fields in printable version...Will Pay!

does anybody know how to get the same custom user profile fields i have in my postbit to show in the printable version? I use this:

<if condition="$post[fieldX]"><div align="left">$post[fieldX]</div></if>

in my postbit and it works fine, however when put in the printthreadbit template, it does nothing. The team over at VB.com said it will not work that way either, and to try asking here. I am desperate to do this as 90 % of my users print threads for use as notes and i have contact info for the user show up in these fields that has to be on there somehow. thanks ahead for your help.

I'll paypal or mail a check for $30 to the first person with a working soloution!
Reply With Quote
  #2  
Old 06-15-2004, 01:48 PM
btappan's Avatar
btappan btappan is offline
 
Join Date: May 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any takers?
Reply With Quote
  #3  
Old 06-15-2004, 02:46 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

HTML Code:
<if condition="$post['fieldX']"><div align="left">$post[fieldX]</div></if>
and let me know if that works.
Reply With Quote
  #4  
Old 06-15-2004, 02:53 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Try this:

HTML Code:
<if condition="$post['fieldX']"><div align="left">$post[fieldX]</div></if>
and let me know if that works.
It doesnt, the data is not there to be called.



line 844 has the massive query to get the info, but i cant make any sense of it. for showthread.
Reply With Quote
  #5  
Old 06-15-2004, 03:30 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by btappan
does anybody know how to get the same custom user profile fields i have in my postbit to show in the printable version? I use this:

<if condition="$post[fieldX]"><div align="left">$post[fieldX]</div></if>

in my postbit and it works fine, however when put in the printthreadbit template, it does nothing. The team over at VB.com said it will not work that way either, and to try asking here. I am desperate to do this as 90 % of my users print threads for use as notes and i have contact info for the user show up in these fields that has to be on there somehow. thanks ahead for your help.

I'll paypal or mail a check for $30 to the first person with a working soloution!
Ok, I got it. Thanks to Zach for finding the query I needed to edit.

In the printthread.php file

Find:

PHP Code:
$posts $DB_site->query("
SELECT post.*,post.username AS postusername,user.username
FROM " 
TABLE_PREFIX "post AS post
LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = post.userid)
LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE post.threadid=
$threadid AND post.visible=1 AND deletionlog.primaryid IS NULL
ORDER BY dateline 
$postorder
LIMIT 
$startat$perpage
"
); 
and replace it with:

PHP Code:
$posts $DB_site->query("
SELECT post.*,post.username AS postusername,user.username,userfield.*
FROM " 
TABLE_PREFIX "post AS post
LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = post.userid)
LEFT JOIN " 
TABLE_PREFIX "userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
WHERE post.threadid=
$threadid AND post.visible=1 AND deletionlog.primaryid IS NULL
ORDER BY dateline 
$postorder
LIMIT 
$startat$perpage
"
); 
and voila! Your if condition should now work.
Reply With Quote
  #6  
Old 06-15-2004, 03:31 PM
vbmechanic vbmechanic is offline
 
Join Date: Jan 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Open printthread.php, change query on line 126 to:

PHP Code:
$posts $DB_site->query("
    SELECT post.*,post.username AS postusername,user.username,userfield.* 
    FROM " 
TABLE_PREFIX "post AS post
    LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = post.userid)
    LEFT JOIN " 
TABLE_PREFIX "userfield AS userfield ON(user.userid = userfield.userid)
    LEFT JOIN " 
TABLE_PREFIX "deletionlog AS deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post')
    WHERE post.threadid=
$threadid AND post.visible=1 AND deletionlog.primaryid IS NULL
    ORDER BY dateline 
$postorder
    LIMIT 
$startat$perpage
"
); 
Then add the fields as normal to the template.
Reply With Quote
  #7  
Old 06-15-2004, 03:32 PM
vbmechanic vbmechanic is offline
 
Join Date: Jan 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey you beat me by a minute
Reply With Quote
  #8  
Old 06-15-2004, 03:46 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sometimes that's all it takes. I guess great minds DO think alike, huh? LOL

Your line is different than mine here. Mine works, I tested it. Which one is correct?

PHP Code:
 LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON(userfield.userid user.userid
Reply With Quote
  #9  
Old 06-15-2004, 03:52 PM
vbmechanic vbmechanic is offline
 
Join Date: Jan 2004
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

They are transposable, both are correct and usable
Reply With Quote
  #10  
Old 06-15-2004, 04:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought so. Thanks for confirming it. I just copied that line from the post query in the showthread as it was.
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:55 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.04295 seconds
  • Memory Usage 2,270KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_html
  • (4)bbcode_php
  • (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_postinfo_query
  • fetch_postinfo
  • 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