Recent Topics

1 Dec 05, 2006 21:00    

Hi,

i had my first closer look at the skins today and i'm a little bit confused. I see lot's of complicated and highly integrated methods and object for displaying complex stuff.

Example: The stuff between <title>. Is there any reason to completely package the whole title into one function instead of building it through single elements inside the template?

The Same goes for permanent_link() function which delivers the complete html-code instead only fetching a url and a title to give the template designers the most flexible way.

Also i couldn't find a possibility to display excerpt and content devided by each other within the template. All i found was $Item->content(); which seems to deliver both.

Is there a Template-Tag overview anywhere?

I have to admit, that wordpress was not the only but the most used application by me during the last months. Probably i'm a bit spoiled by the comfort WP gives a template designer, but maybe that's the reason for thousands of templates which exist for WP.

Also did you ever think about using a real template engine for the display part and really devide design and code? Anything like smarty?

Please don't get me wrong. I don't just want to grump around. I really love some approaches that b2evolution goes and i really would love to use it - it hast great features that other blogging apps don't have but the template stuff confuses me a bit.

Probably just my fault?

2 Dec 06, 2006 00:15

it's funny that right at this time the devellopers are rethingking the skinning system and how to make it more novice user AND expert user orientated...

I'm pointing them to this post as we speak

3 Dec 06, 2006 00:29

nice to hear that - thanks.

i'm not too experienced but still could collect some experiences with wordpress and some smarty based software. If you need any assistance let me know.

4 Dec 06, 2006 02:12

I've been redoing the skinning system the day i went to b2evo. But then plugins came out. Now my plan is to move skins into plugins. In january you will see the Panels Plugin released hopefully. Look at my Skins 2.0 topic in the plugin dev forum. But main advantages is that you would be able to control how multiple skins look easily, you would be able to customize skins easily, and so will the user to your site, skin development would be a lot better imho.

But yeh, this is a solo effort, i think we all have our own crazy ideas for what to do with the skinning system.

5 Dec 07, 2006 01:44

lokari you might be interested in what http://doc.b2evolution.net/v-1-8/elementindex.html has to offer. Basically you see a function in the skin, so you look it up by first letter. You then scroll through until you find your function. You might find it twice, so you look at (for example) is it about comments or items? This will give you a list of all the params a function will accept.

For some of the functions like $Item->content() you can simply undo the function part and get the actual value. So like $Item->content might return the content in it's raw form. BTW content() is not a good example of this because the post content often has stuff in it that is not actual content. Like the comment that makes the More feature happen.

A really good trick is to sort through other skins and see if someone is doing something like what you want to do, then download it and clip out their technique.

6 Dec 09, 2006 00:43

Thanks Ed, for your help.

Oned more question: additonally to all my blogs i have one linkblox. is it possible not to show the postings in the linkblog within the normal posts so they e.g. don't show up in the "all" blog?

I'd just use them as normal linkrolls. Also i'd like to change item titles to be permalinks. This works great with $item->permanent_link('#title#') but then links don't work in the normal postloop.

7 Dec 09, 2006 00:49

1. The blog thing
Use if ( $blog != 0 ) { /* your linkblog */ }

2. The permanent link thing
Use get_permanent_link

8 Dec 09, 2006 01:16

Hi balupton,

sorry i think you got me wrong.

I just wanted to eliminate the linkblog entries from the normal posloop on the "all" blog. That's all. The permalink thing would be a problem if i'd like to keep them.

Unfortunately the if ($blog !=0) doesn't work here. I took 4 instead of 0 as 4 is the id of my linkblog!?

9 Dec 09, 2006 01:33

I think Topanga had a hack that kept linkblog entries out of the posts when viewing blog #1, but I'll be darned if I can find it again. It might have been for something different is why I can't find it?

That's been one of the biggest questions/complaints with b2evolution: stopping linkblog entries from showing up as a blog post.

I'm sorry, but I have no answer to that problem. The dev team has me included in their high level discussions regarding some future aspects of the code, so until they realize it's me and kick me out I'll throw this topic into the discussion.

10 Dec 09, 2006 01:43

unless i'm crazy, i don't see why what i said doesn't work....


if ( $blog != 0 )
{ require( dirname(__FILE__).'/_linkblog.php' ); }

That should do it fine.... Not display the linkblog for blog all that is.

11 Dec 09, 2006 02:00

Balupton, that is not the point.
It is not showing posts of the linkblog in the article section of the allblog...

I don't think lokari is talking about the sidebar...

My sollution EdB is referring too was 'not displaying' a certain category.
So in css I made a div with display:none
And a check before the article displaying if a certain categoy was met...

I don't have it anymore in my current skin..

12 Dec 09, 2006 02:29

That statement will always = true. The blog ID is always not 0.

Currently there is no known method to have any post in any blog not be part of the displayed posts when visiting blog #1. Well, almost no known methods. I came up with one, but it's cheap and simply doesn't come close to what lokari is asking for.

It would require hacking deep inside the bits that make $Item = $MainList->get_item() get the next item to be able to say that a specific category or list of categories (because posts are really attached to categories and not blogs) not be included in blog #1.

I've heard talk that it's a future thing. I've heard the same about the flying car...

13 Dec 09, 2006 02:36

EdB wrote:

It would require hacking deep inside the bits that make $Item = $MainList->get_item() get the next item to be able to say that a specific category or list of categories (because posts are really attached to categories and not blogs) not be included in blog #1.

EdB, my solution was cheap, but it requered NO hacking.
NONE
Only playing with CSS and _main.php...
we don't call that hacking, do we ? ;)

14 Dec 09, 2006 03:09

Um... I have a cheap hack that stops posts from showing up in the main content area when viewing blog #1. I remembered incorrectly that your method stops posts from showing up in the categories displayed in the sidebar when viewing blog #1.

Your solution is niether cheap nor a hack: it's a smart way to use css to affect content. This is obvious when someone visits your web then mine. First they see a website that is obviously style-smart, then they see ... mine. Heck I don't even have good hackage to show off anymore :(

15 Dec 09, 2006 03:28

it was something like this

<?php 
$the_blog_id = $Item->blog_ID;
$Item->Blog = $BlogCache->get_by_ID( $the_blog_id ); ?>
<div class="Blog<?php echo ($the_blog_id); ?>" >
the complete post and comments
</div>

and in your css you had something like

blog4 {display : none; }

16 Dec 09, 2006 11:04

Hi Topanga,

crazy hack ;) Kinda risky as google may penalize you with that.

But thanks anyway.

17 Dec 09, 2006 12:49

if( isset($MainList) ) while( $Item = $MainList->get_item() )
{ 

if( $Item->blog_ID == 5 )
	continue;

Change the blog id to match your linkblog.

This will end up with your "posts per page" count being wrong when a linkblog entry should have been shown

¥


Form is loading...