Recent Topics

pages

Started by on Feb 25, 2006 – Contents updated: Feb 25, 2006

Feb 25, 2006 09:37    

Dear Forum-members,

while making my first experiences with b2evolution which let met see really a lot great opportunities when it comes to blogging (it really has a nice featureset ;-)) I was wondering how to set up some static posts ...which arent categorized the usual way like 'ordinary' posts but would be presented as a somewhat 'static page' (while i actually dont want to have/create a hardcoded file which i cannot edit within the blog).

I came across this feature while testing other blogsoftware (there it was called pages I think) but didnt see it in b2evo (maybe its hidden somewhere though).
The pages can be edited like other posts but have the attribute 'static' in the db which makes them a little different. One could then make them visible through the template (using some function), generating some extra navigational structure.
e.g. About, Contact, Home ...

Thank you very much in advance
Rico

Mar 04, 2006 10:34

I totatally do not see what your getting at...

Why don't you just make individual blogs for Home, About, etc?

Mar 04, 2006 12:21

wordpress allows for the creation of "pages" in the backend, theyre managed just like a blogroll list, can be included in the sidebar, just like a blogroll or list of links, etc..

thats what hes "getting at"

Mar 04, 2006 12:44

Isn't that what the linkblog is... Posts in the sidebar...
Or am i still on the wrong track?

Mar 04, 2006 13:50

If I understand correctly, and I probably don't, I could envision a pretty neat plugin for something like this. First I'm thinking static pages and posts are different. You might want an "about me" page, and possibly one for each blogger. Or other stuff too - lotsa people put static pages linked in their blog for different stuff.

Anyway call it the StaticPages plugin. It'll be a sidebar plugin (or whatever they're called), but it won't include any text or a permalink because it *is* the permalink. A linkblog links to a URL, which you don't have when you first write a post, so it's different again. Anyway it'll go in the sidebar as a list of links to internal pages. It also needs to take some tricks from the template tab and the write tab so you can write an html page including all valid html (xhtml - whatever) tags and a bit of php and maybe some javascript (or whatever is cool to the validators eh?), and offer a preview button. Now you go to your StaticPages tab and create a new static page or edit an existing one. It's kinda like editing a post but more like editing a static page because it's not a post. It doesn't go in the database, it doesn't need a category, it is available across all blogs, it doesn't show up in any blog, and it can be a lot more complex than a post is allowed to be.

Poof. Instant static page. It stores as a php file (just in case the author uses any php in the file) and is saved in the root directory of the installation for happy urlness. It also, because it's very smart, has a bloglist in it so's the visitor can get back to the blog without having to understand the function of the 'back' button. Especially since the back button has only existed in browsers since like 1854.

Anyway I could see the value of such a thing. No need to create the file and upload it then tweak your skin to include it. Groovy eh?

Mar 12, 2006 04:03

EdB that is exactly what i have been looking for I just upgraded to 1.6 alpha and was hoping it might have a feature like that. Do you know of anyone who is working on a plugin for static pages?

Mar 24, 2006 16:26

This is something I have been looking for as well. I had a plain old website before I ever had a blog and now I would like the best of both worlds. I'd like my blog and static pages to have the same layout but on my static pages I of course would not want any comments or word count or other blog-specific info. I tried fooling with setting up separate blogs and categories but the one thing I could not get around was that b2evolution wants to treat these pages as blogs and therefore also wanted to archive them like blogs. One big advantage of this would be that I could use the b2evolution backend to admin my static pages as well as enter and edit my blogs.

Snorkasaurus.

May 01, 2006 00:45

Hi !
Well, I tried to do my statics pages with query strings.
I created 3 files : the _main.php (where are the "everything" of the blog), post.php (where are the tags for posting) and me.php (a static page with some informations about me).
On _main.php in the place that I wanted to my posts and my static page to apear I put this code:

<? if ($id=="") {$id="post";} include "$id.php"; ?>

And, in the side bar, I put a menu like this:

<table width="150px" border="0" cellspacing="1" cellpadding="2" valign="top"><tr>
<td class="head">Menu ?</td></tr>
<td class="main">
<div id="navcontainer">
<ul id="navlist">
<li><a href="http://www.bad-dream.net/ego/skins/custom/?id=post">Home</a></li>
<li><a href="http://www.bad-dream.net/ego/skins/custom/?id=me">About me</a></li>
<li><a href="http://www.bad-dream.net/ego/skins/custom/?id=domain">Domain</a></li>
<li><a href="http://www.bad-dream.net/ego/skins/custom/?id=joined">Joined</a></li>
<li><a href="http://www.bad-dream.net/ego/skins/custom/?id=creditos">Créditos</a></li>
</ul>
</div>
</td></table><br>

The first part went OK, but when somebody clicks on the menu, i.e in "About Me" it wont go.
I was almost there ;/
If you want to see the page ... http://www.bad-dream.net/ego

//Sorry if you don't understood me ... My English isn't that good. ;/

May 01, 2006 09:08

<a href="<?php echo $baseurl; ?>?id=post">Home</a>

;)

¥

May 01, 2006 09:47

¥åßßå wrote:

<a href="<?php echo $baseurl; ?>?id=post">Home</a>

;)

¥

<a href="<?=$baseurl?>?id=post">Home</a>

;)

May 01, 2006 10:32

Note: Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.

[url=http://uk2.php.net/manual/en/language.basic-syntax.php]Source[/url]

;)

¥

May 01, 2006 10:39

8| Well i'm still sticking with my short tags ;)
I'm pretty sure it's only a issue with php3 servers, but i'm always ready to be proven wrong :)

May 01, 2006 15:19

¥åßßå, thanks !
It worked ;D

May 01, 2006 15:20

There are four different pairs of opening and closing tags which can be used in php. Two of those, <?php ?> and <script language="php"> </script>, are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended.

although it's probably this that confused you :-

Note: If you are using PHP 3 you may also enable short tags via the short_tags() function. This is only available in PHP 3!

;)

¥

*edit*
MillaCrazy wrote:

¥åßßå, thanks !
It worked ;D

No problem ;)

¥

May 01, 2006 15:29

Thanks for that ¥.
Do you know what they mean by portable? As in different devices e.g. PCs and Laptops, different Server Technologies like Apache and IIS, or interferance with other languages?

May 02, 2006 00:56

The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file.

Portable (in this case) means between different configurations of php (irrelevant of os/platform).

¥

May 02, 2006 01:29

Yes but why would they make that optional, there must be a reason?


Form is loading...

CMS + forums – This forum is powered by b2evolution CMS, a complete engine for your website.