Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Nov 2003
Posts: 13
Good day to all. Total Newbie here and I have spent the last couple hours trying to help myself, but now am asking for some.

I am curious as to why the PM notification does not appear on the “Active Topics” page.

When I do a “view source” of this page, I see that the check for being logged in and PMs is being done via this bit of JavaScript...
(I've added some CRs to stop the code from streching the screen too much)

Code
<script language="Javascript" type="text/javascript">
<!--

var user_cookie = getCookie('ubber2453006.1557');

if(('' == user_cookie) &#0124;&#0124; (null == user_cookie)) {
// User is not logged in
document.writeln('You are not logged in.' , '
<a href="http://www.boatingabc.com/cgi-bin/testboard/ultimatebb.cgi?ubb=login">Login</a>
or
<a href="http://www.boatingabc.com/cgi-bin/testboard/ultimatebb.cgi?ubb=agree">register</a>')
} else {
// User is logged in
var user_array=user_cookie.split("&");

user_array[2] = unescape(user_array[2]);
document.writeln('Hello, ', user_array[2]);
document.writeln('[ <a title="Click here to log out."
href="http://www.boatingabc.com/cgi-bin/testboard/ultimatebb.cgi?ubb=logoff">log out</a> ]');

// PM check
var haspms = '<?php echo checkUserPMs(); ?>';
if(haspms > 0) {
document.writeln("<" + "b" + "r />");
document.writeln("<" + "a");
document.writeln(' href="http://www.boatingabc.com/cgi-bin/testboard/ultimatebb.cgi?ubb=my_profile"');
document.writeln(">" + "<" + "im" + "g src=" + '"http://www.boatingabc.com/ubb2/newpm.gif" border="0"
valign="middle" alt=" [New PM] " '
+ "/");
document.writeln(">You have " + haspms + " unread private messages.<" + "/" + "a>");
} // end if

} // end else

//-->
</script>
I have been poring though public_common.pl, ultimatebb.cgi, public_daily_topics.pl, ubb_lib.cgi
and a few others trying to see what’s different that PM notifications do not display on the Active Topics pages.

Funny thing is that if I add this little line just under “$TBT” on line 34 of public_daily_topics.pl,
not only does my added PM notification show up in the newly created table row, so does the normal one.

Code
 <tr><td>$show_logout</td></tr>
I am running v6.7 BR1.

What am I missing? confused

Thanks for any help!

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
IIRC, checkUserPMs only gets substituted when pages are served up via ServeFromCache. I don't think I did that for TAT...

*edit* Yup. I'm using OpenTimedCachedFile instead...

*edit2*

Here, try this.. completely untested.

In ubb_search.cgi, find:

if($tp) { print $tp; exit; }

Replace:

if($tp) { print &FilterPNTF($tp); exit; }

*edit3*

Then find

print "$ThisHTML";

And replace with

print &FilterPNTF($ThisHTML);


UBB.classic: Love it or hate it, it was mine.
Joined: Nov 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Nov 2003
Posts: 13
Thank-you so very much. I have made the edits you list and it is working very well on my test board. After playing around with it a few more times, I will install this on the live board.

Many of my members use the Active Topics page as their only interface to the board and have asked for this feature.

Guess it will not hurt to post this as a feature suggestion on InfoPop's Support Forum. wink

Thanks again!

Joined: Nov 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Nov 2003
Posts: 13
Charles,

Can you think of anything about this change that would effect the "Quick Reply" feature?

I have had reports of a very intermittent problem with it.

I posted about this on the InfoPop UBB.Classic Support Forum. Link to post.

It may only be coincidence, but so far, I’ve not had any further reports of the problem since removing this hack. It has been exceedingly intermittent.

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
It's unlikely to the extreme that this is related. Sounds like a client-side cache issue. I'll post more in detail in that topic on Monday.


UBB.classic: Love it or hate it, it was mine.
Sponsored Links
Joined: Nov 2003
Posts: 13
Junior Member
Junior Member
Offline
Joined: Nov 2003
Posts: 13
New development. See posting on the Support Forum for the low down.

http://www.ubbcentral.com/cgi-bin/ultimatebb.cgi/topic/8/880.html?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)