View Full Version : Display albums in member profile
John Tran
07-20-2011, 07:55 PM
I've been playing around the the memberinfo template for awhile now, I moved the album that appears on the sidebar into a tab. That works, but I would like to find a way to display ALL of the member albums in a new profile tab.
This is the code I used to display the sidebar albums in my current tab "
{vb:raw blocks.albums}" I would like to know if there is a way to display all of my albums while keeping the formatting I all ready created on "album.php"
John Tran
07-28-2011, 01:17 PM
Still nothing? Man, I swear Vbulletin forum is not as helpful as some of the other communities out there, maybe because this isn't open source?
I see that you found the article on creating profile tabs. You probably want to look in includes/class_profileblock.php, function vB_ProfileBlock_Albums::prepare_output() around line 1023. Basically it does a query of the album table and formats the output by rendering the memberinfo_albumbit template for each album.
Honourable
06-15-2013, 02:19 PM
any actual way to this???? other than just hinting out?
Lynne
06-15-2013, 02:47 PM
You could see if there is a modification already or you can hire someone to write one. This is a user run community where we help others customize their site. We can't go and code up everything for you, but we are willing to point you in the right direction and when you get stuck, post up your code, and we can help you out.
Honourable
06-16-2013, 11:31 AM
Hey Lynne,
I really tried my best yet I couldnt make yet work
you can check it here the code so far
if (isset($vbulletin->GPC['tab']))
{
$selected_tab = $vbulletin->GPC['tab'];
}
$blockinfo['title'] = "الصور";
$blockid = "photos";
$taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=photos#photos";
$templater = vB_Template::create('memberinfo_tab');
$templater->register('selected_tab', $selected_tab);
$templater->register('relpath', $relpath);
$templater->register('blockinfo', $blockinfo);
$templater->register('blockid', $blockid);
$templater->register('taburl', $taburl);
$template_hook['profile_tabs_last'] .= $templater->render();
// ### Your code to fill the tab ###
// Don't forget you need to register any variables for use in templates
function prepare_output($id = '', $options = array())
{
global $show, $vbphrase;
if (is_array($options))
{
$options = array_merge($this->option_defaults, $options);
}
else
{
$options = $this->option_defaults;
}
require_once(DIR . '/includes/functions_album.php');
$state = array('public');
if (can_view_private_albums($this->profile->userinfo['userid']))
{
$state[] = 'private';
}
if (can_view_profile_albums($this->profile->userinfo['userid']))
{
$state[] = 'profile';
}
if (!$this->profile->prepared['myprofile'])
{
if (!can_moderate(0, 'canmoderatepictures'))
{
$sql = "AND album.visible > 0";
}
else
{
$sql = "AND (album.visible > 0 OR album.moderation > 0)";
}
}
else
{
$sql = "";
}
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
($hook = vBulletinHook::fetch_hook('member_profileblock_alb um_query')) ? eval($hook) : false;
$albums = $this->registry->db->query_read_slave("
SELECT album.*,
a.attachmentid, album.moderation,
fd.thumbnail_dateline, fd.thumbnail_width, fd.thumbnail_height, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail
$hook_query_fields
FROM " . TABLE_PREFIX . "album AS album
LEFT JOIN " . TABLE_PREFIX . "attachment AS a ON (album.coverattachmentid = a.attachmentid)
LEFT JOIN " . TABLE_PREFIX . "filedata AS fd ON (fd.filedataid = a.filedataid)
$hook_query_joins
WHERE
album.userid = ". $this->profile->userinfo['userid'] . "
AND
album.state IN ('" . implode("', '", $state) . "')
$sql
$hook_query_where
ORDER BY album.lastpicturedate DESC
");
$albumbits = '';
while ($album = $this->registry->db->fetch_array($albums))
{
$album['picturedate'] = vbdate($this->registry->options['dateformat'], $album['lastpicturedate'], true);
$album['picturetime'] = vbdate($this->registry->options['timeformat'], $album['lastpicturedate']);
$album['title_html'] = fetch_word_wrapped_string(fetch_censored_text($alb um['title']));
$album['coverdimensions'] = ($album['thumbnail_width'] ? "width=\"$album[thumbnail_width]\" height=\"$album[thumbnail_height]\"" : '');
if ($album['moderation'])
{
$album['moderatedcount'] = vb_number_format($album['moderation']);
$show['moderated'] = true;
}
else
{
$show['moderated'] = false;
}
$templater = vB_Template::create('memberinfo_block_photos');
$templater->register('album', $album);
$albumbits .= $templater->render();
}
$photos_tab_content = $albumbits;
}
$templater = vB_Template::create('memberinfo_block_photos');
$templater->register('selected_tab', $selected_tab);
$templater->register('photos_tab_content', $photos_tab_content);
$template_hook['profile_tabs'] .= $templater->render();
hope if you can help me
as I removed the LIMIT from the sql query
so I registered the array contain everything
added to the templates that already created and delcared
yet it doesnt display the albums????
--------------- Added 1371390920 at 1371390920 ---------------
what I have don so far
if (isset($vbulletin->GPC['tab']))
{
$selected_tab = $vbulletin->GPC['tab'];
}
$blockinfo['title'] = "الصور";
$blockid = "photos";
$taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=photos#photos";
$templater = vB_Template::create('memberinfo_tab');
$templater->register('selected_tab', $selected_tab);
$templater->register('relpath', $relpath);
$templater->register('blockinfo', $blockinfo);
$templater->register('blockid', $blockid);
$templater->register('taburl', $taburl);
$template_hook['profile_tabs_last'] .= $templater->render();
// ### Your code to fill the tab ###
// Don't forget you need to register any variables for use in templates
global $show, $vbphrase;
require_once(DIR . '/includes/functions_album.php');
$state = array('public');
if (can_view_private_albums($this->profile->userinfo['userid']))
{
$state[] = 'private';
}
if (can_view_profile_albums($this->profile->userinfo['userid']))
{
$state[] = 'profile';
}
if (!$this->profile->prepared['myprofile'])
{
if (!can_moderate(0, 'canmoderatepictures'))
{
$sql = "AND album.visible > 0";
}
else
{
$sql = "AND (album.visible > 0 OR album.moderation > 0)";
}
}
else
{
$sql = "";
}
$albums = $this->registry->db->query_read_slave("
SELECT album.*,
a.attachmentid, album.moderation,
fd.thumbnail_dateline, fd.thumbnail_width, fd.thumbnail_height, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail
$hook_query_fields
FROM " . TABLE_PREFIX . "album AS album
LEFT JOIN " . TABLE_PREFIX . "attachment AS a ON (album.coverattachmentid = a.attachmentid)
LEFT JOIN " . TABLE_PREFIX . "filedata AS fd ON (fd.filedataid = a.filedataid)
$hook_query_joins
WHERE
album.userid = ". $this->profile->userinfo['userid'] . "
AND
album.state IN ('" . implode("', '", $state) . "')
$sql
$hook_query_where
ORDER BY album.lastpicturedate DESC
");
$albumbits = '';
while ($album = $this->registry->db->fetch_array($albums))
{
$album['picturedate'] = vbdate($this->registry->options['dateformat'], $album['lastpicturedate'], true);
$album['picturetime'] = vbdate($this->registry->options['timeformat'], $album['lastpicturedate']);
$album['title_html'] = fetch_word_wrapped_string(fetch_censored_text($alb um['title']));
$album['coverdimensions'] = ($album['thumbnail_width'] ? "width=\"$album[thumbnail_width]\" height=\"$album[thumbnail_height]\"" : '');
if ($album['moderation'])
{
$album['moderatedcount'] = vb_number_format($album['moderation']);
$show['moderated'] = true;
}
else
{
$show['moderated'] = false;
}
$templater = vB_Template::create('memberinfo_block_photosbit');
$templater->register('album', $album);
$albumbits .= $templater->render();
}
$templater = vB_Template::create('memberinfo_block_photos');
$templater->register('selected_tab', $selected_tab);
$templater->register('albumbits', $albumbits);
$template_hook['profile_tabs'] .= $templater->render();
deleted functions just made straigt away plugin work
also removed
this
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
($hook = vBulletinHook::fetch_hook('member_profileblock_alb um_query')) ? eval($hook) : false;
and added the plugin to work in hook
member_profileblock_album_query
so the tab disappeared
????
--------------- Added 1371391385 at 1371391385 ---------------
so far
splitted the plugin into to plugins
once to work in
member_profileblock_album_query
to retrieve all albums
$albums = $this->registry->db->query_read_slave("
SELECT album.*,
a.attachmentid, album.moderation,
fd.thumbnail_dateline, fd.thumbnail_width, fd.thumbnail_height, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail
$hook_query_fields
FROM " . TABLE_PREFIX . "album AS album
LEFT JOIN " . TABLE_PREFIX . "attachment AS a ON (album.coverattachmentid = a.attachmentid)
LEFT JOIN " . TABLE_PREFIX . "filedata AS fd ON (fd.filedataid = a.filedataid)
$hook_query_joins
WHERE
album.userid = ". $this->profile->userinfo['userid'] . "
AND
album.state IN ('" . implode("', '", $state) . "')
$sql
$hook_query_where
ORDER BY album.lastpicturedate DESC
");
$albumbits = '';
while ($album = $this->registry->db->fetch_array($albums))
{
$album['picturedate'] = vbdate($this->registry->options['dateformat'], $album['lastpicturedate'], true);
$album['picturetime'] = vbdate($this->registry->options['timeformat'], $album['lastpicturedate']);
$album['title_html'] = fetch_word_wrapped_string(fetch_censored_text($alb um['title']));
$album['coverdimensions'] = ($album['thumbnail_width'] ? "width=\"$album[thumbnail_width]\" height=\"$album[thumbnail_height]\"" : '');
$templater = vB_Template::create('memberinfo_block_photosbit');
$templater->register('album', $album);
$albumbits .= $templater->render();
}
$templater = vB_Template::create('memberinfo_block_photos');
$templater->register('albumbits', $albumbits);
and the second to add the tab that contained the albums
if (isset($vbulletin->GPC['tab']))
{
$selected_tab = $vbulletin->GPC['tab'];
}
$blockinfo['title'] = "الصور";
$blockid = "photos";
$taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=photos#photos";
$templater = vB_Template::create('memberinfo_tab');
$templater->register('selected_tab', $selected_tab);
$templater->register('relpath', $relpath);
$templater->register('blockinfo', $blockinfo);
$templater->register('blockid', $blockid);
$templater->register('taburl', $taburl);
$template_hook['profile_tabs_last'] .= $templater->render();
// ### Your code to fill the tab ###
// Don't forget you need to register any variables for use in templates
$templater = vB_Template::create('memberinfo_block_photos');
$templater->register('selected_tab', $selected_tab);
$template_hook['profile_tabs'] .= $templater->render();
which is in hook member_complete
still not displaying the albums????
Lynne
06-16-2013, 03:11 PM
What about the template memberinfo_block_photos ? We need that code also.
When I create that template and just put in the content:
This is a test.
it shows up for me. So, that means it is something in your php code itself that is making it not work.
Honourable
06-16-2013, 03:32 PM
Here is what I have done
template memberinfo_block_photos
<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">
<a 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">
<ul class="albumslist blockrow image_link_list">
{vb:raw albumbits}
</ul>
</div>
</div>
</div>
template memberinfo_block_photosbit
<li class="floatcontainer">
<div class="albumthumb_container image_container">
<a class="album_showcase image_bit" href="album.php?{vb:raw session.sessionurl}albumid={vb:raw album.albumid}">
<vb:if condition="$album['hasthumbnail']">
<img alt="{vb:raw album.title_html}" class="album_showcase" src="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw album.attachmentid}&thumb=1&d={vb:raw album.thumbnail_dateline}"/>
<vb:else />
<img alt="{vb:raw album.title_html}" class="album_showcase" src="{vb:stylevar imgdir_misc}/default-album.png"/>
</vb:if>
</a>
</div>
<div class="album_content row_content">
<h6>
<a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw album.albumid}">{vb:raw album.title_html}</a>
<vb:if condition="$show['moderated']"> <img class="inlineimg" src="{vb:stylevar imgdir_misc}/moderated_small.gif" alt="{vb:rawphrase x_moderated_pictures, {vb:raw album.moderatedcount}}" /></vb:if>
</h6>
<vb:if condition="$album['lastpicturedate']">
<span class="shade">{vb:raw album.picturedate}<vb:if condition="$show['detailedtime']">{vb:raw album.picturetime}</vb:if></span>
</vb:if>
</div>
</li>
and each plugin of the two I mentioned above
works with each template
i.e. the plugin with hook member_profileblock_album_query
create the albums bits alltogather which is temaplate memberinfo_block_photosbit
and the plugin member_complete
create the albums whole template which is memberinfo_block_photos that contains
memberinfo_block_photosbit
hope this cleared everything????
Lynne
06-16-2013, 04:23 PM
You are creating the template memberinfo_block_photos in both plugins. In the first one you simply want to preregister the variables for use in that template, not create it also.
I would change $albumbits to $albumbits2 throughout.
Change the id of the tab from photos to photos2 throughout (both plugin and template).
I got it to work with those changes, although it will need some formatting to be done.
Honourable
06-16-2013, 04:30 PM
please give me two mintues and I will update u with results dont log off please!
thank you
--------------- Added 1371404477 at 1371404477 ---------------
Here is what I have done but is not working
created two templates
created two plugins
one template with name memberinfo_block_mpphotos
contains
<div id="view-photos" class="<vb:if condition="$selected_tab == 'mpphotos'">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">
<a 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">
<ul class="albumslist blockrow image_link_list">
{vb:raw albumbits2}
</ul>
</div>
</div>
</div>
second template with name memberinfo_block_mpphotosbit
contains
<li class="floatcontainer">
<div class="albumthumb_container image_container">
<a class="album_showcase image_bit" href="album.php?{vb:raw session.sessionurl}albumid={vb:raw album.albumid}">
<vb:if condition="$album['hasthumbnail']">
<img alt="{vb:raw album.title_html}" class="album_showcase" src="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw album.attachmentid}&thumb=1&d={vb:raw album.thumbnail_dateline}"/>
<vb:else />
<img alt="{vb:raw album.title_html}" class="album_showcase" src="{vb:stylevar imgdir_misc}/default-album.png"/>
</vb:if>
</a>
</div>
<div class="album_content row_content">
<h6>
<a href="album.php?{vb:raw session.sessionurl}albumid={vb:raw album.albumid}">{vb:raw album.title_html}</a>
<vb:if condition="$show['moderated']"> <img class="inlineimg" src="{vb:stylevar imgdir_misc}/moderated_small.gif" alt="{vb:rawphrase x_moderated_pictures, {vb:raw album.moderatedcount}}" /></vb:if>
</h6>
<vb:if condition="$album['lastpicturedate']">
<span class="shade">{vb:raw album.picturedate}<vb:if condition="$show['detailedtime']">{vb:raw album.picturetime}</vb:if></span>
</vb:if>
</div>
</li>
and with the plugins
first plugin with hook position member_profileblock_album_query
contains
$albums = $this->registry->db->query_read_slave("
SELECT album.*,
a.attachmentid, album.moderation,
fd.thumbnail_dateline, fd.thumbnail_width, fd.thumbnail_height, IF(fd.thumbnail_filesize > 0, 1, 0) AS hasthumbnail
$hook_query_fields
FROM " . TABLE_PREFIX . "album AS album
LEFT JOIN " . TABLE_PREFIX . "attachment AS a ON (album.coverattachmentid = a.attachmentid)
LEFT JOIN " . TABLE_PREFIX . "filedata AS fd ON (fd.filedataid = a.filedataid)
$hook_query_joins
WHERE
album.userid = ". $this->profile->userinfo['userid'] . "
AND
album.state IN ('" . implode("', '", $state) . "')
$sql
$hook_query_where
ORDER BY album.lastpicturedate DESC
");
$albumbits2 = '';
while ($album = $this->registry->db->fetch_array($albums))
{
$album['picturedate'] = vbdate($this->registry->options['dateformat'], $album['lastpicturedate'], true);
$album['picturetime'] = vbdate($this->registry->options['timeformat'], $album['lastpicturedate']);
$album['title_html'] = fetch_word_wrapped_string(fetch_censored_text($alb um['title']));
$album['coverdimensions'] = ($album['thumbnail_width'] ? "width=\"$album[thumbnail_width]\" height=\"$album[thumbnail_height]\"" : '');
$templater = vB_Template::create('memberinfo_block_mpphotosbit' );
$templater->register('album', $album);
$albumbits2 .= $templater->render();
$templater = vB_Template::create('memberinfo_block_mpphotos');
$templater->register('albumbits2', $albumbits2);
}
$templater = vB_Template::create('memberinfo_block_mpphotos');
$templater->register('albumbits2', $albumbits2);
second plugin with hook position member_complete
contains
if (isset($vbulletin->GPC['tab']))
{
$selected_tab = $vbulletin->GPC['tab'];
}
$blockinfo['title'] = "الصور";
$blockid = "mpphotos";
$taburl = $memberurl = fetch_seo_url('member', $prepared) . "&tab=mpphotos#mpphotos";
$templater = vB_Template::create('memberinfo_tab');
$templater->register('selected_tab', $selected_tab);
$templater->register('relpath', $relpath);
$templater->register('blockinfo', $blockinfo);
$templater->register('blockid', $blockid);
$templater->register('taburl', $taburl);
$template_hook['profile_tabs_last'] .= $templater->render();
// ### Your code to fill the tab ###
// Don't forget you need to register any variables for use in templates
$templater = vB_Template::create('memberinfo_block_mpphotos');
$templater->register('selected_tab', $selected_tab);
$template_hook['profile_tabs'] .= $templater->render();
is not really working?????
Lynne
06-16-2013, 04:45 PM
I was not talking about the template names, but about the id for your tab:
<div id="view-photos"
Change that to mpphotos now.
<div id="view-mpphotos"
Remove this:
$templater = vB_Template::create('memberinfo_block_mpphotos');
$templater->register('albumbits2', $albumbits2);
Replace with:
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.)
Honourable
06-16-2013, 04:48 PM
seconds just testing
pair with me kindly
--------------- Added 1371405329 at 1371405329 ---------------
I did to the code exactly as you said but it doesnt work????
--------------- Added 1371405422 at 1371405422 ---------------
btw my vbulletin version is 4.2.0
--------------- Added 1371405498 at 1371405498 ---------------
heeeeeeeeeeeeeeey it does work i really thank you from the deap of my small heart
ur so helpful
thank you too much
--------------- Added 1371406675 at 1371406675 ---------------
just any suggestions to make the if statements work as they are allocated with $block_data
for example
<vb:if condition="$block_data['albumbits2']">
Lynne
06-16-2013, 05:44 PM
You would need to set that variable first:
$this->block_data['albumbits2'] = $albumbits2;
Honourable
06-16-2013, 05:50 PM
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 1371408729 at 1371408729 ---------------
sorrrry
it is not working I did it now???
--------------- Added 1371411515 at 1371411515 ---------------
I did this is not working
$this->block_data['albumbits2'] = $albumbits2;
vB_Template::preRegister('memberinfo_block_photos' , array('block_data' => $block_data));
--------------- Added 1371412205 at 1371412205 ---------------
I did this
still not working
$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.));
Lynne
06-17-2013, 04:39 AM
What exactly isn't working - the whole page?
Honourable
06-17-2013, 06:05 PM
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 1371496940 at 1371496940 ---------------
Hey Lynne,
It retrieves the albums yet if I add the if statements
and set the variable of data_block
as you said
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
<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">
<a 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
<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??
Lynne
06-17-2013, 07:20 PM
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?
Honourable
06-18-2013, 12:59 PM
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 1371564134 at 1371564134 ---------------
also registered albumcount yet is not display as well as this variable is not display??
{vb:raw userinfo.userid}
--------------- Added 1371564907 at 1371564907 ---------------
trying randomly
tried this
vB_Template::preRegister('memberinfo_block_photos' , array('albumbits2' => $albumbits2));
vB_Template::preRegister('memberinfo_block_photos' , array('albumcount' => $albumcount));
vB_Template::preRegister('memberinfo_block_photos' , array('userinfo' => $userinfo));
vB_Template::preRegister('memberinfo_block_photos' , array('albums' => $albums));
Lynne
06-18-2013, 06:00 PM
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.
Honourable
06-19-2013, 12:55 PM
Ok can you tell me how to display the album counts???
Lynne
06-19-2013, 03:13 PM
Probably something like:
$albumcount = $this->registry->db->affected_rows();
Honourable
06-22-2013, 06:29 PM
thank you very much
I would appreciate your help in this thread
https://vborg.vbsupport.ru/showthread.php?p=2429816#post2429816
many thanks in advance
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.