Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by bitSLAP (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-31-2001 Last Update: Never Installs: 0
 
No support by the author.

Hey there,

I'm looking for a snipet of php code that I can put on the main page of the web site to notify people of their private messages.

Thanks,
Matt

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-01-2001, 08:28 PM
the_sisko's Avatar
the_sisko the_sisko is offline
 
Join Date: Oct 2001
Location: Hamburg,Germany
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did this some time ago:

It's still german but should be easy to see from the code what you need to do.
Change the $imageurl,$posteingang, and color $ and uplaod it to your forum root.
Then just include it in your main homepage!
Code:
<?
// ##########################################
// ### PM AUF ANDEREN SEITEN BY THE SISKO ###
// ##########################################

// GANZ WICHTIG PFAD ZUR GLOBAL PHP ANGEBEN!!!
require('./global.php');

// Folgende Variablen m?ssen definiert werden!!!
$urlimage 		=	"http://www.studenten-city.de/stf/images";
$posteingang		= 	"<a href='private.php?s=$session[sessionhash]'>Posteingang!</a>";

// Diese Variablen sind nur wichtig, wenn Ihr das vorhandene Layout weiter nutzt!
// Bei einem eigenen layout k?nnt Ihr dieses teil weg lassen und die Farbcodes selbst definieren!
$categorybackcolor 	= 	"#6c6081";
$categoryfontcolor 	=	"#000000";
$secondaltcolor 	=	"#EFEFEF";
$firstaltcolor 		=	"#DEDEDE";

$permissions=getpermissions();
if (!$permissions['canview']) {
	show_nopermission();
}

if ($enablepms==1 and $permissions['canusepm'] and $bbuserinfo['receivepm']) {

  $allpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid]");
  $newpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND dateline>$bbuserinfo[lastvisit] AND folderid=0");
  $unreadpm=$DB_site->query_first("SELECT COUNT(*) AS messages FROM privatemessage WHERE userid=$bbuserinfo[userid] AND messageread=0 AND folderid=0");

  if ($newpm['messages']==0) {
    $lightbulb="off";
  } else {
    $lightbulb="on";
  }
  
// Hier wird nun die Private Nachricht angezeigt. Der ECHO Code kann nach den eigenen w?nschen angepasst werden.
// Folgende Variablen k?nnen genutzt werden 
//
// $lightbulb.gif  			--> 		[zeigt an ob eine neue PN vorhanden ist oder nicht. Umbedingt den Pfad f?r die Bilder mit $urlimage festlegen.]
// $posteingang 			-->		[zeigt den Link zum PN Posteingang an, mu? auch vorher definiert werden]
// $bbuserinfo[username]		-->		[zeigt den Username an]
// $newpm[messages]			-->		[zeigt die Anzahl der neuen PN's an]
// $unreadpm[messages]			-->		[zeigt die Anzahl der ungelesenen PN's an]
// $allpm[messages]			-->		[zeigt die Anhzahl aller PN's an]


echo "<table width='100%'>\n<TR bgcolor='$categorybackcolor'><TD colspan=6>\n
<FONT face='verdana,arial,helvetica' size='2' color='$categoryfontcolor'><B>Private Nachrichten (PM):</B></normalfont></td>\n
</tr>\n<tr>\n
<td bgcolor='$secondaltcolor' align=center valign=top><img src='$urlimage/$lightbulb.gif'></td>\n
<td bgcolor='$firstaltcolor' colspan=5><FONT face='verdana,arial,helvetica' size='1'></font>$posteingang<BR>$bbuserinfo[username] - Du hast $newpm[messages] neue Nachricht(en) seit Deinem letzten Besuch ($unreadpm[messages] ungelesene, $allpm[messages] Nachrichten insgesamt)</smallfont></td>\n
</tr>\n</table>\n";

}
?>
I'm off for the weekend, got my first forum meeting!! So I will translate it later or if anyone german like to do so...do it!

On monday I will do it!
Reply With Quote
  #3  
Old 06-01-2001, 09:02 PM
bitSLAP
Guest
 
Posts: n/a
Default

Thanks a million! I'll try it, and if it works then don't bother translating

I did notice that

require('./global.php');

will probably have to change to

require('./forums/global.php');
Reply With Quote
  #4  
Old 06-05-2001, 08:35 PM
jamesdasher jamesdasher is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, please do translate it...it is nice to know what the comments say.
Reply With Quote
  #5  
Old 06-12-2001, 01:23 PM
-dloh-hammer's Avatar
-dloh-hammer -dloh-hammer is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm the script is not working

i put it per INCLUDE on other webpage(server)

the sript itself is lying in forum homedir
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06043 seconds
  • Memory Usage 2,239KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (3)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete