Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[MABBOCMS] Author in the Articles page

Status
Not open for further replies.
Skilled Illusionist
Joined
Jul 30, 2008
Messages
340
Reaction score
50
Hi, It's like when you post an event. You want people to see the author right? So here's the PHP code:)

PHP:
<?php

/*=======================================================================
| MabboCMS - A premium alternative to uberCMS or PhoenixPHP.
| #######################################################################
| 2011 (c) Copyright Nominal & Browneyadz. Use of this product without a
| license is against our terms.
\======================================================================*/

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 http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $hotelnaam; ?> -> Nieuws Artikelen</title>
   
    <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
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>Archief</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><center><?php echo stripslashes($article['title']); ?></center></h4>
</div>
<div class="newsLeft"></div>

<?php echo stripslashes($article['longstory']); ?><br><br>Auteur: <?php echo $author['username']; ?>
			</div><div style="margin: auto auto;"></div>
<?php
?>
</br></br>				
</div>
<?php include('includes/footer.php'); ?>
</div>

</body> 
</html>

Credits: Nominal, Making the CMS. - iJoris, Making no-facebook(Yes i use it) - DonSzeh, For making no share and making the author.

Oh and BTW, If you want it on another spot, Just add it where else, or just copy this code :)

PHP:
 <?php echo $author['username']; ?>

'XoXo
Donny.
-Sorry for my bad english. Im dutch!
 
Newbie Spellweaver
Joined
May 13, 2011
Messages
14
Reaction score
1
Great Release!

I use it!

10/10 + Like!
 
Custom Title Activated
Loyal Member
Joined
Jan 25, 2009
Messages
1,539
Reaction score
4
Ahh.! Spamming the MabboCMS release, great :)
Phoenix PHP say goodbye ! XD
 
Status
Not open for further replies.
Back
Top