poster_post issue

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Epox
Registered User
Posts: 37
Joined: Sat Jan 12, 2002 7:42 am

poster_post issue

Post by Epox » Wed Oct 02, 2002 1:01 am

Ok, in viewtopic.php I made my own varible to pull only the number of posts, no text or spaces what so ever. Here is the code below of the varible:

Code: Select all

 $poster_post = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_posts'] : '';

It keeps returning Posts: 220 , not nessarly always 220 but those are the amount of posts i've made on my board. I only need the number, how can I fix this? plz help!

DJ P@CkMaN
Registered User
Posts: 194
Joined: Thu Jun 06, 2002 12:55 am
Location: Brisbane, Australia
Contact:

Post by DJ P@CkMaN » Wed Oct 02, 2002 3:09 am

Code: Select all

$poster_post = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_posts'] : '';
$poster_post = substr($poster_post, 7);

Acyd Burn
Consultant
Consultant
Posts: 5830
Joined: Wed Dec 05, 2001 8:31 pm
Location: Behind You
Name: Meik Sievertsen

Post by Acyd Burn » Wed Oct 02, 2002 3:10 pm

Your posted code:

Code: Select all

$poster_post = ( $postrow[$i]['user_id'] != ANONYMOUS ) ? $postrow[$i]['user_posts'] : '';
Will add the Post Count of the actual User into the $poster_post variable, in your case 220.

The prepended Posts: is probably added elsewhere (Template ? Additional Code ?).

DJ P@CkMaN
Registered User
Posts: 194
Joined: Thu Jun 06, 2002 12:55 am
Location: Brisbane, Australia
Contact:

Post by DJ P@CkMaN » Fri Oct 04, 2002 3:07 am

Yes, I thought that as well but to save time finding it, my code works just as well :wink:

Post Reply

Return to “[2.0.x] MOD Writers Discussion”