Next Unread PM code (for lava)

Started on the old forum in May 2009 · view the original in the archive · old links redirect here

12 replies · 851 views · started 17 years ago · 1 min read

6 participants
anderson Developer · 146 posts #1

Suppose a member reading a PM(Lava WML version), at that time he/she got another PM. Then to read it generally he has to go back to inbox firstly then read that. I just want to do this work more easier by putting a link below that page where he read the text message. I mean in the read pm page below instead of "Back to Inbox" there shoud put 2 links like...

                                                              <<-killer | +anderson>>

(where killer and anderson are the ID that are PM senders. killer's PM is read and anderson's pm is unread.) The member clicking on the "+anderson" link can go to the next message shortly n easily.

I want to make this but I m failed to make the sql for this. It would be great if everyone think on it and share. I saw this function in a site. If anyone want to see the demo plz pm me. Thanks.

Wait...

anderson Developer · 146 posts #3

Are you telling about that arawap script which is uploaded here? @ rko1

Wait...

kiLLeR-eyEd_14 Senior · 382 posts #4

I have just think..Just put the one that pops for new inbox like when u're on a f0rum..It p0ps 1new inb0x..When u sent a msg..In that page, put this code.. $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "<a href="inbox.php?action=main&sid=$sid">Next New PM!</a>"; }

.,if that's n0t wat u l0okin 4..Find a script which has a c0unter of unread and new pm like in pinoywap..Get the c0de of that new pm and stUdy how u cAn do it as what ur l0oking 4..

anderson Developer · 146 posts #5

rko1 wrote: on the arawap script there is such a code just check in the inbox.php

I just checked arawap's inbox.php...I saw nothing like that. @ rko1

Wait...

anderson Developer · 146 posts #6

kiLLeR-eyEd_14 wrote: I have just think..Just put the one that pops for new inbox like when u're on a f0rum..It p0ps 1new inb0x..When u sent a msg..In that page, put this code.. $umsg = getunreadpm(getuid_sid($sid)); if($umsg>0) { echo "<a href="inbox.php?action=main&sid=$sid">Next New PM!</a>"; }

.,if that's n0t wat u l0okin 4..Find a script which has a c0unter of unread and new pm like in pinoywap..Get the c0de of that new pm and stUdy how u cAn do it as what ur l0oking 4..

No. It's not what u post. It's "back to inbox" link u posted. I just want a code by presssing that user can read the next unread pm directly. for this sql code needed.

Wait...

anderson Developer · 146 posts #7

Urgent

Any coder plz try on it. I need it very much.

Wait...

ori Lead · 512 posts #8

do u want the link in the read pm page

anderson Developer · 146 posts #9

ori wrote: do u want the link in the read pm page

Yes, u r right. I need that code at the below of the read PM page where we see PM texts and before "Bact to Inbox" link. @ ori

Wait...

subzero Super moderator Fellow · 3,954 posts #10

ok lets see what he wonts

this what he wanted

like your reading a pm

message by: admin

blah blah blah

<< hello - old | bye - new-inbox >>

hello he has read and bye he has not is that what you wanted ??

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

ashuwap Junior · 19 posts #12

I am not good coder..but i can solve ur problem....use this code..

$umsg = getunreadpm(getuid_sid($sid));
$item = mysql_fetch_array(mysql_query("SELECT
            a.name, b.id FROM ibwf_users a
            INNER JOIN ibwf_private b ON a.id = b.byuid
            WHERE b.touid='".$uid."' AND b.unread='1'
            ORDER BY b.timesent DESC
            LIMIT 1"));

  if($umsg>0)
  {
echo "((Last PM by <a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid\">$item[0]</a>/";
$userid = getuid_sid($sid);
$lastmsg_id = mysql_fetch_array(mysql_query("SELECT MIN(id) FROM ibwf_private WHERE touid = $userid AND unread='1'"));
$pminfo = mysql_fetch_array(mysql_query("SELECT text, timesent, byuid, reported FROM ibwf_private WHERE id = $lastmsg_id[0]"));
echo "New Pm By :<a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid\">[".getnick_uid($pminfo[2])."]</a>))<br/>";

  }
kiLLeR-eyEd_14 Senior · 382 posts #13

Problem Solved

This is what i have just coded this morning..I think i just got 6x-8x trials and errors coding this newest or next unread pm..I don't know if this is what you're looking for but this one is 100% working in my site and in accord to my script..I just had time and thought to code this one..

//inside if($res) in inbxproc.php..action=sendpm ...and action=sendto

    echo "PM has been sent successfully to $whonick!!!<br/><br/>";
    echo parsepm($pmtext, $sid);
    $sql = "SELECT a.name, b.id, b.byuid, b.unread, b.starred, b.txt FROM ibwf_users a INNER JOIN ibwf_private b ON a.id = b.byuid WHERE b.touid='".$uid."' AND b.unread='1' ORDER BY b.timesent DESC LIMIT 0, 1";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items))
      if($lastloc=="cht")
{
  $lnk = "<a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid&lstloc=cht&rid=$rid\">Next Unread PM</a>";
 }else{
  $lnk = "<a href=\"inbox.php?action=readpm&pmid=$item[1]&sid=$sid\">Next Unread PM</a>";
 }
$umsg = getunreadpm(getuid_sid($sid));
  if($umsg>0)
 {
 echo "$lnk";
 }
else
{ 
echo "";
 }

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close