attroll
10-25-2005, 02:09 AM
With a lot of help from Flarecde got this hack working for me. I am just pretty much writing up the directions for it. He deserves all the credit.
This module provides the ability to create content using VB posts as the content source. This means that is allows you to use pages created with CMPS 3.5 and displaying a specific post on the page as a module using the Custom Page Content module.
This works with vB 3.5.
How would I use it?
Pages may consist of any content you can fit into a VB post, including inline images as long as you have teh images turn on.
Installation
Installation is Simple. Download your showpost.php file from your vB 3.5 site. It is located in your forums directory. Now rename the file to what ever you want to called it. For purposes here we will rename it to article.php. Now open you article.php file with a text editor.
Find:
<?php
Bellow it add:
define('VBA_PORTAL', true);
define('VBA_PAGE', 'article');
Find:
eval('print_output("' . fetch_template('SHOWTHREAD_SHOWPOST') . '");');
Replace with:
eval('$HTML = "' . fetch_template('SHOWTHREAD_SHOWPOST') . '";');
print_portal_output($home, $HTML);
To add the navbar:
Find:
($hook = vBulletinHook::fetch_hook('showpost_complete')) ? eval($hook) : false;
Above that add:
// #############################################################################
// draw navbar
$navbits = array();
$parentlist = array_reverse(explode(',', substr($forum['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $vbulletin->forumcache["$forumID"]['title'];
$navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$forumID"] = $forumTitle;
}
$navbits[''] = $thread['title'];
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// #############################################################################
Now save the changes and upload article.php to you forums directory.
Now you will need to create a page in you CMPS under ADMIMCP.
Add a page
Select [PHP file]
Page title = What ever you want to call it
Page Identifier = article
Under PHP file option
Path to file = article.php
Now enable all the modules that you want to appear on this page. But make sure that your Custom Page Content is check marked.
Now save your page.
To get this page to display you will have to use this format.
www.youtsite/forums/article.php?p=42&postcount=1
To find the ‘p=42&postcount=1’ you just got to the specific post and open it in the window and this will be displayed in the address bar. But you have to be in that one specific post not in the thread.
Flarecde If I am forgetting something, leaving it out or if you can discribe it in a better way then please let me know so I can correct the documention in this post.
This module provides the ability to create content using VB posts as the content source. This means that is allows you to use pages created with CMPS 3.5 and displaying a specific post on the page as a module using the Custom Page Content module.
This works with vB 3.5.
How would I use it?
Pages may consist of any content you can fit into a VB post, including inline images as long as you have teh images turn on.
Installation
Installation is Simple. Download your showpost.php file from your vB 3.5 site. It is located in your forums directory. Now rename the file to what ever you want to called it. For purposes here we will rename it to article.php. Now open you article.php file with a text editor.
Find:
<?php
Bellow it add:
define('VBA_PORTAL', true);
define('VBA_PAGE', 'article');
Find:
eval('print_output("' . fetch_template('SHOWTHREAD_SHOWPOST') . '");');
Replace with:
eval('$HTML = "' . fetch_template('SHOWTHREAD_SHOWPOST') . '";');
print_portal_output($home, $HTML);
To add the navbar:
Find:
($hook = vBulletinHook::fetch_hook('showpost_complete')) ? eval($hook) : false;
Above that add:
// #############################################################################
// draw navbar
$navbits = array();
$parentlist = array_reverse(explode(',', substr($forum['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $vbulletin->forumcache["$forumID"]['title'];
$navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f=$forumID"] = $forumTitle;
}
$navbits[''] = $thread['title'];
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
// #############################################################################
Now save the changes and upload article.php to you forums directory.
Now you will need to create a page in you CMPS under ADMIMCP.
Add a page
Select [PHP file]
Page title = What ever you want to call it
Page Identifier = article
Under PHP file option
Path to file = article.php
Now enable all the modules that you want to appear on this page. But make sure that your Custom Page Content is check marked.
Now save your page.
To get this page to display you will have to use this format.
www.youtsite/forums/article.php?p=42&postcount=1
To find the ‘p=42&postcount=1’ you just got to the specific post and open it in the window and this will be displayed in the address bar. But you have to be in that one specific post not in the thread.
Flarecde If I am forgetting something, leaving it out or if you can discribe it in a better way then please let me know so I can correct the documention in this post.