1
smoothly
pm > user dropdown box
  • 2005/11/7 20:55

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


Hey there,

Does anyone know the answer to this one: when you want to
send a PM, you can select the user from a dropdown menu.
When there are a lot of users this gets pretty annoying.
Is there a way to just type the name in order to send it?

I messed around -a bit- already and when changed to a
textinput field I am able to send to a 'uid' - so when
I type the membership# it delivers. The big question is:
how to convert the value 'uname' which users will have
to type to a 'uid' to send it.

What I have is:

echo "<form action='pmlite.php' method='post' name='coolsus'>n";
            echo 
"<table width='300' align='center' class='outer'><tr><td class='head' width='25%'>"._PM_TO."</td>";
        if ( 
$reply == ) {
            echo 
"<td class='even'><input type='hidden' name='to_userid' value='".$pm->getVar("from_userid")."' />".$pm_uname."</td>";
        } elseif ( 
$send2 == ) {
            
$to_username XoopsUser::getUnameFromId($to_userid);
            echo 
"<td class='even'><input type='hidden' name='to_userid' value='".$to_userid."' />".$to_username."</td>";
        } else  {
            
            echo 
"<td class='even'><input type='text' name='to_userid' value='' /></td>";
        }

2
smoothly
Re: pm > user dropdown box
  • 2005/11/7 20:56

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


Btw, using 2.0.13 and the particular file is pmlite.php

3
tripmon
Re: pm > user dropdown box
  • 2005/11/7 21:22

  • tripmon

  • Module Developer

  • Posts: 462

  • Since: 2004/2/28


FYI; you know you can click on the dropdown and type and it will take you to a match right???

That way, you would be doing exactly what you want to do (users would need to enter the name in a textbox anyway), but would also validate at the same time...

You can continue trying to implement with a plain textbox (though I can't see why you would want to)...
you will need to create an SQL query similar to...but using proper var/table/field names & syntax

SELECT 'uid' FROM `yourdbprefix_users` WHERE `uname` = $pm.uname

that will give you the uid associated with uname based on $pm.uname

But then you will need to make sure that you are sending to a valid uid, and that you have some error handling for wanks that can't type...

Again, I say, just add some text to the form telling them to type the name after clicking the box.... way easier..

4
smoothly
Re: pm > user dropdown box
  • 2005/11/7 22:25

  • smoothly

  • Just popping in

  • Posts: 17

  • Since: 2005/10/29


Typing in a dropdown box only works for the first letter
anyway; and besides that it's just annoying to have a
whole list of users - i can see not every member being
very happy with it.

But is there no way to do it without messing in the database?
Cause I have this feeling I won't get it to work that way :)

5
dickinsd
Re: pm > user dropdown box
  • 2005/11/8 9:52

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Don't know if you would be willing to update, but the newest version of XOOPS has a new PM function, in fact I think it is related to their extended profiles modules as these new features appear across the site.

But with the latest XOOPS you click on List, a window pops up and you get all of the members names in alphabetical order, you can sort the list further by choosing to see just a certain group of users e.g. Moderators or you can sort the list by user rank, which again would allow you to only display moderators or webmasters or whatever, I actually think the ability to search by group is fine, but then I do have a seperate user group for my moderators, so the ranking option is not really useful on my site. Anyway, you click refresh and you see all members which are moderators etc.

If you don't want to go through the list of users or try to sort by rank or group, instead of clicking List in the PM screen, just click on search you can type the display name into this field and press search; this says there is one user, click on Add this gets added to the PM and you can continue with the PM as you would before hand.

Dave

6
shank
Re: pm > user dropdown box
  • 2006/4/18 22:15

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


I would be interested in the same function for 2.0.13.2

The reason I want it is so I can hide how few members I have on my site, And will either have to figure this out, or do away with Private messages all together, which I don't want to do.

Thanks,
Steve
s l s h a n k l e @ b e l l s o u t h . n e t

Login

Who's Online

147 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits