Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
I would like to make a custom pal box with each moderators name in it so when a user clicks on the name, it brings up an email page to that person. I have 6.4b1 with the IIP. Any ideas on what to type in there? Thanks.

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
That is rather an easy thing to do.

You need to query the database and grab all the moderator's and list them in a pal box.

This query would grab all mods names from the database.

SELECT U_Name FROM w3t_Users WHERE U_Groups LIKE '%-2-%'

I am just thinking outloud here

You can then use the suggestions in this post to email a user. There is a link with a very easy explanation on how to use the sendmail function for email with a sample script.

https://www.ubbdev.com/forum/showflat...5/o/all/fpart/1

Joined: Jan 2003
Posts: 141
Journeyman
Journeyman
Offline
Joined: Jan 2003
Posts: 141
Thanks Omegatron. LOL That is WAY over my head. I'll have to hire that one out.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay well the above query would be more like this

SELECT U_Name,U_Email FROM w3t_Users WHERE U_Groups LIKE '%-2-%'

That would grab both Username and Email

You could make it simple and just list username and link an email client to load with the mailto:$email statement

Or the more complex way would be to actually write up a form which would bring up another page to email the mods in a generic mod page.

If you need further assistance you can contact me privately.

Here is an example of a very easy pal box that brings up mod names and a link to email. Things can get alot more complicated from there

<?
echo <<< template

$tbopen
<tr>
<td align="left" class="tdheader">
Email Moderator's
</td>
</tr>

template;

$query = "
SELECT U_Username,U_Email
FROM {$config['tbprefix']}Users
WHERE U_Groups LIKE '%-2-%'
";
$result = mysql_query($query)or die("Query failed");

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
$Mod = $line["U_Username"];
$Email = $line["U_Email"];


echo <<< template

<tr>
<td align="center" class="lighttable">
<a href="mailto:$Email">$Mod</a>
</td>
</tr>

template;

}
mysql_free_result($result);

echo <<< template

$tbclose

template;
?>

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
The above in a custompalbox with a few aestetic changes.
Attachments
97786-custombox5pal.txt (0 Bytes, 15 downloads)

Sponsored Links

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
isaac
isaac
California
Posts: 1,157
Joined: July 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
Morgan 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 20221218)