Go Back   Christian Guitar Forum > Community > Academic > Computers
Register FAQ Members List Calendar Arcade Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2009, 08:27 AM   #1
Look mommy i can fly
 
Oddjob's Avatar
 

Joined: Aug 2001
Location: Good old England
Posts: 910
Send a message via AIM to Oddjob Send a message via Yahoo to Oddjob
Church Podcasting coding help

Hi all
Wasn't sure where to put this, but in here seemed to be the best place, I need a little help with some website coding.

My church are in the process of redoing their website and want to change their podcast page, we have an rss feed for itunes and currently using a bit of javascript to display the contents of the rss feed on the church webpage.
We now want to display the contents in a table format and allow it to be searchable and sortable. Something very similar to this website:
ChristChurch London - Getting Connected - Sermon Downloads...
After doing much searching i think the way is to use php scrips, but i don't know all that much about it. I've manage to write a script that will just display the rss feed like the javascript and i should be able to alter it to fit it all in a table, although it's not very nice code. But i'm stuck as to how i would add a search function or sort by clicking on the column titles.

Does anybody know how to do this or know where i can find a script that will to this?

Thanks in advance.
dave

__________________
For I know the plans I have for you declares the Lord,
Plans to prosper you and not to harm you,
Plans to give you hope and a future.
Oddjob is offline   Reply With Quote
Sponsored Links
Old 11-22-2009, 10:34 PM   #2
Be happy
 
bobthecockroach's Avatar
 

Joined: Apr 2001
Location: Louisiana
Posts: 19,716
Assuming the dataset is small (under a couple hundred items), I would grab all of the data with AJAX, then process and display it with JavaScript. Please, however, don't use plain JavaScript unless you have lots of experience with it. There are just too many ways to go horribly wrong. Use jQuery instead. It will make the AJAX (requesting data from the server without leaving the page) trivially easy and it will also simplify the updating of the DOM (the page).

The ideal way for the server to send the data would be JSON, since processing it in JavaScript is almost trivial.

The advantage of using JavaScript rather than a server-side language is that when the user wants to sort, it can happen immediately without having to reload the page. This will also save a lot of unnecessary requests to your server.

So basically your process would be something like this:

User visits page. JavaScript (with jQuery) on page requests data from server. Server pulls the data out of the database and formats it into a JSON document. JavaScript (with jQuery) on page receives data and processes it into a table. When the user clicks something, JavaScript (with jQuery!) responds and updates the table without reloading the page or re-requesting the data.
__________________
Some things are meant together, some things are better apart
Some things are easy, when other times they are hard
But that doesn’t mean what’s hard isn’t what’s meant to be
- Al Lewis
bobthecockroach is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 11:49 AM.