The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello, I'm designing my website and I want to integrate it with Vbulletin.
I have added a userpanel with the following script: Code:
<?
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
print("<align='center'><span class='sectionheader'>Welcome back, $username!<br>");
} else {
?>
<form action='forums/login.php' method='post' onsubmit='md5hash(vb_login_password,vb_login_md5password)'>
<script type='text/javascript' src='forums/clientscript/vbulletin_md5.js'></script>
<span class="sectionheader">Username:</span>
<input type='text' class='button' name='vb_login_username' id='navbar_username' size='15' accesskey='u' tabindex='1' value='' onfocus='if (this.value == 'username') this.value = '';' /><br>
<span class="sectionheader">Password: </span>
<input type='password' class='button' name='vb_login_password' size='15' accesskey='p' tabindex='2' /><br>
<input type='checkbox' name='cookieuser' value='1' tabindex='3' id='cb_cookieuser_navbar' accesskey='c' checked='checked' /><span class='sectionheader'>Remember Me</span><br>
<input name="submit" type='submit' class='button' accesskey='s' tabindex='4' title='Log In' value='Log In' />
<input type='hidden' name='do' value='login' />
<input type='hidden' name='forceredirect' value='1' />
<input type='hidden' name='vb_login_md5password' />
</form>
<?
}
?>
my 2nd question is: How do I add the amount of posts on the forums on my main site? thanks in advance |
|
#2
|
||||
|
||||
|
To get the avatar
PHP Code:
Last activity is in $bbuserinfo[lastactivity] as a UNIX timestamp. To get the total amount of posts [sql]SELECT COUNT(*) AS totalposts FROM post[/sql] |
|
#3
|
|||
|
|||
|
Quote:
with the total posts i mean, to give me the number of posts on the main site. |
|
#4
|
||||
|
||||
|
Quote:
Quote:
Isn't that what you want? |
|
#5
|
|||
|
|||
|
Quote:
Quote:
with the posts i mean a string on my site that changes everytime the post number changes, so i dont have to update it manually |
|
#6
|
||||
|
||||
|
Quote:
Maybe you got a typo? Quote:
Do you need PHP-Code too? So here we go: PHP Code:
|
|
#7
|
|||
|
|||
|
postcount is working thanks alot!!
![]() PHP Code:
global.php for username and /includes/functions_user.php for the avatar, the pm's just worked maybe I need to include another thing for lastactivity edit: I made a typo, i see it now sorry lol I will most definatly include your name in the final credits Quote:
sorry for double post |
|
#8
|
||||
|
||||
|
As I said, it's a unix timestamp
![]() If you want a readable date PHP Code:
|
|
#9
|
|||
|
|||
|
Quote:
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|