What's your way?

Discussion corner for Developers of Serendipity.
Post Reply
Mert METİN
Posts: 4
Joined: Sat May 05, 2012 1:57 pm

What's your way?

Post by Mert METİN »

Hi there,


I want to write some scripts for using in Serendipity for my template.For example, i want to write script for retrieving tweeter posts for using in my index page. Where i can keep scripts ? In my template directory or any other place?
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: What's your way?

Post by yellowled »

Mert METİN wrote:I want to write some scripts for using in Serendipity for my template.For example, i want to write script for retrieving tweeter posts for using in my index page. Where i can keep scripts ? In my template directory or any other place?
As a rule of thumb, what's part of your template (i.e. useful for this template only) should probably go in your template's directory. If it could be useful for other templates (or even other users), you could put it in a plugin – of course, that requires far more coding knowledge (which I can't advocate on since I'm not a coder myself).

Apart from that, it's always been good practice in Serendipity to not create duplicate functionality. If there is an existing plugin which provides the functionality you need, use it. If you can offer extra functionality which would be useful for others, extend an existing plugin. That way, we keep the Serendipity plugin directory manageable.

For example, retrieving twitter posts and emitting them in your index page can be done with an existing plugin and some template customization. There is literally no need to write your own script for that.

YL
Post Reply