MyBB Threadcache
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #10
RE: MyBB Threadcache
Quote:Can I use the &$thread like I would on a postbit plugin?

Something like that, just than only instead of:
Quote:function bleh(&$thread)
{

You will use:
Quote:function bleh()
{
global $thread;

$thread is not passes by reference here but is on the global scope.

Mege with Zinga Burga's code and you will have something like this:

PHP Code:
1
2
3
4
5
6
7
8
9
10
function bleh() {
global $thread;
static $something_cache;
if(!isset($something_cache)) {
  $something_cache = load_cache();
}

$thread['favorites'] = $something_cache[$thread['tid']]['favorites'];

}


Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
03-02-2015 06:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
MyBB Threadcache - leefish - 02-22-2015, 11:54 AM
RE: MyBB Threadcache - ZiNgA BuRgA - 02-23-2015, 04:44 PM
RE: MyBB Threadcache - leefish - 02-25-2015, 02:22 PM
RE: MyBB Threadcache - Sama34 - 02-27-2015, 04:08 PM
RE: MyBB Threadcache - leefish - 02-27-2015, 08:20 PM
RE: MyBB Threadcache - ZiNgA BuRgA - 02-27-2015, 08:37 PM
RE: MyBB Threadcache - Sama34 - 02-28-2015, 04:48 PM
RE: MyBB Threadcache - leefish - 03-01-2015, 02:20 PM
RE: MyBB Threadcache - ZiNgA BuRgA - 03-01-2015, 05:23 PM
RE: MyBB Threadcache - Sama34 - 03-02-2015 06:52 AM

 Standard Tools
Forum Jump: