[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [kde-edu]: edu.kde.org: kvtml files
From:       Ilja <iljuss () gmail ! com>
Date:       2007-10-14 19:02:56
Message-ID: 5dc8cff0710141202m7c3ba356t5687011c2a5b9fb6 () mail ! gmail ! com
[Download RAW message or body]

Started here: http://lists.kde.org/?l=kde-edu&m=119221981000582&w=2
Replying to: http://lists.kde.org/?l=kde-edu-devel&m=119238389125745&w=2

Well, :

1) There would be some kind of class.

class Data_Files {
  public $files = array();
  function($filename, $description, $last_update, $support_starting_with) {
    $this->files[] = array('description' => $description,
    [..]
  }

  [..]

  function show($application) {
    foreach($this->files as $file) {
      if (??) {
        // show only these files, that application supports
      }
    }
    [..]
  }

  // to use on global page, shows program support stuff too
  $data->show_all();
  /*
  like hangman -  parley
         no        yes
  */
}

2) There would be all data files listed somewhere (some .inc file, maybe).

$data = new Data_Files;
$data->append("dela.tar.bz2",
              "Tarball of German to Latin vocabulary[..]",
              "2006-03-21", ???);

$data->append("lade.tar.bz2",
            "Tarball of Latin to German vocabulary[..]",
            "2005-03-21", ???);
[..]

And on each application page would be shown only supported files:
include("all_data.php");
$data->show(/* Application name */)


But I'm not sure how should it be implemented.

So much as I understand about kvtml support:

(KHangMan == Kanagaram) < KWordQuiz < KVocTrain < Parley

So KWordQuiz should support all files, that Kanagram and KHangMan do,
as so on.

So, maybe one solution would be such, but I'm not sure if it's good
and logical enough:

define (KHANGMAN, 1)
define (KANAGRAM, 1)
define (KWORDQUIZ, 2)
define (KVOCTRAIN, 3)
define (PARLEY, 4);

[..]
$data->append("lade.tar.bz2",
            [..]
            "2005-03-21", KWORDQUIZ); // should mean, that support
                                      // starts with KWordQuiz

// on application page
$data->show(KVOCTRAIN);

[..]

function show($application) {
    foreach($this->files as $file) {
      // KWORDQUIZ = 2               $application = KVOCTRAIN = 3
      if ($file['support_starts_with'] <= $application) {
        // show it then
      }
[..]


Any ideas?
-- 
Ilja
_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic