- Readme First! - Read and follow the rules, otherwise your posts will be closed
There are currently, 139 guest(s) and 0 member(s) that are online. You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - List Subscribers Mod [ ]
Author
Message
XtraX
Lieutenant
Joined: Aug 23, 2003
Posts: 195
Posted:
Thu Mar 02, 2006 6:44 pm
Forgive me if I put this in the wrong spot and feel free to move it if needed,
I'm fairley new to this php-nuke and I started working on my first mod to display subscribed users,
The problem is I'm not experienced enough to figure this one out and its drive me crazyyyy...
What i'm try'in to do is grab just the subscribed users and of course have it linked to their account profile,
here's what i got so far.....
Code:
<?php
if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
header("Location: ../../../index.php");
die ();
}
require_once("mainfile.php");
$pagetitle = "Premium Members";
global $prefix, $db;
include("header.php");
OpenTable();
$query="SELECT id, userid, subscription_expire from $prefix"._subscriptions." ORDER BY id DESC";
$result=mysql_query($query);
while(list($id, $userid, $subscription_expire) = mysql_fetch_row($result)) {
echo "- <A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$userid\" title=\"Welcome $username\">$username</a><br />\n";
}
CloseTable();
include("footer.php");
?>
So far the problem with this is it just pulls the userid and I cant seem to figure out how to display the "username," any help would be appreciated.
xtrax...
Last edited by XtraX on Fri Mar 03, 2006 6:39 am; edited 1 time in total
Evaders99
Site Admin
Joined: Aug 17, 2003
Posts: 12482
Posted:
Fri Mar 03, 2006 4:56 am
XtraX
Lieutenant
Joined: Aug 23, 2003
Posts: 195
Posted:
Fri Mar 03, 2006 6:38 am
Thanks Evader for replying..
Thats just it I don't know how to do that as the username's aren't stored in the subscriptions table...instead its the users id..
How can I get the id to display as the username, and what changes do i need to adhear to the query above..
xtrax
XtraX
Lieutenant
Joined: Aug 23, 2003
Posts: 195
Posted:
Sat Mar 04, 2006 7:47 am
*BUMP*
Anyone have an idea ?
dezina
Support Mod
Joined: Jun 09, 2003
Posts: 1713
Location: England
Posted:
Sat Mar 04, 2006 10:24 am
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum