Loading...
 
Features / Usability

Features / Usability


put blog and forum on custom home page.

posts: 26

I want to make a custom home page
what I believe should be pretty simple.
that has one of my blogs (i mean either a list of the latest posts, or more deisrable just what would appear if I went to my blog page) and one of my forums (agian, the main of what would appear if were at that forum's page...).
I know how to set one or theother as my home page, but what I want is BOTH to show, not just one.

Please excuse me, but I am not understanding smarty syntax terribly well (I7ve looked at the basic intros to it already, but it seems like overkill for what I wantto do, and not answerign my question anyhow). I kind of get that I have to include some kind of tpl file, but I cant find a list of variables or which tpl file corresponds to what content. I am still sorting out hte difference between a module and a plugin (sounds the same to me...) (well, I get the differensce, but you see what I mean), and it seems like smarty is a general language, but there must be some tikiwiki specific stuff going on...am I making any sense? I am confused, guys...help?!! I've spent two hours looking for documentation on how to use templates for this and IMHO it is all pretty skimpy. "Yes, templates exist. They speak smartylanguage, which is used for building rockets to the moon, but can also be used to make toy boats. But we wont tell you how cause you have to learn how to build a rocket first.... "

To be clear, I don't think what I want is a module. I am usig na layout that has only a middle section...no right and left modules. so I want the contetn to appear in the middle.

Thanks for ayn clues.
:-)

posts: 289 United States

You can use modules via a plugin to appear on a Wiki page. That sounds like the simplest solution and requires no modification of Smarty templates, nor building rockets/boats to the moon.

The documentation on the Module Plugin and the built-in help when editing a Wiki page should give you most of the info you need (the rest is just adjusting to your liking).


posts: 26

thanks. that got me there. At the bottom of the module plugin documentation you linked to it explains how to do the same with templates, also. I prefer templates cause I can edit them offline via ftp.

But what I really want is to limit it to just one particular blog or forum. I tried what I believed should work,

{wiki}{literal}{/literal}{/wiki}

but it doesnt seem to be working...At least now I feel close...

posts: 289 United States

I'm not really familiar with templates, and I would argue strongly for not modifying them if you don't have to (mostly because of problems when upgrading Tiki and having to remember not to lose your changes), however the solution that works best is the solution that you're comfortable with.

I will say that with the modules you can certainly specify particular blogs/forums so I'm assuming you must be able to do the same with templates (it's all driven by ID's).

Good luck! Perhaps someone with more template experience can direct you further.

posts: 26

darkbee: thanks very much for the advice. I've tried to use the wiki route, but have run into a layout problem, but I can see your point, so I will see if I can get it to work...

However, the MODULE code for the template seems to be the exact same as for the wiki, so if I can get it to work in one it should (sic) work in the other.

On the other matter, I tried to use the blogId — the code I used got parsed in my post so you couldnt see it I bet. Here it is in a non parsed fashion, in case someone can tell me where I went wrong..

wikiliteralMODULE(module=>last_blog_posts, blogId=>2)//literal/wiki

(note that { and } have been replaced throughout by square parens. I hope this won't parse. (somehow it feels strange writing that :-) )

WHAT I REEEEEEALY want, though I think it might be a tad more difficult is to imitate the actual blog and forum pages themselves, i.e. not just publish a list of posts using the last_blog_posts and forums_last_posts modules, but to post the actual posts themselves...but I dont know which module (if any) this is. I havent found any documentation of the modules, so I am going by the names of the files. not the most efficient manenr.

posts: 289 United States

You should be able to use ~np~ tags (no processing) to include code in forum postings. The closing "no processing" tag should have a forward slash just like HTML tags.

In the above example did you also "close" the "Module" plugin?

{MODULE(module=>last_blog_posts,blogId=>2)}{MODULE}

You could also try:
{rss id=2}

(which assumes you've set up an RSS feed of your blog. I can't quite remember how the IDs for that work, whether they map to individual object IDs or not, you'll have to experiment with that one a little bit.)

As for the forums, I suppose you could try the RSS feed trick with that too.

It sounds like you really want to embed those features into one page so perhaps the templating is the way to go, in which case then the syntax would probably not be the same, since it's not quite the same thing. I'm not sure who's the template expert around here but I will defer to them whomever they are. :-)


posts: 26

OK!!! I got it.

First, using BLOGLIST instead of the plugin module gives me the blog just as I wanted it, as in:

{wiki}{literal}{BLOGLIST(Id=>2, Items=>15, simpleList=>n)}{BLOGLIST}{/literal}{/wiki}

I figured out the np trick independently but thanks for the tip. I am getting it piece by piece.

The same code seems to work in both wikis and tpl except the tpl code needs to be enclosed in wiki and literal tags.

The module tags are self closing and I think i deleted the backslash when putting in the square brackets. good catch. In my original they are there. cut and paste directly from the documetnation. BUT,
i did look at the doucmentation for modules, and figured out that I had an extra space before the => and had to be careful about blogID vs. blogid vs. blogId (hte middle seems to be correct). Similarly using forumId (not id as for blogs) for the forum I wanted seems to have worked. SO now both the plugin module and the bloglist module are working.

I cant seem to find a similar plugin to bloglist for forum posts, but in any event I am quite satisfied, so many many thanks again darkbee for pointing me in the right direction. One pat on the back to you. cool


posts: 26
and a toy boat...(but don't try to say it three times fast...)
posts: 289 United States

As long as it will get me to the moon! wink

I'm happy to help, and I actually learned something new; I didn't know about the bloglist plugin! I find it hard to keep up with all the plugins at the best of times. I don't think it's actually listed in the plugin help when you view a page, perhaps I should have looked at the plugin administration page. confused

Anyway, glad you're all set. Good luck and enjoy Tiki!

posts: 26

yes, but only the Darkbee side...
twisted

shine on...