You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 268 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 [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
XtraX
Lieutenant
Lieutenant


Joined: Aug 23, 2003
Posts: 195


PostPosted: Thu Mar 02, 2006 6:44 pm Reply with quoteBack to top

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... Sad


Last edited by XtraX on Fri Mar 03, 2006 6:39 am; edited 1 time in total
Find all posts by XtraXView user's profileSend private message
Evaders99
Site Admin
Site Admin


Joined: Aug 17, 2003
Posts: 12482


PostPosted: Fri Mar 03, 2006 4:56 am Reply with quoteBack to top

You have to add your query to grab the username from the users table

_________________
Helping those that help themselves
Read FIRST or DIE!

"Fighting is terrible, but not as terrible as losing the will to fight."
Star Wars Rebellion Network - Need Help? Evaders Squadron Coding
Find all posts by Evaders99View user's profileSend private messageVisit poster's websiteAIM Address
XtraX
Lieutenant
Lieutenant


Joined: Aug 23, 2003
Posts: 195


PostPosted: Fri Mar 03, 2006 6:38 am Reply with quoteBack to top

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
Find all posts by XtraXView user's profileSend private message
XtraX
Lieutenant
Lieutenant


Joined: Aug 23, 2003
Posts: 195


PostPosted: Sat Mar 04, 2006 7:47 am Reply with quoteBack to top

*BUMP*

Anyone have an idea ?
Find all posts by XtraXView user's profileSend private message
dezina
Support Mod
Support Mod


Joined: Jun 09, 2003
Posts: 1713

Location: England

PostPosted: Sat Mar 04, 2006 10:24 am Reply with quoteBack to top

Subscribers Block which can be turned into a module
Details and screenshot at
http://www.westernstudios.net/web/downloads-100.html

_________________
Image
Backup files BEFORE altering
Use PHPNuke 7.6 with patches!!
No private messages please, POST in forums.
Find all posts by dezinaView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.051 Seconds - 367 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::