Web
Analytics Made Easy - StatCounter
Jump to content
  • Sign Up
DChiuch

Website redesign (second thread).

Recommended Posts

I'm in the middle of developing the third iteration of KH13, for those who are unaware. I'm going to use this thread to sometimes offer my progress, so feel free to give feedback and offer suggestions.

 

To summarise what I'm doing with the redesign, I'm remaking and recoding everything on the website. At the end of it, it will look different, and it will be a lot easier for me/contributors to add content. However, don't worry, every post and everything will still be here.

 

Updates, feel free to comment:

Share this post


Link to post
Share on other sites

The header and general design are set up. The "design elements" that remain at this point are the footer, and a better username dropdown menu. And of course, the content will have to be styled.

 

I've installed the forum, however this still has to be redesigned quite a bit.

 

Videos is going well, here's videos.php:

<?php

//connect to ipb
chdir('forum');
define( 'IPB_THIS_SCRIPT', 'public' );
require_once( './initdata.php' );
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );
$reg = ipsRegistry::instance();
$reg->init();
$output = $reg->getClass('output');

//get variables from link
$game = $_GET['game'];
$form = $_GET['form'];
$video = $_GET['video'];

//connect to video database
mysql_connect('localhost', 'dchiuch_videos', 'videospass');
mysql_select_db('dchiuch_videos');

//get long game
$gamequery = mysql_query("SELECT * FROM "."abbreviations WHERE short="."'$game'");
$gamearray = mysql_fetch_array($gamequery);
$gamelong = $gamearray['long'];

//get long form
if (!empty($form)) {
	$formexplode = explode("-", $form);
	foreach ($formexplode as &$value) {
	$formquery = mysql_query("SELECT * FROM "."abbreviations WHERE short="."'$value'");
	$formarray = mysql_fetch_array($formquery);
	$value = $formarray['long'];
	}
	$formlong = implode(" ", $formexplode);
}

//define page title
if (empty($video)) {
	if (empty($form)) {
		$pagetitle = $gamelong;
	}
	else {
		$pagetitle = $gamelong.", ".$formlong;
	}
}
else {
	//get video name
	$formclean = str_replace('-', '', $form);
	$table = $game.$formclean;
	$videoquery = mysql_query("SELECT * FROM "."$table WHERE ID="."$video");
	$videoarray = mysql_fetch_array($videoquery);
	$videoname = $videoarray['Name'];
	$pagetitle = $videoname;
}
$output->setTitle($pagetitle);

//define navigation
$output->addNavigation(Videos, '/../videos/');
$output->addNavigation($gamelong, '/../videos/'.$game.'/');
if (!empty($form)) {
$output->addNavigation($formlong, '/../videos/'.$game.'/'.$form.'/');
}

//define content
if (empty($video)) {
	if (empty($form)) {
		//page for video
	}
	else {
		//page for form
	}
}
else {
	//page for game
}

//send shit to ipb
mysql_close();
$output->sendOutput();

?>
It returns the title and navigation, only the content remains..

 

Games and Media are both generated by information.php, which is almost done. Here:

<?php

//get variables
$category = $_GET['category'];
$page = $_GET['page'];
if (empty($page)) {
	$page = $category;
}
if ($category != games) {
$app = 'media';
}
else {
$app = 'games';
}
define('IPS_DEFAULT_PUBLIC_APP', $app);

//required shit to connect to ipb
chdir('forum');
define('IPB_THIS_SCRIPT', 'public');
require_once('./initdata.php');
require_once(IPS_ROOT_PATH.'sources/base/ipsRegistry.php');
require_once(IPS_ROOT_PATH.'sources/base/ipsController.php');
require_once('../wordpress/wp-load.php');
$reg = ipsRegistry::instance();
$reg->init();
$output = $reg->getClass('output');

//define page title
if ($category != $page) {
	$wppage = get_page_by_path($category.'/'.$page);
}
else {
	$wppage = get_page_by_path($category);
}
$pagetitle = $wppage->post_title;
$output->setTitle($pagetitle);

//define navigation
if ($category != games) {
	$output->addNavigation(Media, '/../media/');
}
$wpcategory = get_page_by_path($category);
$categorytitle = $wpcategory->post_title;
if ($category != $page) {
$categorylink = '/../media/'.$category.'/';
}
$output->addNavigation($categorytitle, $categorylink);
if ($category != $page) {
    $output->addNavigation($pagetitle);
}

//define content
$content = $wppage->post_content;
$output->addContent('<div id="main"><h3 class="maintitle">'.$pagetitle.'</h3>
<div class="module">'.$content.'</div></div>
<div class="clearer"> </div>');

//send shit to ipb
$output->sendOutput();

?>

After I finish both of those, I have to do News and Gallery. Then pretty much done.

Here's an example page: http://kh13.com/information.php?category=characters&page=sora

Share this post


Link to post
Share on other sites

Sounds good, so kinda like how Wiki is done? That seems a lot easier to me then uploading the pages.

 

Yes, contributors will be able to login into software called "Wordpress" and edit the games/media pages.

Share this post


Link to post
Share on other sites

In case I believe it needs spaces.

Like the Game titles seem a bit odd, they should be like a space or two to the left.

And maybe a blank line or two in the middle of each game.

 

Also I am well aware of my mistakes in Kingdom Hearts.

I had planed on re writing it, but couldn't be stuffed.

Share this post


Link to post
Share on other sites

Alright, learnt how to use mod_rewrite, which lets me set the URLs. Pretty tricky. Anyway here:

 

RewriteEngine On
RewriteRule ^games/([^/.]+)/?$ information.php?category=games&page=$1 [L]
RewriteRule ^media/([^/.]+)/?$ information.php?category=$1 [L]
RewriteRule ^media/([^/.]+)/([^/.]+)/?$ information.php?category=$1&page=$2 [L]
RewriteRule ^videos/([^/.]+)/?$ videos.php?game=$1 [L]
RewriteRule ^videos/([^/.]+)/([^/.]+)/?$ videos.php?game=$1&form=$2 [L]
RewriteRule ^videos/([^/.]+)/([^/.]+)/([^/.]+)/?$ /videos.php?game=$1&form=$2&video=$3 [L]

Examples:

http://kh13.com/games/birth-by-sleep/

http://kh13.com/videos/bbs/

http://kh13.com/videos/bbs/eng-cut/

http://kh13.com/videos/bbs/eng-cut/287/

http://kh13.com/media/trading-card-game/

http://kh13.com/media/characters/sora/

 

Obviously some of those arent finished yet, I've just got the URLs going.

Share this post


Link to post
Share on other sites

what about a friends list? just to keep everything organized/simple?

 

We had one, its pointless.

But I think the new forum already comes with one. So DChiuch would decide to keep it or not.

Share this post


Link to post
Share on other sites

Definitely gonna have a "friends list", the new forum is a lot more social.

 

Just my opinion, I don't think we need one (>.< I'm just kind of person who don't want to see people seemingly unequal by listing them) well, those who want it already have it at their profile, I think that's kinda sufficient already.

 

And calendar is nice, I think.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...