Jenta
03-15-2005, 11:50 AM
Im trying to show the last paid subscriber in the What's Going On site statistics area. I believe this can be done with some template edits alone. Perhaps something in phpinclude_start like this code someone posted at .com
if (THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay')
{
// GET FORUM COUNTERS
$forumcounts= $DB_site->query("SELECT forumid, replycount, threadcount
FROM " . TABLE_PREFIX . "forum
");
// SET VALUES
while ($forumcount = $DB_site->fetch_array($forumcounts))
{
$forumreply[$forumcount[forumid]] = $forumcount[replycount];
$forumthread[$forumcount[forumid]] = $forumcount[threadcount];
}
}
Im guessing it would have to go like this...
SELECT * FROM `subscriptionlog` WHERE ??????
take the next auto_increment, subtract 1, then pull the userid
Then add a phrase like the newest registered user one edit the forumhome template
Standard Phrase: welcome_to_our_newest_member_x
Varname $vbphrase[welcome_to_our_newest_member_x]
Text Welcome to our newest member, <a href="{1}">{2}</a>
in forumhome
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
Add this under
<div>Welcome to our newest paid subscriber: <a href="member.php?$session[sessionurl]u=userid">username</a></div>
Anyone know how?
Thanks!
if (THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay')
{
// GET FORUM COUNTERS
$forumcounts= $DB_site->query("SELECT forumid, replycount, threadcount
FROM " . TABLE_PREFIX . "forum
");
// SET VALUES
while ($forumcount = $DB_site->fetch_array($forumcounts))
{
$forumreply[$forumcount[forumid]] = $forumcount[replycount];
$forumthread[$forumcount[forumid]] = $forumcount[threadcount];
}
}
Im guessing it would have to go like this...
SELECT * FROM `subscriptionlog` WHERE ??????
take the next auto_increment, subtract 1, then pull the userid
Then add a phrase like the newest registered user one edit the forumhome template
Standard Phrase: welcome_to_our_newest_member_x
Varname $vbphrase[welcome_to_our_newest_member_x]
Text Welcome to our newest member, <a href="{1}">{2}</a>
in forumhome
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
Add this under
<div>Welcome to our newest paid subscriber: <a href="member.php?$session[sessionurl]u=userid">username</a></div>
Anyone know how?
Thanks!