Log in

View Full Version : A couple modification questions.


Lord Angelus
12-27-2005, 08:01 PM
Both of my questions are related to custom vb-powered pages. (As a note, I've read the [How-To] for making them.)

My first question involves editing of the page. To do it you need to go and edit the custom template in the style manager to edit it's content. I'm looking for a way of making it possible to edit the content from right there on the page. A post, for instance, has a button to edit the content.

That's what I'm generally looking for. Or even an admincp entry with the options of "Edit [Custom Page Name]" or something, where it then takes you to a page with an editor(Sort of like what you would see when making a new announcement).

However, I have only a few basic ideas of what all is needed for such a thing(Phrases, etc), and no clue of the specifics. That's really where I need the help.

The second question is (I think) easier. I created a custom page outside of the forum directiory(My forum directory is at forum.site.com, and I've got the custom page at www.site.com) but it's looking for everything in the directory the file is in rather than in the forum's actual directory. The [How-To] says:

Using vBulletin-powered scripts outside vBulletin Directory

REPLACE

require_once('./global.php');

WITH

chdir('/home/site/public_html/forums');
require_once('./global.php');

Where "/home/site/public_html/forums" must be replaced with an actual system path to your forums.
Also, make sure you add the following code in the beginning of any relative links:

$vbulletin->options['homeurl']

And I've followed it accordingly, but I'm not quite coding-savi enough to figure out where the $vbulletin->options['homeurl'] ought to be going to make this work. Or even if the lack of it in the .php file or template is what's causing the custom page to not look in the right location for everything.

mykes
04-19-2006, 08:53 PM
I'd be interested in an answer to this issue, myself.

Following the exact instructions in the

Using vBulletin-powered scripts outside vBulletin Directory

section of the tutorial, I see the following problems:

1) the links in navbits are relative to the current directory.
That is, it says Forums > Test Page (looks right)
but the Forums link is to /index.php instead of to /forum/index.php
2) All the links are thus broken, including on the navbar
3) the stuff at the top of the page looks right, but the bottom table below the "all times are GMT" text and with the "Contact Us" "AdminCP" and so on liks is 100% instead of the same width as the navbits+userbits table above. (the bottom is way wider)