vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 09-01-2004, 12:12 AM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Default modules vs pages

I get the module, but as far as I can see, a Page is a way to display a template, or static content? I don't see how it can connect to a .php file to create dynamic content like a module can?

If I want to create a dynamic content page, I create a module and a new page where I set that module to display. Then I make a link to the new page (with no content) just to show the module linked to a .php file. Is this correct?

As on my website www.globware.com

The "freeware" section is a module and page, and when you click on a specific freeware program that is a different module and page (one module obviously is used to display all the different programs)

My static content page "Installation Files", is just a template (page only).

I'd just like to straighten this out before I go creating all these modules when they are just used on one page. It is nice that most of my content is in modules and I can place them and move them anywhere...

I gotta give my props to Brian for creating such a creative and simple yet powerful mod for vBulletin! It really should be a "package" vBulletin sells to people like myself who want to create an entire website using a template design, not just a forum...

Weird enough, I bought vBulletin just to add a support section for my website, but after I got into the mod community for this product, and finally felt comfortable adding CMPS (which wasn't hard, but my website didn't need a "portal" page), I was blown away by its design and flexability it allowed and decided to throw my entire asp built website out the window to replace it with CMPS.
  #2  
Old 09-01-2004, 12:35 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules vs pages

Thank you for all the compliments.
Instead of adding modules for all of these pages, it would probably be much easier to just wrap the CMPS around the php page instead. If you'll take a look at the user's manual, the last section includes instructions on how to integrate other vB pages with the CMPS.
  #3  
Old 09-02-2004, 01:16 AM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Default Re: modules vs pages

Cool, just figured it out. I'm glad I asked now, cause there is alittle bit of re-writting do so, but shouldn't take too long.

Thanks!

I breezed over that section in help cause I thought it was referring to the forum home, not custom pages unrelated to vBulletin.

It would cool if you added an example blank page in your help section for others interested in creating custom content from scratch using CMPS. (php file and template)

I grabbed the custom page example (php & template) from vBulletin.org, then added your code.

Looks so simple now!

Last edited by socals; 09-02-2004 at 01:19 AM.
  #4  
Old 09-02-2004, 01:30 AM
AlexSFBay AlexSFBay is offline
Junior Member
 
Join Date: Feb 2004
Posts: 11
Default Re: modules vs pages

Quote:
I grabbed the custom page example (php & template) from vBulletin.org, then added your code.
You should attach the blank template or link to the page on vBulletin.org you found it on so others can use it.
  #5  
Old 09-02-2004, 01:54 AM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Default Re: modules vs pages

I was trying to figure out how to make those code boxes!

Here is your basic, custom page & temple.

Original php & template taken from http://www.vbulletin.org/forum/showt...ht=custom+page

test.php

Code:
<?php 

define('VBA_PORTAL', true);
define('VBA_PAGE', 'TEST');

// ####################### SET PHP ENVIRONMENT ########################### 
error_reporting(E_ALL & ~E_NOTICE); 

// #################### DEFINE IMPORTANT CONSTANTS ####################### 
define('NO_REGISTER_GLOBALS', 1); 
define('THIS_SCRIPT', 'test'); // change this depending on your filename 

// ################### PRE-CACHE TEMPLATES AND DATA ###################### 
// get special phrase groups 
$phrasegroups = array( 

); 

// get special data templates from the datastore 
$specialtemplates = array( 
     
); 

// pre-cache templates used by all actions 
$globaltemplates = array( 
    'TEST', 
); 

// pre-cache templates used by specific actions 
$actiontemplates = array( 

); 

// ######################### REQUIRE BACK-END ############################ 

// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

chdir('D:\Webs\vbtest\web\forum');

require_once('./global.php'); 

// ####################################################################### 
// ######################## START MAIN SCRIPT ############################ 
// ####################################################################### 

eval('$HTML = "' . fetch_template('TEST') . '";');
print_portal_output($home, $HTML);

?>

TEST template

Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">Title</td>
</tr>
<tr>
	<td class="alt1">Text</td>
</tr>
</table>

<p>

$footer
</body>
</html>
This would also require a test page in vBa, but only if you want to remove modules from your page. Which you most likely want to do.

Also, make sure you change:

chdir('D:\Webs\vbtest\web\forum');

to your forum directory.

I put all of my custom pages in the home directory, root directory to the forum folder, so the chdir is necessary. I took this from the cmps index file.

Last edited by socals; 09-02-2004 at 01:58 AM.
  #6  
Old 09-02-2004, 01:58 AM
AlexSFBay AlexSFBay is offline
Junior Member
 
Join Date: Feb 2004
Posts: 11
Default Re: modules vs pages

That's great... thank you so much.
  #7  
Old 09-02-2004, 02:46 AM
socals socals is offline
Junior Member
 
Join Date: Aug 2004
Location: California
Posts: 21
Default Re: modules vs pages

I would also add the vb3 MicroStats hack by TECK at http://www.vbulletin.org/forum/showt...ght=microstats which, when logged in as admin you can see if there are any unchached templates which you forgot to define in the pre-cache template area. It lists the names of the templates for you!

Just got done converting my modules to standard .php files and it seems to be working fine. Thanks for the help, I would have created a mess of modules otherwise!
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use addidional Pages?? theMusicMan Troubleshooting / "How do I..." Questions 5 11-05-2004 04:49 AM
Modules displayed by user choice? Delirion Add-On Modules & Modifications 12 09-21-2004 04:03 PM
Add pages rstan Troubleshooting / "How do I..." Questions 3 06-15-2004 11:32 AM
Adding new pages, modules, templates for dummies. Pro Troubleshooting / "How do I..." Questions 1 05-21-2004 09:44 PM


All times are GMT -4. The time now is 01:25 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.