Random files per category (4 posts)

  1. lusohouse
    Posted 9 years ago #

    I am looking at the Random Files plugin at coffee2code.com at http://www.coffee2code.com/archives/2004/07/08/plugin-random-file/

    I assume it would be easy enough to get the script to pick up a file/image from a specific table in mysql based on different categories and/or keywords?

    For example, for the "HEALTH" category, i'd like the script to go and spit out a random file/image from a table created specifically for that category.

    Any help? suggestions?

  2. moshu
    Posted 9 years ago #

    You should go back and READ the description of the plugin:
    Retrieve the name of a randomly chosen file in a given directory. Useful for displaying random images/logos or including text from random files onto your site (writing excerpts, multi-line quotes, etc).

    It is about physical files and directories.
    NO files in the database - just... data.

    Short answer: the plugin doesn't do what you thought it would.

  3. lusohouse
    Posted 9 years ago #

    I did read the description and, having read it, i did realise it doesnt do what i want as is.

    And that's why i'm posting in this forum asking for a way to make it do what I'm wanting it to do...i think that's called 'hacking'.

    Any helpful souls who can enlighten me?

  4. moshu
    Posted 9 years ago #

    Before "hacking" you should read, study and understand the difference between a physical file and data stored in database.

Topic Closed

This topic has been closed to new replies.

About this Topic