Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Using XThreads Custom Thread Field to Hold Additional Data
techu Offline
Member
***
Posts: 154
Joined: Sep 2010
Post: #12
RE: Using XThreads Custom Thread Field to Hold Additional Data
(03-30-2011 03:39 PM)leefish Wrote:  
(03-29-2011 10:11 AM)ZiNgA BuRgA Wrote:  But there's another thing you could do - just simply conditionally define LOAD_SESSION based on whether the user is trying to view a thumbnail or not.  May require a fair bit of editing though.

I think that would be seriously beyond my programming skills at the moment.

But, thanks for the explanation - I did not realise that the Core MYBB loaded like that.

you can take a look at xmlhttp.php, it loads a lite version of the core. You can get a idea from that..



hey yumi I was wondering why did you include this piece of code in xthreads_attach.php

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
define('LOAD_SESSION', false);
// need session class, mybb class, db class
// OR, just check cookie for session & load DB to verify session + check perms
// if using error_no_permission, must load entire global core



if(LOAD_SESSION) {
	// we'll be lazy and just load the full MyBB core
	define('IN_MYBB', 1);
	define('THIS_SCRIPT', 'xthreads_attach.php');
	define('NO_ONLINE', 1); // TODO: check
	
	require './global.php';
	
	// TODO: disable calling send_page_headers()
	
	// TODO: user perms
	// TODO: maybe do online for WOL
}


[Image: banner.png]
03-31-2011 12:39 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Using XThreads Custom Thread Field to Hold Additional Data - techu - 03-31-2011 12:39 AM

 Standard Tools
Forum Jump: