Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 06-16-2013, 04:45 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was not talking about the template names, but about the id for your tab:

HTML Code:
<div id="view-photos"
Change that to mpphotos now.

HTML Code:
<div id="view-mpphotos"
Remove this:
PHP Code:
$templater vB_Template::create('memberinfo_block_mpphotos');
$templater->register('albumbits2'$albumbits2); 
Replace with:
PHP Code:
vB_Template::preRegister('memberinfo_block_photos', array('albumbits2' => $albumbits2));   
vB_Template::preRegister('memberinfo_block_photos', array('albumcount' => $albumcount)); 
(You didn't put in code for the albumcount, so do that too and any other variable in that template.)
Reply With Quote
  #12  
Old 06-16-2013, 04:48 PM
Honourable Honourable is offline
 
Join Date: Oct 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

seconds just testing

pair with me kindly

--------------- Added [DATE]1371405329[/DATE] at [TIME]1371405329[/TIME] ---------------

I did to the code exactly as you said but it doesnt work????

--------------- Added [DATE]1371405422[/DATE] at [TIME]1371405422[/TIME] ---------------

btw my vbulletin version is 4.2.0

--------------- Added [DATE]1371405498[/DATE] at [TIME]1371405498[/TIME] ---------------

heeeeeeeeeeeeeeey it does work i really thank you from the deap of my small heart

ur so helpful

thank you too much

--------------- Added [DATE]1371406675[/DATE] at [TIME]1371406675[/TIME] ---------------

just any suggestions to make the if statements work as they are allocated with $block_data

for example

<vb:if condition="$block_data['albumbits2']">
Reply With Quote
  #13  
Old 06-16-2013, 05:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would need to set that variable first:

$this->block_data['albumbits2'] = $albumbits2;
Reply With Quote
  #14  
Old 06-16-2013, 05:50 PM
Honourable Honourable is offline
 
Join Date: Oct 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did it erlier when it wasnt working

seems to me I'm not that bad though or maybe Lynne is a good teacher dont know

Thank You Again

--------------- Added [DATE]1371408729[/DATE] at [TIME]1371408729[/TIME] ---------------

sorrrry

it is not working I did it now???

--------------- Added [DATE]1371411515[/DATE] at [TIME]1371411515[/TIME] ---------------

I did this is not working

PHP Code:
        $this->block_data['albumbits2'] = $albumbits2;

vB_Template::preRegister('memberinfo_block_photos', array('block_data' => $block_data)); 
--------------- Added [DATE]1371412205[/DATE] at [TIME]1371412205[/TIME] ---------------

I did this

still not working

PHP Code:
        $this->block_data['albumbits2'] = $albumbits2;

vB_Template::preRegister('memberinfo_block_photos', array('albumcount' => $albumcount));
vB_Template::preRegister('memberinfo_block_photos', array('albumbits2' => $albumbits2));
vB_Template::preRegister('memberinfo_block_photos', array('block_data' => $block_data));    
vB_Template::preRegister('memberinfo_block_photos', array('block_data['albumbits2']' => $block_data['albumbits2']));

vB_Template::preRegister('memberinfo_block_photos', array('block_data.albumbits2' => $block_data.albumbits2.)); 
Reply With Quote
  #15  
Old 06-17-2013, 04:39 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What exactly isn't working - the whole page?
Reply With Quote
  #16  
Old 06-17-2013, 06:05 PM
Honourable Honourable is offline
 
Join Date: Oct 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no the if statement everything working yet the if statements as well as the count variable I have registered it yet is not working

waiting for your solution

many thanks in advance

--------------- Added [DATE]1371496940[/DATE] at [TIME]1371496940[/TIME] ---------------

Hey Lynne,

It retrieves the albums yet if I add the if statements
and set the variable of data_block

as you said

Quote:
You would need to set that variable first:

$this->block_data['albumbits2'] = $albumbits2;
add the above code in php as i attached in the privous post

the if statement is not working once I add it around the albums and buttons

it displays that there is no album

the template as follow

PHP Code:
<div id="view-photos" class="<vb:if condition="$selected_tab == 'photos'">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">User albums</h4>
    </
div>

<
div class="albums">
    <
h5 class="blocksubhead smaller">
        <
class="textcontrol" href="album.php?{vb:raw session.sessionurl}do=addalbum">{vb:rawphrase add_album}</a>
        <
span class="albums_total">{vb:raw albumcount}</span> {vb:rawphrase albums}
    </
h5>
    <
div class="blockbody userprof_content userprof_content_border">
        <
vb:if condition="$block_data['albumbits2']">
        <
ul class="albumslist blockrow image_link_list">
            {
vb:raw albumbits2}
        </
ul>
        <
vb:else />
        <
div class="blockrow member_blockrow">
            {
vb:rawphrase you_have_not_created_any_albums}
        </
div>
        </
vb:if>
    </
div>
</
div>

</
div
you can see the if statements in this bet

PHP Code:
        <vb:if condition="$block_data['albumbits2']">
        <
ul class="albumslist blockrow image_link_list">
            {
vb:raw albumbits2}
        </
ul>
        <
vb:else />
        <
div class="blockrow member_blockrow">
            {
vb:rawphrase you_have_not_created_any_albums}
        </
div>
        </
vb:if> 
it goes to else which is there is no album when there is

I have tried all what you have suggested me

yet is not working??
Reply With Quote
  #17  
Old 06-17-2013, 07:20 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you not using this:
<vb:if condition="$albumbits2">

instead of this:
<vb:if condition="$block_data['albumbits2']">

You know that $albumbits2 is defined and registered for use in that template, so why aren't you using it?
Reply With Quote
  #18  
Old 06-18-2013, 12:59 PM
Honourable Honourable is offline
 
Join Date: Oct 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

then why I'm setting this

$this->block_data['albumbits2'] = $albumbits2;

?

I thought this is block data a permission array that holds permission for many things
one of them albumbits2????

am I thinking in the right direction??

--------------- Added [DATE]1371564134[/DATE] at [TIME]1371564134[/TIME] ---------------

also registered albumcount yet is not display as well as this variable is not display??
{vb:raw userinfo.userid}

--------------- Added [DATE]1371564907[/DATE] at [TIME]1371564907[/TIME] ---------------

trying randomly

tried this

vB_Template:reRegister('memberinfo_block_photos' , array('albumbits2' => $albumbits2));
vB_Template:reRegister('memberinfo_block_photos' , array('albumcount' => $albumcount));
vB_Template:reRegister('memberinfo_block_photos' , array('userinfo' => $userinfo));
vB_Template:reRegister('memberinfo_block_photos' , array('albums' => $albums));
Reply With Quote
  #19  
Old 06-18-2013, 06:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And what code did you add to your plugin to get the album count or userinfo - I don't see any code there to define those. And, $albums is not something you can use - it is the query, so it's just a pointer really.

As for why you are trying to use $block_data['albumbits2'], I don't know. If you are just trying to only add code if $albumbits2 exists, then I would use that variable.
Reply With Quote
  #20  
Old 06-19-2013, 12:55 PM
Honourable Honourable is offline
 
Join Date: Oct 2010
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok can you tell me how to display the album counts???
Reply With Quote
Reply


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:45 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.04601 seconds
  • Memory Usage 2,296KB
  • 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
  • (6)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
  • (2)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