Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2008-10-09 12:33:42

Sono Juventino
Member
From: Skedsmo, Norway
Registered: 2007-12-22
Posts: 81

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Yes, it’s 54 rounds and 14 teams per round.

If you want to translate, use column_headers=”#,Club,Points,Goals,Goals against,Goals sum,Won,Draw,Lost” in your <txp:cnk_next_game /> code. Translate all those words.

Offline

#17 2008-10-09 14:23:10

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Thanks, its actully a lot easier than I thought it was

Offline

#18 2008-12-11 05:27:53

Sono Juventino
Member
From: Skedsmo, Norway
Registered: 2007-12-22
Posts: 81

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Could anyone add the functionality of colors in the table? It would be so much better if you could style 1-4th in a color, 5-6th in a color and 17-20 in a color. That would simplify the scan for Champions League qualify spot, Uefa qualify spot, and relegation zone.

Thank you so much. :)

Last edited by Sono Juventino (2008-12-12 13:07:23)

Offline

#19 2009-02-18 23:52:50

andyg
New Member
Registered: 2009-02-18
Posts: 5

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Hi there, thank you very much for producing this great plugin. I can’t believe something like this is available on textpattern.

Some of the sites on this thread are excellent examples of football websites. I am new to textpattern and wanted to try out this plugin for multiple leagues.

It all went through ok but all my admin settings generate loads of errors, here is one example:-

Warning: Table ‘roughide_txpcms.cnk_soccer_league’ doesn’t exist select count(*) from cnk_soccer_league where 1 in /home/roughide/public_html/textpattern/lib/txplib_db.php on line 84

any help appreciated, I’m thinking it might be to do with the name of my database.

Offline

#20 2009-02-19 06:57:10

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Did you run the database install as described in the plugin help?

Offline

#21 2009-02-19 09:01:26

andyg
New Member
Registered: 2009-02-18
Posts: 5

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Hi there Chriloi,

thank you for the reply and I have not ran any mysql queries.

I installed the plugin from this thread version 1.0.2, I have looked at the help in my admin area after installing and that help only says how to use and configure like:
CNK_SOCCER 1.0.0
Description
Manage your football league, clubs and games.

Offline

#22 2009-02-19 09:36:42

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Please read the help for v1.0.0.

I don’t have access to my test-system right now, but I think you have to navigate to extensions->soccer and click on install.

Offline

#23 2009-02-19 09:48:59

andyg
New Member
Registered: 2009-02-18
Posts: 5

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Hi Matey, thanks for such a fast response.

I missed that install link!!! doh!, I just assumed plugin enabled was it.

I did get an error on the install though, so I am unsure if this is going to cause me problems?

Notice: Undefined variable: dbcharset in /home/roughide/public_html/textpattern/lib/txplib_misc.php(534) : eval()’d code on line 2052

Installation was successful

Offline

#24 2009-02-19 09:57:02

chriloi
Plugin Author
From: Vienna, Austria
Registered: 2006-01-17
Posts: 120
Website

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

I have to take a look at the source in the evening…

Last edited by chriloi (2009-02-19 09:57:37)

Offline

#25 2010-01-11 22:51:28

ferra1980
New Member
From: Monza
Registered: 2010-01-11
Posts: 2
Website

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Hi chriloi, there’s a way to show in next_game tag always match with one specific team? Something like follow_club parameter in the cnk_table?
And also there’s a way to show all matchs in calendar?
Many thanks. Ferra 1980

Offline

#26 2010-02-24 03:24:14

Sono Juventino
Member
From: Skedsmo, Norway
Registered: 2007-12-22
Posts: 81

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

ferra1980: just write in time and date for the team(s) you want to show in next_game. That’s what I do.

Offline

#27 2010-02-24 18:38:20

ferra1980
New Member
From: Monza
Registered: 2010-01-11
Posts: 2
Website

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Thanks Sono Juventino. But did You found a way to show table with all match, played and not played?

Offline

#28 2010-02-25 23:30:54

Sono Juventino
Member
From: Skedsmo, Norway
Registered: 2007-12-22
Posts: 81

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

No, but I’ve managed to add “Games/games played/etc” to the plugin. I have also changed the order on the table to what I find most suiting.

You may take a look at it here

1.1: At line 80, find the following code (It will be longer, but I’ve translated it)
if (count($col_headers) != 9) $col_headers = explode

1.2: Change the WHOLE line to this: (You may translate the word as you like)
if (count($col_headers) != 10) $col_headers = explode(',','#,club,games,won,drawn,lost,for,against,+/-,points');

2.1: At line 82m find the following code
if (count($col_display) != 9) $col_display = explode

2.2: Change The WHOLE Line with this:
if (count($col_display) != 10) $col_display = explode(',', '1,1,0,0,0,0,0,0,0,1');

3.1: Start at line 146 and change ALL the lines with @if ($col_display[X]) to this

if ($col_display[0]) $out .= '<td>'.($i+1).'</td>';
if ($col_display[1]) $out .= '<td>'.$r['club'].'</td>';
$games_played = $r['game_won'] + $r['game_lost'] + $r['game_drawn'];
if ($col_display[2]) $out .= '<td>' . $games_played . '</td>';
if ($col_display[3]) $out .= '<td>'.$r['game_won'].'</td>';
if ($col_display[4]) $out .= '<td>'.$r['game_draw'].'</td>';
if ($col_display[5]) $out .= '<td>'.$r['game_lost'].'</td>';
if ($col_display[6]) $out .= '<td>'.$r['goals_for'].'</td>';
if ($col_display[7]) $out .= '<td>'.$r['goals_against'].'</td>';
if ($col_display[8]) $out .= '<td>'.$r['goals_sum'].'</td>';
if ($col_display[9]) $out .= '<td>'.$r['points'].'</td>';

(X = Random number)

Fell free to ask if you don’t understand. :D

Last edited by Sono Juventino (2010-02-25 23:34:22)

Offline

#29 2010-09-06 01:48:02

Sono Juventino
Member
From: Skedsmo, Norway
Registered: 2007-12-22
Posts: 81

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Ok, I’ve written two functions for this plugin. They are for displaying 5 next games for your club, and for displaying the 5 latest results. I’m not an advanced coder, so they are not optimized. The don’t require any changes to the table structure or such, so they should be easy to add to any exsisting site with this plugin. :)

LINK TO .TXT-FILE WITH CODE AND EXPLANATION

Link to example page with described functions

To display 5 next games:
<txp:cnk_game_list />

To display 5 latest results:
<txp:cnk_game_result />

Please ask here, og send me an email on thomas.m.larsson@gmail.com if you are struggeling

Last edited by Sono Juventino (2010-09-06 02:00:36)

Offline

#30 2011-05-15 14:30:28

magenta
New Member
Registered: 2011-05-08
Posts: 2

Re: [plugin] [ORPHAN] cnk_soccer - A football plugin

Please, tell me how to print in table the country name in brackets

Last edited by magenta (2011-05-15 14:44:22)

Offline

Board footer

Powered by FluxBB