PDA

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


shovel
11-28-2002, 10:00 PM
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
11-29-2002, 08:10 PM
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
11-29-2002, 08:11 PM
Sounds good, I think I'll install this now and see what its like :D

shovel
11-29-2002, 08:13 PM
Sorry Talisman. I need to fix that quick. Thanks. ;)

UPDATED!

Velocd
11-29-2002, 08:15 PM
Looks interesting, I'll ponder installation after I see some screenshots. :p

assassingod
11-29-2002, 08:16 PM
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
11-29-2002, 08:18 PM
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
11-29-2002, 08:20 PM
I believe the query is fixed. Here.

UPDATED

Chris M
11-29-2002, 08:52 PM
Interesting Concept:)

Satan

assassingod
11-29-2002, 09:49 PM
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
11-29-2002, 09:57 PM
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
11-30-2002, 12:07 PM
What exactly does this hack do?

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

Regards

- miSt

shovel
11-30-2002, 12:08 PM
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
11-30-2002, 12:11 PM
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
11-30-2002, 03:51 PM
Oh that sounds pretty cool

- miSt

N9ne
11-30-2002, 04:02 PM
Any screenshots?

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

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

shovel
11-30-2002, 05:09 PM
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
11-30-2002, 05:12 PM
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
11-30-2002, 06:05 PM
I can create a delete button if you'd like and submit the code. It shouldn't harm anyone.

PsYc
11-30-2002, 08:18 PM
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
11-30-2002, 08:23 PM
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
11-30-2002, 08:44 PM
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
12-07-2002, 06:02 AM
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
12-21-2002, 03:58 PM
i am also getting the same error

Thewnagchung
12-25-2002, 07:18 AM
ditto here. im getting the same error

Kars10
01-29-2003, 06:51 AM
Works like a charm!! :)
Thanks.

* Kars10 klicks install!

Boofo
01-29-2003, 08:33 AM
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
01-29-2003, 09:01 PM
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
02-16-2003, 07:38 AM
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
02-16-2003, 08:29 AM
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
02-17-2003, 05:26 PM
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
02-18-2003, 02:00 AM
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
03-04-2003, 10:53 AM
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
03-04-2003, 09:02 PM
just to make sure. is the code suppose to appear on the left side?

l8er
sonic

gmarik
05-24-2003, 08:43 AM
Could somebody, please - put it ALL together for 2.3?!

kabresh
07-22-2003, 10:56 PM
yeah id like to see this all put together for vb2.3 also :D

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