PDA


View Full Version : New update to replace Dynamic VB Content Module


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.

e-steki
10-26-2005, 10:32 PM
It looks nice but I can't fully understand what it does... Can you explain it please a bit more? :)

Rukas
10-27-2005, 03:55 AM
Is there anyway to make it pull by thread and not by post?

KW802
10-27-2005, 01:11 PM
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.How is that different from the built-in feature? :o

Rukas
10-27-2005, 10:38 PM
^^ Its quite different because it allows you to pull post content into CMPS pages one at a time. Imagine the news.php feature on CMPS but only pulling one news article at a time.

This is something I really need, but I need to pull the whole thread, or at least the first post from each thread with a comment option, but it needs to go by thread url and not by post becasue I want it to automatically happen for news. Right now I just have a custom style which sort of achieves what I want, but it could be better. Have a look so you know what I mean, and please, let me know how to do it with threads. Id even be whilling to paya little fee through PayPal if I could get this working.

http://www.streethop.com click any of the news articles on the right.

Rukas
11-07-2005, 06:25 AM
Bounce

Zachariah
11-13-2005, 05:59 PM
Great Idea !!! :D

attroll
05-15-2006, 11:35 PM
Well I am stumped now. I worked on this hack with Flarecde and we got it working. But now since I updated to VB 3.5.4 it does not pull in the navbar with it any longer. It pulls the header but not the navbar. Does anyone know how to resolve this issue?

attroll
05-16-2006, 12:07 AM
Well I am stumped now. I worked on this hack with Flarecde and we got it working. But now since I updated to VB 3.5.4 it does not pull in the navbar with it any longer. It pulls the header but not the navbar. Does anyone know how to resolve this issue?

I figured out how to add the navbar and included the direction in the first post.

attroll
05-16-2006, 08:14 PM
I found another issue with this hack. When used with CMPS it will not let you add any other modules to the page except Custom Content Page. You can put check marks in them but nothing else displays.