PDA

View Full Version : Modules on all pages


traderx
11-02-2004, 01:34 PM
Hello I would like to have some modules (left and right) on every page, including all error pages.

I look in the doc's and all that I could see was the option on ADDING the module.

My whole purpose is to have only the content from vbulletin to be shown in the center, but be able to have my modules on the left and right of every page.

Any help would be great
Coll

Brian
11-02-2004, 01:48 PM
http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6

Our Sponsors
 

traderx
11-02-2004, 03:24 PM
http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6

I followed the directions and it does work for the forumhome.... but when I click on a thread or forum it is gone.

Brian
11-02-2004, 05:59 PM
To start integrating other pages, you may skip steps 1-3 and just use the same page as you have for your forum home, assuming that you would like the same modules and settings. .

Our Sponsors
 

traderx
11-02-2004, 06:46 PM
To start integrating other pages, you may skip steps 1-3 and just use the same page as you have for your forum home, assuming that you would like the same modules and settings.


Thanks for the reply Brian... but I am a little confused....

Wouldn't I still need to do the step in #3 that would needed to be added in step #4

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

traderx
11-02-2004, 06:59 PM
After deleting the actions done is steps 1-3 it puts both (left and right) modules on the FORUMHOME page. But I was if there is some thing that I can add (or remove) in step #5 below

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

sorry for all the questions, this type of mod is completely foreign to me (templates)

Brian
11-02-2004, 07:01 PM
There's no reason to add additional pages unless you plan to have different modules/settings on each.

traderx
11-02-2004, 09:20 PM
There's no reason to add additional pages unless you plan to have different modules/settings on each.

But when I go to other pages in vBulletin (all) I would like to have the modules (both left and right) to show up, just like they are in my main site index and my forum index. I would like to see them when I click on all threads, members area, User CP, FAQ.... etc. but the only one so far that it shows up in is the main index and the forumhome page.

I plan on using ALL of my pages through vb, and want to use my main site menu in one of the modules so this why I need it to show up in all of my pages...

Sorry, but I think I must be missing something.

Brian
11-02-2004, 09:36 PM
Follow the instructions on that page.

traderx
11-02-2004, 10:05 PM
As you can see, the main part that you should be concerned with is 'FORUMHOME'.
When integrating other vBulletin pages or hacks with vBadvanced CMPS, you will
want to replace whatever template name is in the "print_output" part of the code.
Once you have done this, save and upload your file, and you're done.

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

Now of the areas the I want to have the module.... I will add them in the FORUMHOME area .... or add them in the $home, $HTML part.

And also an example so I can get it right

Brian
11-03-2004, 12:24 AM
You search the file for 'print_output'. You then take the template name that is inside that function and place it inside this code:
eval('$HTML = "' . fetch_template('TEMPLATE_NAME_GOES_HERE') . '";');
print_portal_output($home, $HTML);
You then replace the entire print_output code with the code above. It's the same thing you did with the FORUMHOME template, you just have to change the name depending on what file you're editing.

traderx
11-03-2004, 02:37 AM
ok just so I fully understand.... I do a complete search of all the files on my site that is using VB, for print_output
eval('print_output("' . fetch_template(''TEMPLATE_NAME_GOES_HERE'') . '");');
And replace with
eval('$HTML = "' . fetch_template('TEMPLATE_NAME_GOES_HERE') . '";');
print_portal_output($home, $HTML);


for example in calendar.php I have:
eval('print_output("' . fetch_template('CALENDAR') . '");');
I would replace it with
eval('$HTML = "' . fetch_template('CALENDAR') . '";');
print_portal_output($home, $HTML);

And I would continue to do so for all of those files that contain print_output?

traderx
11-03-2004, 12:14 PM
Now do I also add

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

to any other file... or is it just the /forums/index.php file.

Brian
11-03-2004, 01:01 PM
Yes and yes.

traderx
11-03-2004, 01:56 PM
Thanks Brian...

Now I have been adding them to some of my pages (calendar.php), but I noticed that if I have a center module active (search) it shows up on every page that I have changed.

Now my question is.... I want my main index.php (not www.site.com/forum/index.php) to have a center with content that will not be seen on any other pages but the main index. Would I create a new page and have that as my index page?

Or should I do steps #1-3 and include the
define('VBA_PORTAL', true);
define('VBA_PAGE', 'left');
define('VBA_PAGE', 'right');

instead of just
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

Brian
11-03-2004, 02:28 PM
Disable the module on your 'include' page.

traderx
11-03-2004, 02:35 PM
I did.... I just wondering now.... when I do make a Custom Page Content for my main site index.... will it now, also show up in my Calender.php in my forums as so far this is all that I have altered.

traderx
11-03-2004, 05:32 PM
Hello Brian.... all has been going pretty smooth on doing all the changes so far. But I ran into a problem when I apply it to newreply.php. When I click on the reply button I get

Sorry! This forum is not accepting new posts.

But I know that I can reply to it when I haven't added that stuff.

Any ideas?

EDIT
I also get the same results with I do it to newthread.php

I also get this error with I do it to poll.php (edit in 3 areas)

TraderX, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

It looks like it is ok untill you submit the poll then I get the msg above

traderx
11-04-2004, 01:11 PM
Bump

Brian
11-04-2004, 01:20 PM
There are some variables that clash on that page, so for right now you won't be able to integrate the CMPS with those pages.

traderx
11-04-2004, 03:18 PM
Wellll... bummer
I wondering if I can get around it by hard coding in the columns for right now would work... though I have no idea what I would need to add for what would be used at that time (the left and right columns).

Any time in the near future that this might be worked out?

traderx
11-04-2004, 07:34 PM
Ok... I have added them to the search area.... but how do I get them to show up if/when they go to 'New Posts' section of the search.....

I also did the register.php page... it shows up on every one (I haven't tried activation yet) but when you are finished it doesn't...

Thanks
Coll

traderx
11-05-2004, 02:42 AM
one other thing... is there a permission issue with using the vB Journal for vBulletin 3.0.3(v1.0.0) (http://www.vbulletin.org/forum/showthread.php?t=69538)?

Brian
11-05-2004, 11:22 AM
The new posts link should be covered when you changed the code in your search.php file...

As for the register, the last page is probably an error template. If you find and replace this code in your functions.php file it should do the trick.
eval('print_output("' . fetch_template($templatename) . '");');

traderx
11-05-2004, 01:06 PM
The new posts link should be covered when you changed the code in your search.php file...
It also help if you do have a new post.... I added a post and it worked just fine.... but don't if there isn't any new posts, and that is what I had the first time... sorry.



As for the register, the last page is probably an error template. If you find and replace this code in your functions.php file it should do the trick.
eval('print_output("' . fetch_template($templatename) . '");');


I had seen those in include/functions.php, but I wasn't sure yet if those needed to be changed, as most are in the root folder of the forums, AND I hadn't gotten that far down the list of items that needed to be changed without testing

when doing a search for 'print_output' there are 3 entries in include/functions.php... do I only what to change the one that has
eval('print_output("' . fetch_template($templatename) . '");');

In it?


Also... any thing about vB Journal for vBulletin from above post?

Coll

Brian
11-05-2004, 01:32 PM
function print_output($vartext, $sendheader = 1)
That one you do NOT want to do anything to as that is the function.

The one I pointed out will change any error pages and add the columns. The other one is for redirect messages, which I personally wouldn't recommend changing since the page only flashes for a second (assuming you even have redirect messages enabled) and would use more resources than it's really worth.

Oh, and as far as I know there are no problems with vB Journal, though I've never tested it.

traderx
11-05-2004, 04:59 PM
Oh, and as far as I know there are no problems with vB Journal, though I've never tested it.

Ok... then I might of done something wrong with my test install, as I am getting this error:

TraderX, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

I will double check my settings in my ACP to make sure.... then if needed post in that thread

traderx
11-05-2004, 05:50 PM
TraderX, you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


My bad.... forgot about the permissions, sorry

traderx
11-05-2004, 06:12 PM
The new posts link should be covered when you changed the code in your search.php file...

As for the register, the last page is probably an error template. If you find and replace this code in your functions.php file it should do the trick.
eval('print_output("' . fetch_template($templatename) . '");');


Ok... after I do these changes to includes/functions.php this is what I get for an error page for the 'New Post' results

Find:
eval('print_output("' . fetch_template($templatename) . '");');
Replace with:
eval('$HTML = "' . fetch_template('$templatename') . '";');
print_portal_output($home, $HTML);

And right after the opening <?php tag add:
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

I am getting what you see in the attachment... Basically the error msg tabe isn't there at all, AND the forum JUMP menu.... all is there is the navbar and header.

Any ideas

Brian
11-05-2004, 08:28 PM
eval('$HTML = "' . fetch_template($templatename) . '";');
print_portal_output($home, $HTML);

(Remove the ' marks from around $templatename)

traderx
11-06-2004, 12:50 AM
damn.... thank you.... I noticed on the others that I did but forgot on this one...Thanks

traderx
11-06-2004, 01:02 AM
well I did it and I am getting the messaged returned with no module... AND the measage what on the left side of the screen (see attachment)..... This is all the info that I have for it....


//eval('print_output("' . fetch_template($templatename) . '");');
eval('$HTML = "' . fetch_template($templatename) . '";');
print_portal_output($home, $HTML);
exit;

}

Do I have the exit; in the wrong place?

Coll

traderx
11-08-2004, 10:02 AM
bump

traderx
11-09-2004, 12:47 AM
Wondering... now sorry if this is a stupid question, but I have no clue about php, and most likely this has been thought of before but thought I would ask any ways... If I had added colums by editing the header and footer.... would it be possible to add modules in them? and if so, what would be needed to add from CMPS to make it happen....

traderx
11-11-2004, 05:50 AM
Wondering... now sorry if this is a stupid question, but I have no clue about php, and most likely this has been thought of before but thought I would ask any ways... If I had added colums by editing the header and footer.... would it be possible to add modules in them? and if so, what would be needed to add from CMPS to make it happen....

BUMP

Brian
11-11-2004, 11:14 AM
Not without a bit of work.