#1BangBangDom maio 06, 2012 2:25 pm
BangBang
Ex-Administrador
Olá Forum dix trago a vocês mais um tutorial !
Instalando Plug-in Nas Noticias.
Vamos lá:
Vá em articles.php e apague tudo, após cole o código abaixo:
Código:
Feche e salve, Pronto ! Muito simples e pratico;
~ Créditos:
BangBang
Instalando Plug-in Nas Noticias.
Vamos lá:
Vá em articles.php e apague tudo, após cole o código abaixo:
Código:
- Código:
<?php
/*=======================================================================
| Power Cms - A mais avançada tecnologia em edição de cms
| #######################################################################
| 2011 - Equipe Power - Fundada Por Brandow
| #######################################################################
| Contato: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
\======================================================================*/
define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('global.php');
define("THIS_SCRIPT", 'me');
$username = $core->EscapeString($_SESSION['username']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
content="A group of U.S. Marines, under command of
a renegade general, take over Alcatraz and
threaten San Francisco Bay with biological
weapons."/>
<meta property="fb:admins" content="1587750403"/>
<meta http-removido="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $sitename." - Articles"; ?></title>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({
appId : 'YOUR APP ID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
</script>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="Public/JS/jquery.history.js"></script>
<script src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script>
<script language="javascript">
(function($){
$(document).ready(function() {
$('.Usersmotto').click(function() {
$('.Usersmotto').css("display", "none")
$('.UserMotto').css("display", "block")
$('.UserMotto').focus()
return;
});
$('.UserMotto').blur(function() {
$('.UserMotto').css("display", "none")
$.ajax({
url: "functions/updatemotto.php?motto=" + $('.UserMotto').val(),
async: false
})
$('.Usersmotto').html($('.UserMotto').val())
$('.Usersmotto').css("display", "block")
$('.Usersmotto').css("min-width", "200px")
$('.Usersmotto').css("min-height", "30px")
return;
});
});
})(jQuery);
</script>
<script src="cufon-yui.js" type="text/javascript"></script>
<script src="includes/minimailTab.js" type="text/javascript"></script>
<script src="ubuntu.font.js" type="text/javascript"></script>
<script type="text/javascript">
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('h4');
</script>
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<?php include('includes/header.php'); ?>
<div class="container">
<?php include('includes/headerTwo.php'); ?>
<?php include('includes/bigCampaign.php'); ?>
<?php
if(!isset($_GET['story']) || !is_numeric($_GET['story']))
{
$articleq = mysql_query("SELECT * FROM cms_news ORDER BY id DESC LIMIT 1");
}
else
{
$articleq = mysql_query("SELECT * FROM cms_news WHERE id = '".addslashes($_GET['story'])."' LIMIT 1");
}
$article = mysql_fetch_array($articleq);
$authorq = mysql_query("SELECT * FROM users WHERE id = '".$article['author']."' LIMIT 1");
$author = mysql_fetch_array($authorq);
$recentstoriesq = mysql_query("SELECT * FROM cms_news ORDER BY id DESC LIMIT 25");
?>
<input type="hidden" value="<?php echo $article['id']; ?>" name="storyid" id="storyid" />
<input type="hidden" value="<?php echo $users->UserID($core->EscapeString($_SESSION['username'])); ?>" name="uid" id="uid" />
<div class="columnOneProfile">
<div class="contentBox">
<div class="boxHeaderGreen">
<h1>Noticias Recentes</h1>
</div>
<div id="recent">
<?php
while($recentstories = mysql_fetch_array($recentstoriesq))
{
echo '<a href="?story='.$recentstories['id'].'">'.$recentstories['title'].' »</a><br />';
}
?>
</div>
</div>
</div>
<div class="columnTwoProfile">
<div class="contentBox">
<div class="boxHeaderNews">
<h4>Noticias</h4>
</div>
<div class="newsLeft"></div>
<div class="newsRight"><!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_counter addthis:url addthis_pill_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e03876c559c7506"></script>
<!-- AddThis Button END --></div>
<?php echo stripslashes($article['longstory']); ?><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://r63.mabbohotel.net/articles.php?story=<?php echo $article['id']; ?>" show_faces="false" font="verdana" width="525" height="40"/>
</div><div style="margin: auto auto;"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="http://r63.mabbohotel.net/articles.php?story=<?php echo $article['id']; ?>" num_posts="2" width="525"></fb:comments></div>
</br></br>
</div>
<?php include('includes/footer.php'); ?>
</div>
</body>
</html>
Feche e salve, Pronto ! Muito simples e pratico;
~ Créditos:
BangBang