Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2009, 11:26 PM
GCSkye GCSkye is offline
 
Join Date: Apr 2008
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 05-31-2009, 11:33 PM
andrewtr89 andrewtr89 is offline
 
Join Date: Jan 2007
Location: Colorado
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree.
Reply With Quote
  #3  
Old 05-31-2009, 11:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GCSkye View Post
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?
Reply With Quote
  #4  
Old 06-01-2009, 01:42 AM
GCSkye GCSkye is offline
 
Join Date: Apr 2008
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$block_data[visitorbits] to

$vbphrase[visitorbits] and $userinfo[visitorbits]
Reply With Quote
  #5  
Old 06-01-2009, 02:43 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 06-01-2009, 03:19 AM
GCSkye GCSkye is offline
 
Join Date: Apr 2008
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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



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.
Reply With Quote
  #7  
Old 06-01-2009, 04:04 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 06-01-2009, 09:10 PM
GCSkye GCSkye is offline
 
Join Date: Apr 2008
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 06-01-2009, 10:04 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 06-01-2009, 10:09 PM
GCSkye GCSkye is offline
 
Join Date: Apr 2008
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
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 05:15 PM.


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.09939 seconds
  • Memory Usage 2,268KB
  • 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
  • (3)bbcode_php
  • (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
  • (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