PDA

View Full Version : Admin. 2 Admin. Notes VIA AdminCP Index


shovel
29 Nov 2002, 20:45
Hello Fellow vBulletin.org Members,

I bring greetings from Appleworld. Lol. Sorry, it's been awhile since my last AdminCP related hack. This time I'm turning more towards Administrator to Administrator communication via quick posting software under the vBulletin AdminCP backend. I don't know, why else would I post it here. Lol. Anyways, here's what it is.

Admin. 2 Admin. Notes Hack is a small hack but can help very greatly especially for those forums who have many Administrators who are always on the go and really don't have the time to post a quick thread. I believe there are more than enough of you out there. ;) This hack is almost portraying itself as a "dry-erase" board for quick messages to leave for your close "vBFamily".

I'm currently unable to take screenshots so if any of you would be willing, I'd love ya da death. Lol. Since it is an Administrative feature, I'm ofcourse, unable to show you a working system, basically why I need someone to install and take screenshots. Well, with all that said and done, the only thing you have to do is click install and download. It comes with a detailed MSNotePad version of the Installation and only requires one table on your database.

Enjoy and thank you.

- Anthony AKA Crater Seraph

UPDATED! ONCE AGAIN! LOL!

-------------------------------------

Many years later...
An update for 2.3.x is underway.
Emails have been sent on the news.
Lemme d/l the software and I'll get it out as quick as possible.
This time, it'll be titled 'Administrator Notes' :nervous:

Talisman
29 Nov 2002, 21:10
Hi Anthony,

This is a useful idea for a hack...... thought I'd set it up and come back with a couple of screenshots for you.

But I got this error when I tried to run the query.

MySQL said: You have an error in your SQL syntax near '\'notes\' LONGTEXT NULL DEFAULT \'NULL\', \'userid\' INT(11) NOT NULL DEFAULT' at line 2

Any ideas?

NTLDR
29 Nov 2002, 21:11
Sounds good, I think I'll install this now and see what its like :D

shovel
29 Nov 2002, 21:13
Sorry Talisman. I need to fix that quick. Thanks. ;)

UPDATED!

Velocd
29 Nov 2002, 21:15
Looks interesting, I'll ponder installation after I see some screenshots. :p

assassingod
29 Nov 2002, 21:16
Im a little confused - Although others seem to understand this hack, I dont know what it does. Would someone kindly explain what exactly this does:)?

NTLDR
29 Nov 2002, 21:18
It looks like a small PM system for use in the ACP, instead of posting a thread/pm'ing all admins, you post a message in the ACP instead :D

Thats what it looks like to me :)

shovel
29 Nov 2002, 21:20
I believe the query is fixed. Here.

UPDATED

Chris M
29 Nov 2002, 21:52
Interesting Concept:)

Satan

assassingod
29 Nov 2002, 22:49
Originally posted by NTLDR
It looks like a small PM system for use in the ACP, instead of posting a thread/pm'ing all admins, you post a message in the ACP instead :D

Thats what it looks like to me :)

Thanks NTLDR:D
This would be even cooler if you could use it with mods

Talisman
29 Nov 2002, 22:57
LOL.... I'm just not having any luck with this today. Just tried the update and got a slightly different error this time:

MySQL said: You have an error in your SQL syntax near '\'0\', `timestamp` INT(11) NOT NULL DEFAULT \'0\', `username` VARCHAR(50) NOT NU' at line 1

(BTW I tried to send you a webmail, Anthony, but that address isn't accepting delivery.)

Will check back later. Has anyone else got this installed yet?

Dean C
30 Nov 2002, 13:07
What exactly does this hack do?

I didn't quite get it from your description :D

Regards

- miSt

shovel
30 Nov 2002, 13:08
The table creation query should work. This is it:

CREATE TABLE `adminnotes` ( `notes` LONGTEXT NULL, `userid` INT(11) NOT NULL DEFAULT '0', `timestamp` INT(11) NOT NULL DEFAULT '0', `username` VARCHAR(50) NOT NULL)

I didn't have any problem when I tested it just now. Give it a try. Like I stated on the installation file, you may want to download the DB Query Hack that FireFly and I innovated. Btw, you can also catch me at: anthony@digitalsoft.net Good luck.

- Anthony

EDIT: Sorry, added a semi-colon at the end.

shovel
30 Nov 2002, 13:11
Originally posted by Mist
What exactly does this hack do?

I didn't quite get it from your description :D

Regards

- miSt

Lol. That's become quite a popular question Mist. Basically it is a small hack that allows you to post notes and has them show up for your Administrators on the ACP Index Home. It's very useful for the many Administrators on the go. Whether your just reminding others or maybe even yourself, it's a great way for quick communication.

Dean C
30 Nov 2002, 16:51
Oh that sounds pretty cool

- miSt

N9ne
30 Nov 2002, 17:02
Any screenshots?

shovel
30 Nov 2002, 17:11
I'm currently waiting for any chosen member to submit one. I'm unable to. :(

Mike Gaidin
30 Nov 2002, 18:07
I have a question? Maybe I'm just flat out missing something, but how do we delete a message?

shovel
30 Nov 2002, 18:09
You just overwrite it. It only takes up a single row on that table at any given time. It only parses one note at a time. Everytime a new one is submitted the old one is deleted and is replaced by the new one.

Mike Gaidin
30 Nov 2002, 18:12
I tried overwriting it with a blank note, but it still leaves my name on it. Is there anyway to make it just blank?

shovel
30 Nov 2002, 19:05
I can create a delete button if you'd like and submit the code. It shouldn't harm anyone.

PsYc
30 Nov 2002, 21:18
here is a screeni

don't care about the language its german ;)

but nice and cool feature ;)


little code addition :

instead of:

------------------------------------------------

maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."</p></font></td>\n<td><p></p></td>\n</tr>\n";

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted");
---------------------------------------------------

use:

---------------------------------------------------

doformheader("","");
maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."</p></font></td>\n<td><p></p></td>\n</tr>\n";

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted");
echo "</table></td></tr></table></form>\n";

---------------------------------------------

so it looks much nicer ;)

Mike Gaidin
30 Nov 2002, 21:23
Originally posted by Crater Seraph
I can create a delete button if you'd like and submit the code. It shouldn't harm anyone.

That would be cool. I really like this hack.

shovel
30 Nov 2002, 21:44
Originally posted by PsYc
here is a screeni

don't care about the language its german ;)

but nice and cool feature ;)


little code addition :

instead of:

------------------------------------------------

maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."</p></font></td>\n<td><p></p></td>\n</tr>\n";

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted");
---------------------------------------------------

use:

---------------------------------------------------

doformheader("","");
maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."</p></font></td>\n<td><p></p></td>\n</tr>\n";

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted");
echo "</table></td></tr></table></form>\n";

---------------------------------------------

so it looks much nicer ;)

Danke. Ich nicht wissen das dort seien Deutsche hier. Lol. J/k. Aber ja, danke.

- Anthony

underburn
07 Dec 2002, 07:02
Hey. Crater, I installed it very very nice idea, great hack... however I am having 1 issue with this, that is that i get the following error after posting my note

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/evanhardy/www/forum/admin/db_mysql.php on line 154

Warning: Cannot add header information - headers already sent by (output started at /home/evanhardy/www/forum/admin/adminfunctions.php:19) in /home/evanhardy/www/forum/admin/anotes.php on line 42


After that it seems that everything works, i just refresh the page. But the error is annoying, What can i do to fix this... Im kind of new to the hackign thing. Thanks.

Reguards
-UB [underburn]

freeshares1
21 Dec 2002, 16:58
i am also getting the same error

Thewnagchung
25 Dec 2002, 08:18
ditto here. im getting the same error

Kars10
29 Jan 2003, 07:51
Works like a charm!! :)
Thanks.

/me klicks install!

Boofo
29 Jan 2003, 09:33
Excellent addition.

/me does the install dance!

By the way, how do we get it to display smilies or vbcode? It doesn't display them for me.

Boofo
29 Jan 2003, 22:01
Another addon to this already great hack. ;)

Instead of displaying and empty message box if you click "Leave a message" and hit enter before you enter anything (to erase the message until I can get a delete button for it), this will only leave the "Leave a message" line until someone enters a message. (No sense having an empty message line or an Author line if there is no message. :))

Change this:

makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted: $date_posted at $time_posted");
echo "</table></td></tr></table></form>\n";

To this:

if ( $note != "" ) {
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted: $date_posted at $time_posted");
}
echo "</table></td></tr></table></form>\n";

TraceyPRO
16 Feb 2003, 08:38
OK, this is my first time here at vBulletin.org so I wanted to make this a good first post :)

I have attached a new anotes.php file which fixes the PHP errors that some of you were having after a note was posted.

Also, I have added an Delete Button Add-On of sorts that a few people were requesting. The delete button will ONLY show up when a message is posted (credit of the PHP code goes to Boofo due to the fact that it's pretty much the same code as his).

In your /admin/index.php file find this:
maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."</p></font></td>\n<td><p></p></td>\n</tr>\n";

$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);

$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted");

Replace this chunk of code with:
$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$time_posted = vbdate('n-j-y, g:i:s a',$timestamp);

maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."";

if ( $note != "" ) {
echo "". makelinkcode("Delete","./anotes.php?action=delete","0") ."";
}
echo "</p></font></td>\n<td><p></p></td>\n</tr>\n";

if ( $note != "" ) {
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted: $date_posted at $time_posted");
}

Once that is done, simply overwrite the original anotes.php file with the altered anotes.php file I attached.

That's it! Once again, this modification/fix should also be partially credited to Boofo for his PHP modification :)

Boofo
16 Feb 2003, 09:29
Excellent addon (with the delete button). Thanks! Try this code and let me know what you think. :)

// Administrator To Administrator Notes Hack
doformheader("","");
$notes = $DB_site->query_first("SELECT notes,userid,timestamp,username FROM adminnotes LIMIT 1");
$bbcodeon=iif($forum[allowbbcode],$ontext,$offtext);
$imgcodeon=iif($forum[allowimages],$ontext,$offtext);
$htmlcodeon=iif($forum[allowhtml],$ontext,$offtext);
$smilieson=iif($forum[allowsmilies],$ontext,$offtext);
$note = stripslashes($notes['notes']);
$timestamp = $notes['timestamp'];
$userid = $notes['userid'];
$author = $notes['username'];
$date_posted = vbdate('l, F jS, Y',$timestamp);
$time_posted = vbdate('g:i a',$timestamp);

maketableheader('Administrator To Administrator Notes');
echo "<tr class='".getrowbg()."' valign='top'>\n<td><font size=1><p>". makelinkcode("Leave A Note","./anotes.php","0") ."";

if ( $note != "" ) {
echo "". makelinkcode("Delete","./anotes.php?action=delete","0") ."";
}
echo "</p></font></td>\n<td><p></p></td>\n</tr>\n";

if ( $note != "" ) {
makelabelcode($note);
makelabelcode("Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted: $date_posted at $time_posted");
}
echo "</table></td></tr></table></form>\n";
// End of Administrator To Administrator Notes Hack

TraceyPRO
17 Feb 2003, 18:26
The only problem with the facelift you showed me is that it doesn't seem to work for my AdminCP :( It's odd too, because I'm using vB 2.2.9. But oh well, lol...anywho. I'm back with another bug fix for this. It's a rather small one, but it's a bug none the less.

In /admin/index.php find:
Author: <a href='$bburl/member.php?s=&action=userinfo&userid=$userid'>$author</a> | Posted On: $time_posted

Replace that with:
Author: <a href='./user.php?s=$session[sessionhash]&action=edit&userid=$userid'>$author</a> | Posted On: $time_posted

The original code would take you to a blank page when you click on the author's username because the Action 'userinfo' doesn't exist. Well at least it doesn't work on vB 2.2.9 anyway if it does exists, lol.

Also, if you guys are interested I've done a few more add-ons to this great hack. If you would like for me to post them, I would be more then happy to! Thanks!

Boofo
18 Feb 2003, 03:00
That actually should be:

Author: <a href='$bburl/member.php?s=&action=getinfo&userid=$userid'>$author</a> | Posted On: $time_posted

You really don't want Admins editing Admins profiles. :)

I'd be interested in any other fixes or addons you have.

Poggyuk
04 Mar 2003, 11:53
Can someone help me...
When i ever i leave a note, i always get the following message:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/webn/public_html/forum/admin/db_mysql.php on line 154

Warning: Cannot modify header information - headers already sent by (output started at /home/webn/public_html/forum/admin/adminfunctions.php:19) in /home/webn/public_html/forum/admin/anotes.php on line 34

(But the note i posted, is still shown when you return to the control panel home)

Thanks in advance!

sonic3d
04 Mar 2003, 22:02
just to make sure. is the code suppose to appear on the left side?

l8er
sonic

gmarik
24 May 2003, 09:43
Could somebody, please - put it ALL together for 2.3?!

kabresh
22 Jul 2003, 23:56
yeah id like to see this all put together for vb2.3 also :D

shovel
17 Nov 2005, 06:29
Alrighty, I think I'll update it for 2.3.x.
Gimme a couple of days.
Gotta download the software on dial-up. :ninja: