Recent Topics

1 Feb 08, 2005 20:41    

Hi!

I've been trying to figure out how to include "content pages" aka, pages that I want to be part of my blog (and take advatage of b2's skinning) like, what many skins do with archives.

I'd have a link to "profile" on my sidebar, and clicking it would bring up my profile in the post area, but not as a backdated post (what I'm doing now).

How do I do this?

Thank you!

2 Feb 08, 2005 22:02

Ya hack a bit. First make your page (like maybe _about.php) and stick it in your skins/skinname folder.

<?php 
/**
 * This groovy file adds "about me" stuff
 *
 * @package evoskins
 * @subpackage custom
 */
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );
?>

<div class="bPost">
<h1>testing</h1>
<p>just some random crap here.</p>
<p>regular html stuff.</p>
<p>whatever.</p>
</div>

Now you hack your _main dot php file and tell it to disp that bad boy on command. Find something that looks like the beginning and add the rest:

		case 'arcdir':
			// this includes the archive directory if requested
			require( dirname(__FILE__).'/_arcdir.php');
			break;

		case 'about':
			// this includes the about file if requested
			require( dirname(__FILE__).'/_about.php');
			break;

Then down/over/off in your sidebar you make the link that tells the disp to do what you command:

<div class="bSideBar">

	<div class="bSideItem">
	<h3 class="sideItemTitle">Neato Including Pages Stuff</h3>
	<ul><li>
	<a href="<?php echo url_add_param( get_bloginfo('blogurl'), 'disp=about') ?>">about adding abouts</a>
	</li></ul>
	</div>

Notice in the _about.php I put in <div class="bPost">? You need that, or more accurately the div that does the deed for your particular skin. Look at your _main to see what it's called. Most use bPost but not all. If you want to get fancy-schmancy and include the fact that it's about you in the document title it's a bit deeper than this, but not much.

3 Feb 09, 2005 02:16

So, do you need to put that div in there??

4 Feb 12, 2005 00:29

;)
IS there a way to make the data from a PHP page show up inside the blog post area without having to first click on a link?

Say, for example, I want to post a gallery of images from a php generated page inside my domain. When I used your hack everything works beautifully, but I just don't want the extra step of making the user click on the link to view the picture table, I just want it to appear automatically.

Ideas?

Thanks in advance!
spin

5 Feb 15, 2005 20:11

Like the pictures as the index page? O_o

*didn't really understand what you're trying to do*

6 Feb 15, 2005 21:03

marston: you need *a* div identifying that your extra page is supposed to be treated like a post IF you want your extra page to use the same styles that your skin uses. I prefer it that way so that if I want to change something I only have to change one style sheet.

spineight: If you just want to add some content to the page, like an image or three, and still want the blog to be like the blog it's not that hard. You take the line for "require( my_extra_file)" and put it up near the top of your _main.php file. In most skins the posts loop is made before the sidebar, so near the top of the file you'll see "<div class="bPosts">" - plural. Add your "require" line after that but before any of the "if main->list blah_blah" stuff. That way your new page will be inside the posts loop but not inside each time it cycles looking for another post.

7 Feb 17, 2005 06:15

That is great info, I get it...
Though this was even more helpful, my original question was actually this:

How can I display the same "results" of the sidebar link in an individual blog entry WITHOUT having the reader click on the hyperlink first. (How can the viewer see a gallery of images, for example, by simply going to that day's blog entry, without having to click on another link).

I seems that the

<?php include('_gallery.php') ?>

statement would work, but that doesn't function within a blog post (or so I've read in the forums)

Is there a way to put your "require" function into my blog post on a post-by-post basis so that the gallery of images would display for that particular post only and would do so whenever anyone searched or permalinked to that individual blog entry?

I know and understand that I can make a list of links on my sidebar to do this, but it doesn't seem that that allows me to take advantage of the best feature of the blog software, which is the search feature, archiving, rss feed, etc.

As it is now, the gallery (galleries) can be accessed by using a series of links on the sidebar, but this also requires a lot of hard-coding rather than the flexibility of the blog system.

My ultimate goal is to have a content-management type feature that allows me to keep track of php include gallery pages without having to hard archive the pages elsewhere. If I could put an include statement into a daily blog entry, this would not only display the contents of a gallery, but would also allow me to archive the contents of a php include page "virtually" (so long as the original php page was hosted somewhere on the internet, the archived php include address would still function into the future without having to store the page myself on my server.

This idea stems from the fact that I have several servers on several domains and want to use the include feature on one site using the content that I have stored on another site. It would be very easy to be able to simply call out in a blog post for a particular page from the remote site to be included on any particular day.

thanks for any help or suggestions! ;)

[/b]

8 Mar 27, 2005 23:33

Hi EdB,

My question is, is it possible to include a forum in one of those content pages, so that the forum is now an integral part of the b2evo blog?

It would be a dream to be able to include a forum as part of the blog...

Someone must have integrated a forum into the blog I'm sure... please let me know

9 Jul 07, 2005 03:28

One way to find out - try. :P


Form is loading...