Clan list

General Chat, Comments
Post Reply
njfrlng
Posts: 53
Joined: Tue Feb 04, 2014 9:51 pm

Clan list

Post by njfrlng »

I just bought the clan list module, I get this error when i click on the clan list after I install it.

http://prntscr.com/2q0lxw
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Clan list

Post by a_bertrand »

It is lacking a column called memb_count. Try to check in the module directory if there is some SQL file adding this column, if yes run the script manually with PhpMyAdmin, if not, I assume memb_count is an int... edit the table and add that column. However this module is bugy.
Creator of Dot World Maker
Mad programmer and annoying composer
njfrlng
Posts: 53
Joined: Tue Feb 04, 2014 9:51 pm

Re: Clan list

Post by njfrlng »

Adding the memb_count column and making it an int worked.

shows as zero though.

I dont see where in the databases clan member info is stored.
illusions
Posts: 31
Joined: Thu Mar 06, 2014 12:46 pm

Re: Clan list

Post by illusions »

i think this is a mod i made i will look into any issues
illusions
Posts: 31
Joined: Thu Mar 06, 2014 12:46 pm

Re: Clan list

Post by illusions »

FIX for the incorrect memb_count.

open up

modules/clans_admin_new_members/in_clans.php

look for near top of page

Code: Select all

 $db->Execute("update clans_roles set role_id = 1 where user_id = ? and clan_id = ?", $_GET["accept"], $memberOf);
underneath add..

Code: Select all

$db->Execute("update clans set memb_count=memb_count+1 where id = ?", $memberOf);
Sorry for delay in fixing this issue it was something i had forgotten about..

you may need to go to phpmyadmin under clans and add the clan member amounts so the update will correct itself

WHEN A USER LEAVES A CLAN

ALSO whilst im here if you have the modules/clans_leave/

then open up the in_clans.php
and under line 4 add

Code: Select all

$db->Execute("update clans set memb_count=memb_count-1 where id = ?", $memberOf);
this will deduct the count when a member leaves

WHEN CREATING YOUR FIRST CLAN

open up modules/clans/content.php

and on line 27 replace that with this

Code: Select all

 $db->Execute("insert into clans(name,description,memb_count) values(?,?,'1')", $_POST["name"], $_POST["desc"]);
this will make sure that the count starts immediatley once a new Clan is created
Tangled
Posts: 12
Joined: Wed Oct 01, 2014 5:29 am

Re: Clan list

Post by Tangled »

Quoting: Sorry for delay in fixing this issue it was something i had forgotten about..
you may need to go to phpmyadmin under clans and add the clan member amounts so the update will correct itself


So do I need to add a column in the database for the count. If so what's the correct way to add. I'm still getting errors and there's no count column in phpmyadmin for a count in clans
Sim
Posts: 410
Joined: Sat Dec 26, 2009 5:37 pm

Re: Clan list

Post by Sim »

It looks like your column should be called "memb_count" in table "clans".

Make the column "INT". I would say make it 6 in length, default value "0"
oRPG Creator - Make Your Own Browser Game
oRPG Creator on Facebook
Tangled
Posts: 12
Joined: Wed Oct 01, 2014 5:29 am

Re: Clan list

Post by Tangled »

awesome thank you that worked ! :D
Post Reply

Return to “General”