Piwik
Posted: Fri Dec 23, 2011 10:42 am
Hi!
I'm a proudly Piwik-tester and the first thing I noticed after install was that the apps are not indexed. So - in case Piwik should also be zero conf - there should be a script, which indexes all apps...? Now my idea is this one:
- some sort of implementation in the settings. A tab like "Indexing for Piwik" where the user can choose if he want to monitor his apps or not
- a script for indexing, something like that: //"ATTENTION: very very bad programing, its just a inspiration"
However, I hope this "script" helped to explain my idea. Apps are stored in the "class Index" with their name and the value for "indexyesorno". The Apps are managed by "elements", which contains the Apps and the pointer to the next "element". My idea is the "class Index_managment" or "Index_writer" (or something like that) which contains functions for writing and reading the list.
However this script gets realized, the main thing is IMHO: zero conf. The user shouldn't know how to ssh into his Amahi-Box for using Piwik.
At next its IMHO mybe a better idea to write a shell-script with much more easier functions for file-writings like "tee"...? But unfortunatly I'm too stupid for this, so I cant help But I can test this script!
Merry X-Mas @ll!
stern
I'm a proudly Piwik-tester and the first thing I noticed after install was that the apps are not indexed. So - in case Piwik should also be zero conf - there should be a script, which indexes all apps...? Now my idea is this one:
- some sort of implementation in the settings. A tab like "Indexing for Piwik" where the user can choose if he want to monitor his apps or not
- a script for indexing, something like that: //"ATTENTION: very very bad programing, its just a inspiration"
Code: Select all
//==============================
// Name : Piwik_Indexer.cpp
// Author : RN
// Version :
// Copyright : none
// Description : something in C++, Ansi-style
//==============================
#include <iostream>
#include <fstream>
#include <string>
//#include "main.h"
using namespace std;
class Index_managment {
private:
string indexyes "Index me!";
string indexno "Dont index me!";
public:
void write_to_file (element& get_element) {
string* ProjektPfad = new string [50];
*ProjektPfad = "/var/hda/web-apps/"
strcat (*ProjektPfad, get_element.get_Index.get_name);
strcat (*ProjektPfad, "/html/index.php");
ofstream out(*ProjektPfad,ios::app);
if (out.is_open()) {
out << "Indexed by HDA-Piwik" << endl;
if (get_element.get_Index.get_indexmeornot == 0) {
out << indexno << endl;
out.close();
}
else if (get_element-get_Index.get_indexmeornot == 1) {
out << indexyes << endl;
out.close();
else
cout << "Error" << endl;
}
else {
cout << "File not found!" << endl;
}
}
}
class element {
private:
Index my_index;
element *next;
static int numberofElements;
public:
element () {
//Index = ?
next = NULL;
numberofElements++;
}
element (element *firstelement, Index first_index) {
next = firstelement;
my_Index = first_index;
numberofElements++;
}
void set_index (Index set_index) {
my_Index = set_index;
}
void set_next (element *set_next) {
next = set_next;
}
element* get_next () {
return next;
}
Index get_Index () {
return my_index;
}
~element () {
anzahlElemente--;
}
static int get_numberofElements () {
return numberofElements;
}
};
static int numberofElements = 0;
class Index {
private:
string name;
bool indexmeornot;
public:
Index(string f, bool yesorno):name(f),indexmeornot(yesorno)
{
}
void set_name (string set_name) {
name = set_name;
}
void set_indexmeornot (bool yesorno) {
indexmeornot = yesorno;
}
string get_name () {
return name;
}
bool get_indexmeornot () {
return indexmeornot;
}
}
int main() {
return 0;
}
However this script gets realized, the main thing is IMHO: zero conf. The user shouldn't know how to ssh into his Amahi-Box for using Piwik.
At next its IMHO mybe a better idea to write a shell-script with much more easier functions for file-writings like "tee"...? But unfortunatly I'm too stupid for this, so I cant help But I can test this script!
Merry X-Mas @ll!
stern