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

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

Hi: Thank you for this plugin. Can you give advice with installation issues?

I am using php 5.6 and I have version 1.0.2 of the plug in installed.
I go the “soccer” page and click “install” and I quickly get “Installation aborted”
I tried php 7.0 clicked install and got the following error.

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

Hi arellanon and welcome!

That looks like the plugin is not yet updated for newer versions of PHP. It’s been a while since we saw the author here on the forum.

I don’t know what your level of knowledge is, but it may be as simple as replacing functions that use mysql_… in the plugin code with mysqli_… (note the extra i). See here for further information. That was a casualty of a change in PHP. You can edit the plugin code in the Admin › Plugins pane and look up the correct function names on php.net or here. That might resolve the installation problems, but it might also be more complicated than that.

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

Hi arellanon,

Have a go with this one. All I’ve looked at for the time being is the install and deinstall routine. They now use txp’s own create/remove table and prefs functions but you still have to go through the Content › Soccer tab to install and deinstall. In my tests installation works as do the panels afterwards (PHP 7.2 and Textpattern 4.7.3), though I’ve not entered any details. I don’t know anything about the plugin (or that much about football leagues) so you’ll still need to figure out how to use the rest of the plugin.

Oh, and I also added the public tags to the registry so you don’t get an error further down the line.

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

Hmm, the function select_buttons no longer exists in txp but was previously part of the multi-edit options. For the moment I simply removed it and silenced another error that showed after adding a club or league. It seems to now add items when you input them and show the table.

Otherwise, I think the plugin is definitely in need of some love as much of the way it does things is very old or custom. The table display mechanisms are quite old and in my opinion, the entire soccer item should be its own menu item with the panels as individual entries in the drop-down rather than the current tier arrangement.

The author has since gone on to much bigger things and last visited the forum 6 years ago, so I suspect you won’t get any help there. The plugin is quite specific so I’m not how many people are interested in an update. If it’s very important to you – or others also using it – you might want to post in the developers wanted thread for (potentially paid) assistance in updating the plugin.

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

Thank you for helping. I am finding out quickly that most plugins are out of date. So far I tried this one, a store, and will try a calendar next. Now that all the databases are in place, I will try to hack around and see if I can make work for my specific needs. realsanjose.net is my site. I am also trying to find a way to reorder the navigation buttons of the sections. I tried a plugin for that and sort of got it to work but it will require me to figure out how to make look the same as the one I have.

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

Thank you for helping. I am finding out quickly that most plugins are out of date.

It varies. A lot are no longer necessary but specific cases such as this are definitely plugin territory and people come and go…

I am also trying to find a way to reorder the navigation buttons of the sections. I tried a plugin for that and sort of got it to work but it will require me to figure out how to make look the same as the one I have.

If you don’t mind explicitly naming the sections you want, you can use the sections attribute in txp:section_list and enter the section names separated by commas in the order you want them (remove any sort attribute you might have). That’s normally fine for a site you control as you can update that should you add new sections at some later date.

If you need to build it flexibly, you could try esq_sectionsort. That allows you to drag and drop the sections in the Presentation › Sections pane. In your section_list tag, you then add sort="sectionsort desc" (or asc as you need it) to make the sections sort according to their position on the sections pane. Here you should leave out the sections attribute (i.e. don’t mix it with the above tip). If you don’t want all the sections to show, then use the exclude attribute.