How can I duplicate your vaultwiki.org homepage to use as my wiki homepage. I don't like the default homepage, but I want to have custom tabs like you do as well.
How can I duplicate your vaultwiki.org homepage to use as my wiki homepage. I don't like the default homepage, but I want to have custom tabs like you do as well.
You can use a custom home page by changing Settings > Options > VaultWiki: Server Settings > Replace Wiki Tab with URL
It's not so simple to add custom tabs. This requires programming knowledge to hook into our Tab API. This is the article that introduces it: http://www.vaultwiki.org/articles/38/
- lead developer for VaultWiki
do I have to create a php page to pull this off?
No, you can replace the home page with an article URL.
As for the tabs, you probably just need to create a plugin that checks against the thread ID. I'm sure you've noticed this number is well hidden, but you can get it from the URL for the tag editor.
- lead developer for VaultWiki
Could you post your front page code so we could work off of it as an example?
Pretty Please?
That would be helpful for a project I am planning. I want to integrate wiki articles with my forumdisplay.
Also. Is there a way to fully cache tabs, so that it loads nearly instantly? Or else: is there a way to speed the loading up?
This is the layout I'd like to make for my wiki front page. I'm not even a good programmer, but this is my vision. Anybody up for helping me create this? I'm more than willing to share and even pay money to have this become a reality.
Basic, but good looking layout. The Special links section has only one link that is specific to me (the Terms still to be defined) page, which is where we've identified article titles that still have to be worked on.
Our home page code, which just places the Overview, Features, Testimonials, and Screen shots as tabs of each other.
Plugin: vault_contentaction_start
Plugin: vault_contentaction_prepareCode:if ($this->thread['threadid'] == 1431) { $this->post['first_tab_text'] = 'overview'; } if ($this->thread['threadid'] == 1917) { $this->post['first_tab_text'] = 'features'; } if ($this->thread['threadid'] == 2345) { $this->post['first_tab_text'] = 'screenshots'; } if ($this->thread['threadid'] == 4268) { $this->post['first_tab_text'] = 'testimonials'; }
The first plugin defines the label for each tab.Code:if ($this->thread['threadid'] == 1431) { $content_actions['features'] = array( 'text' => 'features', 'href' => $this->registry->options['bburl'] . '/features/', 'nojs' => true, 'custom' => 'article' ); $content_actions['screenshots'] = array( 'text' => 'screenshots', 'href' => $this->registry->options['bburl'] . '/screenshots/', 'nojs' => true, 'custom' => 'article' ); $content_actions['testimonials'] = array( 'text' => 'testimonials', 'href' => $this->registry->options['bburl'] . '/testimonials/', 'nojs' => true, 'custom' => 'article' ); } if ($this->thread['threadid'] == 1917) { $content_actions['vaultwiki'] = array( 'text' => 'overview', 'href' => $this->registry->options['bburl'] . '/', 'nojs' => true, 'custom' => 'start' ); $content_actions['screenshots'] = array( 'text' => 'screenshots', 'href' => $this->registry->options['bburl'] . '/screenshots/', 'nojs' => true, 'custom' => 'article' ); $content_actions['testimonials'] = array( 'text' => 'testimonials', 'href' => $this->registry->options['bburl'] . '/testimonials/', 'nojs' => true, 'custom' => 'article' ); } if ($this->thread['threadid'] == 2345) { $content_actions['vaultwiki'] = array( 'text' => 'overview', 'href' => $this->registry->options['bburl'] . '/', 'nojs' => true, 'custom' => 'start' ); $content_actions['features'] = array( 'text' => 'features', 'href' => $this->registry->options['bburl'] . '/features/', 'nojs' => true, 'custom' => 'start' ); $content_actions['testimonials'] = array( 'text' => 'testimonials', 'href' => $this->registry->options['bburl'] . '/testimonials/', 'nojs' => true, 'custom' => 'article' ); } if ($this->thread['threadid'] == 4268) { $content_actions['vaultwiki'] = array( 'text' => 'overview', 'href' => $this->registry->options['bburl'] . '/', 'nojs' => true, 'custom' => 'start' ); $content_actions['features'] = array( 'text' => 'features', 'href' => $this->registry->options['bburl'] . '/features/', 'nojs' => true, 'custom' => 'start' ); $content_actions['screenshots'] = array( 'text' => 'screenshots', 'href' => $this->registry->options['bburl'] . '/screenshots/', 'nojs' => true, 'custom' => 'start' ); } if ( in_array($this->thread['threadid'], array(1431, 1917, 2345, 4268)) AND !is_member_of($this->registry->userinfo, 6) ) { foreach ($content_actions AS $key => $body) { if ( $key != 'vaultwiki' AND $key != 'article' AND $key != 'features' AND $key != 'screenshots' AND $key != 'testimonials' ) { unset($content_actions["$key"]); unset($this->post[$key . 'link']); } } }
The second plugin defines the order of the tabs, and makes sure only admins can see edit/history/etc for the front pages.
This is all somewhat inefficient in the amount of code you need to write, which we're hoping to improve upon in 3.1 with a quick-register and possibly an admin tool.
- lead developer for VaultWiki
thanks for that, although I'm still a bit stumped as to actually implement this. Do I have to create a thread in a wiki page, or do I have to create a php page and upload it to the server to pull this off?
Create the tabs as individual wiki pages. The plugins basically just make the pages link to each other, except that the links look like tabs.
- lead developer for VaultWiki
Then I'd make the homepage of the wiki the URL of the first Tab?
What did you think of the mockup I posted today? the only think I don't think I can do is the random article part. Is that possible?
No, you would have to write your own plugin that randomly selects an article, parses it, and inserts it into the page in a certain location. To prevent the random choice from becoming cached and static, I would recommend using a text replacement at vault_article_complete.
- lead developer for VaultWiki
Pegasus, I'm not a programmer. There are very few people who are. If you could elaborate further, that would help enormously.
That layout that I showed is what I want to have. I'm willing to pay for you to develop this for me. I am at my wits end here. The default wiki homepage isn't good enough for my users, and I need something better.
At the moment I am pretty bogged down working on 3.1 which needs to reach alpha status for late next week. Everything you've mentioned is supposed to be a premium feature in 3.1 anyway. In the mean time, I would recommend manually copying & pasting short previews for a couple featured articles, perhaps updated every week or so.
Instead of creating tabs, another temporary measure would be to create a floated block in your article that links to the appropriate sections. If you need to check permissions, you might be able to create the block as a template, and wrap each link with something like the following:
There will actually be no such thing as namespaces in 3.1. Instead they are being replaced with a much more flexible container called "Areas". As a result we also have to do an overhaul of the front-page design, so we'll be creating a more useful page to take its place. I'll try to start posting screen shots once we get an alpha site set up in the next month or so. Right now the new code is undeployed until the rewrite is complete - the removal of namespaces means we can't even launch a test until all the code is changed over.Code:[if="[var]user|usergroupid[/var]==6"]Only show to admins[/if] [if="[var]user|usergroupid[/var]==6 || [var]user|usergroupid[/var]==8"]Only show to admins or banned users[/if]
- lead developer for VaultWiki
Bookmarks