From 15eeb65a5eeec1731955e20d9b409a83e0904a34 Mon Sep 17 00:00:00 2001 From: "Marco A. Braghim" Date: Sat, 20 Jul 2019 15:55:34 -0300 Subject: [PATCH 1/2] Suporte a pt-BR --- language/Portugues - BR.php | 75 +++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 language/Portugues - BR.php diff --git a/language/Portugues - BR.php b/language/Portugues - BR.php new file mode 100644 index 0000000..2258dd8 --- /dev/null +++ b/language/Portugues - BR.php @@ -0,0 +1,75 @@ +Podcast RSS Editor'; + $lang[1]='Episódios'; + $lang[2]='Dashboard'; + $lang[3]='Configurações'; + $lang[4]='Dias desde o último Ep.'; + $lang[5]='Total Episódios'; + $lang[6]='Add novo Episódio'; + $lang[7]='Título:'; + $lang[8]='Publicado em:'; + $lang[9]='Duração:'; + $lang[10]='Link:'; + $lang[11]='Autor:'; + $lang[12]='Imagem de capa:'; + $lang[13]='Arquivo de áudio:'; + $lang[14]='Descrição:'; + $lang[15]='Dias'; + $lang[16]='desde o último episódio, e ciclo de atualização médio é de '; + $lang[17]=' dias.'; + $lang[18]='Episódios'; + $lang[19]='no total depois de sua primeira exibição
'; + $lang[20]=' anos atrás.'; + $lang[21]='Horas'; + $lang[22]='podcasted, que é '; + $lang[23]=' \'O Hobbit\' trilogia combinada.'; + $lang[24]='KB'; + $lang[25]='por arquivo de RSS, incluindo '; + $lang[26]=' links
in shownotes.'; + $lang[27]='Pessoas'; + $lang[28]='mostrado na lista de autores.
'; + $lang[29]=' é o mais popular.'; + $lang[30]='Dom'; + $lang[31]='Seg'; + $lang[32]='Ter'; + $lang[33]='Qua'; + $lang[34]='Qui'; + $lang[35]='Sex'; + $lang[36]='Sab'; + $lang[37]='A duração dos últimos 10 episódios vs. média de duração ('; + $lang[38]='minutos) de todos os tempos.'; + $lang[39]='Selecione o arquivo para editar:'; + $lang[40]='E quem sabe trocar o idioma:'; + $lang[41]='Salvar'; + $lang[42]='Novo episódio'; + $lang[43]='Editar Episódio #'; + $lang[44]=' '; + $lang[45]='Mês'; + $lang[46]='Dia'; + $lang[47]='Ano'; + $lang[48]='Hora'; + $lang[49]='Minuto'; + $lang[50]='Segundo'; + $lang[51]='HH'; + $lang[52]='MM'; + $lang[53]='SS'; + $lang[54]='Configurações salvas'; + $lang[55]='Episódio atualizado'; + $lang[56]='Novo episódio criado'; + $lang[57]='Você tem certeza de que quer excluir “'; + $lang[58]='”?'; + $lang[59]='Diga adeus àquele episódio, ele se foi para sempre.'; + $lang[60]='Duplicar este episódio'; + $lang[61]='Excluir este episódio'; + $lang[62]='Dublicado com sucesso'; + $lang[63]='Episódios'; + $lang[64]='Complete hosts list: '; + $lang[65]=' anos atrás'; + $lang[66]=' meses atrás'; + $lang[67]=' semanas atrás'; + $lang[68]=' dias atrás'; + $lang[69]=' horas atrás'; + $lang[70]='Publicado'; + $lang[71]='Ontem'; + $lang[72]='Visualizar'; +?> \ No newline at end of file From e32d7450085519f4aa333ec4069481980ed38166 Mon Sep 17 00:00:00 2001 From: Pernalonga Date: Sun, 21 Jul 2019 10:48:03 -0300 Subject: [PATCH 2/2] Authentication method by .htaccess file --- .htaccess | 4 ++++ .htpasswd | 1 + README.md | 12 ++++++++---- assets/logout.js | 31 +++++++++++++++++++++++++++++++ index.php | 10 ++++++++++ language/Portugues - BR.php | 4 ++-- 6 files changed, 56 insertions(+), 6 deletions(-) create mode 100644 .htaccess create mode 100644 .htpasswd create mode 100644 assets/logout.js diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..95bec84 --- /dev/null +++ b/.htaccess @@ -0,0 +1,4 @@ +AuthType Basic +AuthName "Restricted Area" +AuthUserFile /var/www/Podcast-RSS-Editor/.htpasswd +Require valid-user diff --git a/.htpasswd b/.htpasswd new file mode 100644 index 0000000..5cf5f56 --- /dev/null +++ b/.htpasswd @@ -0,0 +1 @@ +admin:$apr1$0kT4lhp/$h8IeA/F7y4eUuBXFPKidj/ diff --git a/README.md b/README.md index 458a75a..54ed18f 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,22 @@ Started a [design podcast](https://anyway.fm/) couple of years ago, and in the v # 02. Usage - Put the XML file you wanna edit in the root and select it in the '**Settings**' panel and then you can edit / add episodes. -- There isn't any authentication or security check so please don't put it on the sever in case shit happens. -# 03. Change Log +# 03. Authentication + - There's a very simple authentication done with `.htaccess`, so all you gotta do is to generate the `.htpasswd` file content [in this site](http://www.htaccesstools.com/htpasswd-generator/) and replace it. + - The parameter **AuthUserFile** of the `.htaccess` file is the path to the `.htpasswd` that **must to be the real path** at all, if needed, change it. + - By default authentication is: user `admin` and password `admin` + +# 04. Change Log - [Feb 3, 2019] Updated the layout compatibility. - [Jul 27, 2017] Added ‘**Preview**’ function for episode link, image file and audio file. - [Dec 13, 2016] Added ‘**duplicate**’ and ‘**delete**’ functions. - [Jul 20, 2016] Added multi-language support: Simplified Chinese, Traditional Chinese, English. -# 04. Alternatives +# 05. Alternatives - [Itunes podcast XML generator](http://codepen.io/jon-walstedt/pen/jsIup) by Jon Wålstedt - [Podcast Generator](http://www.podcastgenerator.net/) - Any Podcast hosting services. -# 05. Credits +# 06. Credits - Some icons used are from the set [Squid Ink Line Icons](http://thesquid.ink/line-icons/) diff --git a/assets/logout.js b/assets/logout.js new file mode 100644 index 0000000..b57067c --- /dev/null +++ b/assets/logout.js @@ -0,0 +1,31 @@ + +/* + * This function will try to force browser to request + * login again, but it's not really confiable, so avoid + * to depend entirely on it. + */ +function logout() { + + var baseURL = window.location.origin+window.location.pathname; + + var xmlhttp; + if (window.XMLHttpRequest) { + xmlhttp = new XMLHttpRequest(); + } + // code for IE + else if (window.ActiveXObject) { + xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); + } + if (window.ActiveXObject) { + // IE clear HTTP Authentication + document.execCommand("ClearAuthenticationCache"); + window.location.href=baseURL; + } else { + xmlhttp.open("GET", baseURL+'assets/logout.js', true, "logout", "logout"); + xmlhttp.send(""); + xmlhttp.onreadystatechange = function() { + if (xmlhttp.readyState == 4) {window.location.href=baseURL;} + } + } + return false; +} diff --git a/index.php b/index.php index 9a48601..bbcfce6 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,8 @@ + + +
  • + + + Logout + +
  • diff --git a/language/Portugues - BR.php b/language/Portugues - BR.php index 2258dd8..af920f9 100644 --- a/language/Portugues - BR.php +++ b/language/Portugues - BR.php @@ -11,8 +11,8 @@ $lang[9]='Duração:'; $lang[10]='Link:'; $lang[11]='Autor:'; - $lang[12]='Imagem de capa:'; - $lang[13]='Arquivo de áudio:'; + $lang[12]='Capa URL:'; + $lang[13]='Áudio URL:'; $lang[14]='Descrição:'; $lang[15]='Dias'; $lang[16]='desde o último episódio, e ciclo de atualização médio é de ';