Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Four Questions - Forum/Pagination/Levelup (http://www.mysidiaadoptables.com/forum/showthread.php?t=3614)

AlexC 04-20-2012 09:47 PM

the forum and main site's members should share the same IDs - I had to do some edits, but everything should be lining up now.

SilverDragonTears 04-20-2012 10:11 PM

I thought so too, but then I put it on my site and a member from the site doesn't match the ones on the forum. Mine does.... hmmm

SilverDragonTears 04-20-2012 10:16 PM

I guess mine is messed up somehow but you can try it on yours. Add this to the query:
Code:

, ".constant("PREFIX")."users.uid
and this where you want the link to show up:
Code:

<a href='http://www.ratties.x10.mx/forum/member.php?action=profile&uid={$row->uid}'>{$row->username}</a>

AlexC 04-20-2012 10:36 PM

Okay, it's like 12:30 here and I think I found the query but I have no idea if I did - where do I put this? :c

Code:

        // We did not specify a user, so show the memberlist
        $article_title = "Memberlist";
        $article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("css/pagination.css");
        $query = "SELECT * FROM ".constant("PREFIX")."users ORDER BY uid ASC";
        $stmt = $adopts->query($query);
        $rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.".constant("DOMAIN").constant("SCRIPTPATH")."/profile.php");
    $pagination->setPage($_GET[page]);

        $stmt = $adopts->select("users", array(), "1 ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}");       
        while ($row = $stmt->fetchObject()){
                $status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":"";
                $article_content .= "<strong><a href='http://www.ratties.x10.mx/forum/member.php?action=profile&uid='{$row->uid}'>{$star}{$row->username}</a></strong><br />";
        }

        $article_content .= "<br />{$pagination->showPage()}</div>";

}

here is the member list part of the code.

SilverDragonTears 04-20-2012 10:39 PM

I was looking at the wrong page. What you have now should work. Try this

Code:

// We did not specify a user, so show the memberlist
        $article_title = "Memberlist";
        $article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("css/pagination.css");
        $query = "SELECT * FROM ".constant("PREFIX")."users ORDER BY uid ASC";
        $stmt = $adopts->query($query);
        $rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.".constant("DOMAIN").constant("SCRIPTPATH")."/profile.php");
    $pagination->setPage($_GET[page]);

        $stmt = $adopts->select("users", array(), "1 ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}");       
        while ($row = $stmt->fetchObject()){
                $status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":"";
                $article_content .= "<strong><a href='http://www.ratties.x10.mx/forum/member.php?action=profile&uid={$row->uid}'>{$star}{$row->username}</a></strong><br />";
        }

        $article_content .= "<br />{$pagination->showPage()}</div>";

}


AlexC 04-20-2012 10:41 PM

Still not working. :/ I don't know how hard it is fetch the id.

SilverDragonTears 04-20-2012 10:43 PM

It should already be fetching it.

AlexC 04-20-2012 10:48 PM

It's probably fetching, it just isn't inserting it into the URL.

http://www.ratties.x10.mx/forum/memb...n=profile&uid= <-- this is what I've been getting every time.

I removed the quotes around the id thing, and for some reason it was kinda working then - the ids were showing up, but everything went wonky.

SilverDragonTears 04-20-2012 10:49 PM

Show me it again... what you have now?

I have this and it works
Code:

$stmt = $adopts->select("users", array(), "1 ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}");       
        while ($row = $stmt->fetchObject()){
                $status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":"";
                $article_content .= "<strong><a href='http://taleofdragons.net/forum/member.php?action=profile&uid={$row->uid}'>{$star}{$row->username}</a></strong><br />";
        }


AlexC 04-20-2012 10:51 PM

Code:

}
else{

        // We did not specify a user, so show the memberlist
        $article_title = "Memberlist";
        $article_content = "Here are all of the members of this site, sorted by registration date.<br /><br />";
    include("css/pagination.css");
        $query = "SELECT * FROM ".constant("PREFIX")."users ORDER BY uid ASC";
        $stmt = $adopts->query($query);
        $rowsperpage = 15;
    $pagination = new Pagination($adopts, $query, $rowsperpage, "http://www.".constant("DOMAIN").constant("SCRIPTPATH")."/profile.php");
    $pagination->setPage($_GET[page]);

        $stmt = $adopts->select("users", array(), "1 ORDER BY uid ASC LIMIT {$pagination->getLimit()},{$rowsperpage}");       
        while ($row = $stmt->fetchObject()){
                $status = cancp($row->usergroup);
        $star = ($status == "yes")?"<img src='templates/icons/star.gif' border=0' /> ":"";
                $article_content .= "<strong><a href='http://www.ratties.x10.mx/forum/member.php?action=profile&uid='{$row->uid}'>{$star}{$row->username}</a></strong><br />";
        }

        $article_content .= "<br />{$pagination->showPage()}</div>";

}

What I have right now.

http://www.ratties.x10.mx/profile.php member list

I can remove the quotes again and show you how it went.


All times are GMT -5. The time now is 11:58 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.