* A lot of changes on Control Panel (Theme Engine).
parent
3471ee1993
commit
c60cdef066
446
admin/index.php
446
admin/index.php
|
|
@ -15,22 +15,32 @@ if(!defined('entry'))define('entry', true);
|
||||||
require('../entry.php');
|
require('../entry.php');
|
||||||
|
|
||||||
global $user, $conf, $tumble;
|
global $user, $conf, $tumble;
|
||||||
$template = new plantillas("admin");
|
#$template = new plantillas("admin");
|
||||||
|
$theme = new themes;
|
||||||
|
|
||||||
$isEdition = (isset($_GET["edit"])) ? true : false;
|
$isEdition = (isset($_GET["edit"])) ? true : false;
|
||||||
$postId = ($isEdition) ? $_GET["edit"] : NULL;
|
$postId = ($isEdition) ? $_GET["edit"] : NULL;
|
||||||
|
|
||||||
if ($user->isAuthenticated()) {
|
$theme->set('isEdition',$isEdition);
|
||||||
|
$theme->set('postId',$postId);
|
||||||
|
$theme->set('pagination','');
|
||||||
|
|
||||||
|
if (get_magic_quotes_gpc()) {
|
||||||
|
foreach($_GET as $k=>$get){
|
||||||
|
$_GET[$k]=stripslashes($get);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user->isAuthenticated()) {
|
||||||
if (isset($_GET["delete"])) {
|
if (isset($_GET["delete"])) {
|
||||||
$tumble->deletePost($_GET['delete']);
|
$tumble->deletePost($_GET['delete']);
|
||||||
header("Location: index.php?deleted=true");
|
header("Location: index.php?deleted=true");
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_POST["btnAdd"])) {
|
if(isset($_POST["btnAdd"])){
|
||||||
unset($_POST["btnAdd"]);
|
unset($_POST["btnAdd"]);
|
||||||
|
$_POST['type'] = type2Number($_POST['type']);
|
||||||
|
|
||||||
if ($_POST["type"]=="2") { // is Photo type
|
if ($_POST["type"]=="2") { // is Photo type
|
||||||
if (isset($_POST["url"]) && $_POST["url"]!="") {
|
if (isset($_POST["url"]) && $_POST["url"]!="") {
|
||||||
|
|
@ -77,14 +87,14 @@ if ($user->isAuthenticated()) {
|
||||||
$_POST["title"] = removeBadTags($_POST["title"],true);
|
$_POST["title"] = removeBadTags($_POST["title"],true);
|
||||||
$_POST["description"] = removeBadTags($_POST["description"]);
|
$_POST["description"] = removeBadTags($_POST["description"]);
|
||||||
|
|
||||||
if (isset($_POST["id_post"])) {
|
if (isset($_POST["id_post"]) and is_numeric($_POST["id_post"]) and $_POST["id_post"]>0) {
|
||||||
$tumble->modifyPost($_POST, $_POST["id_post"]);
|
$tumble->modifyPost($_POST, $_POST["id_post"]);
|
||||||
} else {
|
} else {
|
||||||
if ($tumble->addPost($_POST)) {
|
if ($tumble->addPost($_POST)) {
|
||||||
header("Location: ".$conf->urlGelato."/admin/index.php?added=true");
|
header("Location: ".$conf->urlGelato."/admin/index.php?added=true");
|
||||||
die();
|
die();
|
||||||
} else {
|
} else {
|
||||||
header("Location: ".$conf->urlGelato."/admin/index.php?error=2&des=".$this->merror);
|
header("Location: ".$conf->urlGelato."/admin/index.php?error=2&des=".$tumble->merror);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -93,153 +103,64 @@ if ($user->isAuthenticated()) {
|
||||||
$post = $tumble->getPost($postId);
|
$post = $tumble->getPost($postId);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
$theme->set('version',version());
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
$theme->set('conf', array(
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
'urlGelato'=>$conf->urlGelato,
|
||||||
<head>
|
'richText'=>$conf->richText
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
));
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
$theme->set('new',isset($_GET['new'])?$_GET['new']:'');
|
||||||
<title>gelato :: <?php echo __("control panel")?></title>
|
$theme->set('information',false);
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
$theme->set('error',false);
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/lightbox.js"></script>
|
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.validate.min.js"></script>
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
$(document).ready(function(){
|
|
||||||
$("#divMessages").fadeOut(5000,function(){
|
|
||||||
$("#divMessages").css({display:"none"});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
Lightbox.fileLoadingImage = "css/images/loading.gif";
|
|
||||||
Lightbox.fileBottomNavCloseImage = "css/images/closelabel.gif";
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
if($conf->richText) {
|
|
||||||
?>
|
|
||||||
<script src="<?php echo $conf->urlGelato;?>/admin/scripts/nicEdit.js" type="text/javascript"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
bkLib.onDomLoaded(nicEditors.allTextAreas);
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
<script type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/markitup/jquery.markitup.pack.js"></script>
|
|
||||||
<script type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/markitup/sets/html/set.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo $conf->urlGelato;?>/admin/scripts/markitup/skins/simple/style.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="<?php echo $conf->urlGelato;?>/admin/scripts/markitup/sets/html/style.css" />
|
|
||||||
<script type="text/javascript" >
|
|
||||||
$(document).ready(function() {
|
|
||||||
$("#description").markItUp(my_html);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<style type="text/css" media="screen">
|
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/lightbox.css";
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="div-process" style="display:none;"><?php echo __("Processing request…")?></div>
|
|
||||||
<div id="cont">
|
|
||||||
<div id="head">
|
|
||||||
<h1><a href="<?php echo $conf->urlGelato;?>/admin/index.php" title="gelato :: <?php echo __("home")?>">gelato cms</a></h1>
|
|
||||||
<ul id="nav">
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("View Tumblelog")?></a></li>
|
|
||||||
<li><a href="close.php" title="Log off" ><?php echo __("Log out")?></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="main">
|
|
||||||
<div class="box">
|
|
||||||
<ul class="menu">
|
|
||||||
<h3><?php echo __("New Post")?></h3>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="conversation") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=conversation"><img src="css/images/comments.png" alt="New chat" /> <?php echo __("Chat")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="quote") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=quote"><img src="css/images/quote.png" alt="New qoute" /> <?php echo __("Quote")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="url") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=url"><img src="css/images/world.png" alt="New link" /> <?php echo __("Link")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="mp3") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=mp3"><img src="css/images/music.png" alt="New audio" /> <?php echo __("Audio")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="video") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=video"><img src="css/images/film.png" alt="New video" /> <?php echo __("Video")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="photo") ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=photo"><img src="css/images/image.png" alt="New picture" /> <?php echo __("Picture")?></a></li>
|
|
||||||
<li<?php echo (isset($_GET["new"]) && $_GET["new"]=="post") ? " class=\"selected\"" : ""; echo (!isset($_GET["new"])) ? " class=\"selected\"" : ""; ?>><a href="<?php echo $conf->urlGelato;?>/admin/index.php?new=post"><img src="css/images/page.png" alt="New post" /> <?php echo __("Regular")?></a></li>
|
|
||||||
</ul>
|
|
||||||
<p> </p>
|
|
||||||
<?php
|
|
||||||
if($conf->check_version){
|
if($conf->check_version){
|
||||||
$present = version();
|
$present = version();
|
||||||
$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
|
$lastest = _file_get_contents("http://www.gelatocms.com/vgel.txt");
|
||||||
if ($present < $lastest) {
|
if ($present < $lastest)
|
||||||
echo "<div class=\"information\" id=\"update\">".__("A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>.")."</div><br />";
|
$theme->set('information',__("A new gelato version has been released and is ready <a href=\"http://www.gelatocms.com/\">for download</a>."));
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isset($_GET["deleted"])) {
|
|
||||||
if ($_GET["deleted"]=="true") {
|
|
||||||
echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been eliminated successfully.")."</div>";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["modified"])) {
|
$actions = array(
|
||||||
if ($_GET["modified"]=="true") {
|
'deleted'=>false,
|
||||||
echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been modified successfully.")."</div>";
|
'modified'=>false,
|
||||||
}
|
'added'=>false
|
||||||
|
);
|
||||||
|
|
||||||
|
if(isset($_GET['deleted']) and $_GET['deleted']=='true'){
|
||||||
|
$theme->set('exito',__("The post has been eliminated successfully."));
|
||||||
|
$actions['deleted'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["added"])) {
|
if(isset($_GET["modified"]) and $_GET["modified"]==true){
|
||||||
if ($_GET["added"]=="true") {
|
$theme->set('exito',__("The post has been modified successfully."));
|
||||||
echo "<div class=\"exito\" id=\"divMessages\">".__("The post has been added successfully.")."</div>";
|
$actions['modified']=true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["error"])) {
|
if(isset($_GET["added"]) and $_GET["added"]==true) {
|
||||||
if ($_GET["error"]==2) {
|
$theme->set('exito',__("The post has been added successfully."));
|
||||||
echo "<div class=\"error\"><strong>".__("Error on the database server:")." </strong>".$_GET["des"]."</div>";
|
$actions['added']=true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["mp3"])) {
|
$theme->set('action',$actions);
|
||||||
if ($_GET["mp3"]=="false") {
|
|
||||||
echo "<div class=\"error\" id=\"divMessages\">".__("Not an MP3 file or an upload problem.")."</div>";
|
if (isset($_GET["error"]) and $_GET["error"]==2)
|
||||||
}
|
$theme->set('error',__("Error on the database server:")." </strong>".$_GET["des"]);
|
||||||
}
|
|
||||||
|
if (isset($_GET["mp3"]) and $_GET["mp3"]=='false')
|
||||||
|
$theme->set('error',__("Not an MP3 file or an upload problem."));
|
||||||
|
|
||||||
|
if (isset($_GET["photo"]) and $_GET["photo"]=='false')
|
||||||
|
$theme->set('error',__("Not a photo file or an upload problem."));
|
||||||
|
|
||||||
if (isset($_GET["photo"])) {
|
|
||||||
if ($_GET["photo"]=="false") {
|
|
||||||
echo "<div class=\"error\" id=\"divMessages\">".__("Not a photo file or an upload problem.")."</div>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<form action="index.php" method="post" <?php echo (isset($_GET["new"]) && $_GET["new"]=="photo") ? "enctype=\"multipart/form-data\"" : ""?> name="frmAdd" id="autosave" class="newpost">
|
|
||||||
<fieldset>
|
|
||||||
<?php
|
|
||||||
if ($isEdition) {
|
if ($isEdition) {
|
||||||
?>
|
|
||||||
<input type="hidden" name="id_post" id="id_post" value="<?php echo $postId;?>" />
|
|
||||||
<?php
|
|
||||||
switch ($post["type"]) {
|
switch ($post["type"]) {
|
||||||
case "1":
|
case "1": $_GET["new"] = "post"; break;
|
||||||
$_GET["new"] = "post";
|
case "2": $_GET["new"] = "photo"; break;
|
||||||
break;
|
case "3": $_GET["new"] = "quote"; break;
|
||||||
case "2":
|
case "4": $_GET["new"] = "url"; break;
|
||||||
$_GET["new"] = "photo";
|
case "5": $_GET["new"] = "conversation"; break;
|
||||||
break;
|
case "6": $_GET["new"] = "video"; break;
|
||||||
case "3":
|
case "7": $_GET["new"] = "mp3"; break;
|
||||||
$_GET["new"] = "quote";
|
|
||||||
break;
|
|
||||||
case "4":
|
|
||||||
$_GET["new"] = "url";
|
|
||||||
break;
|
|
||||||
case "5":
|
|
||||||
$_GET["new"] = "conversation";
|
|
||||||
break;
|
|
||||||
case "6":
|
|
||||||
$_GET["new"] = "video";
|
|
||||||
break;
|
|
||||||
case "7":
|
|
||||||
$_GET["new"] = "mp3";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = ($isEdition) ? strtotime($post["date"]) : gmmktime();
|
$date = ($isEdition) ? strtotime($post["date"]) : gmmktime();
|
||||||
|
|
@ -247,110 +168,121 @@ if ($user->isAuthenticated()) {
|
||||||
$body = ($isEdition) ? stripslashes($post["description"]) : "";
|
$body = ($isEdition) ? stripslashes($post["description"]) : "";
|
||||||
$url = ($isEdition) ? $post["url"] : "";
|
$url = ($isEdition) ? $post["url"] : "";
|
||||||
|
|
||||||
if (!isset($_GET['new'])) $_GET['new'] = 'default';
|
if (!isset($_GET['new'])) $_GET['new'] = 'post';
|
||||||
|
|
||||||
|
$theme->set('date',$date);
|
||||||
|
$theme->set('id_user',$_SESSION['user_id']);
|
||||||
|
$theme->set('type',$_GET["new"]);
|
||||||
|
$theme->set('editBody',$body);
|
||||||
|
|
||||||
switch ($_GET["new"]) {
|
switch ($_GET["new"]) {
|
||||||
case "post":
|
case "post":
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}");
|
$theme->set('editTitle',$title);
|
||||||
$output = array("1", $date, $_SESSION['user_id'], $title, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_post");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "photo":
|
case "photo":
|
||||||
$url = str_replace("../", $conf->urlGelato."/", $url);
|
$url = str_replace("../", $conf->urlGelato."/", $url);
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}");
|
$theme->set('editUrl',$url);
|
||||||
$output = array("2", $date, $_SESSION['user_id'], $url, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_photo");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "quote":
|
case "quote":
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}");
|
$theme->set('editTitle',$title);
|
||||||
$output = array("3", $date, $_SESSION['user_id'], $title, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_quote");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "url":
|
case "url":
|
||||||
|
$theme->set('editTitle',$title);
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editUrl}", "{editBody}");
|
$theme->set('editUrl',$url);
|
||||||
$output = array("4", $date, $_SESSION['user_id'], $title, $url, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_link");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "conversation":
|
case "conversation":
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editTitle}", "{editBody}");
|
$theme->set('editTitle',$title);
|
||||||
$output = array("5", $date, $_SESSION['user_id'], $title, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_conversation");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "video":
|
case "video":
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}");
|
$theme->set('editUrl',$url);
|
||||||
$output = array("6", $date, $_SESSION['user_id'], $url, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_video");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
case "mp3":
|
case "mp3":
|
||||||
$input = array("{type}", "{date}", "{id_user}", "{editUrl}", "{editBody}");
|
$theme->set('editUrl',$url);
|
||||||
$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}", "{editTitle}", "{editBody}");
|
|
||||||
$output = array("1", $date, $_SESSION['user_id'], $title, $body);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_add_post");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<p>
|
|
||||||
<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
|
|
||||||
<?php echo __("Some HTML allowed")?>:<br />
|
|
||||||
|
|
||||||
<code>
|
|
||||||
<strong> <em> <del> <ul> <ol> <li> <a>
|
|
||||||
<br />
|
|
||||||
<blockquote>
|
|
||||||
<code> <pre> <img>
|
|
||||||
</code>
|
|
||||||
<br /><br />
|
|
||||||
Bookmarklet - <a class="bookmarklet" title="<?php echo __("Drag to the Bookmarks Toolbar")?>" href="javascript:var w; setTimeout('w.focus()',100);w=window.open('<?php echo $conf->urlGelato; ?>/admin/bm.php?url='+encodeURIComponent(location.href)+'&sel='+encodeURIComponent(window.getSelection()),'bookmarklet','toolbar=0,resizable=0,status=1,width=650,height=540,dependent=yes' ); w.focus();"><?php echo __("add to gelato")?></a>
|
|
||||||
<br /><br />
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input class="btn" type="submit" name="btnAdd" value="<?php echo ($isEdition) ? "Modify" : "Create"; ?> post" />
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
<div class="footer-box"> </div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
if (!$isEdition) {
|
|
||||||
?>
|
|
||||||
<div class="box">
|
|
||||||
<ul class="menu manage">
|
|
||||||
<h3>Manage</h3>
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/admin/settings.php"><?php echo __("Settings")?></a></li>
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/admin/options.php"><?php echo __("Options")?></a></li>
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/admin/feeds.php"><?php echo __("Feeds")?></a></li>
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/admin/admin.php"><?php echo __("Users")?></a></li>
|
|
||||||
<li><a href="<?php echo $conf->urlGelato;?>/admin/comments.php"><?php echo __("Comments")?></a></li>
|
|
||||||
<li class="selected"><a><?php echo __("Posts")?></a></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<?php
|
if (!$isEdition){
|
||||||
if (isset($_GET["page"])) {
|
if (isset($_GET["page"]))
|
||||||
$page_num = $_GET["page"];
|
$page_num = $_GET["page"];
|
||||||
} else {
|
else
|
||||||
$page_num = NULL;
|
$page_num = NULL;
|
||||||
|
|
||||||
|
$limit=$conf->postLimit;
|
||||||
|
|
||||||
|
if(isset($page_num) && is_numeric($page_num) && $page_num>0)// Is defined the page and is numeric?
|
||||||
|
$from = (($page_num-1) * $limit);
|
||||||
|
else
|
||||||
|
$from = 0;
|
||||||
|
|
||||||
|
$rs = $tumble->getPosts($limit, $from);
|
||||||
|
$theme->set('Posts_Number',$tumble->contarRegistros());
|
||||||
|
|
||||||
|
$rows = array();
|
||||||
|
if ($tumble->contarRegistros()>0) {
|
||||||
|
while($register = mysql_fetch_array($rs)) {
|
||||||
|
$row['postType'] = type2Text($tumble->getType($register["id_post"]));
|
||||||
|
|
||||||
|
$formatedDate = gmdate("M d", strtotime($register["date"])+transform_offset($conf->offsetTime));
|
||||||
|
$permalink = $conf->urlGelato."/index.php/post/".$register["id_post"]."/";
|
||||||
|
|
||||||
|
$register["title"] = stripslashes($register["title"]);
|
||||||
|
$register["description"] = stripslashes($register["description"]);
|
||||||
|
|
||||||
|
$row['Id_Post'] = $register["id_post"];
|
||||||
|
$row['Date_Added'] = $formatedDate;
|
||||||
|
$row['Permalink'] = $permalink;
|
||||||
|
|
||||||
|
switch ($tumble->getType($register["id_post"])) {
|
||||||
|
case "1":
|
||||||
|
$row['Title'] = $register["title"];
|
||||||
|
$row['Body'] = $register["description"];
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
$fileName = "../uploads/".getFileName($register["url"]);
|
||||||
|
|
||||||
|
$x = @getimagesize($fileName);
|
||||||
|
if ($x[0] > 100)
|
||||||
|
$photoPath = $conf->urlGelato."/classes/imgsize.php?w=100&img=".$register["url"];
|
||||||
|
else
|
||||||
|
$photoPath = $register["url"];
|
||||||
|
|
||||||
|
$effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\"";
|
||||||
|
|
||||||
|
$row['PhotoURL'] = $photoPath;
|
||||||
|
$row['PhotoAlt'] = strip_tags($register["description"]);
|
||||||
|
$row['Caption'] = $register["description"];
|
||||||
|
$row['Effect'] = $effect;
|
||||||
|
break;
|
||||||
|
case "3":
|
||||||
|
$row['Quote'] = $register["description"];
|
||||||
|
$row['Source'] = $register["title"];
|
||||||
|
break;
|
||||||
|
case "4":
|
||||||
|
if($conf->shorten_links)
|
||||||
|
$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
|
||||||
|
$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
|
||||||
|
|
||||||
|
$row['URL'] = $register["url"];
|
||||||
|
$row['Name'] = $register["title"];
|
||||||
|
$row['Description'] = $register["description"];
|
||||||
|
break;
|
||||||
|
case "5":
|
||||||
|
$row['Title'] = $register["title"];
|
||||||
|
$row['Conversation'] = $tumble->formatConversation($register["description"]);
|
||||||
|
break;
|
||||||
|
case "6":
|
||||||
|
$row['Video'] = $tumble->getVideoPlayer($register["url"]);
|
||||||
|
$row['Caption'] = $register["description"];
|
||||||
|
break;
|
||||||
|
case "7":
|
||||||
|
$row['Mp3'] = $tumble->getMp3Player($register["url"]);
|
||||||
|
$row['Caption'] = $register["description"];
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
<<<<<<< .mine
|
||||||
|
$rows[] = $row;
|
||||||
|
}
|
||||||
|
=======
|
||||||
|
|
||||||
$limit=$conf->postLimit;
|
$limit=$conf->postLimit;
|
||||||
|
|
||||||
|
|
@ -387,82 +319,20 @@ if ($user->isAuthenticated()) {
|
||||||
} else {
|
} else {
|
||||||
$photoPath = $register["url"];
|
$photoPath = $register["url"];
|
||||||
}
|
}
|
||||||
|
>>>>>>> .r241
|
||||||
$effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\"";
|
|
||||||
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_photo");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
case "3":
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Quote}", "{Source}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $register["description"], $register["title"], $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_quote");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
case "4":
|
|
||||||
if($conf->shorten_links){
|
|
||||||
$register["url"] = _file_get_contents("http://api.abbrr.com/api.php?out=link&url=".$register["url"]);
|
|
||||||
}
|
|
||||||
$register["title"] = ($register["title"]=="")? $register["url"] : $register["title"];
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{URL}", "{Name}", "{Description}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $register["url"], $register["title"], $register["description"], $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_url");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
case "5":
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Title}", "{Conversation}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $register["title"], $tumble->formatConversation($register["description"]), $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_conversation");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
case "6":
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Video}", "{Caption}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $tumble->getVideoPlayer($register["url"]), $register["description"], $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_video");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
case "7":
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{Mp3}", "{Caption}", "{URL_Tumble}");
|
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $tumble->getMp3Player($register["url"]), $register["description"], $conf->urlGelato);
|
|
||||||
|
|
||||||
$template->cargarPlantilla($input, $output, "template_mp3");
|
|
||||||
$template->mostrarPlantilla();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$p = new pagination;
|
$p = new pagination;
|
||||||
$p->items($tumble->getPostsNumber());
|
$p->items($tumble->getPostsNumber());
|
||||||
$p->limit($limit);
|
$p->limit($limit);
|
||||||
$p->currentPage(isset($page_num) ? $page_num : 1);
|
$p->currentPage(isset($page_num) ? $page_num : 1);
|
||||||
$p->show();
|
|
||||||
|
|
||||||
|
$theme->set('pagination',$p->getPagination());
|
||||||
} else {
|
$theme->set('rows',$rows);
|
||||||
$template->renderizaEtiqueta(__("No posts in this tumblelog."), "div","error");
|
}else{
|
||||||
|
$theme->set('error',__("No posts in this tumblelog."));
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
<div class="footer-box"> </div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
$theme->display(Absolute_Path.'admin/themes/admin/index.htm');
|
||||||
<div id="foot">
|
|
||||||
<a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
header("Location: ".$conf->urlGelato."/login.php");
|
header("Location: ".$conf->urlGelato."/login.php");
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
<div>
|
|
||||||
<label for="title">Title <span class="option">(optional)</span></label><br />
|
|
||||||
<input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="description">Conversation</label>
|
|
||||||
<div style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
|
|
||||||
<span style="font-weight: bold;">Example</span><br>
|
|
||||||
<span style="font-style: italic;">
|
|
||||||
Geek: Wow an open source tumblelog CMS!!.<br>
|
|
||||||
Normal: Tumble... what??<br>
|
|
||||||
Geek: Read the wikipedia!!
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="url" id="url" value="" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
description: "required"
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.parent().children("label"))
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="title">Name <span class="option">(optional)</span></label>
|
|
||||||
<br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="url">URL</label>
|
|
||||||
<br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div id="add_link_description" style="margin-top:5px;">
|
|
||||||
<a class="linkFrm" href="#" onclick="document.getElementById('link_description').style.display = ''; document.getElementById('add_link_description').style.display = 'none'; return false;" style="font-size:11px;">Add a description</a><br /><br />
|
|
||||||
</div>
|
|
||||||
<div id="link_description" style="display:none;">
|
|
||||||
<label for="description">Description</label><br />
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
url: {
|
|
||||||
required: true,
|
|
||||||
url: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="url">MP3 URL</label>
|
|
||||||
<br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
|
||||||
<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
|
||||||
This is the MP3 file URL or a GoEar URL or an Odeo URL.<br>
|
|
||||||
<span style="font-size: 10px; font-weight: normal;">(ie. http://www.goear.com/listen.php?v=c0a2c85)</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="description">Caption <span class="option">(optional)</span></label><br />
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description" tabindex="2">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="title" id="title" value="" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
url: {
|
|
||||||
required: true,
|
|
||||||
url: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="photo_upload">
|
|
||||||
<label for="description">Photo</label>
|
|
||||||
<br /><input type="file" name="photo" id="photo" accept="image/gif,image/jpeg,image/jpg,image/png"/>
|
|
||||||
<div style="font-size:11px; color:#666; margin-top:5px;">
|
|
||||||
Supports JPEG, GIF and PNG. <strong>Max size is 10 MB.</strong>
|
|
||||||
</div>
|
|
||||||
<div style="font-size:11px; color:#666; margin-top:5px;">
|
|
||||||
<a href="#" class="linkFrm">Use a URL instead</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="photo_url">
|
|
||||||
<label for="description">Photo URL</label>
|
|
||||||
<br /><input class="input-text" type="text" name="url" id="url" size="80" value="{editUrl}" />
|
|
||||||
<div style="font-size:11px; color:#666; margin-top:5px;">
|
|
||||||
<a href="#" class="linkFrm">Use a upload form instead</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="description" style="display:block;">Caption <span class="option">(optional)</span></label>
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="title" id="title" value="" />
|
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="10485760" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('#photo_url').css('display','none');
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
photo: {
|
|
||||||
required: function() {
|
|
||||||
return ($('#photo_upload').css('display')!= 'none') ? true : false;
|
|
||||||
},
|
|
||||||
accept: "(jpe?g|gif|png)"
|
|
||||||
},
|
|
||||||
url: {
|
|
||||||
required: function() {
|
|
||||||
return ($('#photo_url').css('display')!= 'none') ? true : false;
|
|
||||||
},
|
|
||||||
url: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#photo_upload a.linkFrm").click( function() {
|
|
||||||
$('#photo_upload').css('display','none');
|
|
||||||
$('#photo_url').css('display','block');
|
|
||||||
$('#photo').val('');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$("#photo_url a.linkFrm").click( function() {
|
|
||||||
$('#photo_url').css('display','none');
|
|
||||||
$('#photo_upload').css('display','block');
|
|
||||||
$('#url').val('');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="photo_upload">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="photo_url">
|
|
||||||
<label for="description">Photo URL</label>
|
|
||||||
<br /><input class="input-text" type="text" name="url" id="url" size="80" value="{editUrl}" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="description" style="display:block;">Caption <span class="option">(optional)</span></label>
|
|
||||||
<br /><textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="title" id="title" value="" />
|
|
||||||
<input type="hidden" name="MAX_FILE_SIZE" value="10485760" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('#photo_upload').css('display','none');
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
photo: {
|
|
||||||
required: function() {
|
|
||||||
return ($('#photo_upload').css('display')!= 'none') ? true : false;
|
|
||||||
},
|
|
||||||
accept: "(jpe?g|gif|png)"
|
|
||||||
},
|
|
||||||
url: {
|
|
||||||
required: function() {
|
|
||||||
return ($('#photo_url').css('display')!= 'none') ? true : false;
|
|
||||||
},
|
|
||||||
url: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#photo_upload a.linkFrm").click( function() {
|
|
||||||
$('#photo_upload').css('display','none');
|
|
||||||
$('#photo_url').css('display','block');
|
|
||||||
$('#photo').val('');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
$("#photo_url a.linkFrm").click( function() {
|
|
||||||
$('#photo_url').css('display','none');
|
|
||||||
$('#photo_upload').css('display','block');
|
|
||||||
$('#url').val('');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="title" style="display:block;">Title <span class="option">(optional)</span></label>
|
|
||||||
<br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="description" style="display:block;">Body</label>
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="url" id="url" value="" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
description: "required"
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="description">Quote</label>
|
|
||||||
<br /><textarea rows="12" cols="84" name="description" id="description">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="title">Source <span class="option">(optional)</span></label>
|
|
||||||
<br /><input class="txt" type="text" name="title" id="title" value="{editTitle}" size="80" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="url" id="url" value="" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
description: "required"
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="url">Video URL</label>
|
|
||||||
<br /><input class="txt" type="text" name="url" id="url" value="{editUrl}" size="80" />
|
|
||||||
<div style="color: rgb(136, 136, 136); margin-bottom: 5px; font-size: 11px; font-weight: bold;">
|
|
||||||
This is the URL from the video sites YouTube, Vimeo, Yahoo, Daily Motion <br />
|
|
||||||
or even an Slide Share Presentation.<br />
|
|
||||||
<span style="font-size: 10px; font-weight: normal;">(ie. http://youtube.com/watch?v=HcBFLN9cli0)</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label for="description">Caption <span class="option">(optional)</span></label><br />
|
|
||||||
<textarea rows="12" cols="84" name="description" id="description" tabindex="2">{editBody}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" name="title" id="title" value="" />
|
|
||||||
<input type="hidden" name="type" id="type" value="{type}" />
|
|
||||||
<input type="hidden" name="date" id="date" value="{date}" />
|
|
||||||
<input type="hidden" name="id_user" id="id_user" value="{id_user}" />
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$("#autosave").validate({
|
|
||||||
rules: {
|
|
||||||
url: {
|
|
||||||
required: true,
|
|
||||||
url: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
errorElement: "span",
|
|
||||||
errorClass: "validate_span",
|
|
||||||
errorPlacement: function(label, element) {
|
|
||||||
label.prependTo(element.prev())
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/comments.php?edit={Id_Comment}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/comments.php?delete={Id_Comment}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Comment_Author}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<p>{Comment}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
<form action="{Form_Action}" method="post" name="commentForm" id="commentForm" class="newpost">
|
|
||||||
<fieldset>
|
|
||||||
<p>
|
|
||||||
<label for="username">Name</label>
|
|
||||||
<input class="txt" name="username" id="username" value="{User}" size="22" tabindex="1" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<label for="email">E-mail</label>
|
|
||||||
<input class="txt" name="email" id="email" value="{Email}" size="22" tabindex="2" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<label for="web">Website</label>
|
|
||||||
<input class="txt" name="web" id="web" value="{Web}" size="22" tabindex="3" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<label for="description">Body</label><br />
|
|
||||||
<textarea name="content" id="content" cols="50" rows="10" tabindex="4">{Comment}</textarea>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input type="submit" value="Modify comment" name="btnAdd" id="btnAdd" tabindex="5" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input name="id_post" id="id_post" value="{Id_Post}" type="hidden" />
|
|
||||||
<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
|
|
||||||
<input name="id_comment" id="id_comment" value="{Id_Comment}" type="hidden" />
|
|
||||||
</p>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">{Title}</span>
|
|
||||||
<div class="conversation">{Conversation}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">{Caption}</span>
|
|
||||||
<p><img src="{URL_Tumble}/admin/css/images/music.png" alt="Play song" /> <a href="{Permalink}">Play</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">{Caption}</span>
|
|
||||||
<p><a {Effect}><img src="{PhotoURL}" alt="{PhotoAlt}" /></a></a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">— {Source}</span>
|
|
||||||
<p><big class="quote"><a href="{Permalink}">“</a></big> {Quote}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option"><a href="{Permalink}">{Title}</a></span>
|
|
||||||
<p>{Body}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">» <a href="{URL}">{Name}</a></span>
|
|
||||||
<p>{Description}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<div class="entry">
|
|
||||||
<div class="info"><span class="compact"><a href="{Permalink}">Link</a> <a href="{URL_Tumble}/admin/index.php?edit={Id_Post}"><img src="{URL_Tumble}/admin/css/images/edit.png" alt="" title="" /></a> <a href="{URL_Tumble}/admin/index.php?delete={Id_Post}"><img src="{URL_Tumble}/admin/css/images/delete.png" alt="" title="" /></a></span>
|
|
||||||
<p>{Date_Added}</p>
|
|
||||||
</div>
|
|
||||||
<div class="post">
|
|
||||||
<span class="option">{Caption}</span>
|
|
||||||
<p><img src="{URL_Tumble}/admin/css/images/film.png" alt="Watch video" /> <a href="{Permalink}">Watch</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -200,5 +200,13 @@ class gelato extends Conexion_Mysql {
|
||||||
$out .= $post_id.$strEnd;
|
$out .= $post_id.$strEnd;
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPermalink($post_id){
|
||||||
|
$strEnd = ($this->conf->urlFriendly) ? "/" : "";
|
||||||
|
$out = $this->conf->urlGelato;
|
||||||
|
$out .= ($this->conf->urlFriendly) ? "/post/" : "/index.php?post=";
|
||||||
|
$out .= $post_id.$strEnd;
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue