Lavalair bbcode club with number users in club. . .

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

4 replies · 805 views · started 15 years ago · 1 min read

2 participants
cwikyz Junior · 12 posts #1

Hello. . . Do any who know, how to make this code to work?

//Function for count users
function clubusers($clid)
{
$users = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='". $clid ."' AND accepted='1'"));
return $users[0];
}

// BBcode
$text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is", "<div style='border-left:3px solid #777;'><a href='index.php?action=gocl&clid=$1&sid=$sid'>$2</a> <br /> <small> Club: ". clubusers("$1") ." peopls like this club", $text);

Problem in code is in counter. . . result is 0. . . I dont know how to do make this code to work? Please help. . . And sorry for my bad English. . . 🙂 thanks. . .

My FaceBook clone: http://secafe.freehostia.com

cwikyz Junior · 12 posts #3

No. . . That is a counter. . . But not working correct. . . 😀 Do you understand? 🙂 If me remove that. . . Result is: Club: peoples like this club. . . 🙁 Show result on picture. . .

My FaceBook clone: http://secafe.freehostia.com

Attachments: rs_en.png
pichiriche Junior · 38 posts #4

Teste $wathever = function($clubid);

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close