![]() |
Last PM on Forumhome
This hack will show you last PM you recieved on the forumhome.
|
Screenshot:
|
nice, thanks for sharing ^^
|
it doen't work for me.. no errors, just says i have no new pms when i do. v229
|
Great, I will install it right away, nice little hack! simple/easy/effective :)
|
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 |
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'; |
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?
|
i think $lastpmuser should be referenced as:
PHP Code:
you could limit it to inbox by adding folderid = 0 after WHERE in the $lastpmstuff query |
Should it look like this?
PHP Code:
|
put an 'and' in there as well
folderid = 0 AND userid=$bbuserinfo[userid] |
Thank you very much. ;) Would there also be a way to pull out the name of the folder the message is in, too?
|
PHP Code:
|
Quote:
|
So how would the hack look like in total?
I'm kinda confused now. |
Mine is showing last PM by ARRAY..
Do you have the correct code for this? |
Nevermind..
The correct code for template: forumhome_pmlast Code:
<br><b>Latest Private Message:</b> $lastpmstuff[title] by $lastpmuser[username] |
Hmmm... Indeed. Sorry about that.
Other than that, it should've worked. My friend's running it (that's where I got the screenie from.. haven't reinstalled it on my own boards, yet. @_@) |
Is there a way to have this link to the last message shown so all you have to do is click on the link to bring the message up?
|
Yep.
Replace: $lastpmstuff[title] With: <a href="./private.php?s=$session&action=show&privatemessagei d=$lastpmstuff[privatemessageid]">$lastpmstuff[title]</a> |
Excellent! Thank you. Great hack! ;)
|
Quote:
|
Do you have any hacks installed that might be messing with it? I have alot of hacks installed and it works great here.
|
I just installed it on a 2.2.9 and it does work. No hitches, except the one "array" thing, which has been fixed in the posts above. I can't think of a reason where it shouldn't.
|
Kratheous, don't forget to update the first post with the Array fix. :) I am running a heavily hacked v2.2.9 and it works fine here, too. Also, I adapted it to work on my vbHome lite page as well.
By the way, the code you gave me for the link to the Latest Private Message was missing a sessionhash. :) This: Quote:
Quote:
|
Ok heres a fix i made to the hack, it uses just 1 query instead of 2, i also added support for firefly's private attachment hack, it also gets the folder name the pm is in, it links the user who sent you the pm to there profile and it also links the message to the pm itself, i fixed up the code and templates, ill post a screenshot below and in the next post the fix. enjoy.
|
You can find the updated fixed file that shows the correct folder name here:
https://vborg.vbsupport.ru/showthrea...000#post345000 |
um.. not working. I'm getting this message, with new pm's?
Quote:
|
Quote:
|
Yes, at the time I made this hack, I hadn't discovered joins... it's actually a few months old... *shrugs* And I must be out of it this week, excuse my lack of full variables. @_@
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Ok, i saw whats wrong and I fixed it and tested it, this now shows the correct folder name its in, enjoy.
Updated, see this post: https://vborg.vbsupport.ru/showthrea...675#post394675 |
Thank you again, sir. ;)
|
eeeh.... may I ask.
Can the folders be made clickable (to make it browse to that folder) as well.. (some people are never satisfied, duh?) |
Quote:
in folder $lastpmstuff[foldername] change it to: in folder <a href="private.php?s=$session[sessionhash]&folderid=$lastpmstuff[folderid]">$lastpmstuff[foldername]</a> I also updated the text file with this. |
Its been a while, any ways, Added a small add on that shows the first 300 chracters of the private message on forumhome.
|
Welcome back, my friend. ;)
|
All times are GMT. The time now is 02:45 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|