This long sql error relates to caching the ibEconomy portfolio. You might get this error if your ibEconomy is popular enough to be too big to store everything in cache.
The good news is, the fix is simple.
Just go to ACP->ibEconomy->General Settings and change the Cache Portfolio to No. Then recache ibEconomy.
- emoneyCodes
- → Viewing Profile: Topics: emoney
emoney
emoney
Member Since 08 Jul 2010Offline Last Active Today, 02:03 PM




Community Stats
- Group Administrators
- Active Posts 1,091
- Profile Views 5,280
- Member Title Administrator
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Contact Information
Topics I've Started
SQL Error: INSERT INTO board_cache_store
08 April 2012 - 01:46 PM
How to Use New Export Block Feature in CSB 2.0+
16 March 2012 - 08:47 AM
With the release of Custom Sidebar Blocks 2.0, users can now make their custom blocks fully sortable with the new Export Block feature.
To take advantage of this new feature, follow these steps:
To take advantage of this new feature, follow these steps:
- Add the new block from ACP->Custom Sidebar Blocks->Add Block just like you would always do (skip if you have already created the block).
- From the Manage Blocks page, click the Export Block icon in the right column of the block row you want to export.
- Your browser should present you a file to download, so allow your browser to download the file and pay attention to where you downloaded it.
- Now go to ACP->Manage Hooks.
- Scroll down to the bottom where you import hooks and browse for the file you just downloaded.
- Import it.
- To sort the newly imported standalone custom block, go back to ACP->Manage Hooks and drag+drop the hook you just imported to the proper place you want it.
- Now you probably only want to display the block once, so go back to ACP->Custom Sidebar Blocks->Manage Blocks and click Edit on the block.
- Enable the Hide from main custom block? setting. That will hide it from the main batch of custom blocks, so it is only seen once.
Active Users
11 March 2012 - 06:54 PM
Add an "Active Users" block with the following settings (as of CSB 2.0).
This block requires some custom block templates, so first download this hook, extract it, and import the CSBActiveUsersTemplates.xml file from ACP->Manage Hooks
Then create a new Custom Sidebar Block with the following data:
Name: Active Users
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: user.png (or whatever you wish as long as it is in the proper directory and your reference it)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
This block requires some custom block templates, so first download this hook, extract it, and import the CSBActiveUsersTemplates.xml file from ACP->Manage Hooks
Then create a new Custom Sidebar Block with the following data:
Name: Active Users
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: user.png (or whatever you wish as long as it is in the proper directory and your reference it)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
$active = array( 'TOTAL' => 0 ,
'NAMES' => array(),
'GUESTS' => 0 ,
'MEMBERS' => 0 ,
'ANON' => 0 ,
);
if ( $this->settings['show_active'] )
{
if( !$this->settings['au_cutoff'] )
{
$this->settings['au_cutoff'] = 15;
}
//-----------------------------------------
// Get the users from the DB
//-----------------------------------------
$cut_off = $this->settings['au_cutoff'] * 60;
$time = time() - $cut_off;
$rows = array();
$ar_time = time();
if ( $this->memberData['member_id'] )
{
$rows = array( $ar_time.'.'.md5( microtime() ) => array(
'id' => 0,
'login_type' => substr( $this->memberData['login_anonymous'], 0, 1),
'running_time' => $ar_time,
'seo_name' => $this->memberData['members_seo_name'],
'member_id' => $this->memberData['member_id'],
'member_name' => $this->memberData['members_display_name'],
'member_group' => $this->memberData['member_group_id'],
'cns_prefix' => (ipsRegistry::$settings['cns_on']) ? $this->memberData['cns_prefix'] : "",
'cns_suffix' => (ipsRegistry::$settings['cns_on']) ? $this->memberData['cns_suffix'] : ""
)
);
}
if (ipsRegistry::$settings['cns_on'])
{
$customNameStyleJoin = array(
0 => array( 'select' => 'pp.cns_prefix, pp.cns_suffix',
'from' => array( 'profile_portal' => 'pp' ),
'where' => "s.member_id = pp.pp_member_id",
'type' => 'left',
)
);
}
$this->DB->build( array(
'select' => 's.id, s.member_id, s.member_name, s.seo_name, s.login_type, s.running_time, s.member_group, s.uagent_type',
'from' => array( 'sessions' => 's' ),
'where' => "running_time > {$time}",
'add_join' => $customNameStyleJoin
) );
$this->DB->execute();
//-----------------------------------------
// FETCH...
//-----------------------------------------
while ( $r = $this->DB->fetch() )
{
$rows[ $r['running_time'].'.'.$r['id'] ] = $r;
}
krsort( $rows );
//-----------------------------------------
// cache all printed members so we
// don't double print them
//-----------------------------------------
$cached = array();
foreach ( $rows as $result )
{
$last_date = $this->registry->getClass('class_localization')->getDate( $result['running_time'], 'TINY' );
//-----------------------------------------
// Bot?
//-----------------------------------------
if ( isset( $result['uagent_type'] ) && $result['uagent_type'] == 'search' )
{
/* Skipping bot? */
if ( ! $this->settings['spider_active'] )
{
continue;
}
//-----------------------------------------
// Seen bot of this type yet?
//-----------------------------------------
if ( ! $cached[ $result['member_name'] ] )
{
$active['NAMES'][] = IPSMember::makeNameFormatted( $result['member_name'], $result['member_group'], $result['cns_prefix'], $result['cns_suffix'] );
$cached[ $result['member_name'] ] = 1;
}
else
{
//-----------------------------------------
// Yup, count others as guest
//-----------------------------------------
$active['GUESTS']++;
}
}
//-----------------------------------------
// Guest?
//-----------------------------------------
else if ( ! $result['member_id'] OR ! $result['member_name'] )
{
$active['GUESTS']++;
}
//-----------------------------------------
// Member?
//-----------------------------------------
else
{
if ( empty( $cached[ $result['member_id'] ] ) )
{
$cached[ $result['member_id'] ] = 1;
$result['member_name'] = IPSMember::makeNameFormatted( $result['member_name'], $result['member_group'], $result['cns_prefix'], $result['cns_suffix'] );
if ( $result['login_type'] )
{
if ( $this->memberData['g_access_cp'] )
{
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) . "' title='$last_date'>{$result['member_name']}</a>*";
$active['ANON']++;
}
else
{
$active['ANON']++;
}
}
else
{
$active['MEMBERS']++;
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) ."' title='$last_date'>{$result['member_name']}</a>";
}
}
}
}
$active['TOTAL'] = $active['MEMBERS'] + $active['GUESTS'] + $active['ANON'];
$this->users_online = $active['TOTAL'];
}
$this->lang->words['active_users'] = sprintf( $this->lang->words['active_users'], $this->settings['au_cutoff'] );
return $this->registry->output->getTemplate('boards')->customSidebarBlockActiveUsers($active);
Latest Reputation
17 February 2012 - 06:26 PM
Add a "Latest Reputation" block with the following settings (as of CSB 2.0).
This block requires some custom block templates, so first download this hook, extract it, and import the CSBMemberBlockTemplates.xml file from ACP->Manage Hooks:
Then create a new Custom Sidebar Block with the following data:
Name: Latest Reputation
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: star.png (or whatever you wish as long as it is in the proper directory and use reference it)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
This block requires some custom block templates, so first download this hook, extract it, and import the CSBMemberBlockTemplates.xml file from ACP->Manage Hooks:
Then create a new Custom Sidebar Block with the following data:
Name: Latest Reputation
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: star.png (or whatever you wish as long as it is in the proper directory and use reference it)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
/* INIT */
$html = "";
$rows = array();
$storeMe = array();
$mids = array();
$justSayNo = array();
$hasRep = 0;
$member_rows = "";
$maxToShow = 5;
$fiddyCent = $this->registry->getClass('class_forums')->fetchSearchableForumIds( $this->memberData['member_id'], $justSayNo );
$fiddyCent = ( count( $fiddyCent ) ) ? $fiddyCent : array( 0 => 0 );
/* Count member posts */
$this->DB->build( array('select' => '*',
'from' => array( 'reputation_index' => 'ri' ),
'where' => "ri.app = 'forums' AND t.forum_id IN(" . implode( ',', $fiddyCent ) . ')',
'order' => 'rep_date DESC',
'limit' => array( 0, $maxToShow ),
'add_join' => array(
0 => array( 'select' => 'p.topic_id, p.author_id',
'from' => array( 'posts' => 'p' ),
'where' => "p.pid = ri.type_id",
'type' => 'left',
),
1 => array( 'select' => 't.forum_id, t.title_seo',
'from' => array( 'topics' => 't' ),
'where' => "t.tid = p.topic_id",
'type' => 'left',
),
)
) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$hasRep++;
$mids[ $r['author_id'] ] = $r['author_id'];
$mids[ $r['member_id'] ] = $r['member_id'];
$storeMe[] = $r;
}
if ( count( $mids ) )
{
$members = IPSMember::load( $mids );
}
/* Empty array for guests */
$members[0] = array();
if( $hasRep )
{
foreach( $storeMe as $info )
{
$repper = $this->registry->output->getTemplate('boards')->customSidebarBlockMemLink($members[ $info['member_id'] ]);
$postLink = $this->registry->output->getTemplate('boards')->customSidebarBlockTopicLink($info);
$info = IPSMember::buildDisplayData( array_merge( $info, $members[ $info['author_id'] ] ) );
$extraData = "By: ".$repper. " on ".$this->registry->getClass( 'class_localization')->getDate( $info['rep_date'], 'JOINED' )." - ".$postLink;
$member_rows .= $this->registry->output->getTemplate('boards')->customSidebarBlockMemRow($info, $extraData);
$rows[] = $info;
}
}
if ( $member_rows )
{
$html .= $this->registry->getClass('output')->getTemplate('boards')->customSidebarBlockMem( $member_rows );
}
return $html;
Rotating YouTube Videos (Fixed Order)
16 February 2012 - 10:21 PM
Name: Videos
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: youtube.gif if you've uploaded it (I forgot if it comes with IPB in public/style_images/master or not..., if not, find it and upload it there)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
There are two spots that you can configure. Both have ALL CAPS comments next to them so you can easily see what they do and what to add/change. It works fine as it is, but you probably want to change the video embed urls, and possible the number of them.
Enabled : Yes
Hide From Main Custom Block: Depends on where you want it
Full Image Name: youtube.gif if you've uploaded it (I forgot if it comes with IPB in public/style_images/master or not..., if not, find it and upload it there)
Enable RAW HTML/JS mode: No
Enable PHP Mode: Yes
Use Table/Border/Title/Image?: Yes
Remove Ability for User to Collapse Block? Up to you
//CAN CHANGE THIS FROM 3 TO WHATEVER NUMBER YOU WANT TO HAVE, JUST MAKE SURE TO ADD MORE LINES TO THE VIDEO LIST BELOW
$numVids = 3;
// Store youtube [CHANGES NEEDED IN THE 3 URLS BELOW]
$videos = array();
$videos[0] = "http://www.youtube.com/embed/Xqy5nrzhs0g";
$videos[1] = "http://www.youtube.com/embed/f6e4cubBASs";
$videos[2] = "http://www.youtube.com/embed/Hti-PJ3TDGs";
$lastVidSeen = IPSCookie::get('last_csb_video_seen');
$nextVidToWatch = ($lastVidSeen+1) % $numVids;
IPSCookie::set('last_csb_video_seen', $nextVidToWatch);
$html = "<p style='padding: 6px 0;text-align:center'>
<iframe id='random_youtube_vid' src='{$videos[$nextVidToWatch]}' width='250' height='200' frameborder='0' allowfullscreen></iframe>
</p>";
return $html;There are two spots that you can configure. Both have ALL CAPS comments next to them so you can easily see what they do and what to add/change. It works fine as it is, but you probably want to change the video embed urls, and possible the number of them.
- emoneyCodes
- → Viewing Profile: Topics: emoney


Donate Points
Find content
