• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

The old WordPress plugin

Started by AndyDeGroo, July 27, 2014, 06:14:45 PM

DJones

Quote from: AndyDeGrooThe error message indicates that no data was returned for query. Note that it looks for song_type=0, which is music.

That's it! This explains why it wouldn't work at all for me. Since I don't play music, when I import my tracks, I put them in the Other category. I changed all references in the plugin for song_type=0 (and all the slightly different iterations of it) to equal 6 instead. Now I'm getting top track and top album info! Now playing is still showing the "info can't be displayed" message but at least now my issues are making more sense.

I knew it had to be something on my end that wasn't being done as expected since the plugin was working for others. Never occurred to me that it could be the track type. Should I wait a while and see if the now playing info starts working?

Thanks again for all your help, man!

Aside:
The only thing showing an error now is the requests part but I'm not concerned about it as I won't be using the feature. Here's the error message in case it helps for later on or with someone else's setup (again, could be an error caused by me tweaking the script):

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''song_type' = 6 ORDER BY `artist` ASC LIMIT 0, 25' at line 7]

AndyDeGroo

Quote from: DJones on August 01, 2014, 08:25:07 PM
Aside:
The only thing showing an error now is the requests part but I'm not concerned about it as I won't be using the feature. Here's the error message in case it helps for later on or with someone else's setup (again, could be an error caused by me tweaking the script):

WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''song_type' = 6 ORDER BY `artist` ASC LIMIT 0, 25' at line 7]
Ah, I thought about the track type in WHERE clause, but it didn't seem likely that someone would use other track types.

That error shows exactly what's wrong. Column name should be enclosed in backticks "`", not single quotation marks (e.g.: `song_type`)

I could add track type selection as advanced option in later versions, if anyone else votes for it.
It is also possible to query more than one track type:

SELECT `date_played`, `artist`, `title` FROM `history` WHERE `song_type` IN(0,1,2,3,4) ORDER BY `date_played` DESC;

DJones

#47
You are the man! Changed the single quotes (3 occurrences) to backticks and voila! Very cool! Thanks again!

+1 for having an option for track type

Another request (hopefully easy to implement): Add an option to change how often Ajax refresh happens instead of just on or off. My tracks are so long that 10 seconds is WAY more frequent than necessary. Just a thought.

Hansen

hi again is there, like in the "old" version (Wordpress), a translation sektion?  where i can edit the bottons and other stuff?

im far from able to mess around with the script
Best Regards
Lars Hansen

AndyDeGroo

Quote from: Hansen on August 02, 2014, 03:54:56 PM
hi again is there, like in the "old" version (Wordpress), a translation sektion?  where i can edit the bottons and other stuff?

im far from able to mess around with the script

There is no translation section in new plugin and there will never be one. It can be translated like every other plugin, theme or WordPress itself - with gettext and .mo files, just the way it should be.
You may use Codestyling Localisation plugin in WordPress or Poedit application to create po/mo files in languages directory. You can find a radiodj.pot template file for Poedit in languages directory as well. Codestyling Localisation is easier to use and allows to rescan for new translatable strings in plugins. You should rescan the RadioDJ plugin, because I might have changed some strings without updating the pot and po files.

If something is unclear, there is more info about WordPress localization online.

It would be great if you contributed your translation and it could included in later releases.

DJones

Quick question for you.. I wanted to remove the duration from the now playing info, but I was unsuccessful. What needs to be changed to have it show everything else but the duration?

joshuatree44

#51
it is a simple css code add. i figured it was after andy noted it to me. .now-playing .duration,
.now-playing .timestamp {
    display: none;
}

Edit: fixed a missing bracket. --Andy

Quote from: DJones on August 03, 2014, 09:57:05 PM
Quick question for you.. I wanted to remove the duration from the now playing info, but I was unsuccessful. What needs to be changed to have it show everything else but the duration?

DJones

Ah, that makes sense. I was trying to edit the php file.  :-X Never thought to check there! Thanks!

joshuatree44

That is why Andy made the point several times that you can edit the CSS for complete customization.

Quote from: DJones on August 04, 2014, 12:41:10 AM
Ah, that makes sense. I was trying to edit the php file.  :-X Never thought to check there! Thanks!

DJones

Thanks for pointing that out.  :-[

AndyDeGroo

Message by Hansen moved to its own topic: Top Spins Report in WordPress plugin

Please, if you have a feature requests, post them on the dedicated forum board New Wordpress Plugin as new topic.

joshuatree44

It was odd today that I replaced my cable modem to fix the wifi issue here and now the setup does not work. I tried all the setup things we have listed here and nothing. I even set it up as forwarding and still nothing. I set it with port 21, 80, etc. Nothing. So I guess this modem is crap. I even tried to put it with the firewall off and still nothing. Windows firewall too. I went to www.grc.com and prob tests and everything. Probed it and all. Nothing is working. So I guess I am stuck without this feature now. Andy or anyone advice?

foxfm

can please help me how i setup this plugin . I have all ready installed but i cant connect with my sql db my site is http://foxfm.eu i have see a video and i have install at my pc heidi i make users , but i cant understunt what ip i must put at the plugin dashboard .

thank you
elias
Foxfm
A happy old man dj
Elias

AndyDeGroo

Quote from: foxfm on September 18, 2014, 05:47:25 PM
can please help me how i setup this plugin . I have all ready installed but i cant connect with my sql db my site is http://foxfm.eu i have see a video and i have install at my pc heidi i make users , but i cant understunt what ip i must put at the plugin dashboard .

thank you
elias

Hi Elias, and welcome to RadioDJ forums

I've read your PM, but it should be better to post my answer here so others can benefit from it.

First of all you have to understand if your RadioDJ database is accessible from public IP address. That depends on your ISP and how your RadioDJ computer is connected to internet. Fastest way to check your public IP address is to ask google.

If you already have a persistent public IP address, use that for connection. Otherwise, if your IP address is dynamic, you'll have to use some dynamic DNS service like dyn.com (not free) or or free dtdns.com and use the new hostname to connect.
If the computer is behind a router, you'll have to forward port 3306 on the router.

If connecting on port 3306 still fails, you'll have to check if your hosting provider (papaki.gr) allows external MySQL connections. If not and they can't allow exceptions, you'll have to use some safe port like 21(FTP), 80(HTTP) or 443(HTTPS) to connect to RadioDJ database. That is eaier to do if the PC is behind a router and you can forward one of mentioned external ports to 3306 on LAN.

Please post what massages you get when you verify database setting on RadioDJ plugin options page.

foxfm

i try it but i cant found a solution i have give on hosting provider papaki.gr to see what is wrong , all day i try many different ways but still not connect the port is open and they see the server but still not connect i always get this message  .

Using mysql client to connect
Connection took 0.001 seconds
Error connecting to RadioDJ database: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /var/www/vhosts/keas.edu.gr/foxfm.eu/wp-content/plugins/radiodj/lib/radiodj_db.class.php on line 237
Unknown errno (9999) or no error description available because of existing mysql connection.

I have format the server install windows 7 again but still nothing so i give it to provider to found the solution .

If some one have same problem let me know what solution they get

thank you
elias
Foxfm
A happy old man dj
Elias