Admin Notepad Function?
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #1
Admin Notepad Function?
"Administrator Notes
These notes are public to all administrators."

Those notes are easy to find in the datacache. Where is the function to retrieve the un-serialized text?


Edit:
I found this
$cache->update("adminnotes", $update_cache);  
...so I must be getting close.  Smile

Edit#2:

$adminmessage = $cache->read("adminnotes");
in the file
admin/modules/home/index.php

Now the only question is what to include in a 'custom' page, will "global.php" be enough?   (Edit: Yes, and No)


Edit#3:

PHP Code:
1
2
3
4
5
6
7
<?php
define('IN_MYBB', 1);
require_once "./global.php";

$adminmessage = $cache->read("adminnotes");
echo $adminmessage['adminmessage'];
?> 


Looks fine only when using view source (in the browser), still working on formatting...


Edit#4:
One (simple) answer to question #1

PHP Code:
1
2
3
4
5
6
7
8
9
10
<?php

define('IN_MYBB', 1);
require_once "./global.php";
$adminmessage = $cache->read("adminnotes");
?>

<textarea rows="30" cols="110">
<?php echo $adminmessage['adminmessage'] ; ?> 
</textarea>



Question #2
What file(s) to include to use the...
'  $table = new Table;  '  and   ' $form = new Form("index.php", "post"); '

...table and form functions?

Thank you


Edit#5:

require_once MYBB_ADMIN_DIR."inc/class_form.php";
require_once MYBB_ADMIN_DIR."inc/class_table.php";

Happy Thanksgiving  Smile

(This post was last modified: 11-25-2010 04:16 PM by Firefox Wins.)
11-25-2010 03:23 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Admin Notepad Function? - Firefox Wins - 11-25-2010 03:23 PM
RE: Admin Notepad Function? - ZiNgA BuRgA - 11-25-2010, 04:26 PM
RE: Admin Notepad Function? - Firefox Wins - 11-25-2010, 06:40 PM

 Standard Tools
Forum Jump: