diff --git a/admin/admin.php b/admin/admin.php index 3ac6813..95b34c7 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -1,4 +1,4 @@ - -isAdmin()) { gelato :: admin users - - - + + + @@ -48,10 +48,10 @@ if ($user->isAdmin()) {
@@ -59,13 +59,13 @@ if ($user->isAdmin()) {

 

-The user has been added successfully.
"; @@ -102,27 +102,27 @@ if ($user->isAdmin()) { -getUsers(); if ($user->contarRegistros()>0) { while($register = mysql_fetch_array($rs)) { ?> - > + > - + - + - ">Edit + ">Edit - ">Delete + ">Delete -isAdmin()) {
No users available.
- @@ -141,12 +141,12 @@ if ($user->isAdmin()) {
-urlGelato."/login.php"); } diff --git a/admin/ajax.php b/admin/ajax.php index 84ab838..1f96ad9 100644 --- a/admin/ajax.php +++ b/admin/ajax.php @@ -1,4 +1,4 @@ - - -closeSession()

Closing session

-

Ending session...

-

Has happened an error when closing the session.

-

@@ -55,7 +55,7 @@ if (@session_destroy()) {

- gelato CMS :: PHP/MySQL Tumblelog Content Management System. + gelato CMS :: PHP/MySQL Tumblelog Content Management System.

diff --git a/admin/css/style.css b/admin/css/style.css index 1be7aab..57817b5 100644 --- a/admin/css/style.css +++ b/admin/css/style.css @@ -14,9 +14,11 @@ div, p, ul, ol, li, h1, h2, h3, h4, h5, h6, h7,form, span, pre, a{margin:0; padd h1, h2, h3, h4, h5, h6, h7{ font-weight:normal;} -a, a:link, a:visited, a:active{ color:#000; text-decoration:none; outline:none;} +a, a:link, a:visited, a:active{ color:#000000; text-decoration:none; outline:none;} a:hover{ text-decoration:underline; color:#000000; outline:none;} +.inslnl { text-decoration:underline; } + acronym{ border-bottom: 1px dotted #666; cursor:help;} fieldset{ border:none; margin:0; padding:0;} @@ -66,6 +68,17 @@ form.newpost input.txt{ background: #fff url(images/grad-small.png) top left rep form.newpost input.btn{ } form.newpost textarea{background: #fff url(images/grad-big.png) top left repeat-x; height:190px; border:1px solid #999; width:490px; padding:5px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:0.8em;} +legend.install{ + font: normal 16.5px/17px georgia, "times new roman", serif; + border: 0; + margin-top: 0px; + padding-top:0; + margin-bottom: 0; + padding-bottom: 0; + color: #c60; + margin-bottom: 10px; +} + .tabla{ background-color:#FFFBFF; margin:20px 15px; } .entry{ background-color:#efefef; border:1px solid #ccc; margin:20px 15px;} .info{ border-bottom:1px solid #aaa; position:relative; display:block; padding:4px 10px; height:20px; } @@ -104,6 +117,12 @@ a.linkFrm:hover{ text-decoration:underline; color:#297aab; outline:none;} .exito { width:80%; background: #F4FBF5 url('../../images/information.png') 15px center no-repeat; border-top: 2px solid #006600; border-bottom: 2px solid #006600; margin: 0 auto; padding: 5px 20px 5px 45px; } .information { width:80%; background: #FFF6BF url('../../images/icon_info.gif') 15px center no-repeat; border-top: 2px solid #FFD324; border-bottom: 2px solid #FFD324; margin: 0 auto;padding: 5px 20px 5px 45px; } +#update { text-align:center; font-size: 10px; color: #000; } + #update a { color: #000; text-decoration:none; } + #update a:visited { color: #000; text-decoration:none; } + #update a:active { color: #000; text-decoration:none; } + #update a:hover { color: #000; text-decoration:underline; } + /* Pagination */ div.pagination { text-align:center; padding:3px; margin:3px; } diff --git a/admin/index.php b/admin/index.php index fef04f8..0f7de66 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,4 +1,4 @@ - -isAdmin()) { + if (isset($_GET["delete"])) { + $tumble->deletePost($_GET['delete']); + header("Location: index.php?deleted=true"); + die(); + } + if(isset($_POST["btnAdd"])) { unset($_POST["btnAdd"]); @@ -54,15 +63,14 @@ if ($user->isAdmin()) { header("Location: ".$conf->urlGelato."/admin/index.php?mp3=false"); die(); } - $_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name; - } + if (isMP3($remoteFileName)) { + $_POST["url"] = $conf->urlGelato."/uploads/".$mp3Name; + } + } if (get_magic_quotes_gpc()) { - $_POST["title"] = htmlspecialchars(stripslashes($_POST["title"])); - $_POST["description"] = htmlspecialchars(stripslashes($_POST["description"])); - } else { - $_POST["title"] = htmlspecialchars($_POST["title"]); - $_POST["description"] = htmlspecialchars($_POST["description"]); + $_POST["title"] = stripslashes($_POST["title"]); + $_POST["description"] = stripslashes($_POST["description"]); } $_POST["title"] = strip_tags($_POST["title"]); @@ -70,7 +78,7 @@ if ($user->isAdmin()) { if (isset($_POST["id_post"])) { - //$tumble->modifyPost($_POST, $_POST["id_post"]); + $tumble->modifyPost($_POST, $_POST["id_post"]); } else { if ($tumble->addPost($_POST)) { header("Location: ".$conf->urlGelato."/admin/index.php?added=true"); @@ -80,18 +88,22 @@ if ($user->isAdmin()) { die(); } } - } + } else { + if ($isEdition) { + $post = $tumble->getPost($postId); + } + ?> - gelato :: Control panel - - - - - + + + @@ -126,41 +138,47 @@ if ($user->isAdmin()) {

 

-A new gelato version has been released and is ready for download.
"; + } + if (isset($_GET["deleted"])) { if ($_GET["deleted"]=="true") { - echo "
The article has been eliminated successfully.
"; + echo "
The post has been eliminated successfully.
"; } } if (isset($_GET["modified"])) { if ($_GET["modified"]=="true") { - echo "
The article has been modified successfully.
"; + echo "
The post has been modified successfully.
"; } } if (isset($_GET["added"])) { if ($_GET["added"]=="true") { - echo "
The article has been added successfully.
"; + echo "
The post has been added successfully.
"; } } @@ -180,64 +198,99 @@ if ($user->isAdmin()) { if ($_GET["photo"]=="false") { echo "
Not a photo file or an upload problem.
"; } - } + } ?> -
name="frmAdd" class="newpost"> + name="frmAdd" class="newpost">
- + +cargarPlantilla($input, $output, "template_add_post"); $template->mostrarPlantilla(); break; case "photo": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("2", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); + $output = array("2", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_photo"); $template->mostrarPlantilla(); break; case "quote": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("3", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); + $output = array("3", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_quote"); $template->mostrarPlantilla(); break; case "url": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("4", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editUrl}", "{editBody}"); + $output = array("4", $date, $_SESSION['user_id'], $title, $url, $body); $template->cargarPlantilla($input, $output, "template_add_link"); $template->mostrarPlantilla(); break; case "conversation": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("5", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); + $output = array("5", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_conversation"); $template->mostrarPlantilla(); break; case "video": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("6", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); + $output = array("6", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_video"); $template->mostrarPlantilla(); break; case "mp3": - $input = array("{type}", "{date}", "{id_user}"); - $output = array("7", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}"); + $output = array("7", $date, $_SESSION['user_id'], $url, $body); $template->cargarPlantilla($input, $output, "template_add_mp3"); $template->mostrarPlantilla(); break; default: - $input = array("{type}", "{date}", "{id_user}"); - $output = array("1", time(), $_SESSION['user_id']); + $input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}"); + $output = array("1", $date, $_SESSION['user_id'], $title, $body); $template->cargarPlantilla($input, $output, "template_add_post"); $template->mostrarPlantilla(); @@ -245,23 +298,28 @@ if ($user->isAdmin()) { } ?>

- + Textile syntax is supported. +

+

+ post" />

- +
-isAdmin()) { $permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/"; $textile = new Textile; - $register["description"] = $textile->process(str_replace(""", "\"", $register["description"])); + $register["description"] = $textile->process($register["description"]); switch ($tumble->getType($register["id_post"])) { case "1": @@ -361,13 +419,17 @@ if ($user->isAdmin()) {
+ -urlGelato."/login.php"); } diff --git a/admin/settings.php b/admin/settings.php new file mode 100644 index 0000000..4ec121a --- /dev/null +++ b/admin/settings.php @@ -0,0 +1,145 @@ + +isAdmin()) { + + if(isset($_POST["btnsubmit"])) { + unset($_POST["btnsubmit"]); + $_POST["url_installation"] = (endsWith($_POST["url_installation"], "/")) ? substr($_POST["url_installation"], 0, strlen($_POST["url_installation"])-1) : $_POST["url_installation"] ; + $tumble->saveSettings($_POST); + } else { +?> + + + + gelato :: settings + + + + + + + + + +
+ +
+ +
+ +

 

+The configuration has been modified successfully.
"; + } + } + if (isset($_GET["error"])) { + if ($_GET["error"]==1) { + echo "
Error on the database server: ".$_GET["des"]."
"; + } + } +?> +
+ +
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+

+ + + +

+
+ +
+ + +
+
+ + + + +urlGelato."/login.php"); +} +?> \ No newline at end of file diff --git a/admin/themes/admin/template_add_conversation.htm b/admin/themes/admin/template_add_conversation.htm index 6e3ba82..8892230 100644 --- a/admin/themes/admin/template_add_conversation.htm +++ b/admin/themes/admin/template_add_conversation.htm @@ -1,6 +1,6 @@

- +

@@ -10,10 +10,10 @@ Geek: Wow an open source tumblelog CMS!!.
Normal: Tumble... what??
- Geek: Read the fucking wikipedia!! + Geek: Read the wikipedia!!
- +

diff --git a/admin/themes/admin/template_add_link.htm b/admin/themes/admin/template_add_link.htm index 7e209da..43d0316 100644 --- a/admin/themes/admin/template_add_link.htm +++ b/admin/themes/admin/template_add_link.htm @@ -1,10 +1,10 @@

- +

- +

diff --git a/admin/themes/admin/template_add_mp3.htm b/admin/themes/admin/template_add_mp3.htm index bb89cfd..a98b815 100644 --- a/admin/themes/admin/template_add_mp3.htm +++ b/admin/themes/admin/template_add_mp3.htm @@ -1,14 +1,15 @@

- +

- This is the MP3 file URL. + This is the MP3 file URL or a GoEar URL.
+ (ie. http://www.goear.com/listen.php?v=c0a2c85)


- +

diff --git a/admin/themes/admin/template_add_photo.htm b/admin/themes/admin/template_add_photo.htm index eb483b1..bb1cbf1 100644 --- a/admin/themes/admin/template_add_photo.htm +++ b/admin/themes/admin/template_add_photo.htm @@ -15,7 +15,7 @@ - \ No newline at end of file diff --git a/readme.txt b/readme.txt index c3eb1cc..c9fdf4a 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,19 @@ -==== How to install gelato CMS developers preview ===== +==== How to install gelato CMS ===== + +1) Download and unzip the gelato package, if you haven't already. +2) Create a database for gelato on your web server, as well as a MySQL user who has all privileges for accessing and modifying it. +3) Rename the config-sample.php file to config.php. +4) Open config.php in your favorite text editor and fill in your database details. +5) Place the gelato files in the desired location on your web server. +6) Run the gelato installation script by accessing install.php in your favorite web browser. + * If you installed gelato in the root directory, you should visit: http://example.com/install.php + * If you installed gelato in its own subdirectory called tumblelog, for example, you should visit: http://example.com/tumblelog/install.php +7) Set CHMOD / permission ( Chmod 777 ) to the folder 'uploads' + +That's it! gelato should now be installed. + + +==== How to install gelato CMS (Manual) ===== 1) Download and unzip the gelato package, if you haven't already. 2) Create a database for gelato on your web server, as well as a MySQL user who has all privileges for accessing and modifying it. diff --git a/rss.php b/rss.php index f6b217a..961fa2f 100644 --- a/rss.php +++ b/rss.php @@ -1,4 +1,4 @@ - -\n"; + echo "\n"; +?> + + + <?php echo htmlspecialchars($conf->title);?> + urlGelato;?> + description);?> + gelato CMS + + urlGelato;?>/images/information.png + <?php echo htmlspecialchars($conf->description);?> + urlGelato;?> + + + +getPosts("20"); if ($tumble->contarRegistros()>0) { -?> - - - <?=htmlspecialchars(replaceAccents($conf->title));?> - urlGelato;?> - description));?> - gelato CMS - - urlGelato;?>/images/information.png - <?=htmlspecialchars(replaceAccents($conf->description));?> - urlGelato;?> - -process($register["description"]); + switch ($register["type"]) { case "1": - $tit = ($register["title"]=="") ? htmlspecialchars(strip_tags($register["description"])) : htmlspecialchars($register["title"]); - $desc = htmlspecialchars($register["description"]); + $tit = ($register["title"]=="") ? strip_tags($register["description"]) : $register["title"]; + $desc = $register["description"]; break; case "2": - $tit = ($register["description"]=="") ? "Photo" : htmlspecialchars(strip_tags($register["description"])); + $tit = ($register["description"]=="") ? "Photo" : strip_tags($register["description"]); $desc = ""; break; case "3": - $tit = "\"".htmlspecialchars(strip_tags($register["description"]))."\""; - $tmpStr = ($register["title"]!="") ? "

- ".htmlspecialchars($register["title"])."" : ""; - $desc = "\"".htmlspecialchars($register["description"])."\"".$tmpStr; + $tit = "\"".strip_tags($register["description"])."\""; + $tmpStr = ($register["title"]!="") ? "

- ".$register["title"]."" : ""; + $desc = "\"".$register["description"]."\"".$tmpStr; break; case "4": - $tit = ($register["title"]=="") ? htmlspecialchars($register["url"]) : htmlspecialchars($register["title"]); - $tmpStr = ($register["description"]!="") ? "

- ".htmlspecialchars($register["description"])."" : ""; - $desc = "".$tit."".$tmpStr; + $tit = ($register["title"]=="") ? $register["url"] : $register["title"]; + $tmpStr = ($register["description"]!="") ? "

- ".$register["description"]."" : ""; + $desc = "".$tit."".$tmpStr; break; case "5": $lines = explode("\n", $register["description"]); - $line = htmlspecialchars($lines[0]); - $tit = ($register["title"]=="") ? $line : htmlspecialchars($register["title"]); - $desc = $tumble->formatConversation(htmlspecialchars($register["description"])); + $line = $lines[0]; + $tit = ($register["title"]=="") ? $line : $register["title"]; + $desc = $tumble->formatConversation($register["description"]); break; case "6": - $tit = ($register["description"]=="") ? "Video" : htmlspecialchars(strip_tags($register["description"])); - $desc = $tumble->getVideoPlayer(htmlspecialchars($register["url"])); + $tit = ($register["description"]=="") ? "Video" : strip_tags($register["description"]); + $desc = $tumble->getVideoPlayer($register["url"]); break; case "7": - $tit = ($register["description"]=="") ? "MP3" : htmlspecialchars(strip_tags($register["description"])); - $desc = $tumble->getMp3Player(htmlspecialchars($register["url"])); + $tit = ($register["description"]=="") ? "MP3" : strip_tags($register["description"]); + $desc = $tumble->getMp3Player($register["url"]); break; } - $url = htmlspecialchars($conf->urlGelato."/index.php/post/".$register["id_post"]."/"); + $url = $conf->urlGelato."/index.php/post/".$register["id_post"]."/"; $formatedDate = gmdate("D, d M Y H:i:s \G\M\T", strtotime($register["date"])); - ?> +?> - <?=replaceAccentsWithAmp($tit);?> - ]]> - - urlGelato."/index.php/post/".$register["id_post"]."/";?> - + <?php echo $tit;?> + ]]> + + urlGelato."/index.php/post/".$register["id_post"]."/";?> + -
-
- - \ No newline at end of file +
\ No newline at end of file diff --git a/themes/tumblr/template_footer.htm b/themes/tumblr/template_footer.htm index b38e3cb..06268a4 100644 --- a/themes/tumblr/template_footer.htm +++ b/themes/tumblr/template_footer.htm @@ -2,7 +2,7 @@ \ No newline at end of file