2 Attachment(s)
Newest Wiki pages link, in Forumhome, and in Wiki front page
Warning : please make backup before doing this, use it with your own risk
before, i asked about this in this thread https://www.vaultwiki.org/threads/5050/ , but its says its not available, so i decided to create it by my self, and i did it for Forumhome, here is how.
Newest Wiki pages link, in Forumhome
It is by using our vaultwiki feed, based on this hack : Latest Blog Feed in Postbit using Carp RSS http://www.vbulletin.org/forum/showthread.php?t=91781 , that mod is for showing rss feed in postbit, but we will showing vaultwiki rss feed in forumhome. So same methode, only different template, they are using postbit template, we are using forumhome template
1. download and install carp http://www.geckotribe.com/rss/carp/ in your site, make sure its working first by read they instruction, i use the free version its works too. Carp is RSS Parser, it will get vaultwiki rss link
2. go to admincp >> Plugins & Products >> Add New Plugin, with below content
Product : vbulletin
Hook Location : global_start
Title : Carp Configuration
Execution Order : 5
Plugin PHP Code :
Code:
if (in_array(THIS_SCRIPT, array('index', 'showwiki')))
{
require_once '/path/to/carp/carp.php'; // change the path to your carp.php path installation
CarpConf('cacheinterval',120);
/** You can omit the above two lines without a problem **/
CarpConf('cborder','');
CarpConf('poweredby','');
CarpConf('maxitems',10); // i set to showing 10 newest vaultwiki page links, you can showing to another number
CarpConf('iorder','link');
}
3. go to admincp >> Plugins & Products >> Add New Plugin, another one, with below content
Product : vbulletin
Hook Location : forumhome_start
Title : wiki rss feed for forumhome
Execution Order : 5
Plugin PHP Code :
Code:
ob_start();
CarpCacheShow("http://www.domain.com/forum/external.php?type=rss2&forumids=xxx"); // change the forum path with yours, and xxx to forumid that used for your vaultwiki
$wikirssfeedforforumhome = ob_get_contents();
ob_end_clean();
4. Put this code anywhere that you want in your forumhome template : $wikirssfeedforforumhome
i put it above 'What's Going On?' box, it will showing 10 newest vaultwiki pages in forum home
screenshot
https://www.vaultwiki.org/attachment...1&d=1310971270
5. Thats it, its simple enough
Newest Wiki pages link, in Wiki front page
Step 1 and 2 you dont need do again, if you already do it above, only need to do it once above
3. go to admincp >> Plugins & Products >> Add New Plugin, another one, with below content
Product : VaultWiki
Hook Location : vault_showthread_complete
Title : wiki rss feed for wiki home
Execution Order : 5
Plugin PHP Code :
Code:
if ($vault->error & VAULT_NOID) {
ob_start();
CarpCacheShow("http://www.domain.com/forum/external.php?type=rss2&forumids=xxx"); // change the forum path with yours, and xxx to forumid that used for your vaultwiki
$wikirssfeedforwikihome = ob_get_contents();
ob_end_clean();
}
4.
- Open vault_article_main template
- Search for :- add this code above it :
Code:
<if condition="$vault->error & VAULT_NOID">
$wikirssfeedforwikihome
</if>
- this will showing Newest wiki Pages in your vault wiki front page, screenshot
https://www.vaultwiki.org/attachment...1&d=1311216545
5. Thats it, its simple enough
this mod maybe working for vb4 too