←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
amette_left #tikiwiki
joined #tikiwiki
[01:08]
............... (idle for 1h12mn)
left #tikiwiki
joined #tikiwiki
[02:20]
.... (idle for 16mn)
left #tikiwiki [02:36]
fabriciusjoined #tikiwiki [02:41]
............................................................ (idle for 4h56mn)
joined #tikiwiki [07:37]
........... (idle for 54mn)
joined #tikiwiki [08:31]
.......... (idle for 49mn)
chibaguyjoined #tikiwiki
polom
[09:20]
Kollejoined #tikiwiki
@fabricius hey
i am back :) we've already chatted on friday
are you there?
[09:30]
robertokirjoined #tikiwiki [09:46]
Kollehey guys, concerning the dynamic content part..
where do i put the =id?
cant find that part
[09:53]
....... (idle for 32mn)
fabriciusjoined #tikiwiki [10:25]
luciashpolom
Hi Kolle
[10:35]
Kollehi luciash
maybe you can help me as well? i managed to create dynamic blocks
but i dont know where to include them via the content=x option
[10:38]
........... (idle for 50mn)
amette_joined #tikiwiki [11:29]
..... (idle for 20mn)
jonnybjoined #tikiwiki [11:49]
.... (idle for 19mn)
arildbjoined #tikiwiki [12:08]
.... (idle for 15mn)
luciashKolle: in wiki page I suppose
https://doc.tiki.org/Dynamic-Content
[12:23]
Kolleyes, i did it :) works fine [12:31]
..... (idle for 23mn)
hey guys its me again. my next issue is a bit more difficult.. is it possible to create a script which generates a 4 digit number every month, randomly? [12:54]
...... (idle for 28mn)
juststrollinginjoined #tikiwiki [13:22]
..... (idle for 21mn)
luciashKolle: yes, sure thing :)
Kolle: pretty sure you can google something out
[13:43]
Kollei did, it is possible :) the problem is that i dont know where to embed the script
do i have to create a new plugin?
[13:44]
luciashwhat is it? PHP?
what is the script written in?
[13:45]
Kollei have the old script from our old wiki
export RND=$(echo ${RANDOM:0:4})&&export MDATE=$(echo `date`)&&perl -i.bak -pe 's@.*Incony.*$@<!-- Incony AG Webmail Service $ENV{"MDATE"}:$ENV{"RND"} -->@' /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc
the script was saved in a HTML file when i am not wrong.. if you wanted to view the number, you had to open the source code of the wiki
the output for november was something like this: Incony AG Webmail Service Wed Nov 1 00:01:03 CET 2017:6021
so the number was generated on nov 1 around 00.01
and the number itself is 6021
and i need exactly this for the tiki wiki :)
but i struggle with the scriopt itself since i am an absolute noob at programming
according to the tiki faq, you can build your own plugins using PHP..
i found something like : <?php echo rand() . "n"; echo rand() . "n"; echo rand(5, 15); ?>
but i think this string only generates random numbers. i need them to be generated on the first of every month
[13:47]
luciashyou need to use cron for that
or some online service like easycron
to run the script every month
[13:53]
Kollehmmm
how do i "connect" this cron with the tiki?
ah nevermind, cron will just execute my script
ok ill dig further into it, thank you so far
[13:54]
luciashKolle: I think you could also use the same script as before (it seems to be a perl script) just instead of output to /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc you could write the number in templates/something.tpl file and then just have your own custom Tiki module display it using {include file=something.tpl} [14:04]
fabriciusjoined #tikiwiki [14:17]
.... (idle for 16mn)
Kollehey luciash, thank you for the guide
ill try it
[14:33]
luciashKolle: (I assume that command/script was run monthly using cron too) [14:36]
.... (idle for 15mn)
lhtsengjoined #tikiwiki [14:51]
robertokirjoined #tikiwiki [15:03]
.... (idle for 15mn)
fabriciusHi Kolle [15:18]
Kollehi fabricius [15:19]
amette_left #tikiwiki
joined #tikiwiki
[15:25]
fabriciusKolle: put it on a wiki page or in a module [15:25]
Kolley i managed to setup the dynamic tasks; it works very good. i tested it
so a message will be displayed on the first of every month at 5 o clock in the morning
[15:26]
fabriciusKolle: {content id=1 label="some text"} <- this on a wiki page [15:27]
Kollemy problem now is the random 4 digit number
luciash described it quite good but still i cant manage this stuff
i have no idea where to put the script
and how to associate it with the tiki wiki
[15:27]
fabriciusKolle: you can place this on several places and most likely nest it in other plugin snippets like {DIV()}{content id=1 label="some text"}{DIV} or {BOX()}{content id=1 label="some text"}{BOX}
whhat script you refer to?
[15:29]
Kollethis is the old script:
export RND=$(echo ${RANDOM:0:4})&&export MDATE=$(echo `date`)&&perl -i.bak -pe 's@.*Incony.*$@<!-- Incony AG Webmail Service $ENV{"MDATE"}:$ENV{"RND"} -->@' /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc
and luciash suggested something like this:
I think you could also use the same script as before (it seems to be a perl script) just instead of output to /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc you could write the number in templates/something.tpl file and then just have your own custom Tiki module display it using {include file=something.tpl}
[15:30]
...... (idle for 29mn)
torsten1joined #tikiwiki [16:00]
..... (idle for 20mn)
fabriciusjoined #tikiwiki [16:20]
.... (idle for 19mn)
Kollefabricius seems to have connection issues :/
i was hoping for his guidance
[16:39]
..... (idle for 22mn)
fabriciusjoined #tikiwiki [17:01]
.... (idle for 16mn)
joined #tikiwiki
Kolle: sry, I have been distracted .. just reading now
Kolle: what is the purpose of the script on your Tiki site? Is it only to be displayed in the wiki and updated on the server?
[17:17]
Kollehey, no problem!
the purpose is to generate a random 4 digit number
once every month, preferably on the first
and yes it should only be displayed in the wiki site and updatet on the server
[17:21]
fabriciusBut it has to be / is calculated on the server?
ok
but do you want to display the script or the 4-digits?
[17:22]
Kollewell, i dont know. if it works on the site, im totally ok with that as well
i only need the 4 digits
in our old wiki, the 4 digits were only displayed in the source code of the webpage
[17:23]
fabriciusso the output of the script could be another file, ex a tpl as luciash says [17:23]
Kolleyes, absolutely
it either can be a .php or a .tpl file i think
[17:23]
fabriciusand the target file can contain html code ... some or none or much ... thus you can do everything with the file you do with template files [17:25]
Kollei think so, yes
it was a basic html file in our old wiki
here is the old code again, maybe it helps
export RND=$(echo ${RANDOM:0:4})&&export MDATE=$(echo `date`)&&perl -i.bak -pe 's@.*Incony.*$@<!-- Incony AG Webmail Service $ENV{"MDATE"}:$ENV{"RND"} -->@' /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc
the last part is not that important since we are moving our wiki and thus the folder also changed
[17:25]
fabriciusKolle: I suggest that you setup a few files with only one or few lines, just to determine the differences - a .txt file with "Text" as content an .html with a coloured div etc. and then experiment to include those file in a wikipge with the include plugin, that luciash mentioned above
After that you only need to adjust the script to output into the file ... maybe a textfile or template file with only the 4 digits as single content would do the job
the output code then need to be simply like "write the result in that file and overwrite he existing content
should be some simple command line magic
[17:27]
Kollesimple for you ;D
sounds very complicated
[17:31]
fabriciusnot really - I am not a coder and not a high-level sysadmin, even using Linux only ... I could ask a fiend here in the community who maybe could add a line ... it is most likely not complicated and one or few lines of not much code
IF the import works
(include)
[17:33]
Kolle"only linux" :D [17:34]
luciashKolle: it is not clear to me where you get the script source from. Is it still running on the server where the Tiki is installed now? Or just from some internal documentation? [17:35]
Kollei have used windows my whole life. i started my apprenticeship 3 months ago and are pretty new to all thuis stuff. had my first linux sessions using only code without a GUI which was a huge achievement for me :D
never coded anything
this is because there are many questions which im sorry for.. bothering you guys with basic stuff
[17:35]
luciashKolle: if it is still running periodically, you could just change the file where it is written to as I suggested [17:36]
Kolleluciash, we have an old kind of "wiki"
where the number is generated
but we are migrating our whole database to the tiki wiki
[17:36]
luciashKolle: and how do you run the script? [17:37]
Kollevia cron [17:37]
luciashKolle: if you do not know how to modify it you will need to ask someone
Kolle: or learn ;)
[17:37]
Kollewell, i am learning and do not want to ask my boss everything [17:38]
luciashso you know there is the command "crontab -e" to edit it ? [17:38]
fabriciusluciash: I assume that the file needs to be on the same mashine, best "besides" the Tiki to work without a hussle and that it needs to write ths digits into a second file. Then the Tiki can include the second files content and does not display the code aswell. Am I about right? [17:38]
Kollei wish i could add screenshots here
would explain a lot more
[17:38]
fabriciusKolle: I think we have an imagination [17:38]
Kollei will try to explain the best i can again from the beginning: a script is executed via cron. to be specific, this script: export RND=$(echo ${RANDOM:0:4})&&export MDATE=$(echo `date`)&&perl -i.bak -pe 's@.*Incony.*$@<!-- Incony AG Webmail Service $ENV{"MDATE"}:$ENV{"RND"} -->@' /srv/www/htdocs/H3.1/horde/templates/common-header-sidebar.inc
my job is
to "create" a new one inside tiki wiki
to do exactly the same as the old one
only implemented into tiki wiki
[17:39]
luciashKolle: this is not "how it works" [17:40]
Kollei managed to setup the dynamic tasks (on the first of every month, a sentence will be displayed in a special page i created"
the next and last thing is to generate the 4 digit number similar to the senteces on the first of every month
[17:40]
luciashKolle: you need to modify or add copy of the script (actually it is a command, not a script) in the crontab (cron) and change the path, where it outputs the output of the command (as I suggested) to the Tiki path [17:41]
Kolleahhhh ok
that sounds good
now i think i got it
[17:41]
fabriciusluciash Kolle : my picture:
a script creates a random 4 digit when it runs
a cronjob runs the script every month (ex. 1st day)
the script writes the result (4 digits) into another file (ex: 4-digits.tpl)
the Tiki fetches the content by using the include plugin
{include file="../../script/4-digits.tpl"}
[17:42]
luciashKolle: then you can remove the <!-- comments --> syntax if you want it displayed in Tiki module or whatever [17:42]
Kolleooomg yes! [17:42]
luciash<!-- is what makes it hidden [17:42]
Kollethis cleared up a lot fabricius
it is only hidden in the wiki, not in the source code, right?
i think thats the purpose since nobody should be able to see the digits in plain text
[17:42]
luciashit is hidden in the browser [17:43]
Kolleyes, right [17:43]
luciashbecause it is syntax for HTML comments [17:43]
jonnybjoined #tikiwiki [17:43]
Kolleok guys
i will try it tomorrow!
[17:44]
fabriciusah Kolle: maybe an important information from you to us: did you say, that the 4-digits shall NOT be visible in the browser? [17:44]
Kolleit wopuld be best if they are not, yes
since it is a "admion only" wiki, it wouldnt be that bad
[17:44]
fabriciusso why you want to include them?
I do not get that point
[17:45]
Kollethey were not visible in the browser before, but in the "source code" of the page
it was hidden in there
[17:45]
fabriciusah [17:45]
Kollebecause the number is a part of a important password
thank you so far guys, i am leaviong for now. hopefully we can talk tomorrow :) but again, you helped me a lot!! <3<3
see you and unlimited thanks
[17:46]
fabriciusyou could display them, but limit the visibility of the page to a group or to the Admins .. whilst they are all Admins ... what is the point to hide their information from themselves to make it necessary to open the sourcecode and read it there? I am just curious about this curius type of security ... sounds like security by obscurity
so gone!
what do you think about the last luciash?
[17:47]
luciashluciash thinks anything that is "part of an important password" should not be just "hidden" in the page source which can be seen by anyone hitting ctrl+U in their browser
but anyway, glad to help ;)
[17:48]
fabricius:DDD
fabricius thinks about the same as luciash ... at least regarding "obscurely hidden parts of important passwords" ...
[17:48]
luciashI suppose they have some pattern and only that part of the password changes monthly so they can easily change password frequently
but I do not understand why they hide it in HTML comment :)
[17:50]
fabriciusexactly [17:53]
joined #tikiwiki [18:06]
.......... (idle for 48mn)
Telesightjoined #tikiwiki [18:54]
....... (idle for 34mn)
jonnybjoined #tikiwiki [19:28]
....................... (idle for 1h52mn)
RadoSjoined #tikiwiki [21:20]
jonnybjoined #tikiwiki [21:33]
........... (idle for 54mn)
robertokirjoined #tikiwiki [22:27]
....... (idle for 34mn)
fabriciusjoined #tikiwiki [23:01]
...... (idle for 26mn)
robertokirjoined #tikiwiki [23:27]

←Prev date Next date→ Show only urls(Click on time to select a line by its url)