vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Profile Customization $block_data (https://vborg.vbsupport.ru/showthread.php?t=215028)

GCSkye 05-31-2009 11:26 PM

Profile Customization $block_data
 
I am currently working on custom profiles on my site. I'm trying to get the last visitors on the page to display at the top, you can see it is blank. I have it at the bottom working using the following code:

$blocks[visitors]

Profile can be found here:

http://evercube.net/forum/members/skye.html

I ripped apart the template it calls for to make the top part. Code being the following:

PHP Code:

<div class="alt1 smallfont block_row">
    <
phrase 1="$block_data[visitorcount]">$vbphrase[last_x_visitors]</phrase>
    <
ol class="list_no_decoration last_visitors_list">
        
$block_data[visitorbits]
    </
ol>
</
div


I tried changing the block_data in the code to other things like vbphrase and userinfo but had no luck.

I need an alternative to get the code working or a way for when I post $blocks[visitors] it doesnt show the top bar with the text Recent Visitors on it.

Thanks,
Skye

andrewtr89 05-31-2009 11:33 PM

I agree.

Lynne 05-31-2009 11:54 PM

Quote:

Originally Posted by GCSkye (Post 1820977)
I tried changing the block_data in the code to other things like vbphrase and userinfo but had no luck.

Exactly what do you mean by this - you changed your code to look like what?

GCSkye 06-01-2009 01:42 AM

$block_data[visitorbits] to

$vbphrase[visitorbits] and $userinfo[visitorbits]

Lynne 06-01-2009 02:43 AM

I'm not getting a good picture of what you want. I see how you've moved it over to the left side, but now you want to move it to the top of the left side? I'm really not getting a good idea of what you want and what you have tried.

GCSkye 06-01-2009 03:19 AM

Where ever I post $blocks[visitors], I get the following:

http://evercube.net/recent.png

The code for this in the memberinfo_block_recentvisitors template is:

PHP Code:

<if condition="$block_data['visitorcount']">
<
div class="alt1 smallfont block_row">
    <
phrase 1="$block_data[visitorcount]">$vbphrase[last_x_visitors]</phrase>
    <
ol class="list_no_decoration last_visitors_list">
        
$block_data[visitorbits]
    </
ol>
</
div>
</if>
<
div class="<if condition="$block_data['visitorcount']">alt2<else />alt1</if> smallfont block_row block_footer">
    <
phrase 1="$prepared[profilevisits]">$vbphrase[this_page_has_x_visits]</phrase>
</
div

Viewing that script posted above, you will noticed it doesn't contain the bar that says Recent Visitors [-], but it shows up in the Members profile still. I don't want it. How do I post the last 10 visitors without having that bar.

As I said before. The top bar I tried to add, I used this code:

PHP Code:

<div class="alt1 smallfont block_row"
    <
phrase 1="$block_data[visitorcount]">$vbphrase[last_x_visitors]</phrase
    <
ol class="list_no_decoration last_visitors_list"
        
$block_data[visitorbits
    </
ol
</
div

Instead of $blocks[visitors]. The only problem is, it doesn't work. I need it to work.

Lynne 06-01-2009 04:04 AM

The "Recent Visitors" part of that is in a different template. It's in memberinfo_block. That is the basic template that holds the specific templates for the different blocks. I have a feeling you will have to do a few code changes in order to get this how you want it.... or put a condition around that area in memberinfo_block that says if it's for the visitor block, then not to show it. I'm not sure what that condition would look like though. You'd have to play with it.

GCSkye 06-01-2009 09:10 PM

That if statement is seeming like a no go for me atm. Been playing with it for a while and can't seem to get it going.

Looking at the script I ripped from the memberinfo_block_recentvisitors template, is it possible to have it display in the memberinfo template on its own?

Here is what I have for it in my member info as of right now:

<div class="alt1 smallfont block_row">
<phrase 1="$block_data[visitorcount]">$vbphrase[last_x_visitors]</phrase>
<ol class="list_no_decoration last_visitors_list">
$block_data[visitorbits]
</ol>
</div>

When looking at the profile you see that it shows the $vbphrase[last_x_visitors], but it isn't displaying the $block_data. Anyway to fix that?

Edit: Basically, I need $block_data[visitorbits], $block_data[visitorcount] to work no matter where I post it in memberinfo.

Lynne 06-01-2009 10:04 PM

You may try looking at the code around line 360 in member.php. The actual template is evaled closer to line 473. I'm not sure if you can use the hook right above there to change things or if there is another better hook to use where you could change things (hooks are on the bottom of the page when in debug mode). You may want to just take it out of the template ($blocks[visitors] line in MEMBERINFO) and write your own template to use in insert it in there where you want.

GCSkye 06-01-2009 10:09 PM

Are you saying just put the following in a different template:

<div class="alt1 smallfont block_row">
<phrase 1="$block_data[visitorcount]">$vbphrase[last_x_visitors]</phrase>
<ol class="list_no_decoration last_visitors_list">
$block_data[visitorbits]
</ol>
</div>

Will that work?


All times are GMT. The time now is 06:48 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.01016 seconds
  • Memory Usage 1,756KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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