View Full Version : Show Newest PM If Unread On Forum Home
Zero Tolerance
06-09-2005, 10:00 PM
This is a port of: https://vborg.vbsupport.ru/showthread.php?s=&threadid=77250
Exact same functionality/style, will automatically make the template edit for you using the plugins system (a bit hackish but it worked :p)
Plugins Added: 3
Enjoy,
- Zero Tolerance
King Kovifor
06-09-2005, 11:04 PM
Nice Hack... I'd use this if It was my forum that my email is attached to!
Chris M
06-09-2005, 11:10 PM
Hate to burst your bubble but it doesn't work - No "forumhome_pmshow" template was created...
Satan
Zero Tolerance
06-09-2005, 11:14 PM
Forgot to upload the text file, thanks for pointing that HS :)
- Zero Tolerance
Chris M
06-09-2005, 11:15 PM
Invalid attachment specified :alien:
Why me lol...
Satan
Zero Tolerance
06-09-2005, 11:16 PM
Working fine for me .. try again?
- Zero Tolerance
Chris M
06-09-2005, 11:17 PM
Yeh I got it now ;)
Working like a charm now :p
Satan
Link14716
06-09-2005, 11:25 PM
Nice work. :)
* Link14716 installs.
eXtremeTim
06-10-2005, 05:58 AM
Nice work. Love the hackish template edit. :)
jpt62089
06-10-2005, 06:09 AM
* jpt62089 installs :)
burnist
06-10-2005, 10:29 AM
working, nice mod :)
* burnist licks install
A good idea to eliminate a query or two would be to do the following file modifaction. It basically caches the forumhome_pmshow template eliminating 2 queries if I remember it right.
Open index.php
Find:
'forumhome_subforumbit_post',
Add After:
'forumhome_pmshow',
Enjoy!
Nice plugin btw :)
Link14716
06-12-2005, 12:37 AM
A good idea to eliminate a query or two would be to do the following file modifaction. It basically caches the forumhome_pmshow template eliminating 2 queries if I remember it right.
Open index.php
Find:
'forumhome_subforumbit_post',
Add After:
'forumhome_pmshow',
Enjoy!
Nice plugin btw :)
IIRC, you can also plug in some code into fetch_userinfo to cache it.
mholtum
06-12-2005, 06:03 AM
/me installs!
Nice work!
burnist
06-12-2005, 08:32 AM
IIRC, you can also plug in some code into fetch_userinfo to cache it.
what like,
if (THIS_SCRIPT == "index")
{
$globaltemplates = array(
'forumhome_pmshow'
}
I assume this is wrong and would mess something up, but is that the general idea?
eXtremeTim
06-12-2005, 07:01 PM
This hack already has the code for the template catch.
Zero Tolerance
06-12-2005, 09:22 PM
eXtemeTim is correct, this adds in the code to cache the template, globally however, but i doubt it would make any resource difference at all since the template is rather small.
- Zero Tolerance
fraghappy
06-17-2005, 11:33 AM
I only have one suggestion: add a "Reply to PM" link down at the bottom with the other stuff. ;)
Azhrialilu
07-06-2005, 08:07 AM
I loved this on 3.0.7 and now I can continue to love it on 3.5 *smiles happily*
burnist
07-16-2005, 09:49 PM
been trying this on beta 4 its generating an error in the admin cp on all pages
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in *****\****\****\*****\includes\functions.php(1030) : eval()'d code on line 3
It would appear that this if from the use of the fetch_userinfo hook, but I could be wrong.
please fix it, I liked this plugin ;)
Gizmo5h1t3
08-08-2005, 02:40 PM
guys, on the original install, not modified, im getting the same "invalid file specifiewd" message.
can u help at all?
im creeating the template exactly as the info file dictates.
but when i import from .xml file on desktop, i get the error message
Brandon Sheley
09-10-2005, 06:06 AM
will this work with RC3 ?
:)
ultranerds
09-10-2005, 11:11 AM
Installed <G> Nice plugin!
delds
09-10-2005, 01:52 PM
is this compatable with vb 3.5 rc 3
Brandon Sheley
09-10-2005, 08:17 PM
worked fine with rc3 :) ty installs*
Vizionz
09-13-2005, 06:51 AM
awesome scott another great hack from you dude your work is outstanding
memorex
09-23-2005, 01:04 PM
awesome scott another great hack from you dude your work is outstanding
Great hack, I'm having one problem though, Its showing the PM Duplicated on the forumhome. I just want it to show once hehe. I made the template as well as ran the plugin, is that where i went wrong?
Neutral Singh
09-24-2005, 08:01 AM
when i checkup with my installed plugins list, i find out that there are not many of yours, that i have failed to install on my forums. TY!!
evesve
09-24-2005, 02:09 PM
This is a great hack!
If there would be a link to "Delete this PM", than it would be great-great-great!!!
Protoman
10-08-2005, 07:26 PM
doesn't work with gold.
Bounce
10-09-2005, 02:42 AM
/me installed
Works a treat..Thanks,users were complaining of missing pm's...NO MORE lol
Peace_Hope
10-11-2005, 10:44 PM
Thanks, Great work.
michaelbenson
10-20-2005, 05:59 PM
Anyway in which we could strip BBCode formatting from the PM preview?
Or actually enabling it?
Xplorer4x4
10-20-2005, 06:32 PM
doesn't work with gold.
It works but I seem to have trouble with the old grey pop up box showing up.
Xplorer4x4
11-01-2005, 09:28 AM
Database error in vBulletin 3.5.0:
Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(filedata) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =;
MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Error Number : 1064
Date : Tuesday, November 1st 2005 @ 04:40:25 AM
Script : /forums/index.php
Referrer :
IP Address :
Username :
Classname : vb_database
This may be cause in conjuction with PM PReview hack, but either way I have had porblems with this since going Gold.
Just an FYI for later Zero.
Protoman
11-01-2005, 09:49 PM
yup, I finally got this mod working. there is an error in the template cache plugin.
there should be an is_array() check otherwise it causes errors in the admin panel
Xplorer4x4
11-02-2005, 04:50 AM
yup, I finally got this mod working. there is an error in the template cache plugin.
there should be an is_array() check otherwise it causes errors in the admin panel
As in a parse error or a DB Error? If so can you tell me what to fix?
Brandon Sheley
11-20-2005, 09:07 AM
* Brandon Sheley clicks install
this shows two sets of the same pm ? any thoughts ?
i have a few things installed on my index
http://locoforum.com/forums/index.php?
im guessing this is the reason ?
any idea how to fix this
Iceburg22
11-21-2005, 12:50 PM
thanks
Allan
12-30-2005, 05:47 AM
Thanks you very much ;)
Click Install
hraweb.com
02-20-2006, 08:49 PM
i installed this on 3.53 and i now have big problems
when i read pm i get this on top of my banner
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1064) : eval()'d code on line 3
and i can not even go to adminpanel to uninstal this stupid hack becouse all i get is this when i click on admincp
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1064) : eval()'d code on line 3
how can i fix this?
edit manualy with phpmyadmin , what to edit, how to uninstall this
Protoman
02-20-2006, 10:01 PM
I only had issues with the admincp, everything else worked already. I'd say you are having a conflict with another hack if you get other errors
hraweb.com
02-21-2006, 09:09 AM
only thing other that is installed is who visited the board today and pm preview
how can i uninstall this manualy?
Christie189
02-28-2006, 04:20 AM
Umm, I need HELP, ASAP!
I cannot get into my admin panel after installing this hack. When I try and go to the link, this is what it says:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1097) : eval()'d code on line 9
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /includes/functions.php(1097) : eval()'d code on line 12
HOW DO I FIX IT???? PLEASE HELP!!!!!!
Christie189
02-28-2006, 04:30 AM
PLEASE HELP!!!!!!!!!! See above post!!!
The Realist
03-19-2006, 12:24 PM
Getting the very same error. Removed the hack and all works fine.
Database error in vBulletin 3.5.0:
Invalid SQL:
SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(filedata) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =;
MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Error Number : 1064
Date : Tuesday, November 1st 2005 @ 04:40:25 AM
Script : /forums/index.php
Referrer :
IP Address :
Username :
Classname : vb_database
This may be cause in conjuction with PM PReview hack, but either way I have had porblems with this since going Gold.
Just an FYI for later Zero.
Nexus Beat
03-22-2006, 10:42 AM
Having the same problem as a few other guys here, not being able to get into the ACP etc. Anyone enlighten me on how to disable the hack manually somehow?
Thanks.
The Realist
03-22-2006, 02:47 PM
Admincp> Plugin System>
If a product...
Plugin System...
In the dropdown choose disable.
If its a Plugin....
In Plugin Manager
Click edit next to the plugin
Where it says "Plugin is Active" tick NO.
Laters
Nexus Beat
03-22-2006, 05:52 PM
Admincp> Plugin System>
If a product...
Plugin System...
In the dropdown choose disable.
If its a Plugin....
In Plugin Manager
Click edit next to the plugin
Where it says "Plugin is Active" tick NO.
Laters
But the problem is that I cannot get into the ACP after installing this :confused:
bashy
03-22-2006, 06:11 PM
Brilliant ide m8, dont know why i aint seen this sooner :)
Note to self "look harder for great hacks"
bairy
03-23-2006, 10:46 PM
I've added a delete button to mine.
In the forumhome_pmshow template, find (near the bottom):
<td class='tfoot' colspan='2'><b>Options:</b> <a href='private.php?{$session['sessionurl']}&do=showpm&pmid={$from['pmid']}'>Read This PM</a> | <a href='private.php?{$session['sessionurl']}'>Go To Your Inbox</a></td>
Replace with
<td class='tfoot' colspan='2'> <table><tr><td><a href='private.php?{$session['sessionurl']}&do=showpm&pmid={$from['pmid']}'>Read This PM</a> | <a href='private.php?{$session['sessionurl']}'>Go To Your Inbox</a> | <form action="private.php" method="post"><label for="deletepm"><input type="checkbox" name="pm[$from[pmid]]" id="deletepm" value="true" />Tick Here To Delete This Message</input> <input type="hidden" name="s" value="$session[sessionurl]" /> <input type="hidden" name="do" value="managepm" /> <input type="hidden" name="dowhat" value="delete" /><input type="submit" class="button" value="And Click Here To Confirm" accesskey="s" /></form></td></tr></table></td>
You can change the deletion and button text as you wish.
Also, I've customised the "Show This PM" link to show only if the PM exceeds 400 characters (which is the plugin's default crop).
To do this:
1. Edit the plugin named "New PM On Forum Home (If Unread) [Main]"
Find:
$from['message'] = substr($from['message'],0,400) . "...";
Add under:
$show['pmcropped'] = true;
2. In template forumhome_pmshow,
Find
<a href='private.php?{$session['sessionurl']}&do=showpm&pmid={$from['pmid']}'>Read This PM</a> |
and stick <if condition="$show['pmcropped']"> in front and </if> afterwards, so it looks like this:
<if condition="$show['pmcropped']"><a href='private.php?{$session['sessionurl']}&do=showpm&pmid={$from['pmid']}'>Read This PM In Full</a> | </if>
TygerTyger
03-24-2006, 11:49 AM
Is it possible to include the pm senddate data on forumhome as well? Seems funny to miss it out when the PM arrived, everything else is included.
Protoman
06-19-2006, 05:55 PM
ok the fix for the admincp functions.php error is as follows
change the fetch_userinfo plugin to the following:
global $globaltemplates;
if (is_array($globaltemplates)) {
$globaltemplates = array_merge($globaltemplates, array('forumhome_pmshow'));
}
I've never had a problem with it since.
yoyoyoyo
12-06-2006, 09:36 PM
ok the fix for the admincp functions.php error is as follows
change the fetch_userinfo plugin to the following:
global $globaltemplates;
if (is_array($globaltemplates)) {
$globaltemplates = array_merge($globaltemplates, array('forumhome_pmshow'));
}
I've never had a problem with it since.Where is the "fetch_userinfo" plug?
edit: nevermind - I found it...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.