MyBB Community Forums

Full Version: Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi i would like to add things to the postbit...

ID Number
Number of Threads created by the user
Location (The Custom Profile)

What do i need to add and where?
any idea?
hey

Quote:ID Number
in the postbit template add

$post[uid]

Quote:Number of Threads created by the user
open ./inc/functions_post.php

find

if($post['avatar'] != "" && $mybb->user['showavatars'] != "no") 

above it add

 
//threads count by zaher1988
$threadsc = $db->query("SELECT count(*) as postscount FROM ".TABLE_PREFIX."threads WHERE username='".$post['username']."'");		
$outputc = $db->fetch_array($threadsc);
$threadscount = $outputc['postscount'];
and in the postbit template add

 threads : $threadscount<br />

Quote:Location (The Custom Profile)

in the postbit template add

$post[fid1] <br />
1 is the id of the location field.
thanx, the location and the user ID works, but on the postbit on "threads: " display "0"
lol Toungue

thanx, that works Toungue
how do i get the location to say "Location: XXXXXX" instead of "XXXXXX(1 space)"
try this:

Quote:Location: $post[fid1]<br />

But Location is always gonna be always displayed, lets wait for zaher Toungue
yeah indeed it is gonna stay there.

For that reason.

in ./inc/functions_post.php

find

 if($post['avatar'] != "" && $mybb->user['showavatars'] != "no") 

above it add

 if ($post['fid1'] == '')
{
$ulocation == '';
} else {
$ulocation ="Location: ".$post['fid1'];
}

so in the potbit template u will have to use $ulocation instead of $post[fid1]

regards

what is the code for a age one same as location but age
Pages: 1 2