vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Google Chart Integration (https://vborg.vbsupport.ru/showthread.php?t=316061)

kh99 12-18-2014 11:37 AM

Quote:

Originally Posted by gfran5 (Post 2527907)
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.

gfran5 12-18-2014 01:01 PM

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>


kh99 12-18-2014 01:08 PM

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.

gfran5 12-18-2014 01:21 PM

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?

kh99 12-18-2014 01:24 PM

Does it still happen if you disable the new plugin?

gfran5 12-18-2014 01:27 PM

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.

kh99 12-18-2014 01:29 PM

Glad you figured it out. I should just not reply at all when people ask html questions.

gfran5 12-19-2014 07:00 AM

Hi,

Was wondering if you know how to do math equations in html template just simple things like times, divide, etc ?

kh99 12-19-2014 07:56 AM

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.

gfran5 12-19-2014 11:44 AM

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}}


All times are GMT. The time now is 09:08 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.01159 seconds
  • Memory Usage 1,740KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete