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)
-   -   Last PM on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=47900)

Kratheous 01-18-2003 10:00 PM

Last PM on Forumhome
 
This hack will show you last PM you recieved on the forumhome.

Kratheous 01-19-2003 09:00 PM

Screenshot:

Disturbed 01-20-2003 03:13 AM

nice, thanks for sharing ^^

Sebastian 01-20-2003 07:59 AM

it doen't work for me.. no errors, just says i have no new pms when i do. v229

Floris 01-20-2003 07:59 AM

Great, I will install it right away, nice little hack! simple/easy/effective :)

Floris 01-20-2003 08:05 AM

floris - You have 1 new message(s) since your last visit.
(You have 1 unread messages and 42 total messages in all your folders.)
You have no Private Messages in your inbox at the moment.

Uhm, doesn't seem to be working though :> vB 2.2.9

Floris 01-20-2003 08:16 AM

inph from the irc informed me to also add the templates that are used into the $templatesused=' bit.

So, find:

$templatesused=' (in the top of index.php)

and at the end of the line, replace:
';
with:
,forumhome_pmlastno,forumhome_pmlast';

Boofo 01-20-2003 08:37 AM

Well, it works for me, almost. It says the last message title correct but is has ARRAY as the user the message is from (and there is no such user on my board). Also, the message it is picking up was moved out of the Inbox into another folder. Is it supposed to show only pms in your inbox?

inphinity 01-20-2003 08:48 AM

i think $lastpmuser should be referenced as:
PHP Code:

<br><br><b>Latest Private Message:</b$lastpmstuff[titleby $lastpmuser['username'

also it is the last pm recieved in all folders

you could limit it to inbox by adding folderid = 0 after WHERE in the $lastpmstuff query

Boofo 01-20-2003 09:06 AM

Should it look like this?

PHP Code:

$lastpmstuff=$DB_site->query_first("SELECT * FROM privatemessage WHERE folderid = 0 userid=$bbuserinfo[userid] and fromuserid!=$bbuserinfo[userid] $ignoreusers ORDER BY dateline DESC LIMIT 1"); 



All times are GMT. The time now is 12:39 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.00980 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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