Lobby news home page - Page 2

Lobby news home page

Please use this forum to set up matches and discuss played games.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Lobby news home page

Post by Argh »

Aha, so it links that way. Cool.

And yeah, I can relate to the WordPress mess.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Well, in all fairness, it doesn't get messy until you try to do really weird stuff with it (Like rip out 97% of the total layout :lol:).

However, that said, the way I've done it is really clean. It's jsut I keep going crosseyed from looking at blocks of code.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Lobby news home page

Post by Jazcash »

Image
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

ooo pretty, can I steal it?

Edit, just glanced in TS and noticed you were messaging me, I was taking a nap. Awesome, and THANKS! Cheers!

Image
mehumpingjazleg.jpg
(787.24 KiB) Downloaded 1 time
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Lobby news home page

Post by Argh »

Very nice!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby news home page

Post by AF »

Forboding Angel wrote:Well, in all fairness, it doesn't get messy until you try to do really weird stuff with it (Like rip out 97% of the total layout :lol:).

However, that said, the way I've done it is really clean. It's jsut I keep going crosseyed from looking at blocks of code.
Not at all, use a custom page template, and instead of including the header and footer via functions, include your own stuff
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Custom page template doesn't cover header and footer, AF (And that would be pointless anyway, cause very little is actually even being done with the content, 99% of it is tied up in the header and footer). The extra code in the actual content page template is all of 5 lines.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby news home page

Post by AF »

in a page template, you normally have get_header(); which includes header.php, and get_footer() which includes footer.php, and inbetween these you shove a div with your page content. You also have a sidebar function you call too.

So its actually quite easy to do what you want with a minimum of fuss. Take index.php, rename it, add a comment at the top so it gets detected as a page template, remove the header and footer call outs and replace it with your alternative stuff.

Then all you need to do is create a new page with the new page template, and link to the url.

Heres postables.php, which drives the blog page of darkstars:

Code: Select all

<?php
/*
Template Name: postables
*/

get_header();
?>
<div id="blogsidebar">
	<div class="box">
		<div class="content">
			<h2>Archives</h2>
			<p>
				<a href="/blog/post-archives/">View the post archives, by yearly, monthly, and category views</a>
			</p>
		</div>
		<div class="bottomcorners"> </div>
	</div>
</div>
<?php 
global $more;
$more = 0;

query_posts('posts_per_page=5'); ?>

<div id="blog">
	<div class="content">

	<?php if (have_posts()) : ?>
		
		<?php while (have_posts()) : the_post();?>
				
			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
				<?php echo get_post_image($post); ?>
				<div class="postShort">
					<div class="postTitle">
						<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
					</div>
					<div class="postExcerpt">
						<?php the_content('</p><p>Read the rest of this entry &raquo;'); ?>
					</div>
				</div>
				<div class="clearleft"></div>
			</div>
		

		<?php endwhile; ?>
		<div class="navigation">
			<div class="alignleft"><?php next_posts_link('&laquo; Older Posts', '0'); ?></div>
			<div class="alignright"><?php previous_posts_link('Newer Posts &raquo;','0') ?></div>
		</div>
		</div>
		<div class="bottomcorners"> </div>
	</div>
		
		
	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

	<?php endif;
get_footer();

?>

Replace get_header() with:

Code: Select all

<head>
    <title>mytitle</title>
    <link rel="stylesheet" href="/stylesheet.css" type="text/css" /> 
</head>
<body>
    <div id="pagewrap">
and get_footer(); with:

Code: Select all

    </div>
</body>
and rename the name of the file and page template comment, and make a new page using that template, and your good to go
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Hmm, that's a nice way of going about it. In my case it's a bit different as index is calling the header and the footer, but unless I'm mistaken, it would be trivial to have index call the main page (which it already is), and have the main page call the header and footer, then set up a template for a single page as you suggested.

Interesting and clever. I'll screw with it when I have some time. At least that way I wouldn't have to set a session variable so many times, that was getting old.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Lobby news home page

Post by AF »

Your main page can be turned into any page, the only differrence, is the main page has wordpress call the post query for you. So when you create your page, you end up with the page itself as the only listed post. You also loose the ability to use exceprts.

However the solution to this is in my code snippet above.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Lobby news home page

Post by Satirik »

bump !! did you make any progress forb ? can't anyone else make a lobby news front page ?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: Lobby news home page

Post by Satirik »

Forboding Angel wrote:http://www.springinfo.info/livenewsfeed.php/ << Whats wrong with that?
the lobby page is visible 2seconds or so by the users, so the scrolling is just useless, the aim is to show a lot of information with attractive screenshot so the player will just not login but check the news because something looked cool, if you show only one news they won't ever see the other ones
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Lobby news home page

Post by Jazcash »

Satirik wrote:
Forboding Angel wrote:http://www.springinfo.info/livenewsfeed.php/ << Whats wrong with that?
the lobby page is visible 2seconds or so by the users, so the scrolling is just useless, the aim is to show a lot of information with attractive screenshot so the player will just not login but check the news because something looked cool, if you show only one news they won't ever see the other ones
I think you're just being awkward now. Forb's mini-news feed looks great to me and I'd bother to read it upon lobby startup if I saw something new.

The real problem here is getting frequent and regular news updates so we don't have the same article lurking around for months.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Working on that Jaz.

Also, satirik, that sliding thing slides a new item in every 10 seconds. If you want a list of headlines, that's what rss feeds are for. Particularly, the rss feed that you had up at one point above the chat stuff. If I had it sliding in faster than 10 seconds, then you wouldn't have a chance of reading the excerpt of what is displayed. You'd get halfway through reading it and a new item would slide in.

Back to Jaz, I'm in the process of integrating guides with springinfo like we talked about. I ran into some trouble last night with figuring out a real nice way of displaying the content, but my brother is giving me a hand and I think you'll be pleased with the result.

Even neater, once this is implemented, mod authors and just random people will be able to contribute game play guides as easily as making a new news post on springinfo, so I think this has some fairly serious potential.

Like I told you in pm, you and your buddies should feel free to use it as a platform. Articles in the news category don't have to be about some new thing that came out. You could use it to preach on the evils of BA in DSD. As long as it's spring related and objective, sans objectionable content, I don't care. That was one of the original goals. The unfortunate thing is the fact that I'm not a particularly gifted writer, and i'm not convinced that if I get on a soapbox that anyone will happen to give 2 shits about what I have to say, be that as it may. lol
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Lobby news home page

Post by Jazcash »

Nice, looking forward to the integrated guides and I'll try and contribute some nice articles every now and then if I get some inspiration :-)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Lobby news home page

Post by Forboding Angel »

Ok, guides are now integrated and I'm working on transporting them over. Took a while to get the guides page to display like I wanted it to.

Edit: Guides have been transplanted.
Post Reply

Return to “Ingame Community”