Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #21  
Old 12-18-2014, 11:37 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gfran5 View Post
You were pretty close, just forgot to mention to change (if $post) to (if $userinfo)... but thanks for your help. I will try get this chart working, if i have any questions i will post back.
Oh...oops, yeah, I wasn't using your template, I was using the one from the how-to page. I guess that turned out to be your problem? Oh well, the rest should be easy.
Reply With Quote
  #22  
Old 12-18-2014, 01:01 PM
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

This is slightly unrelated but i'm having some CSS issues on the template: Link to the page

For some reason my footer is half may up the page, rather than normal position on bottom.

Here is my template code:
Code:
<div id="view-test" class="<vb:if condition="$selected_tab == 'test'">selected_view_section<vb:else />view_section</vb:if><vb:if condition="$userinfo['userid'] != $bbuserinfo['userid']"> vm_other_prof</vb:if>">
    <div class="blocksubhead subsectionhead userprof_headers userprof_headers_border">     
        <h4 class="subsectionhead-understate">Body Measurements</h4>
    </div>
      <div class="body_measurements">
          <div class="current_bm">
              <vb:if condition="$userinfo['field8']">
              <span class="label">Height:</span>
              <div><b id="body_data">{vb:raw userinfo.field8}</b><span class="lbs_font">cm</span></div>
              <vb:else />
              <span class="label">Height:</span>
              <div><b id="body_data">--</b><span class="lbs_font">cm</span></div>
              </vb:if>
           </div>
        
        <div class="current_bm">
             <vb:if condition="$userinfo['field7']">
             <span class="label">Weight:</span>
             <div><b id="body_data">{vb:raw userinfo.field7}</b><span class="lbs_font"> Lbs</span></div>
             <vb:else />
             <span class="label">Weight:</span>
             <div><b id="body_data">--</b><span class="lbs_font"> Lbs</span></div>
           </vb:if>
         </div>
       
       <div class="current_bm">
             <vb:if condition="$userinfo['field15']">
             <span class="label">Body Fat %:</span>
             <div><b id="body_data">{vb:raw userinfo.field15}</b><span class="lbs_font"> %</span></div>
             <vb:else />
             <span class="label">Body Fat %:</span>
             <div><b id="body_data">--</b><span class="lbs_font"> %</span></div>
           </vb:if>
       </div>
</div>
Reply With Quote
  #23  
Old 12-18-2014, 01:08 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not really an html/css person, but I looked at the page and your new tab doesn't look like it's any different than the other tabs, so I don't think the problem is in the template for the new tab. I see that the .footerBanner css has absolute positioning for that 'free gift' image, so that's why that's in the middle of eveyrthing. There's also that red line, but I don't know exactly why that's happening.
Reply With Quote
  #24  
Old 12-18-2014, 01:21 PM
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That red line goes with the footer-main section, making the advertisement absolute doesn't fix the issue, this is getting me confused, because the only pages effected are the ones on the member profile... could it be anything in the PHP code?
Reply With Quote
  #25  
Old 12-18-2014, 01:24 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does it still happen if you disable the new plugin?
Reply With Quote
  #26  
Old 12-18-2014, 01:27 PM
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry don't worry i've figured it out, was missing just one </div> element.. lol hate when it's that simple right in front of your face.
Reply With Quote
Благодарность от:
kh99
  #27  
Old 12-18-2014, 01:29 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you figured it out. I should just not reply at all when people ask html questions.
Reply With Quote
  #28  
Old 12-19-2014, 07:00 AM
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Was wondering if you know how to do math equations in html template just simple things like times, divide, etc ?
Reply With Quote
  #29  
Old 12-19-2014, 07:56 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a {vb:math expression} tag that lets you do some simple math, but I don't think it's used much, and if I remember correctly there's some limitation so that it's not very useful. It may be that you can't use variables in the expressions or something like that.

In general I think you'll probably have to do you calculations in the plugin.
Reply With Quote
  #30  
Old 12-19-2014, 11:44 AM
gfran5's Avatar
gfran5 gfran5 is offline
 
Join Date: Nov 2014
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So i was able to use vb:math to do what i wanted but i can't control the number of decimals displayed. So how would i do the maths in the plugin? and then call the equation in the template? I was trying to measure BMI based off height and weight but need to do

this is in my template and is right answer, with heaps of decimals:
Code:
{vb:math {vb:math {vb:raw userinfo.field7}/2.2} / {vb:math ({vb:raw userinfo.field8}/100)*2}}
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 06:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04177 seconds
  • Memory Usage 2,270KB
  • Queries Executed 14 (?)
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_code
  • (1)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
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete