The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Pull the last paid subsciber
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
PHP Code:
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! |
#2
|
||||
|
||||
urghh if it's in the table you just said then it's as simple as
phpinclude_start PHP Code:
HTML Code:
<a href="member.php?$session[sessionurl]u=$latest_subscription[userid]>$latest_subscription[username]</a> is the latest subscriber at $vboptions[bbtitle]. |
#3
|
|||
|
|||
sweet that worked, had to do some minor typo fixes and something else but its working
ill post the minor changes to ur code in a bit thanks a million! |
#4
|
||||
|
||||
no problem
|
#5
|
|||
|
|||
in template phpinclude_start
Code:
if (THIS_SCRIPT == 'index') { $latest_subscription = $DB_site->query_first("SELECT subscriptionlog.subscriptionid, user.username, subscriptionlog.userid FROM " . TABLE_PREFIX . "subscriptionlog AS subscriptionlog LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid = subscriptionlog.userid) ORDER BY subscriptionlog.subscriptionlogid DESC LIMIT 1"); } Code:
<div><strong>Latest Contributer: <a href="member.php?$session[sessionurl]u=$latest_subscription[userid]>$latest_subscription[username]</a></strong></div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|