Recent Topics

[4.0.5] multiple skins

Started by on Aug 17, 2011 – Contents updated: Aug 17, 2011

Aug 17, 2011 21:48    

My b2evolution Version:

New to the forum, only been using b2evo for a few weeks but struck a problem that I can't find solved in the manual or on the forum.

I have set up a blog (OK) with a skin customised to fit my website (OK) and I want to be able to access posts from elsewhere in my website, but using a different skin (not OK :( )

I understand that I need to provide a stub to call through and have copied the stub and renamed it. It accesses the same blog successfully, but always returns to the original stub - so, for example if my original stub was blog.php - I have made another stub blogcopy.php - when I use the url mysite/blogcopy.php it comes up with the page mysite/blog.php.

Now I think it is something to do with the baseurl, btu I can't figure our exactly what!! Is there anyone who can point me to the setting that I am missing (always assuming that what I am trying to do is possible....)

Many thanks

Aug 18, 2011 14:28

OK - found a workaround by crossposting everything to a 'parallel' blog and using the alternative skin on that - but I'm sure that isn't the most elegant solution, so if anyone comes up with the 'proper' way to do this I'd still be interested to hear it.

Aug 19, 2011 11:26

you want a different just for remote publishing ? whats the point

Aug 19, 2011 12:28

Thanks for the response,

I'm using b2evolution as a lightweight CMS for part of the site. I have therefore skinned it to fit in with the rest of the website including a lot of header/footer information. That all works fine.

What I was the trying to do was enable access to individual posts, but for them I required a different look - specifically losing a lot of the header/footer and also the sidebar so that what was seen was 'just' the post content as if it wasn't actually part of the blog at all (so no comment option either).

I was able to create the skin OK and that works fine in isolation - what I was unable to do was to set the blog up to use both skins, driven by the stub that was used. When I accessed the blog through the stub for the secons skin, it ended up back displaying the first skin.

Hope that explains what I am trying to do. As I said in the last post I now have cross-posted all the entries to two blogs and use one skin on each blog. That has the desired effect, but the cross-posting struck me as being a bit OTT.

Aug 20, 2011 06:58

See if this works for you


global $skin;
if( in_array$Item->IDarray(5,2,10,66) ) )

Aug 20, 2011 21:25

Thanks for that, it isn't quite what I wanted but it did give me an idea of how to solve it. I am now trying to pass a parameter on the url

e.g. myurl?skin_type=1

when I want to use the alternative skin. I then have this code


$skintype $_GET['skin_type'];
if ($skintype == '1'
$skin 'news1';
} else 
$skin 'news';

Unfortunately, this still doesn't work - although $skin gets correctly set by the parameter it doesn't successfully get passed on. I have tried just setting the skin to 'news1' and that is OK.

I'm not a php expert - what have I missed?

Aug 21, 2011 18:43

Add redir=no to query params

This is a better way to catch your param.
$skintype = param( 'skin_type', 'integer' );

Aug 22, 2011 17:12

excellent!! :D :D

The redir was precisely what was required - many thanks for all the good advice!

Form is loading...

powered by b2evolution free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.