vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Admin. 2 Admin. Notes VIA AdminCP Index (https://vborg.vbsupport.ru/showthread.php?t=46221)

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'>$aut hor</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'>$aut hor</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

Quote:

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

Quote:

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'>$aut hor</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'>$aut hor</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

PHP Code:

Warningmysql_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:19in /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.

[high]* Kars10 klicks install![/high]

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:

PHP Code:

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:

PHP Code:

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"



All times are GMT. The time now is 01:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01200 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete