1
sturgis
Re: how to develope a pm (private message) page
  • 2004/9/7 19:11

  • sturgis

  • Just popping in

  • Posts: 4

  • Since: 2004/8/11


If I wanted to use the above script, but modify it so that it only shows certain parts if the viewer is admin, how would I go about that? I'm clueless as far as the auth checks go. An example would do wonders for me!
TIA



2
sturgis
Re: how to develope a pm (private message) page
  • 2004/9/4 14:05

  • sturgis

  • Just popping in

  • Posts: 4

  • Since: 2004/8/11


I stole donxoops post and modified it do have pm's listed, as well as a link to yahoo messenger so you can send messages that way if they have an acct. As the previous poster stated, don't used this if you have a ton of users since it has no paging.

If anyone could show me how to modify it to add paging I'd be tickled, but at this time I'm not a good enough programmer to have a clue how to do that.

It shouldn't be too difficult to add an icq online/offline indicator as well as a yahoo one.

Hope this helps someone out

Oh BTW, I am using this with the TinyD module




global $xoopsDB;
$query = 'SELECT A.uid,uname AS U_Name, name AS Full_Name, user_from AS Location, A.user_yim AS Yahoo, A.uid AS User FROM xoops_users AS A LEFT JOIN xoops_groups_users_link AS B ON A.uid = B.uid
WHERE (
B.groupid =2
)
ORDER BY A.uname';

$result = mysql_query($query);
// Top message, and start of table including column heads
echo "<b>· Registered Members ·</b>
<li>Click on your name and edit your profile
<li>Click a yahoo id to send a message<hr />";
echo "<table cellpadding=0 border=0>
<tr>
<th>User Name</th>
<th>Full Name</th>
<th>PM</th>
<th>Yahoo</th>
<th>Location</th>
</tr>";

// loop through the data and echo each cell 1 row per loop
while ($data = mysql_fetch_object($result)) {
echo "<tr ><td><a href=\"/userinfo.php?uid=$data->uid\">$data->U_Name</a></td>";
echo "<td >$data->Full_Name</td>";

// I did the pm part in chunks rather than one big echo because I found it easier to
// see where I left stuff out or screwed things up ;)L.
echo "<td> <a href=\"http://hshs85.cloudy.biz/pmlite.php?send2=1&to_userid=$data->User\" target=_blank";

// This part should degrade nicely. If a user has javascript turned off
// it'll return false and open the window anyway though size may not be default 450 x 380
echo " onclick=\"window.open(this.href,'pms','width=450,height=380');return false;\"";
echo "><img src=\"http://hshs85.cloudy.biz/images/icons/pm.gif\" alt=\"Send Private Message to $data->U_Name\" /></a></td>";

if ($data->Yahoo !="") {
echo "<td ><center><A HREF=\"http://edit.yahoo.com/config/send_webmesg?.target=$data->Yahoo\">
$data->Yahoo</a></center></td>";
}
else {
echo "<td><center>Not Listed</center></td>";
}
if ($data->Location!="") {
echo "<td >$data->Location</td></tr>";
}
else {
echo "<td>Not Listed</td></tr>";
}
}
echo "</table>";



3
sturgis
Yellow Pages portal module I-Frames problem also
  • 2004/8/11 13:48

  • sturgis

  • Just popping in

  • Posts: 4

  • Since: 2004/8/11


Update: I'm now using an I-Frame in xf-section to do what I needed. Told you all I was a newb! If anyone wants to see what it looks like (and my site in general tho theres not much there yet, go tohttp://torcnm.cloudy.biz Stupid domain name I know but my wife likes the cloudy part.

Hey, this is only my 2nd post, nice to meet everyone. Try to take it easy on the newb?
I don't know if it's possible or not, but I've been looking for ways to get my local area businesses listed on my website (I'm using X-directory right now). Not for pay, just because it's a small community website and I'd like to promote the locals!
While x-directory works well enough, adding entries is a nerve wracking proposition considering how many entries I need to input.
So, after looking at the yahoo yellow pages which already show every business I want in my listing, I was wondering if anyone has looked either into a way to grab listings and catagories from an already existing yellow pages site, or perhaps just wrap the current yahoo site into my page. I have to say though, I read somewhere else that I-Frames could be used to do this, but for some reason I can't make em work. Module is installed, but when I click the menu link, the screen flashes for a sec, then reverts to my default view.
Ideas anyone?
Thanks in advance for any and all help!



4
sturgis
Decent host, great service. Supremecenter.com (used to be lonex)
  • 2004/8/11 13:39

  • sturgis

  • Just popping in

  • Posts: 4

  • Since: 2004/8/11


Hey just wanted to let everyone know if they need a decent host supremecenter is pretty good. Not as cheap as some, its around $7 a month for 400mb space, and 5g storage with 1 MySQL database, 99 emails, (4 mb MySQL quota) Ftp, gd2, frontpage etc. SSH is extra though.
The main reason I'm recommending them is their service. I've had a few questions, and during a server switch from Lonex to supremecenter, I had a short term dns problem, (Not a shock, it happens) but the amazing thing is when I put in my service tickets I had a response in 5 min. This has happened with every stupid question I've asked them. After dealing with some other places prior to this, I have to say I was blown away.
So there you go for what it's worth. (Ok ok, I had good luck with pair.com quite a while back too)




TopTop



Login

Who's Online

155 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 155


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