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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2011, 02:40 PM
benny_quach benny_quach is offline
 
Join Date: Jul 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help! Items showing 1 time on 1 page

My forum is using vbshop and I got trouble like this
Attachment 133966

Item are show under every post. I want each member's item just showing 1 time on 1 page. The forum will be slow in loading if that member talking many post in 1 page. I was successful with signnature but I cant do it with item.

Please help me to hide the items onder 2nd post
this is my postbit_display_complete (in hook fodel of vbshop)

Quote:
<?php

if (!VBSHOP::$postbitcache["$post[userid]"])
{
$vbshop_postbit = array();
//if ($this->registry->options['dbtech_vbshop_enablepoints'])
//{
($hook = vBulletinHook::fetch_hook('dbtech_vbshop_postbit') ) ? eval($hook) : false;

foreach ((array)VBSHOP::$cache['currency'] as $currencyid => $currency)
{
if (!$currency['active'])
{
// Inactive currency
continue;
}

// Set the points
$currency['points'] = doubleval(VBSHOP::$cache['currencies'][$post['userid']][$currencyid]);

// Create the main stats template
$templater = vB_Template::create('dbtech_vbshop_postbit_stats') ;
$templater->register('currency', $currency);
$vbshop_postbit['point'] .= $templater->render();
}
//}

// Ensure we have everything in order
VBSHOP::verify_purchases($post);
if (!is_array($post['dbtech_vbshop_purchase']))
{
// Just to be 100% sure
$post['dbtech_vbshop_purchase'] = array();
}
krsort($post['dbtech_vbshop_purchase'], SORT_NUMERIC);

$i = 0;
$feature = 'item';
//if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"])
//{
$purchases = '';
foreach ((array)$post['dbtech_vbshop_purchase'] as $purchaseid => $purchase)
{
if ($purchase['feature'] != $feature)
{
// We only want achievements atm
continue;
}

if (!$purchase['active'])
{
// We only want achievements atm
continue;
}

if ($purchase['hidden'])
{
// We only want achievements atm
continue;
}

if ($purchase['userid'] != $post['userid'])
{
// We're not displaying stuff not intended for us
continue;
}

// This is the info we need
$purchase = array_merge($purchase, (array)VBSHOP::$cache[$purchase['feature']][$purchase['featureid']]);

if ($i >= $this->registry->options['dbtech_vbshop_numgifts'])
{
// That's too many!
continue;
}

// Ensure this is set
$purchase['icon'] = ($purchase['icon'] ? $purchase['icon'] : 'unknown.gif');


// Create the achievement bit
$templater = vB_Template::create('dbtech_vbshop_postbit_purchas ebit');
$templater->register('purchase', $purchase);
$purchases .= $templater->render();

$i++;
}

if ($purchases)
{
$templater = vB_Template::create('dbtech_vbshop_postbit_purchas e');
$templater->register('phrase', $vbphrase["dbtech_vbshop_{$feature}s"]);
$templater->register('purchases', $purchases);
$vbshop_postbit["$feature"] = $templater->render();

if (intval($this->registry->versionnumber) == 3)
{
$vbshop_postbit["$feature"] = '<div>' . $vbshop_postbit["$feature"] . '</div>';
}
else
{
$vbshop_postbit["$feature"] = '<dd>' . $vbshop_postbit["$feature"] . '</dd>';
}
}
//}

// Cache this
VBSHOP::$postbitcache["$post[userid]"] = $vbshop_postbit;
}


VBSHOP::$postbitcache2 = VBSHOP::$postbitcache["$post[userid]"];
foreach (VBSHOP::$postbitcache2 as $feature => &$template)
{
// Ensure this is updated with the proper postid
//$template = str_replace('[postid]', $post['postid'], $template);

if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"] & 1)
{
// We're hooking into this location
//$template_hook['postbit_userinfo_left'] .= '<dl class="userinfo_extra">' . $template . '</dl>';
}

if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"] & 2)
{
// We're hooking into this location
$template_hook['postbit_signature_start'] .= $template;
}

if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"] & 4)
{
// We're hooking into this location
//$template_hook['postbit_userinfo_right'] .= '<div class="imlinks"><dl class="userinfo_extra">' . $template . '</dl></div>';
}

if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"] & 8)
{
// We're hooking into this location
//$template_hook['postbit_signature_start'] .= '<div class="userinfo"><dl class="userinfo_extra">' . $template . '</dl></div>';
}

if ($this->registry->options["dbtech_vbshop_{$feature}s_postbit"] & 16)
{
// We're hooking into this location
//$template_hook['postbit_signature_end'] .= '<div class="userinfo"><dl class="userinfo_extra">' . $template . '</dl></div>';
}
}


$vbshop_postbit = VBSHOP::$postbitcache2;
if (intval($this->registry->versionnumber) > 3)
{
vB_Template:PreRegister('postbit', array('vbshop_postbit' => VBSHOP::$postbitcache2));
vB_Template:PreRegister('postbit_legacy', array('vbshop_postbit' => VBSHOP::$postbitcache2));
}


if (class_exists('POSTBITTABS'))
{
if (!POSTBITTABS::$created['dbtech_vbshop'])
{
// DragonByte Tech: Postbit Tabs - registerView()
POSTBITTABS::registerView('dbtech_vbshop_points', 'DragonByte Tech: vBShop - Points Display', (intval($this->registry->versionnumber) == 3 ? '{$vbshop_postbit[point]}' : '{vb:raw vbshop_postbit.point}'));
POSTBITTABS::registerView('dbtech_vbshop_gifts', 'DragonByte Tech: vBShop - Items', (intval($this->registry->versionnumber) == 3 ? '{$vbshop_postbit[item]}' : '{vb:raw vbshop_postbit.item}'));

// Set created
POSTBITTABS::$created['dbtech_vbshop'] = true;
}
}
?>
Reply With Quote
  #2  
Old 10-20-2011, 02:50 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Questions/Problems regarding modifications/styles need to be asked in the modification/style thread or site forum. That is where the support for modification/style is - not out here in the main forums. Please note that if a modification/style is unsupported (or even if it says it is supported), you may be on your own if you chose to install it.
Reply With Quote
  #3  
Old 10-20-2011, 05:08 PM
benny_quach benny_quach is offline
 
Join Date: Jul 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

U will not understand the question if I post wrong place ? Or you dont want help ?
Please look at it if you don't want to help. Let others help me
ty
Reply With Quote
  #4  
Old 10-20-2011, 05:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is the totally wrong place to post for help. Where did you get the modification? That is where you should be posting for help - in that exact thread where you downloaded it from.
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 12:55 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.04271 seconds
  • Memory Usage 2,223KB
  • Queries Executed 14 (?)
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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete