Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

Interacting with the database from a block

posted by Krow on 05:26 AM March 12th, 2002   Printer-friendly   Email story
I've been messing with a Slash site for demo purposes for a little while now. I've done enough that I'm fairly comfortable administering the site. Now I want to get into the guts of it. I have not found anything in the docs about this so I decided to ask. I want to add a table to the DB and call the data from it to create a block. From what I gather, this would require developing a plugin. Can I reference a table and its contents directly from a block without having to learn PERL and all of the modules used in Slash? I plan on learning all of that anyhow, but I'm looking for perhaps a quick and dirty solution. I need to be able to do this to sell my idea of a Slash-based site to my boss, and the sooner the better. If this can't be done any way other than with a plugin, where should I start?
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • where should I start?

    uhm, hire a perl coder who's worked with slash?

    if you don't *want* to learn perl, that'd be your best bet.

    lottadot []
  • You can also work outside the Slash framework, if you create the empty static block, then in an external script (any language) you connect to the Slash mysql db and update the content of the block when needed.

    It's dirty, but I've used it to convert to Slashboxes some legacy information while converting an existing site.

    The plugin way is the best to go for long-term satisfaction, anyway.

    Check out the Slash in Italian Project []

  • one quick and dirty way would be to include the and the (i think that is what they are called) in the script, and then use you're own perl code to connect and retrieve stuff from the DB. I ended up doing that for the links and audioclips section on my site.

    You can also modify things to your linking too. A good plug in to look at is the jobs one. It's short, and the code is easy to understand. Also consider getting the Slash book. It's expensive, but it is a good introduction to how things work in Slash.


    It's either on the beat or off the beat, it's that easy.
  • I'm not sure if x-col support made it into the latest version of Slash or not. I'm no Perl wizard, but Nathan Vonnahme @ Third Sector is :). They implemented it for me. My site uses an extra table and pulls information from it for a specific section. The displayStory template processes a separate template to handle the database information processing.

    see this:

    > The x-cols info on the bugs part of slashcode's sourceforge page:
    > ?func=deta il&aid=427138&group_id=4421&atid=104421