Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved How do you get $myb->post_code in xmlhttp?
#1
Not Solved
I'm trying to develop a plugin and where it loads a row of chats on an interval in a box.
Kinda like shoutbox, but this plugin focuses on the being able to add people as a friend. It's a must to what I'm trying to accomplish through this plugin.

Here is the code for hooking it into the xmlhttp

$plugins->add_hook("xmlhttp", "shortchat_load_rows");

and the template contains the following link:

"usercp.php?action=do_editlists&add_username={$username}&my_post_key={$mybb->post_code}"

Obviously, I need the post code to make this happen.

here is an example output on the website:

Quote:"http://lcoalhost/mybb/usercp.php?action=do_editlists&add_username=testuser2&my_post_key="

The post codes is completely empty hence the request will be denied due to the lack of the code.

I'm developing this while working on a local server. (I don't have any websites yet)
Sorry if you couldn't test it, but I hope my post was clear enough.

Thanks.
#2
Not Solved
Make sure to global $mybb Smile
#3
Not Solved
(2013-04-28, 06:10 PM)Euan T Wrote: Make sure to global $mybb Smile

Yeah, it's already set. Here:

global $db, $mybb, $parser, $charset, $lang, $templates;


Forum Jump:


Users browsing this thread: 2 Guest(s)