• Is there a way to make it so that the plugin doesn’t display the lyrics randomly? and make it so that they go in order and then just repeat?

    Basically I’ve put in my own lyrics from another song and want them to be in order…

    I tried to just remove the part that it says randomizes it, but that didn’t work…

    any ideas/help?

    Thank you in advance!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • This may be the most unusual plugin customization request I’ve seen on the forums so far!

    This can be done, though not through a simple change in the code. The problem is, you have no mechanism for tracking which line was last displayed.

    {thinking out loud} One way of doing this is to add a record in the options table that keeps track of the line. The plugin would read in the value from the option, select the line, increment the value and reset the option. It also needs to be reinitialized when it reaches the last line in the lyrics.

    Interested?

    Thread Starter Kahil

    (@kahil)

    OK…maybe I shoulda mentioned that I’m not all that great with the code thing like that…You’re gonna have to speak english…lol…sorry…

    Continuing Kafka’s line of thought…
    And you have to track it per user, preferably through cookies which WordPress already uses.

    Kahil> You’re gonna have to speak english…lol.
    Or you gonna have to speak green 😉

    I did note I was {thinking out loud}. :) Simply put, here is what you’re asking for the plugin to do:

    Step 1. Read the $lyrics.
    Step 2. Print the first line from the $lyrics.
    Step 3. Remember that you printed the first line, so you can print the second line the next time you run.
    Step 4. Increment line count, rinse, lather and repeat.

    There is nothing in a PHP script (which is all a plugin file really is) on its own which lets it get past Step 3. What’s needed is some way to retain the information about the last line displayed. One way to do that in WordPress is to add a custom record to the options table (i.e. in the database). That’s what my foreign text above is recommending.

    angsuman, good point. Or if we make it a 2.0-only mod, we can stick it in usermeta. 🙂

    Thread Starter Kahil

    (@kahil)

    woah…

    i was just asking of anyone knew a simple way or hack to get this to happen…

    I’m sorry I’m no code expert… but please remember that not everyone has the same knowledge of the code as others…

    If there isn’t a way to get it done with ‘Hello Dolly’, is there another plugin that this can be done in?

    Thank you

    Thread Starter Kahil

    (@kahil)

    Thank you Kafkaesqui, that makes more sense…

    If I’m understanding correctly, you are saying that this can’t be done yet?

    If I’m understanding correctly, you are saying that this can’t be done yet?

    When I believe that about a project, I would never put it vaguely. This is more of a you may not be able to do this with a simple change of the code, but it can be done type of situation. Hence the original “Interested?” query.

    Thread Starter Kahil

    (@kahil)

    oh…

    Thank you again Kafkaesqui, hopefully someone can/will figure that out and share it with everyone…

    Oh, someone will…

    @kafka
    Do tell me more about the usermeta thingy. Where can I get more information on it?

    angusman, this (older) article at Asymptomatic discusses new features in 2.0, including the usermeta table:

    http://asymptomatic.net/2005/06/16/1665/wordpress-16-feature-updates/

    And a couple useful mailing list threads:

    http://comox.textdrive.com/pipermail/wp-hackers/2005-July/001707.html
    — on user rolls and capabilities, but usermeta comes up
    http://comox.textdrive.com/pipermail/wp-hackers/2005-December/003427.html

    Thanks Kafkaesqui.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Hello Dolly? Make it not random?’ is closed to new replies.